-
Notifications
You must be signed in to change notification settings - Fork 3
/
mosinit_PC_SC_SplusCNO.hoc
565 lines (394 loc) · 14.9 KB
/
mosinit_PC_SC_SplusCNO.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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
//Developer Fabio Simoes de Souza, 2020
//University of Colorado Anschutz Medical Campus
//University Federal of ABC
load_file("nrngui.hoc")
load_file("2_compartment_template.hoc") //PC
load_file("PF_template.hoc") //PF
load_file("SC_template.hoc") //SC
totalruntime = startsw() - totalruntime
print "total run time ", totalruntime
//Setting the random seed
objref semente
semente = new Random(RANDOM_SEED)
semente.uniform(0,1000000000)
semente_pick=(semente.repick())
semente_randomica = semente_pick
print semente_randomica
//PARAMETERS
// Fiber frequencies
PFfreq=50 //Hz
CFfreq=300 // Hz Mathy et al., Neuron 62: 388-399, 2009
BGfreq=10 //Hz background for two SCs
SCfreq= 20 // Stellate cell freq Hausser and Clark 1997
//number of fibers
NSC=40 //number of BG stellate cells to inhibity PCs
NBGPF=5 //number of background PF inputs to drive real SCs
NCF=1 //number of CF inputs
NPF= 10 //number of PF inputs
//Synaptic conductances
//PC AMPAR
Gmax_PF_PC_AMPAR = 0.2857e-3 //uS (Hausser and Roth, 1997)
//PC GABAaR
Gmax_SC_PC_GABAaR_dist = 0.5*15e-3 //uS (Houston et al., 2009)
Gmax_SC_PC_GABAaR_prox = 0.5*15e-3 //uS (Houston et al., 2009)
Gmax_SC_PC_GABAaR_BG = 15e-3 //uS (Houston et al., 2009)
//SC AMPAR
Gmax_PF_SC0_AMPAR = 0.5*1.3774e-3 //uS (Chu et al., 2012)
Gmax_PF_SC1_AMPAR = 0.5*1.3774e-3 //uS (Chu et al., 2012)
//SC GABAaR
Gmax_SC_SC_GABAaR = 1.0786e-3 //uS (Kondo and Marty, 1998)
// CF and PF timing
PF_onset = 2000
CF_onset = 4000 // S+
duration= 10e-3 // s
tsim = 5000
tstop=5000 //20e3
//////////
//PC
/////////
objref PC[1]
PC[0]=new Purkinje_simple(0,0,0)
PC[0].position(-100,100,0)
//AMPAR
PC[0].Esynapse.tau1=0.28 //ms rise time (Hausser and Roth, 1997)
PC[0].Esynapse.tau2=1.23 //ms decay time (Hausser and Roth, 1997)
PC[0].Esynapse.e=0 //mV reversal potential
//GABAaR
PC[0].Isynapse_dist.tau1= 1.8 //ms rise time
PC[0].Isynapse_dist.tau2= 8.5 //ms decay time
PC[0].Isynapse_dist.e=-85 //mV reversal potential (Houston et al., 2009) //J neurosci. 29: 10416, 2009
PC[0].Isynapse_prox.tau1= 1.8 //ms rise time
PC[0].Isynapse_prox.tau2= 8.5 //ms decay time
PC[0].Isynapse_prox.e=-85 //mV reversal potential (Houston et al., 2009) //J neurosci. 29: 10416, 2009
PC[0].Isynapse_BG.tau1= 1.8 //ms rise time
PC[0].Isynapse_BG.tau2= 8.5 //ms decay time
PC[0].Isynapse_BG.e=-85 //mV reversal potential (Houston et al., 2009) //J neurosci. 29: 10416, 2009
//////////
//SC
/////////
//creating cells
objref SC[2]
SC[0]=new StellateCell(0,0,0)
SC[1]=new StellateCell(0,0,0)
SC[0].position(150,0,0)
SC[1].position(400,0,0)
//creating synaptic receptors
//AMPAR
SC[0].Esynapse.tau1=3.45 //ms rise time (Chu et al., 2012)
SC[0].Esynapse.tau2=3.17 //ms decay time (Chu et al., 2012)
SC[0].Esynapse.e=0 //mV reversal potential
SC[1].Esynapse.tau1=3.45 //ms rise time (Chu et al., 2012)
SC[1].Esynapse.tau2=3.17 //ms decay time (Chu et al., 2012)
SC[1].Esynapse.e=0 //mV reversal potential
//GABAaR
SC[0].Isynapse.tau1= 0.6 //ms rise time (Kondo and Marty, 1998)
SC[0].Isynapse.tau2= 5.9 //ms decay time (Kondo and Marty, 1998)
//SC[0].Isynapse.e=-85 //mV reversal potential (Kondo and Marty, 1998)
SC[0].Isynapse.e=-60 //mV reversal potential (Chavas and Marty, 2003)
SC[1].Isynapse.tau1= 0.6 //ms rise time (Kondo and Marty, 1998)
SC[1].Isynapse.tau2= 5.9 //ms decay time (Kondo and Marty, 1998)
//SC[1].Isynapse.e=-85 //mV reversal potential (Kondo and Marty, 1998)
SC[1].Isynapse.e=-60 //mV reversal potential (Chavas and Marty, 2003)
//Chavas, J. & Marty, A. (2003). Coexistence of excitatory and //inhibitory GABA synapses in the cerebellar interneuron network. //J. Neurosci. 23, 2019-2031.
// Creating the Input Fibers
XORIGIN0 = 0
YORIGIN0 = 0
ZORIGIN0 = 0
XORIGIN1 = 0
YORIGIN1 = -200
ZORIGIN1 = 0
//Creating PF inputs
objref fiber[NPF] //define objects for cells
for i=0,NPF-1 {
//pick a new seed for each fiber
semente_pick=(semente.repick())
semente_randomica = semente_pick
fiber[i]=new fibre(-10,0,0,semente_randomica)
//Move cell location
fiber[i].position(XORIGIN0+10*i,YORIGIN0,ZORIGIN0)
fiber[i].Presynapse fiber[i].nclist.append(new NetCon(fiber[i].StimTrigger,fiber[i].syn,0.5,0,0.01))
}
//setting up PF stimulus
NETIN_SP_START= PF_onset // start time
NETIN_SP_NUMBER= PFfreq*2000*1e-3 - 5 //PFfreq*duration //total number of spikes
SEED=1
NETIN_SP_INTERVAL=1000/PFfreq
NETIN_SP_NOISE=1 // 1=randomized spikes
for i = 0, NPF-1 {
fiber[i].StimTrigger.start=NETIN_SP_START
fiber[i].StimTrigger.interval=NETIN_SP_INTERVAL
fiber[i].StimTrigger.number=NETIN_SP_NUMBER
fiber[i].StimTrigger.noise=NETIN_SP_NOISE
//fiber[i].StimTrigger.seed(i)
}
XORIGIN0 = 0
YORIGIN0 = 0
ZORIGIN0 = 0
XORIGIN1 = 0
YORIGIN1 = -300
ZORIGIN1 = 0
//Creating CF inputs
objref fiber2[NCF] //define objects for cells
for i=0,NCF-1 {
//pick a new seed for each fiber
semente_pick=int(semente.repick())
semente_randomica = semente_pick
fiber2[i]=new fibre(-10,0,0,semente_randomica)
//Move cell location
fiber2[i].position(XORIGIN0+10*i,YORIGIN0,ZORIGIN0)
fiber2[i].Presynapse fiber2[i].nclist.append(new NetCon(fiber2[i].StimTrigger,fiber2[i].syn,0.5,0,0.01))
}
//setting up CF stimulus
NETIN_SP_START= CF_onset //5000 // start time
NETIN_SP_NUMBER= 2 //CFfreq*duration //total number of spikes (Mathy et al., Neuron 62: 388-399, 2009)
SEED=1
NETIN_SP_INTERVAL=1000/CFfreq
NETIN_SP_NOISE=0 // 1=randomized spikes
for i = 0, NCF-1 {
fiber2[i].StimTrigger.start=NETIN_SP_START
fiber2[i].StimTrigger.interval=NETIN_SP_INTERVAL
fiber2[i].StimTrigger.number=NETIN_SP_NUMBER
fiber2[i].StimTrigger.noise=NETIN_SP_NOISE
//fiber2[i].StimTrigger.seed(i)
}
XORIGIN0 = 0
YORIGIN0 = 0
ZORIGIN0 = 0
XORIGIN1 = 0
YORIGIN1 = -400
ZORIGIN1 = 0
//Background GABAR inhibitory inputs to PC
objref fiber3[NSC] //define objects for cells
for i=0,NSC-1 {
//pick a new seed for each fiber
semente_pick=int(semente.repick())
semente_randomica = semente_pick
fiber3[i]=new fibre(-10,0,0,semente_randomica)
//Move cell location
fiber3[i].position(XORIGIN0+10*i,YORIGIN0,ZORIGIN0)
fiber3[i].Presynapse fiber3[i].nclist.append(new NetCon(fiber3[i].StimTrigger,fiber3[i].syn,0.5,0,0.01))
}
//setting up SC stimulus
NETIN_SP_START=0 // start time
NETIN_SP_NUMBER= SCfreq*tsim*1e-3 //total number of spikes
SEED=1
NETIN_SP_INTERVAL=1000/SCfreq
NETIN_SP_NOISE=1 // 1=randomized spikes
for i = 0, NSC-1 {
fiber3[i].StimTrigger.start=NETIN_SP_START
fiber3[i].StimTrigger.interval=NETIN_SP_INTERVAL
fiber3[i].StimTrigger.number=NETIN_SP_NUMBER
fiber3[i].StimTrigger.noise=NETIN_SP_NOISE
//fiber3[i].StimTrigger.seed(i)
}
XORIGIN0 = 0
YORIGIN0 = 0
ZORIGIN0 = 0
XORIGIN1 = 0
YORIGIN1 = -500
ZORIGIN1 = 0
//Background PF inputs to PC
objref fiber4[NBGPF] //define objects for cells
for i=0,NBGPF-1 {
//pick a new seed for each fiber
semente_pick=int(semente.repick())
semente_randomica = semente_pick
fiber4[i]=new fibre(-10,0,0,semente_randomica)
//Move cell location
fiber4[i].position(XORIGIN0+10*i,YORIGIN0,ZORIGIN0)
fiber4[i].Presynapse fiber3[i].nclist.append(new NetCon(fiber4[i].StimTrigger,fiber4[i].syn,0.5,0,0.01))
}
//setting up PF background stimulus
NETIN_SP_START=0 // start time
NETIN_SP_NUMBER=SCfreq*tsim*1e-3 //total number of spikes
SEED=1
NETIN_SP_INTERVAL=1000/SCfreq
NETIN_SP_NOISE=1 // 1=randomized spikes
for i = 0, NBGPF-1 {
fiber4[i].StimTrigger.start=NETIN_SP_START
fiber4[i].StimTrigger.interval=NETIN_SP_INTERVAL
fiber4[i].StimTrigger.number=NETIN_SP_NUMBER
fiber4[i].StimTrigger.noise=NETIN_SP_NOISE
//fiber4[i].StimTrigger.seed(i)
}
//Creating Synaptic Connections
//PF -> PC
//PF parameters
CONNECTION_THRESHOLD_PFPC = -10
CONNECTION_DELAY_PFPC = 0.0
CONNECTION_WEIGHT_PFPC = Gmax_PF_PC_AMPAR
min=0 // 0 ms delay
max=10 // 10 ms delay
objref prob
prob=new Random()
//Connecting PF -> PC
for i=0,NPF-1 {
dprob=prob.uniform(min,max) //normal distribution delays
fiber[i].Presynapse PC[0].nclist.append(new NetCon(&fiber[i].Presynapse.v(0.5),PC[0].Esynapse, CONNECTION_THRESHOLD_PFPC,CONNECTION_DELAY_PFPC+dprob,CONNECTION_WEIGHT_PFPC))
}
//CF -> PC
//Increase those factor to create a CF-like effect
CF_weightfactor = 100
//CF parameters
CONNECTION_THRESHOLD_CFPC = -10
CONNECTION_DELAY_CFPC = 0.0
CONNECTION_WEIGHT_CFPC = Gmax_PF_PC_AMPAR * CF_weightfactor
min=0 // 0 ms delay
max=10 // 100 ms delay
objref prob
prob=new Random()
//Connecting CF -> PC
for i=0,NCF-1 {
dprob=prob.uniform(min,max) //normal distribution delays
fiber2[i].Presynapse PC[0].nclist.append(new NetCon(&fiber2[i].Presynapse.v(0.5),PC[0].Esynapse, CONNECTION_THRESHOLD_CFPC,CONNECTION_DELAY_CFPC+dprob,CONNECTION_WEIGHT_CFPC))
}
//Spontaneous PF -> SC
//PF parameters
CONNECTION_THRESHOLD_PFSC = -10
CONNECTION_DELAY_PFSC = 0.0
CONNECTION_WEIGHT_PFSC0 = Gmax_PF_SC0_AMPAR
CONNECTION_WEIGHT_PFSC1 = Gmax_PF_SC1_AMPAR
min=0 // 0 ms delay
max=10 // 10 ms delay
objref prob
prob=new Random()
//Connecting PF -> SC 0
i=0
dprob=prob.uniform(min,max) //normal distribution delays
fiber4[i].Presynapse SC[0].nclist.append(new NetCon(&fiber4[i].Presynapse.v(0.5),SC[0].Esynapse, CONNECTION_THRESHOLD_PFSC,CONNECTION_DELAY_PFSC+dprob,CONNECTION_WEIGHT_PFSC0))
//Connecting PF -> SC 1
i=1
dprob=prob.uniform(min,max) //normal distribution delays
fiber4[i].Presynapse SC[1].nclist.append(new NetCon(&fiber4[i].Presynapse.v(0.5),SC[1].Esynapse, CONNECTION_THRESHOLD_PFSC,CONNECTION_DELAY_PFSC+dprob,CONNECTION_WEIGHT_PFSC1))
//PF -> SC
//PF parameters
CONNECTION_THRESHOLD_PFSC = -10
CONNECTION_DELAY_PFSC = 0.0
CONNECTION_WEIGHT_PFSC0 = Gmax_PF_SC0_AMPAR
CONNECTION_WEIGHT_PFSC1 = Gmax_PF_SC1_AMPAR
min=0 // 0 ms delay
max=10 // 10 ms delay
objref prob
prob=new Random()
//Connecting PF -> SC 0
for i=0,NPF-1 {
dprob=prob.uniform(min,max) //normal distribution delays
fiber[i].Presynapse SC[0].nclist.append(new NetCon(&fiber[i].Presynapse.v(0.5),SC[0].Esynapse, CONNECTION_THRESHOLD_PFSC,CONNECTION_DELAY_PFSC+dprob,CONNECTION_WEIGHT_PFSC0))
}
//Connecting PF -> SC 1
for i=0,NPF-1 {
dprob=prob.uniform(min,max) //normal distribution delays
fiber[i].Presynapse SC[1].nclist.append(new NetCon(&fiber[i].Presynapse.v(0.5),SC[1].Esynapse, CONNECTION_THRESHOLD_PFSC,CONNECTION_DELAY_PFSC+dprob,CONNECTION_WEIGHT_PFSC1))
}
//CF -> SC
//Increase those factor to create a CF-like effect
CF_weightfactor = 100
//CF parameters
CONNECTION_THRESHOLD_CFSC = -10
CONNECTION_DELAY_CFSC = 10 //assumed a 10ms for glu spillover
//Based on the olfactory glomerulus
//Christie and Westbrook, J Neurosci. 26: 2269-2277, 2006
CONNECTION_WEIGHT_CFSC0 = Gmax_PF_SC0_AMPAR * CF_weightfactor
CONNECTION_WEIGHT_CFSC1 = Gmax_PF_SC1_AMPAR * CF_weightfactor
min=0 // 0 ms delay
max=10 // 10 ms delay
objref prob
prob=new Random()
//Connecting CF -> SC 0
for i=0,NCF-1 {
dprob=prob.uniform(min,max) //normal distribution delays
fiber2[i].Presynapse SC[0].nclist.append(new NetCon(&fiber2[i].Presynapse.v(0.5),SC[0].Esynapse, CONNECTION_THRESHOLD_CFSC,CONNECTION_DELAY_CFSC+dprob,CONNECTION_WEIGHT_CFSC0))
}
//Connecting CF -> SC 1
for i=0,NCF-1 {
dprob=prob.uniform(min,max) //normal distribution delays
fiber2[i].Presynapse SC[1].nclist.append(new NetCon(&fiber2[i].Presynapse.v(0.5),SC[1].Esynapse, CONNECTION_THRESHOLD_CFSC,CONNECTION_DELAY_CFSC+dprob,CONNECTION_WEIGHT_CFSC1))
}
//SC -> PC
//SC-PC parameters
CONNECTION_THRESHOLD_SCPC = -10
CONNECTION_DELAY_SCPC = 5 // Assuming a 5ms delay for spike to reach PC
CONNECTION_WEIGHT_SCPC_dist = Gmax_SC_PC_GABAaR_dist
CONNECTION_WEIGHT_SCPC_prox = Gmax_SC_PC_GABAaR_prox
//Connecting SC[0] -> PC
SC[0].soma PC[0].nclist.append(new NetCon(&SC[0].soma.v(0.5),PC[0].Isynapse_dist, CONNECTION_THRESHOLD_SCPC,CONNECTION_DELAY_SCPC,CONNECTION_WEIGHT_SCPC_dist))
//Connecting SC[1] -> PC
SC[1].soma PC[0].nclist.append(new NetCon(&SC[1].soma.v(0.5),PC[0].Isynapse_prox, CONNECTION_THRESHOLD_SCPC,CONNECTION_DELAY_SCPC,CONNECTION_WEIGHT_SCPC_prox))
//SC -> SC
//SC-SC parameters
CONNECTION_THRESHOLD_SCSC = -10
CONNECTION_DELAY_SCSC = 2.0 // 2ms delay (Kondo and Marty, 1998)
CONNECTION_WEIGHT_SCSC = Gmax_SC_SC_GABAaR
//Connecting SC[0] -> SC[1]
SC[0].soma SC[1].nclist.append(new NetCon(&SC[0].soma.v(0.5),SC[1].Isynapse, CONNECTION_THRESHOLD_SCSC,CONNECTION_DELAY_SCSC,CONNECTION_WEIGHT_SCSC))
// Background (BG) inhibitory inputs -> PC
CONNECTION_THRESHOLD_BGPC = -10
CONNECTION_DELAY_BGPC = 0.0
CONNECTION_WEIGHT_BGPC = Gmax_SC_PC_GABAaR_BG
min=0 // 0 ms delay
max=10 // 10 ms delay
objref prob
prob=new Random()
//Connecting BG -> PC
for i=0,NSC-1 {
dprob=prob.uniform(min,max) //normal distribution delays
fiber3[i].Presynapse PC[0].nclist.append(new NetCon(&fiber3[i].Presynapse.v(0.5),PC[0].Isynapse_BG, CONNECTION_THRESHOLD_BGPC,CONNECTION_DELAY_BGPC+dprob,CONNECTION_WEIGHT_BGPC))
}
// Plotting the figures
objref grafico[6]
grafico[0]=new Graph()
grafico[0].size(0,tstop, -100, 50)
grafico[0].beginline()
grafico[0].addvar("Soma PC", &PC[0].soma.v(0.5),2,1)
grafico[0].flush()
grafico[1]=new Graph()
grafico[1].size(0,tstop, -100, 50)
grafico[1].beginline()
grafico[1].addvar("Soma SC[0]", &SC[0].soma.v(0.5),3,1)
grafico[1].flush()
grafico[2]=new Graph()
grafico[2].size(0,tstop, -100, 50)
grafico[2].beginline()
grafico[2].addvar("Soma SC[1]", &SC[1].soma.v(0.5),4,1)
grafico[2].flush()
graphList[0].append(grafico[0])
graphList[0].append(grafico[1])
graphList[0].append(grafico[2])
objref ps
ps = new PlotShape(1)
ps.variable("v")
ps.exec_menu("Show Diam")
ps.exec_menu("Shape Plot")
fast_flush_list.append(ps)
//Recording data
objref PC_spiketimes, PC_nc, PC_nil
PC_spiketimes = new Vector()
PC[0].soma PC_nc=new NetCon(&PC[0].soma.v(0.5),PC_nil)
PC_nc.record(PC_spiketimes)
objref SC0_spiketimes, SC0_nc, SC0_nil
SC0_spiketimes = new Vector()
SC[0].soma SC0_nc=new NetCon(&SC[0].soma.v(0.5),SC0_nil)
SC0_nc.record(SC0_spiketimes)
objref SC1_spiketimes, SC1_nc, SC1_nil
SC1_spiketimes = new Vector()
SC[1].soma SC1_nc=new NetCon(&SC[1].soma.v(0.5),SC1_nil)
SC1_nc.record(SC1_spiketimes)
//begining
init()
run()
//save spike times
objref savdataspkt0
savdataspkt0=new File()
savdataspkt0.wopen("data_spkt_PC_soma.dat")
PC_spiketimes.printf(savdataspkt0)
savdataspkt0.close()
objref savdataspkt1
savdataspkt1=new File()
savdataspkt1.wopen("data_spkt_SC0_soma.dat")
SC0_spiketimes.printf(savdataspkt1)
savdataspkt1.close()
objref savdataspkt2
savdataspkt2=new File()
savdataspkt2.wopen("data_spkt_SC1_soma.dat")
SC1_spiketimes.printf(savdataspkt2)
savdataspkt2.close()