-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathProbGABAAB_EMS_GEPH_g.mod
330 lines (273 loc) · 10.7 KB
/
ProbGABAAB_EMS_GEPH_g.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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
COMMENT
/**
* @file ProbGABAAB.mod
* @brief
* @author king, muller
* @date 2011-08-17
* @remark Copyright © BBP/EPFL 2005-2011; All rights reserved. Do not distribute without further notice.
*/
ENDCOMMENT
TITLE GABAAB receptor with presynaptic short-term plasticity
COMMENT
GABAA receptor conductance using a dual-exponential profile
presynaptic short-term plasticity based on Fuhrmann et al, 2002
Implemented by Srikanth Ramaswamy, Blue Brain Project, March 2009
_EMS (Eilif Michael Srikanth)
Modification of ProbGABAA: 2-State model by Eilif Muller, Michael Reimann, Srikanth Ramaswamy, Blue Brain Project, August 2011
This new model was motivated by the following constraints:
1) No consumption on failure.
2) No release just after release until recovery.
3) Same ensemble averaged trace as deterministic/canonical Tsodyks-Markram
using same parameters determined from experiment.
4) Same quantal size as present production probabilistic model.
To satisfy these constaints, the synapse is implemented as a
uni-vesicular (generalization to multi-vesicular should be
straight-forward) 2-state Markov process. The states are
{1=recovered, 0=unrecovered}.
For a pre-synaptic spike or external spontaneous release trigger
event, the synapse will only release if it is in the recovered state,
and with probability u (which follows facilitation dynamics). If it
releases, it will transition to the unrecovered state. Recovery is as
a Poisson process with rate 1/Dep.
This model satisys all of (1)-(4).
-integration scheme modified to make it usable with variable time step
-added preliminary equations to take into account the effect of Gephyrin and Neuroligin2 on GABAA.
M. Migliore and Carmen Lupascu Nov.2014
ENDCOMMENT
NEURON {
THREADSAFE
POINT_PROCESS ProbGABAAB_EMS_GEPH_mm
RANGE tau_r_GABAA, tau_d_GABAA, tau_r_GABAB, tau_d_GABAB
RANGE Use, u, Dep, Fac, u0, Rstate, tsyn_fac, u
RANGE i,i_GABAA, i_GABAB, g_GABAA, g_GABAB, g, e_GABAA, e_GABAB, GABAB_ratio
RANGE A_GABAA_step, B_GABAA_step, A_GABAB_step, B_GABAB_step
RANGE alphaf, alphab, beta, nhalf, phi, geph, Ry, N, h, h1, c1
NONSPECIFIC_CURRENT i
POINTER rng
RANGE synapseID, verboseLevel, npeak
}
PARAMETER {
tau_r_GABAA = 0.2 (ms) : dual-exponential conductance profile
:tau_d_GABAA = 8 (ms) : IMPORTANT: tau_r < tau_d
tau_d_GABAA = 4 (ms) : IMPORTANT: tau_r < tau_d
tau_r_GABAB = 3.5 (ms) : dual-exponential conductance profile :Placeholder value from hippocampal recordings SR
tau_d_GABAB = 260.9 (ms) : IMPORTANT: tau_r < tau_d :Placeholder value from hippocampal recordings
Use = 1.0 (1) : Utilization of synaptic efficacy (just initial values! Use, Dep and Fac are overwritten by BlueBuilder assigned values)
Dep = 100 (ms) : relaxation time constant from depression
Fac = 10 (ms) : relaxation time constant from facilitation
e_GABAA = -80 (mV) : GABAA reversal potential
e_GABAB = -97 (mV) : GABAB reversal potential
:gmax = .001 (uS) : weight conversion factor (from nS to uS)
gmax = 1 (uS) : weight conversion factor (from nS to uS)
u0 = 0 :initial value of u, which is the running value of release probability
alphaf = 1
alphab =0.1
beta=1
nhalf=0.5
phi=0.25
geph =1
c1 = 1
h = 0.0001
h1 = 0.0005
synapseID = 0
verboseLevel = 0
GABAB_ratio = 0 (1) : The ratio of GABAB to GABAA
}
COMMENT
The Verbatim block is needed to generate random nos. from a uniform distribution between 0 and 1
for comparison with Pr to decide whether to activate the synapse or not
ENDCOMMENT
VERBATIM
#include<stdlib.h>
#include<stdio.h>
#include<math.h>
#ifndef NRN_VERSION_GTEQ_8_2_0
double nrn_random_pick(void* r);
void* nrn_random_arg(int argpos);
#define RANDCAST
#else
#define RANDCAST (Rand*)
#endif
ENDVERBATIM
ASSIGNED {
v (mV)
i (nA)
i_GABAA (nA)
i_GABAB (nA)
g_GABAA (uS)
g_GABAB (uS)
A_GABAA_step
B_GABAA_step
A_GABAB_step
B_GABAB_step
g (uS)
factor_GABAA
factor_GABAB
rng
: Recording these three, you can observe full state of model
: tsyn_fac gives you presynaptic times, Rstate gives you
: state transitions,
: u gives you the "release probability" at transitions
: (attention: u is event based based, so only valid at incoming events)
Rstate (1) : recovered state {0=unrecovered, 1=recovered}
tsyn_fac (ms) : the time of the last spike
u (1) : running release probability
npeak
}
STATE {
A_GABAA : GABAA state variable to construct the dual-exponential profile - decays with conductance tau_r_GABAA
B_GABAA : GABAA state variable to construct the dual-exponential profile - decays with conductance tau_d_GABAA
A_GABAB : GABAB state variable to construct the dual-exponential profile - decays with conductance tau_r_GABAB
B_GABAB : GABAB state variable to construct the dual-exponential profile - decays with conductance tau_d_GABAB
N
nlg2
Ry
}
INITIAL{
LOCAL tp_GABAA, tp_GABAB
Rstate=1
tsyn_fac=0
u=u0
A_GABAA = 0
B_GABAA = 0
A_GABAB = 0
B_GABAB = 0
tp_GABAA = (tau_r_GABAA*tau_d_GABAA)/(tau_d_GABAA-tau_r_GABAA)*log(tau_d_GABAA/tau_r_GABAA) :time to peak of the conductance
tp_GABAB = (tau_r_GABAB*tau_d_GABAB)/(tau_d_GABAB-tau_r_GABAB)*log(tau_d_GABAB/tau_r_GABAB) :time to peak of the conductance
factor_GABAA = -exp(-tp_GABAA/tau_r_GABAA)+exp(-tp_GABAA/tau_d_GABAA) :GABAA Normalization factor - so that when t = tp_GABAA, gsyn = gpeak
factor_GABAA = 1/factor_GABAA
factor_GABAB = -exp(-tp_GABAB/tau_r_GABAB)+exp(-tp_GABAB/tau_d_GABAB) :GABAB Normalization factor - so that when t = tp_GABAB, gsyn = gpeak
factor_GABAB = 1/factor_GABAB
N = 0
nlg2 = (geph - nhalf*phi)/phi
Ry = (h*geph)/h1
npeak=N
}
BREAKPOINT {
SOLVE states METHOD derivimplicit
g_GABAA = (B_GABAA-A_GABAA) :compute time varying conductance as the difference of state variables B_GABAA and A_GABAA
g_GABAB = (B_GABAB-A_GABAB) :compute time varying conductance as the difference of state variables B_GABAB and A_GABAB
g = g_GABAA + g_GABAB
i_GABAA = c1*Ry*N*(v-e_GABAA) :compute the GABAA driving force based on the time varying conductance, membrane potential, and GABAA reversal
i_GABAB = g_GABAB*(v-e_GABAB) :compute the GABAB driving force based on the time varying conductance, membrane potential, and GABAB reversal
i = i_GABAA :+ i_GABAB
if (N>npeak) {npeak=N}
}
DERIVATIVE states {
A_GABAA' = -A_GABAA/tau_r_GABAA
B_GABAA' = -B_GABAA/tau_d_GABAA
A_GABAB' = -A_GABAB/tau_r_GABAB
B_GABAB' = -B_GABAB/tau_d_GABAB
N' = beta*alphaf*(-B_GABAA/tau_d_GABAA+A_GABAA/tau_r_GABAA)*nlg2 - alphab*N
}
NET_RECEIVE (weight, weight_GABAA, weight_GABAB, Psurv, tsyn (ms)){
LOCAL result
weight_GABAA = weight
weight_GABAB = weight*GABAB_ratio
: Locals:
: Psurv - survival probability of unrecovered state
: tsyn - time since last surival evaluation.
INITIAL{
tsyn=t
}
: Do not perform any calculations if the synapse (netcon) is deactivated. This avoids drawing from the random stream
if( !(weight > 0) ) {
VERBATIM
return;
ENDVERBATIM
}
: calc u at event-
if (Fac > 0) {
u = u*exp(-(t - tsyn_fac)/Fac) :update facilitation variable if Fac>0 Eq. 2 in Fuhrmann et al.
} else {
u = Use
}
if(Fac > 0){
u = u + Use*(1-u) :update facilitation variable if Fac>0 Eq. 2 in Fuhrmann et al.
}
: tsyn_fac knows about all spikes, not only those that released
: i.e. each spike can increase the u, regardless of recovered state.
tsyn_fac = t
: recovery
if (Rstate == 0) {
: probability of survival of unrecovered state based on Poisson recovery with rate 1/Dep
Psurv = exp(-(t-tsyn)/Dep)
result = urand()
if (result>Psurv) {
Rstate = 1 : recover
if( verboseLevel > 0 ) {
printf( "Recovered! %f at time %g: Psurv = %g, urand=%g\n", synapseID, t, Psurv, result )
}
}
else {
: survival must now be from this interval
tsyn = t
if( verboseLevel > 0 ) {
printf( "Failed to recover! %f at time %g: Psurv = %g, urand=%g\n", synapseID, t, Psurv, result )
}
}
}
if (Rstate == 1) {
result = urand()
if (result<u) {
: release!
tsyn = t
Rstate = 0
A_GABAA = A_GABAA + weight_GABAA*factor_GABAA
B_GABAA = B_GABAA + weight_GABAA*factor_GABAA
A_GABAB = A_GABAB + weight_GABAB*factor_GABAB
B_GABAB = B_GABAB + weight_GABAB*factor_GABAB
if( verboseLevel > 0 ) {
printf( "Release! %f at time %g: vals %g %g %g \n", synapseID, t, A_GABAA, weight_GABAA, factor_GABAA )
}
}
else {
if( verboseLevel > 0 ) {
printf("Failure! %f at time %g: urand = %g\n", synapseID, t, result )
}
}
}
}
PROCEDURE setRNG() {
VERBATIM
{
/**
* This function takes a NEURON Random object declared in hoc and makes it usable by this mod file.
* Note that this method is taken from Brett paper as used by netstim.hoc and netstim.mod
*/
void** pv = (void**)(&_p_rng);
if( ifarg(1)) {
*pv = nrn_random_arg(1);
} else {
*pv = (void*)0;
}
}
ENDVERBATIM
}
FUNCTION urand() {
VERBATIM
double value;
if (_p_rng) {
/*
:Supports separate independent but reproducible streams for
: each instance. However, the corresponding hoc Random
: distribution MUST be set to Random.uniform(1)
*/
value = nrn_random_pick(RANDCAST _p_rng);
//printf("random stream for this simulation = %lf\n",value);
return value;
}else{
ENDVERBATIM
: the old standby. Cannot use if reproducible parallel sim
: independent of nhost or which host this instance is on
: is desired, since each instance on this cpu draws from
: the same stream
urand = scop_random()
VERBATIM
}
ENDVERBATIM
urand = value
}
FUNCTION toggleVerbose() {
verboseLevel = 1 - verboseLevel
}