-
Notifications
You must be signed in to change notification settings - Fork 1
/
ComPanel.hoc
400 lines (346 loc) · 12.3 KB
/
ComPanel.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
//Inserted manipulation mechanisms for Granule cell Inhibitory synaptic fibers on 28-09-2005
//Last updated 13-December-2007
// Shyam Diwakar M.
objref AmpaSchemeMenu,mfpanel,ifpanel
Ampa_Gmax=600//Granule[0].synA[0].gmax
Gaba_gmax = Granule[0].synG[0].gmax
Nmda_Gmax2_ES=16000//Granule[0].synNS[0].gmax
GmaxCOD=Ampa_Gmax//1200
GmaxNES = Nmda_Gmax2_ES
GmaxGaba = 2500//Gaba_gmax
Ampa_G = 600//Granule[0].synA[0].gmax
Nmda_G = Granule[0].synNS[0].gmax
NumSin=0
NumISin=0
xpanel("Command Panel")
xlabel(" ===== Command Panel ===== ")
//xbutton("GrC Soma","GrcPanel()")
xbutton("Postsynaptic","Synapses()")
xbutton("Exc Presyn Parameters","PresynParam()")
xbutton("Inh Presyn Parameters","PresynGParam()")
xmenu("Mossy Fibers")
xradiobutton("Homogeneous mf","HomogeneousMf()")
xradiobutton("Heterogeneous mf","HeterogeneousMF()")
xradiobutton("Mossy traces","MossyFiberTraces()")
xmenu()
xmenu("Inhibitory Synaptic Fibers")
xradiobutton("Homogeneous if","HomogeneousIf()")
xradiobutton("Heterogeneous if","HeterogeneousIF()")
xradiobutton("Inhib Synaptic fiber traces","InhibFiberTraces()")
xmenu()
xpanel()
// *************************** Grc parameters ***********************//
strdef KinMenu
KinMenu="kinetics.hoc"
objref GRCparams
proc GrcPanel(){
GRCparams = new VBox()
GRCparams.intercept(1)
xpanel("1")
xlabel("Soma Properties")
xvalue("gNabar","Granule[0].soma.gnabar_GRC_NA", 1,"", 0, 0 )
xvalue("gKVbar","Granule[0].soma.gkbar_GRC_KV", 1,"", 0, 0 )
xvalue("gKAbar","Granule[0].soma.gkbar_GRC_KA", 1,"", 0, 0 )
xvalue("gKirbar","Granule[0].soma.gkbar_GRC_KIR", 1,"", 0, 0 )
xvalue("gKCabar","Granule[0].soma.gkbar_GRC_KCA", 1,"", 0, 0 )
xvalue("gCaHVAbar","Granule[0].soma.gcabar_GRC_CA", 1,"", 0, 0 )
xvalue("gKSlowbar","Granule[0].soma.gkbar_GRC_KM", 1,"", 0, 0 )
xvalue("gLeakage","Granule[0].soma.gl_GRC_LKG1", 1,"", 0, 0 )
xvalue("gGabaA","Granule[0].soma.ggaba_GRC_LKG2", 1,"", 0, 0 )
xpanel()
xpanel("2")
xlabel("Calcium parameters")
xvalue("Shell thickness","Granule[0].soma.d_GRC_CALC", 1,"", 0, 0 )
xvalue("Initial concentration","Granule[0].soma.cai0_GRC_CALC", 1,"", 0, 0 )
xvalue("Removal rate","Granule[0].soma.beta_GRC_CALC", 1,"", 0, 0 )
xpanel()
GRCparams.intercept(0)
GRCparams.map("Granule Cell Parameters")
}
//For gaba update 8-Feb-06
proc UpdateAmpaNmda() {
Ampa_Gmax = Ampa_G
Nmda_Gmax2_ES = Nmda_G
for(i=0;i<8;i=i+1) {
AmpaCOD[i].gmax=Ampa_Gmax
NMDAS[i].gmax=Nmda_Gmax2_ES
}
for(i=0;i<4;i=i+1) {
Granule[0].synA[i].gmax=Ampa_Gmax
Granule[0].synNS[i].gmax=Nmda_Gmax2_ES
}
}
proc UpdateGaba() {
for(i=0;i<8;i=i+1) {
GRC_GABA[i].gmax=GmaxGaba
GRC_GABA[i].U=0.34
}
for(i=0;i<4;i=i+1) {
Granule[0].synG[i].gmax=GmaxGaba
}
}
// **********************************************************************************************
// ************************************* Presynpatic-Exc and Inh *********************************
proc PresynParam(){
Tau_rec=Granule[0].synA[0].tau_rec
Tau_facil=Granule[0].synA[0].tau_facil
Tau_1=Granule[0].synA[0].tau_1
U=Granule[0].synA[0].U
//Us=Granule[0].synA[0].Us
xpanel("PRESYNAPTIC PARAMETERS")
xlabel("Exc Presynaptic parameters")
xvalue("T_transition (ms)","Tau_1", 1,"UpDatePre()", 0, 0 )
xvalue("T_recovery (ms)","Tau_rec", 1,"UpDatePre()", 0, 0 )
xvalue("T_facilita (ms)","Tau_facil", 1,"UpDatePre()", 0, 0 )
xvalue("Release probability","U", 1,"UpDatePre()", 0, 0 )
//xvalue("Use synaptic","Us", 1,"UpDatePre()", 0, 0 )
xpanel()
}
proc UpDatePre(){
for (i=0;i<NumSin+4;i=i+1) {
AmpaCOD[i].tau_rec=Tau_rec
AmpaCOD[i].tau_facil=Tau_facil
AmpaCOD[i].tau_1=Tau_1
AmpaCOD[i].U=U
//Granule[0].synA[i].Us=Us
NMDAS[i].tau_rec=Tau_rec
NMDAS[i].tau_facil=Tau_facil
NMDAS[i].tau_1=Tau_1
NMDAS[i].U=U
}
}
proc PresynGParam(){
Tau_rec_if=Granule[0].synG[0].tau_rec
Tau_facil_if=Granule[0].synG[0].tau_facil
Tau_1_if=Granule[0].synG[0].tau_1
U_if=Granule[0].synG[0].U
xpanel("If PRESYNAPTIC PARAMETERS")
//xlabel("Presynaptic parameters")
xvalue("T_transition (ms)","Tau_1_if", 1,"UpDateGPre()", 0, 0 )
xvalue("T_recovery (ms)","Tau_rec_if", 1,"UpDateGPre()", 0, 0 )
xvalue("T_facilita (ms)","Tau_facil_if", 1,"UpDateGPre()", 0, 0 )
xvalue("Release probability","U_if", 1,"UpDateGPre()", 0, 0 )
xpanel()
}
proc UpDateGPre(){
for (ifn=0;ifn<NumISin+4;ifn=ifn+1) {
GRC_GABA[ifn].tau_rec=Tau_rec_if
GRC_GABA[ifn].tau_facil=Tau_facil_if
GRC_GABA[ifn].tau_1=Tau_1_if
GRC_GABA[ifn].U=U_if
}
}
// ******************************** Mossy Fiber ************************************//
objref grafici[8]
ngraph = 0
proc addgraph() { local ii
ngraph = ngraph+1
ii = ngraph-1
grafici[ii] = new Graph(0)
grafici[ii].size(0,tstop,$2,$3)
grafici[ii].view(0,0,150,48,0,48,150,48)
grafici[ii].xaxis()
grafici[ii].yaxis()
grafici[ii].addvar($s1,1,0)
grafici[ii].save_name("graphList[0].")
graphList[0].append(grafici[ii])
grafici[ii].exec_menu("View = plot")
grafici[ii].flush()
}
proc MossyFiberTraces(){
mfpanel = new VBox()
mfpanel.intercept(1)
xpanel("Mossy fibers traces")
addgraph("Mossy[0].y",0,2)
addgraph("Mossy[1].y",0,2)
addgraph("Mossy[2].y",0,2)
addgraph("Mossy[3].y",0,2)
xpanel()
mfpanel.intercept(0)
mfpanel.map("Mossy Fiber traces")
}
NumSin = 0
NumISin = 0
proc HomogeneousMf(){
xpanel("MOSSY PARAMETERS")
xlabel("Homogeneous mossy fibers")
InSpike=10//Mossy[0].fast_invl //10
InBurst=1e5//Mossy[0].slow_invl //1e10
NumSpikes=1//Mossy[0].burst_len //1
StartIn=20//Mossy[0].start // 50
EndIn=1e10//Mossy[0].end // 1e10
Rumore=0//Mossy[0].noise // 0
NumSin=0
delay=Mossy[0].delay //4
UpDateMossyO()
xvalue("Number of synapses ","NumSin", 1,"UpDateMossyO()", 0, 0 )
xvalue("Interspike interval (ms)","InSpike", 1,"UpDateMossyO()", 0, 0 )
xvalue("Interburst interval (ms)","InBurst", 1,"UpDateMossyO()", 0, 0 )
xvalue("Spikes per burst ","NumSpikes", 1,"UpDateMossyO()", 0, 0 )
xvalue("Begin of the Input (ms)","StartIn", 1,"UpDateMossyO()", 0, 0 )
xvalue("End of the Input (ms)","EndIn", 1,"UpDateMossyO()", 0, 0 )
//xvalue("Poisson Noise (0=no noise,1=noise)","Rumore", 1,"UpDateMossyO()", 0, 0 )
//xvalue("Shift Poisson distribution (ms) ","delay",1,"UpDateMossyO()", 0, 0 )
xpanel()
}
proc HeterogeneousMF(){
xpanel("Mossy heterogeneus")
xlabel("Heterogeneous mossy fibers")
xvalue("Interspike interval (ms)","Mossy[0].fast_invl", 1,"", 0, 0 )
xvalue("Interburst interval (ms)","Mossy[0].slow_invl", 1,"", 0, 0 )
xvalue("Spikes per burst","Mossy[0].burst_len", 1,"", 0, 0 )
xvalue("Begin of the Input (ms)","Mossy[0].start", 1,"", 0, 0 )
xvalue("End of the Input (ms)","Mossy[0].end", 1,"", 0, 0 )
xvalue("Poisson Noise (0=Not)","Mossy[0].noise", 1,"", 0, 0 )
xlabel("Mossy 2")
xvalue("Interspike interval (ms)","Mossy[1].fast_invl", 1,"", 0, 0 )
xvalue("Interburst interval (ms)","Mossy[1].slow_invl", 1,"", 0, 0 )
xvalue("Spikes per burst","Mossy[1].burst_len", 1,"", 0, 0 )
xvalue("Begin of the Input (ms)","Mossy[1].start", 1,"", 0, 0 )
xvalue("End of the Input (ms)","Mossy[1].end", 1,"", 0, 0 )
xvalue("Poisson Noise (0=Not)","Mossy[1].noise", 1,"", 0, 0 )
xlabel("Mossy 3")
xvalue("Interspike interval (ms)","Mossy[2].fast_invl", 1,"", 0, 0 )
xvalue("Interburst interval (ms)","Mossy[2].slow_invl", 1,"", 0, 0 )
xvalue("Spikes per burst","Mossy[2].burst_len", 1,"", 0, 0 )
xvalue("Begin of the Input (ms)","Mossy[2].start", 1,"", 0, 0 )
xvalue("End of the Input (ms)","Mossy[2].end", 1,"", 0, 0 )
xvalue("Poisson Noise (0=Not)","Mossy[2].noise", 1,"", 0, 0 )
xlabel("Mossy 4")
xvalue("Interspike interval (ms)","Mossy[3].fast_invl", 1,"", 0, 0 )
xvalue("Interburst interval (ms)","Mossy[3].slow_invl", 1,"", 0, 0 )
xvalue("Spikes per burst","Mossy[3].burst_len", 1,"", 0, 0 )
xvalue("Begin of the Input (ms)","Mossy[3].start", 1,"", 0, 0 )
xvalue("End of the Input (ms)","Mossy[3].end", 1,"", 0, 0 )
xvalue("Poisson Noise (0=Not)","Mossy[3].noise", 1,"", 0, 0 )
xpanel()
}
proc UpDateMossyO(){
print "UpDating Mossy parameters"
for(i=0;i<4;i=i+1) {
Mossy[i].fast_invl=InSpike
Mossy[i].slow_invl=InBurst
Mossy[i].burst_len=NumSpikes
Mossy[i].start=StartIn
Mossy[i].noise=Rumore
Mossy[i].delay=delay
if (i<NumSin) {
Mossy[i].end=EndIn
} else {
Mossy[i].end=0
}
}
}
// *************Inhibitory Synaptic Fiber**************************//
objref graffz[8]
ngraff = 0
proc addgraph() { local ix
ngraff = ngraff+1
ix = ngraff-1
graffz[ix] = new Graph(0)
graffz[ix].size(0,tstop,$2,$3)
graffz[ix].view(0,0,150,48,0,48,150,48)
graffz[ix].xaxis()
graffz[ix].yaxis()
graffz[ix].addvar($s1,1,0)
graffz[ix].save_name("graphList[1].")
//graffz[ix].view(2)
// E la documentazione dove era????
graphList[1].append(graffz[ix])
graffz[ix].exec_menu("View = plot")
graffz[ix].flush()
}
proc InhibFiberTraces(){
ifpanel = new VBox()
ifpanel.intercept(1)
xpanel("Inhib fibers traces")
addgraph("Inhib[0].y",0,2)
addgraph("Inhib[1].y",0,2)
addgraph("Inhib[2].y",0,2)
addgraph("Inhib[3].y",0,2)
xpanel()
ifpanel.intercept(0)
ifpanel.map("Inhibitory synaptic Fiber traces")
}
proc HomogeneousIf(){
xpanel("Inhib PARAMETERS")
xlabel("Homogeneous inhib fibers")
IInSpike=10//Inhib[0].fast_invl //10
IInBurst=1e10//Inhib[0].slow_invl //1e10
INumSpikes=1//Inhib[0].burst_len //1
IStartIn=25//Inhib[0].start // 50
IEndIn=1e10//Inhib[0].end // 1e10
IRumore=Inhib[0].noise // 0
NumISin=0
Idelay=Inhib[0].delay //4
UpDateInhibO()
xvalue("Number of synapses ","NumISin", 1,"UpDateInhibO()", 0, 0 )
xvalue("Interspike interval (ms)","IInSpike", 1,"UpDateInhibO()", 0, 0 )
xvalue("Interburst interval (ms)","IInBurst", 1,"UpDateInhibO()", 0, 0 )
xvalue("Spikes per burst ","INumSpikes", 1,"UpDateInhibO()", 0, 0 )
xvalue("Begin of the Input (ms)","IStartIn", 1,"UpDateInhibO()", 0, 0 )
xvalue("End of the Input (ms)","IEndIn", 1,"UpDateInhibO()", 0, 0 )
//xvalue("Poisson Noise (0=no noise,1=noise)","IRumore", 1,"UpDateInhibO()", 0, 0 )
//xvalue("Shift Poisson distribution (ms) ","Idelay",1,"UpDateInhibO()", 0, 0 )
xpanel()
}
proc HeterogeneousIF(){
xpanel("Inhib heterogeneus")
xlabel("Heterogeneous inhib fibers")
xvalue("Interspike interval (ms)","Inhib[0].fast_invl", 1,"", 0, 0 )
xvalue("Interburst interval (ms)","Inhib[0].slow_invl", 1,"", 0, 0 )
xvalue("Spikes per burst","Inhib[0].burst_len", 1,"", 0, 0 )
xvalue("Begin of the Input (ms)","Inhib[0].start", 1,"", 0, 0 )
xvalue("End of the Input (ms)","Inhib[0].end", 1,"", 0, 0 )
xvalue("Poisson Noise (0=Not)","Inhib[0].noise", 1,"", 0, 0 )
xlabel("Inhib 2")
xvalue("Interspike interval (ms)","Inhib[1].fast_invl", 1,"", 0, 0 )
xvalue("Interburst interval (ms)","Inhib[1].slow_invl", 1,"", 0, 0 )
xvalue("Spikes per burst","Inhib[1].burst_len", 1,"", 0, 0 )
xvalue("Begin of the Input (ms)","Inhib[1].start", 1,"", 0, 0 )
xvalue("End of the Input (ms)","Inhib[1].end", 1,"", 0, 0 )
xvalue("Poisson Noise (0=Not)","Inhib[1].noise", 1,"", 0, 0 )
xlabel("Inhib 3")
xvalue("Interspike interval (ms)","Inhib[2].fast_invl", 1,"", 0, 0 )
xvalue("Interburst interval (ms)","Inhib[2].slow_invl", 1,"", 0, 0 )
xvalue("Spikes per burst","Inhib[2].burst_len", 1,"", 0, 0 )
xvalue("Begin of the Input (ms)","Inhib[2].start", 1,"", 0, 0 )
xvalue("End of the Input (ms)","Inhib[2].end", 1,"", 0, 0 )
xvalue("Poisson Noise (0=Not)","Inhib[2].noise", 1,"", 0, 0 )
xlabel("Inhib 4")
xvalue("Interspike interval (ms)","Inhib[3].fast_invl", 1,"", 0, 0 )
xvalue("Interburst interval (ms)","Inhib[3].slow_invl", 1,"", 0, 0 )
xvalue("Spikes per burst","Inhib[3].burst_len", 1,"", 0, 0 )
xvalue("Begin of the Input (ms)","Inhib[3].start", 1,"", 0, 0 )
xvalue("End of the Input (ms)","Inhib[3].end", 1,"", 0, 0 )
xvalue("Poisson Noise (0=Not)","Inhib[3].noise", 1,"", 0, 0 )
xpanel()
}
proc UpDateInhibO(){
print "UpDating Inhib-Synaptic parameters"
for(kk=0;kk<4;kk=kk+1) {
Inhib[kk].fast_invl=IInSpike
Inhib[kk].slow_invl=IInBurst
Inhib[kk].burst_len=INumSpikes
Inhib[kk].start=IStartIn
Inhib[kk].noise=IRumore
Inhib[kk].delay=Idelay
if (kk<NumISin) {
Inhib[kk].end=IEndIn
} else {
Inhib[kk].end=0
}
}
}
proc Synapses() {
xpanel("Postsynaptic params")
xvalue("AMPA Gmax (pS)","Ampa_G", 1,"UpdateAmpaNmda()", 0, 0 )
xvalue("NMDA Gmax (pS)","Nmda_G", 1,"UpdateAmpaNmda()", 0, 0 )
xvalue("GABA Gmax","Gaba_gmax",1,"UpdateGaba()",0,0)
xpanel()
}
//Set up initials
UpDateMossyO()
UpDateInhibO()
UpdateGaba()
UpdateAmpaNmda()