-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathfi.mod
More file actions
120 lines (103 loc) · 2.42 KB
/
fi.mod
File metadata and controls
120 lines (103 loc) · 2.42 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
: copied by Hines from Exp2syn and added spike dependent plasticity
COMMENT
Two state kinetic scheme synapse described by rise time tau1,
and decay time constant tau2. The normalized peak condunductance is 1.
Decay time MUST be greater than rise time.
The solution of A->G->bath with rate constants 1/tau1 and 1/tau2 is
A = a*exp(-t/tau1) and
G = a*tau2/(tau2-tau1)*(-exp(-t/tau1) + exp(-t/tau2))
where tau1 < tau2
If tau2-tau1 -> 0 then we have a alphasynapse.
and if tau1 -> 0 then we have just single exponential decay.
The factor is evaluated in the
initial block such that an event of weight 1 generates a
peak conductance of 1.
Because the solution is a sum of exponentials, the
coupled equations can be solved as a pair of independent equations
by the more efficient cnexp method.
ENDCOMMENT
NEURON {
POINT_PROCESS FastInhib
RANGE tau1, tau2, e, i
NONSPECIFIC_CURRENT i
RANGE gmax
RANGE x, mgid, ggid, srcgid
GLOBAL ltdinvl, ltpinvl, sighalf, sigslope
RANGE g
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(uS) = (microsiemens)
}
PARAMETER {
tau1= 1 (ms) <1e-9,1e9> : was 1
tau2 = 200 (ms) <1e-9,1e9> : was 200
gmax = .003 (uS)
e = -80 (mV)
ltdinvl = 250 (ms) : longer intervals, no change
ltpinvl = 33.33 (ms) : shorter interval, LTP
sighalf = 25 (1)
sigslope = 3 (1)
x = 0 (um) : cartesian synapse location
mgid = -1 : associated mitral gid
ggid = -1 : associated granule gid
srcgid = -1 : the gid of the granule detector
}
ASSIGNED {
v (mV)
i (nA)
g (uS)
factor
w (uS)
total (uS)
}
STATE {
A
B
}
INITIAL {
LOCAL tp
if (tau1/tau2 > .9999) {
tau1 = .9999*tau2
}
A = 0
B = 0
tp = (tau1*tau2)/(tau2 - tau1) * log(tau2/tau1)
factor = -exp(-tp/tau1) + exp(-tp/tau2)
factor = 1/factor
}
BREAKPOINT {
SOLVE state METHOD cnexp
g = (B - A)*gmax
i = g*(v - e)
}
DERIVATIVE state {
A' = -A/tau1
B' = -B/tau2
}
FUNCTION plast(step(1))(1) {
plast = 1 - 1/(1 + exp((step - sighalf)/sigslope))
}
FUNCTION norm_weight_to_sig(w) {
norm_weight_to_sig = floor(0.4999 + log(((-1/(w-1))-1)/exp(-sighalf/sigslope))*sigslope)
}
NET_RECEIVE(weight, s, w, tlast (ms)) {
INITIAL {
s = 0
w = 0
tlast = -1e9(ms)
}
if (t - tlast < ltpinvl) { : LTP
s = s + 1
if (s > 2*sighalf) { s = 2*sighalf }
}else if (t - tlast > ltdinvl) { : no change
}else{ : LTD
s = s - 1
if (s < 0) { s = 0 }
}
tlast = t
w = weight : turn plasticity off, to turn on use weight*plast(s)
A = A + w*factor
B = B + w*factor
}