-
Notifications
You must be signed in to change notification settings - Fork 1
/
develop.hoc
238 lines (197 loc) · 3.8 KB
/
develop.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
load_file("nrngui.hoc")
cvode_active(1)
Vrest = -64
dt = 0.05
celsius = 35.0
freq=20
numaxon=1
numsoma=1
numbasal=52
numapical=81
Rm = 25370
Cm = 1.41
RaAll= 150
AXONM = 5
ghd=0.00001
gna = .022
gkdr = 0.01
KMULTP = 0.02
gc=1.e-5
gKc=0
gkm=0.017
gkd=0.0
gahp=0.0
gcal=gc
gcan=gc
gcat=gc
objref rc, rf
use_mcell_ran4()
lowindex = mcell_ran4_init(1)
rc = new Random()
rc.MCellRan4(12345)
rc.uniform(0,80)
rf = new Random()
rf.MCellRan4(10946353)
rf.uniform(0,1)
tstop=1000
xopen("geo-cell1zr.hoc")
xopen("fixnseg.hoc")
nsyn=30
objref stim, time, y, y2, infile, ifile, currt, curr, syngaba[nsyn], synglu[nsyn]
objref ncgaba[nsyn], ncglu[nsyn], s, apc, spikes
spikes = new Vector()
access soma
apc= new APCount(.5)
apc.thresh=0
distance()
s = new NetStim(.5)
s.interval =50
s.number=10
s.noise=1
s.start=20
low=0
high=100
soma {
for k=0, nsyn-1 {
syngaba[k] = new Exp2Syn(1)
syngaba[k].e=-44
syngaba[k].tau1=1.4
syngaba[k].tau2=27
synglu[k]= new Exp2Syn(1)
synglu[k].e=0
synglu[k].tau1=.4
synglu[k].tau2=4.8
}
}
for i=0, nsyn-1 {
flag=0
while (flag==0) {
comp=int(rc.repick()+0.5)
tmp=rf.repick()
apical_dendrite[comp] {if (distance(tmp)<low || distance(tmp)>high) {flag=0} else{flag=1}}
}
apical_dendrite[comp] {syngaba[i].loc(tmp)}
}
forall {insert pas area(.5)}
forsec "dendrite" {
insert hd
insert na3
insert kdr
insert kap
insert cacum depth_cacum=diam/2
insert cal
insert can
insert cat
insert cagk
insert KahpM95
}
forsec "soma" {
insert hd
insert na3
insert kdr
insert kap
insert km
insert cacum depth_cacum=diam/2
insert cal
insert can
insert cat
insert cagk
insert KahpM95
}
forsec "axon" {
insert na3
insert kdr
insert kap
}
forall {v=Vrest e_pas=Vrest g_pas = 1/Rm Ra=RaAll cm=Cm ek=-90 ena=55}
geom_nseg()
distance()
forsec "axon" Ra=RaAll/3
forall if(ismembrane("hd")) {ehd_hd=-30}
load_file("develop.ses")
PlotShape[0].exec_menu("Shape Plot")
PlotShape[0].show(0)
Graph[0].exec_menu("Keep Lines")
proc init() {
access soma
forall {
v=Vrest e_pas=Vrest
if (ismembrane("cal")) {
gcalbar_cal=gc
gcanbar_can=gc
gcatbar_cat=gc
gbar_cagk= gKc
gbar_KahpM95 = gahp
}
}
forsec "axon" {
gbar_na3=gna*AXONM
gkdrbar_kdr=gkdr
gkabar_kap = KMULTP
}
forsec "soma" {
ghdbar_hd=ghd
gbar_na3=gna
gkdrbar_kdr=gkdr
gkabar_kap = KMULTP
gbar_km= gkm
}
for i=0, numbasal-1 dendrite[i] {
ghdbar_hd=ghd
gbar_na3=gna
gkdrbar_kdr=gkdr
gkabar_kap=KMULTP
}
forsec "apical_dendrite" {
ghdbar_hd=ghd
gbar_na3=gna
gkdrbar_kdr=gkdr
gkabar_kap=KMULTP
}
finitialize(v)
fcurrent()
finitialize(v)
forall for(x) {
if (ismembrane("cal")) {e_pas(x)=v(x)+(i_hd(x)+ina(x)+ik(x)+ica(x))/g_pas(x)
} else {
e_pas(x)=v(x)+(ina(x)+ik(x))/g_pas(x)
}
}
cvode.re_init()
}
proc runglu20() {
Graph[0].erase()
s.interval =50
for k=0, nsyn-1 {
ncglu[k] = new NetCon(s, synglu[k], 0, 0, 5.5e-3)
ncgaba[k] = new NetCon(s, syngaba[k], 0, 0, 0e-3)
}
for nsim=1,3 {run()}
}
proc runglu40() {
Graph[0].erase()
s.interval =25
for k=0, nsyn-1 {
ncglu[k] = new NetCon(s, synglu[k], 0, 0, 5.5e-3)
ncgaba[k] = new NetCon(s, syngaba[k], 0, 0, 0e-3)
}
for nsim=1,3 {run()}
}
proc rungaba20() {
Graph[0].erase()
s.interval =50
for k=0, nsyn-1 {
ncglu[k] = new NetCon(s, synglu[k], 0, 0, 0e-3)
ncgaba[k] = new NetCon(s, syngaba[k], 0, 0, 13.8e-3)
}
for nsim=1,3 {run()}
}
proc rungaba40() {
Graph[0].erase()
s.interval =25
for k=0, nsyn-1 {
ncglu[k] = new NetCon(s, synglu[k], 0, 0, 0e-3)
ncgaba[k] = new NetCon(s, syngaba[k], 0, 0, 13.8e-3)
}
for nsim=1,3 {run()}
}