forked from ModelDBRepository/223891
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mosinit.hoc
184 lines (146 loc) · 3.11 KB
/
mosinit.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
load_file("nrngui.hoc")
xopen("rlgntc5-10-95.geo")
xopen("proc.hoc")
celsius = 34
dt = 0.02
steps_per_ms = 1/dt
tstop = 7000
v_init = -70
gcabarfixed = 1
g_pas_fixed = 1
g_hbar_fixed = 1
// Not actually conductance, but permeability
Gbar_cat_soma = 0.00007
Gbar_cat_proximal = 0.00007
Gbar_cat_distal = 0.00007
E_pas = -79
G_pas_soma = 1.5e-5
G_pas_prox = 8e-6
G_pas_dist = 1.4e-6
Ghbar_htc_soma = 1.5e-05
Ghbar_htc_prox = 0
Ghbar_htc_dist = 0
AxialRes = 170
C = 0.7
Cprox = 0.7
Cdist = 0.7
Gbar_ican = 2.5e-4
forsec whole_cell { // insert passive and Ih current everywhere
insert pas
e_pas=E_pas
insert htc
eh_htc=-45
insert irk // insert IRK
gkbar_irk = 0.00002
shift_irk = 15
Ra = AxialRes
cm = C
nseg=3
}
objref distalsForStim
distalsForStim = new Vector()
distalsForStim.append(38, 45, 52, 61, 30, 124,74,118,185,107,151,157,161,25,31,49,13)
for (n=0; n<=15; n+=1) {
dend[distalsForStim.x[n]] {
nseg=9
}
}
soma {
insert hh2 // insert fast spikes
ena = 50
ek = -100
vtraub_hh2 = -52
gnabar_hh2 = 0.05
gkbar_hh2 = 0.05
}
if (g_pas_fixed==1) {
forsec whole_cell { g_pas = G_pas_soma }
} else {
localizepas(G_pas_soma,G_pas_soma,G_pas_dist)
}
if (g_hbar_fixed==1) {
forsec whole_cell { ghbar_htc = Ghbar_htc_soma }
} else {
localizehtc(Ghbar_htc_soma,Ghbar_htc_soma,Ghbar_htc_dist)
}
forsec whole_cell {
insert itGHK
cai = 2.4e-4
cao = 2
eca = 120
shift_itGHK = -12 // shift for LJP
qm_itGHK = 5
qh_itGHK = 4
insert cad // calcium diffusion everywhere
depth_cad = 0.1
kt_cad = 0 // no pump
kd_cad = 1e-4
taur_cad = 5
cainf_cad = 2.4e-4
insert ican
}
if (gcabarfixed==1) {
forsec whole_cell {pcabar_itGHK = Gbar_cat_soma}
} else{
localizeca(Gbar_cat_soma,Gbar_cat_proximal,Gbar_cat_distal)
}
proc init() {
soma { cm = C }
forsec proximals { cm = Cprox }
forsec distals { cm = Cdist }
forsec whole_cell {
e_pas = E_pas
Ra = AxialRes
gbar_ican = Gbar_ican
}
if (g_pas_fixed==1) {
forsec whole_cell { g_pas = G_pas_soma }
} else {
localizepas(G_pas_soma,G_pas_soma,G_pas_dist)
}
if (g_hbar_fixed==1) {
forsec whole_cell {ghbar_htc = Ghbar_htc_soma }
} else {
localizehtc(Ghbar_htc_soma,Ghbar_htc_soma,Ghbar_htc_dist)
}
if (gcabarfixed==1) {
forsec whole_cell {pcabar_itGHK = Gbar_cat_soma}
} else {
localizeca(Gbar_cat_soma,Gbar_cat_proximal,Gbar_cat_distal)
}
finitialize(v_init)
if (cvode.active()) {
cvode.re_init()
} else {
fcurrent()
}
frecord_init()
}
objref somastim
soma somastim = new IClamp(0.5)
somastim.del = 2000
somastim.dur = 500
somastim.amp = -0.1
objref dendstim
dend[38] dendstim = new IClamp(1)
dendstim.del = 5500
dendstim.dur = 500
dendstim.amp = 0.02
objref spstim
soma spstim = new IClamp(0.5)
spstim.del = 0
spstim.dur = 0
spstim.amp = 0
addgraph("soma.v(0.5)",-90,-40, 1500, 3000) // soma
//Begin VariableTimeStep
objectvar ocbox_
ocbox_ = NumericalMethodPanel[0]
object_push(ocbox_)
atol_ = 0.001
CVode[0].atol(atol_)
restore(301, 1)
object_pop()
ocbox_.map("VariableTimeStep", 361, 451, 216.9, 120.6)
objref ocbox_
//End VariableTimeStep
xopen("analysisProc.hoc")