Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial netpyne-only basal-ganglia notebook #4

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
298 changes: 298 additions & 0 deletions examples/tvb_netpyne/notebooks/NetPyNE_basal_ganglia.ipynb

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions examples/tvb_netpyne/notebooks/mod/Izhi2003c.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
NEURON {
POINT_PROCESS Izhi2003c
RANGE a, b, c, d, C, Ie, n0, n1, n2, Vr, uInit, vInit, thresh, cellid
NONSPECIFIC_CURRENT i
}

UNITS {
(mV) = (millivolt)
(nA) = (nanoamp)
}

PARAMETER {
a = 0.02 (/ms)
b = 0.2 (/ms)
c = -65 (mV) : reset potential after a spike
d = 2 (mV/ms)
C = 1
Ie = 0 (nA)
n0
n1
n2
mu = 0
Eampa = 0
Egaba = -90
Vr = 0
tau = 10
refrac = 10
uInit = -18.55
vInit = -70
thresh = 30 (mV) : spike threshold
cellid = -1 : A parameter for storing the cell ID, if required (useful for diagnostic information)
}

ASSIGNED {
i (nA)
refracEnds
}

INITIAL {
V = vInit
u = uInit
gampa = 0
ggaba = 0
refracEnds = -1e10
net_send(0,1) : to start watching for threshold
}

STATE {
u (mV/ms)
V
gampa
ggaba
}

BREAKPOINT {
SOLVE states METHOD derivimplicit
}

LOCAL clamp
DERIVATIVE states {
gampa' = -gampa/tau
ggaba' = -ggaba/tau

if (t < refracEnds) {
clamp = 0 : clamp u and V at reset values during refractory period (i.e. keep derivative at zero)
} else {
clamp = 1
}
u' = clamp * (a * (b * (V - Vr) - u))
V' = clamp * (n2 * V * V + n1 * V + n0 - u / C -gampa * (V - Eampa) - ggaba * (V - Egaba) + Ie + mu)
}

NET_RECEIVE (w) {
if (flag == 1) {
WATCH (V > thresh) 2
} else if (flag == 2) { : spike fired
net_event(t)
V = c
u = u + d
refracEnds = t + refrac
} else { : spike received
: by convention here, negative weights are inhibitory
if (w > 0) {
gampa = gampa + w
} else {
ggaba = ggaba - w
}
}
}