-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsynampa.mod
More file actions
55 lines (48 loc) · 1.03 KB
/
synampa.mod
File metadata and controls
55 lines (48 loc) · 1.03 KB
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
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
ENDCOMMENT
INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}
NEURON {
POINT_PROCESS synampa
RANGE onset, tau0, tau1, gmax, e, i
NONSPECIFIC_CURRENT i
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(umho) = (micromho)
}
PARAMETER {
onset=0 (ms)
tau0=0.2 (ms)
tau1=3.0 (ms)
gmax=0 (umho)
e=0 (mV)
v (mV)
}
ASSIGNED { i (nA) g (umho) }
LOCAL a[2]
LOCAL tpeak
LOCAL adjust
LOCAL amp
BREAKPOINT {
g = cond(t)
i = g*(v - e)
}
FUNCTION cond(x) {
tpeak=tau0*tau1*log(tau0/tau1)/(tau0-tau1)
adjust=1/((1-exp(-tpeak/tau0))-(1-exp(-tpeak/tau1)))
amp=adjust*gmax
if (x < onset) {
cond = 0
}else{
a[0]=1-exp(-(x-onset)/tau0)
a[1]=1-exp(-(x-onset)/tau1)
cond = amp*(a[0]-a[1])
}
}