-
Notifications
You must be signed in to change notification settings - Fork 1
/
Fig2.hoc
344 lines (218 loc) · 8.27 KB
/
Fig2.hoc
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
331
332
333
334
335
336
337
338
339
340
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Figure 2 from Jaffe and Brenner, J. Neurophys., 2017 (in press)
// Dentate gyrus granule cell model: paradoxical effect of varying AHP amplitude on firing rate
//
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
celsius = 25 // temperature
VREST = -80 //resting potential
// Independent Parameters List ------------------------------------------------------------------------
// Passive properties
RM = 38000 //membrane resistivity
RI = 200 //input resistance
CM = 1 //membrane conductivity
// Controls
ISTEP = .065 //step amplitude in nA
IDUR = 2000 //duration of the current step
TSTOP = 2000 //duration of the simulation
// Geometry of the cell ------------------------------------------------------------------------
ropen("601886b.nrn") // Claiborne DG granule cell
ncompartments=fscan() // Number of compartments
// arrays
double comp[ncompartments],par[ncompartments],x[ncompartments],y[ncompartments],z[ncompartments]
double len[ncompartments],d[ncompartments]
for i=0,ncompartments-1 { /* read in dendritic parameters */
comp[i] = fscan() // compartment number
par[i] = fscan() // parent compartment
x[i] = fscan() // x coordinate
y[i] = fscan() // y coordinate
z[i] = fscan() // z coordinate
len[i] = fscan() // compartment length
d[i] = fscan() // compartment diameter
}
create cell[ncompartments], hillock, mfiber /* creates the major regions */
cell[0] {nseg=1 L=len[0] diam = d[0]} /* soma dimensions */
dredux = .64 // Rescale all dendrites by this factor
for i=1,ncompartments-1 { /* all other soma/dendritic compartments */
cell[i] {nseg=1 pt3dadd(x[par[i]],y[par[i]],z[par[i]],d[par[i]]*dredux) pt3dadd(x[i],y[i],z[i],d[i]*dredux)}
}
for i=1,ncompartments-1 { /* connect the soma/dendrites */
cell[par[i]] connect cell[i](0),1
}
// AXON and AIS
hillock { L=100 diam(0:1)=1.4:0.5 nseg = 50} // Axon initial segment
mfiber { L=1000 diam=0.5 nseg = 100} // Axon proper
cell[0] connect hillock(0),0 // connect the soma ot the AIS to the axon
hillock connect mfiber(0),1
proxlimit = 80 // maximum limit in microns of the proximal region
objref AIS, prox, stim, dend, axon, ahp // Create objects for subsections
proc subsets() { local i // procedure defines subsections
// three subsections: soma/prox region, dendrites, AIS, and axon
// AIS and axon are only here for future extensibility and serve no function
objref AIS, prox, stim, dend, axon, ahp // Create objects
prox = new SectionList()
dend = new SectionList()
access cell[0]
distance()
for i=0,ncompartments-1 { // define which dendrites are proximal
access cell[i]
howfar = distance(1)
if (howfar < proxlimit) cell[i] prox.append()
if (howfar >=proxlimit) cell[i] dend.append()
}
AIS = new SectionList()
axon = new SectionList()
hillock AIS.append() // the hillock is the AIS mfiber axon.append() // mfiber is the axon
}
subsets() // run the procedure
// Parameter initialization ------------------------------------------------------------------------
forsec prox { // Somatic conductances
insert NaM99SL // Lazarewicz, Migliore, and Ascoli (2002) Na channel
gbar_NaM99SL = .035 // g_Na
insert fKDR // Aradi and Holmes (1999) fast and slow KDR channels
gbar_fKDR = .003 // g_fKDR
insert sKDR
gbar_sKDR = .03 // g_fKDR
// T-channel
insert DGCaT // Huguenard and McCormick (1992); Mainen and Sejnowski (1996)
gcat_DGCaT = .0035 // g_CaT
mshift_DGCaT = 15 // + valuies shift m in positive direction
hshift_DGCaT = -10 // + values shifts h in negative direction
}
forsec dend{ // dendritic conductances
insert NaM99SL
gbar_NaM99SL = .003 // low Na channel density in dendrites
insert fKDR
gbar_fKDR = .003
}
access hillock // AIS conductances
insert NaM99SL
gbar_NaM99SL = .1
insert fKDR
gbar_fKDR = .05
access mfiber // axon channels
insert NaM99SL
gbar_NaM99SL = .1
insert fKDR
gbar_fKDR = .1
// Basic parameters for all compartments ------------------------------------------------------------------------
forall {
v = VREST
Ra = RI
cm = CM
ek = -90
ena = 60
insert pas
g_pas = 1/RM
e_pas = v
}
// Reinitialization procedure ------------------------------------------------------------------------
proc init() {
forall {
v = VREST // all compartments reset Vrest
}
forsec prox {
v = VREST // Redundant resetting of Vrest
finitialize(v) // Initialize all variables to Vrest
fcurrent() // Generate currents at Vrest
e_pas = v + (ina + ik + ica)/g_pas // calculate E_leak for resting currents
}
forsec axon {
v = VREST // Redundant resetting of Vrest
finitialize(v)
fcurrent()
e_pas = v + (ina+ik)/g_pas // E_leak
}
forsec AIS { // hillock/AIS resetting
v = VREST
finitialize(v)
fcurrent()
e_pas = v + (ina + ik)/g_pas
}
forsec dend { // dendrites resetting
v = VREST
finitialize(v)
fcurrent()
e_pas = v + (ina + ik)/g_pas
}
}
// Current step controls ------------------------------------------------------------------------
init() // Initialize model
// Current step controls ------------------------------------------------------------------------
access cell[0]
stim = new IClamp(.5)
stim.del = 10
stim.dur = IDUR
stim.amp = ISTEP
// AHP modifier controls ------------------------------------------------------------------------
ahp = new AlphaSynapse(.5)
ahp.onset = 5000
ahp.tau = 1
ahp.e = -90
ahp.gmax = 0.07
// Start of the four simulations ------------------------------------------------------------------------
////// Simulation 1 - largest AHP /////////
t=0 // reset time
wopen("output1.dat") // output file
count = -100 // counter that spaces AHP between spikes
while (t<TSTOP){ // simulation loop
if ((cell[0].v > 0) && (count <=0 )){ // Did the cell fire?
ahp.onset = t + 1.5 // start controlling the AHP in 1.5 milliseconds
count = 300 // Reset counter to 300
}
count -= 1 // decrement counter
// output parameters you to analyze
fprint("%g %g %g %g %g %g %g %g %g %g %g\n",t,cell[0].v, hillock.v(.5), cell[119].v, ina, m_DGCaT^2,h_DGCaT, ica, m_NaM99SL^3, h_NaM99SL, ik)
fadvance() // advance simulation one time step
}
////// Simulation 2 - second to largest AHP /////////
t=0 // reset time
init()
wopen("output2.dat") // output file
while (t<TSTOP){ // simulation loop
if ((cell[0].v > 0) && (count <=0 )){ // Did the cell fire?
ahp.e = -90
ahp.gmax = .005*10*.4
ahp.tau = 1
ahp.onset = t + 1.5
count = 300
}
count -= 1 // counter
fprint("%g %g %g %g %g %g %g %g %g %g %g\n",t,cell[0].v, hillock.v(.5), cell[119].v, ina, m_DGCaT^2,h_DGCaT, cell[0].ica, m_NaM99SL^3, h_NaM99SL, ik)
fadvance()
}
////// Simulation 3 - second to smallest AHP /////////
t = 0 // reset time
init() // initialize state variables
wopen("output3.dat") // output file
while (t<TSTOP){ // simulation loop
if ((cell[0].v > 0) && (count <=0 )){ // Did the cell fire?
ahp.e = -60
ahp.gmax = .05
ahp.tau = 2
ahp.onset = t + 1.5
count = 300
}
count -= 1 // counter
// output parameters you to analyze
fprint("%g %g %g %g %g %g %g %g %g %g %g\n",t,cell[0].v, hillock.v(.5), cell[119].v, ina, m_DGCaT^2,h_DGCaT, cell[0].ica, m_NaM99SL^3, h_NaM99SL, ik)
fadvance() // advance simulation one time step
}
////// Simulation 4 - smallest AHP /////////
t = 0 // reset time
init() // initialize state variables
wopen("output4.dat") // output file
while (t<TSTOP){ // simulation loop
if ((cell[0].v > 0) && (count <=0 )){ // Did the cell fire?
ahp.e = -50
ahp.gmax = .1
ahp.tau = 2
ahp.onset = t + .2
count = 300
}
count -= 1 // counter
// output parameters you to analyze
fprint("%g %g %g %g %g %g %g %g %g %g %g\n",t,cell[0].v, hillock.v(.5), cell[119].v, ina, m_DGCaT^2,h_DGCaT, cell[0].ica, m_NaM99SL^3, h_NaM99SL, ik)
fadvance() // advance simulation one time step
}