-
Notifications
You must be signed in to change notification settings - Fork 1
/
basket_syn.mod
75 lines (67 loc) · 1.22 KB
/
basket_syn.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
72
73
74
75
: Suffix syn2
COMMENT
synaptic current with exponential rise and decay conductance defined by
i = g * (v - e) i(nanoamps), g(micromhos);
where
g = 0 for t < onset and
g=amp*((1-exp(-(t-onset)/tau0))-(1-exp(-(t-onset)/tau1)))
for t > onset
plus a little bulletproofing and stuff to make it run a mite faster
and make it compatible with cvode
ENDCOMMENT
NEURON {
POINT_PROCESS syn2
RANGE onset, tau0, tau1, gmax, e, i
NONSPECIFIC_CURRENT i
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(uS) = (microsiemens)
}
PARAMETER {
onset=0 (ms)
tau0=0.5 (ms) <1e-3,1e6>
tau1=5.0 (ms) <1e-3,1e6>
gmax=0 (uS) <0,1e9>
e=0 (mV)
}
ASSIGNED {
v (mV)
i (nA)
g (uS)
factor
a0
a1
}
INITIAL { LOCAL tpeak
if (tau0/tau1 > 0.9999) {
tau0 = 0.9999*tau1
}
tpeak=tau0*tau1*log(tau0/tau1)/(tau0-tau1)
factor=1/((1-exp(-tpeak/tau0))-(1-exp(-tpeak/tau1)))
}
BREAKPOINT {
if (gmax) { at_time(onset) }
g = gmax*cond(t-onset)
i = g*(v - e)
}
FUNCTION cond(x (ms)) { LOCAL temp
if (x < 0) {
cond = 0
}else{
temp = x/tau0
if (temp > 10) {
a0 = 1
} else {
a0=1-exp(-temp)
}
temp = x/tau1
if (temp > 10) {
a1 = 1
} else {
a1=1-exp(-temp)
}
cond = factor*(a0-a1)
}
}