/
wb_cond_exp_neuron.nestml
124 lines (95 loc) · 4.53 KB
/
wb_cond_exp_neuron.nestml
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
121
122
123
124
"""
wb_cond_exp - Wang-Buzsaki model
################################
Description
+++++++++++
wb_cond_exp is an implementation of a modified Hodkin-Huxley model.
(1) Post-synaptic currents: Incoming spike events induce a post-synaptic change
of conductance modeled by an exponential function.
(2) Spike Detection: Spike detection is done by a combined threshold-and-local-
maximum search: if there is a local maximum above a certain threshold of
the membrane potential, it is considered a spike.
References
++++++++++
.. [1] Wang, X.J. and Buzsaki, G., (1996) Gamma oscillation by synaptic
inhibition in a hippocampal interneuronal network model. Journal of
neuroscience, 16(20), pp.6402-6413.
See Also
++++++++
hh_cond_exp_traub, wb_cond_multisyn
"""
model wb_cond_exp_neuron:
state:
V_m mV = E_L # Membrane potential
V_m_old mV = E_L # Membrane potential at previous timestep for threshold check
refr_t ms = 0 ms # Refractory period timer
is_refractory boolean = false
Inact_h real = alpha_h_init / ( alpha_h_init + beta_h_init )
Act_n real = alpha_n_init / ( alpha_n_init + beta_n_init )
equations:
# synapses: exponential conductance
kernel g_inh = exp(-t / tau_syn_inh)
kernel g_exc = exp(-t / tau_syn_exc)
recordable inline I_syn_exc pA = convolve(g_exc, exc_spikes) * nS * ( V_m - E_exc )
recordable inline I_syn_inh pA = convolve(g_inh, inh_spikes) * nS * ( V_m - E_inh )
inline I_Na pA = g_Na * _subexpr(V_m) * Inact_h * ( V_m - E_Na )
inline I_K pA = g_K * Act_n**4 * ( V_m - E_K )
inline I_L pA = g_L * ( V_m - E_L )
V_m' =( -( I_Na + I_K + I_L ) + I_e + I_stim + I_syn_exc - I_syn_inh ) / C_m
Act_n' = ( alpha_n(V_m) * ( 1 - Act_n ) - beta_n(V_m) * Act_n ) # n-variable
Inact_h' = ( alpha_h(V_m) * ( 1 - Inact_h ) - beta_h(V_m) * Inact_h ) # h-variable
parameters:
C_m pF = 100 pF # Membrane capacitance
g_Na nS = 3500 nS # Sodium peak conductance
g_K nS = 900 nS # Potassium peak conductance
g_L nS = 10 nS # Leak conductance
E_Na mV = 55 mV # Sodium reversal potential
E_K mV = -90 mV # Potassium reversal potential
E_L mV = -65 mV # Leak reversal potential (aka resting potential)
V_Tr mV = -55 mV # Spike threshold
refr_T ms = 2 ms # Duration of refractory period
tau_syn_exc ms = 0.2 ms # Rise time of the excitatory synaptic alpha function
tau_syn_inh ms = 10 ms # Rise time of the inhibitory synaptic alpha function
E_exc mV = 0 mV # Excitatory synaptic reversal potential
E_inh mV = -75 mV # Inhibitory synaptic reversal potential
# constant external input current
I_e pA = 0 pA
internals:
alpha_n_init 1/ms = -0.05/(ms*mV) * (E_L + 34.0 mV) / (exp(-0.1 * (E_L + 34.0 mV)) - 1.0)
beta_n_init 1/ms = 0.625/ms * exp(-(E_L + 44.0 mV) / 80.0 mV)
alpha_h_init 1/ms = 0.35/ms * exp(-(E_L + 58.0 mV) / 20.0 mV)
beta_h_init 1/ms = 5.0 / (exp(-0.1 / mV * (E_L + 28.0 mV)) + 1.0) /ms
input:
exc_spikes <- excitatory spike
inh_spikes <- inhibitory spike
I_stim pA <- continuous
output:
spike
update:
if is_refractory:
refr_t -= resolution()
V_m_old = V_m
integrate_odes()
onCondition(not is_refractory and V_m > 0 mV and V_m_old > V_m):
# threshold crossing and maximum
refr_t = refr_T # start of the refractory period
is_refractory = true
emit_spike()
onCondition(is_refractory and refr_t <= resolution() / 2):
# end of refractory period
refr_t = 0 ms
is_refractory = false
function _subexpr(V_m mV) real:
return alpha_m(V_m)**3 / ( alpha_m(V_m) + beta_m(V_m) )**3
function alpha_m(V_m mV) 1/ms:
return 0.1/(ms*mV) * (V_m + 35.0 mV) / (1.0 - exp(-0.1 mV * (V_m + 35.0 mV)))
function beta_m(V_m mV) 1/ms:
return 4.0/(ms) * exp(-(V_m + 60.0 mV) / 18.0 mV)
function alpha_n(V_m mV) 1/ms:
return -0.05/(ms*mV) * (V_m + 34.0 mV) / (exp(-0.1 * (V_m + 34.0 mV)) - 1.0)
function beta_n(V_m mV) 1/ms:
return 0.625/ms * exp(-(V_m + 44.0 mV) / 80.0 mV)
function alpha_h(V_m mV) 1/ms:
return 0.35/ms * exp(-(V_m + 58.0 mV) / 20.0 mV)
function beta_h(V_m mV) 1/ms:
return 5.0 / (exp(-0.1 / mV * (V_m + 28.0 mV)) + 1.0) /ms