-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlin_exp2syn.mod
More file actions
79 lines (63 loc) · 1.6 KB
/
lin_exp2syn.mod
File metadata and controls
79 lines (63 loc) · 1.6 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
TITLE Shared synaptic conductance with per-stream linear summation
COMMENT
Milstein, 2018
Rise and decay kinetics are shared across all presynaptic sources. Conductances are linearly summed across sources, and
updated at every time step. Each source stores an independent weight multiplier and a unitary peak conductance (g_unit).
Each stream will sum events linearly without saturation during repetitive activation.
Implementation informed by:
The NEURON Book: Chapter 10, N.T. Carnevale and M.L. Hines, 2004
ENDCOMMENT
NEURON {
POINT_PROCESS LinExp2Syn
RANGE g, i, tau_rise, tau_decay, e
NONSPECIFIC_CURRENT i
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(umho) = (micromho)
(mM) = (milli/liter)
}
PARAMETER {
tau_rise = 1. (ms) : time constant of exponential rise
tau_decay = 5. (ms) : time constant of exponential decay
e = 0. (mV) : reversal potential
}
ASSIGNED {
v (mV) : postsynaptic voltage
i (nA) : current = g*(v - Erev)
g (umho) : conductance
factor : normalization factor
}
STATE {
A (uS)
B (uS)
}
INITIAL {
LOCAL tp
if (tau_rise/tau_decay > 0.9999) {
tau_rise = 0.9999*tau_decay
}
if (tau_rise/tau_decay < 1e-9) {
tau_rise = tau_decay*1e-9
}
A = 0
B = 0
tp = (tau_rise*tau_decay)/(tau_decay - tau_rise) * log(tau_decay/tau_rise)
factor = -exp(-tp/tau_rise) + exp(-tp/tau_decay)
factor = 1/factor
}
BREAKPOINT {
SOLVE state METHOD cnexp
g = B - A
i = g * (v - e)
}
DERIVATIVE state {
A' = -A/tau_rise
B' = -B/tau_decay
}
NET_RECEIVE(weight, g_unit (umho)) {
INITIAL {}
A = A + weight * g_unit * factor
B = B + weight* g_unit * factor
}