-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariable_length_0.hoc
132 lines (91 loc) · 3.14 KB
/
variable_length_0.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
objref somaVm, somaT, somaD1, somaD2, abdVm, abdT, abdD1, abdD2, nabdVm, nabdT, nabdD1, nabdD2, fnabd, fabd, fsoma, fsomaSum, fabdSum, fnabdSum
objref fais, faisSum, aisVm, aisD1, aisD2, fISI
proc variable_length(){
somaVm = new Vector()
somaT = new Vector()
somaD1 = new Vector()
somaD2 = new Vector()
abdVm = new Vector()
abdT = new Vector()
abdD1 = new Vector()
abdD2 = new Vector()
nabdVm = new Vector()
nabdT = new Vector()
nabdD1 = new Vector()
nabdD2 = new Vector()
fsomaSum = new File()
fabdSum = new File()
fnabdSum = new File()
fsoma = new File()
fabd = new File()
fnabd = new File()
fISI = new File()
chdir("data")
strdef somaSum
sprint (somaSum, "%s", "Variable_AIS_Cell_0_soma_data.txt")
fsomaSum.wopen(somaSum)
fsomaSum.printf("%s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t", "Parameter", "Na/K SD", "K_ais ", "Na_ais", "ABD lenght", "AIS length", "threshold index", "AP threshold", "AP amplitude", "AP half-width", "IS dv2", "SD dv2")
fsomaSum.close
strdef abdSum
sprint (abdSum, "%s", "Variable_AIS_Cell_0_ABD_data.txt")
fabdSum.wopen(abdSum)
fabdSum.printf("%s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t", "Parameter", "Na/K SD", "K_ais ", "Na_ais", "ABD lenght", "AIS length", "threshold index", "AP threshold", "AP amplitude", "AP half-width", "IS dv2", "SD dv2")
fabdSum.close
strdef nabdSum
sprint (nabdSum, "%s", "Variable_AIS_Cell_0_nABD_data.txt")
fnabdSum.wopen(nabdSum)
fnabdSum.printf("%s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t %s\t", "Parameter", "Na/K SD", "K_ais ", "Na_ais", "ABD lenght", "AIS length", "threshold index", "AP threshold", "AP amplitude", "AP half-width", "IS dv2", "SD dv2")
fnabdSum.close
strdef ISISum
sprint (ISISum, "%s", "ISI_DATA_Cell_0.txt")
fISI.wopen(ISISum)
fISI.printf("%s\t %s\t %s\t %s\t %s\t %s\t ", "Parameter", "AIS length","ABD length","Na SD", "Na AIS", "ISI")
fISI.close
for j=1, 5{
//Loop changing AIS length
SIprox.L = j*10
SIdistal.L = 10
for k=2, 4{
//loop changing gbar Na in the sd
{
forsec all { gbar_Na12 = k*25
gbar_kdrDA= k*50
}
SIprox.gbar_Na12= 5000
SIdistal.gbar_Na12 = 5000
SIprox.gbar_kdrDA = 5000
SIdistal.gbar_kdrDA = 5000
axon.gbar_Na12=400
axon.gbar_kdrDA=400
}
abd_length = dend1.L + dend1[1].L + dend1[2].L
ais_length = SIprox.L + SIdistal.L
print "ABD_length is ", abd_length
print "AIS_length is ", ais_length
print "AIS Na+ density is ", SIprox.gbar_Na12
print "ABD Na+ density is " , dend1.gbar_Na12
// recording Vm and time in corresponding vectors geom_nseg to modify nbr of segments according to dend length
geom_nseg()
diam_seg()
init(v_init)
soma somaT.record(&t)
soma somaVm.record(&v(0.5))
dend1[2] abdVm.record(&v(0.5))
dend1[2] abdT.record(&t)
dend1_1[1] nabdVm.record(&v(0.06))
dend1_1[1] nabdT.record(&t)
run()
somaD1.deriv(somaVm, dt)
somaD2.deriv(somaD1, dt)
abdD1.deriv(abdVm, dt)
abdD2.deriv(abdD1, dt)
nabdD1.deriv(nabdVm, dt)
nabdD2.deriv(nabdD1, dt)
freqmeter()
print "controle bug1"
}
print "controle bug2"
}
print "controle bug3"
quit()
}