-
Notifications
You must be signed in to change notification settings - Fork 3
/
nmda.mod
71 lines (61 loc) · 1.16 KB
/
nmda.mod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
: from Durstewitz & Gabriel (2006), Cerebral Cortex
TITLE nmda synapse
NEURON {
POINT_PROCESS NMDA
NONSPECIFIC_CURRENT i
RANGE g,a,b,gNMDAmax,tauD,tauF,util,tcon,tcoff,enmda
}
UNITS {
(uS) = (microsiemens)
(nA) = (nanoamp)
(mV) = (millivolt)
}
PARAMETER {
tcon = 2.3 (ms)
tcoff = 95.0 (ms)
enmda = 0 (mV)
gNMDAmax = 0 (uS)
tauD = 800 (ms)
tauF = 800 (ms)
util= .3
}
ASSIGNED {
v (mV)
i (nA)
g (uS)
factor
}
INITIAL {
a=0
b=0
factor=tcon*tcoff/(tcoff-tcon)
}
STATE {
a
b
}
BREAKPOINT {
LOCAL s
SOLVE states METHOD derivimplicit
s = 1.50265/(1+0.33*exp(-0.0625*v))
g = b-a
i = gNMDAmax*g*s*(v-enmda)
}
DERIVATIVE states {
a' = -a/tcon
b' = -b/tcoff
}
NET_RECEIVE(wgt,R,u,tlast (ms),nspike) {
LOCAL x
:printf("entry flag=%g t=%g\n", flag, tlast)
if (nspike==0) { R=1 u=util }
else {
if (tauF>0) { u=util+(1-util)*u*exp(-(t-tlast)/tauF) }
if (tauD>0) { R=1+(R*(1-u)-1)*exp(-(t-tlast)/tauD) }
}
x=wgt*factor*R*u
state_discontinuity(a,a+x)
state_discontinuity(b,b+x)
tlast=t
nspike= nspike+1
}