-
Notifications
You must be signed in to change notification settings - Fork 1
/
fig6a.hoc
175 lines (147 loc) · 3.8 KB
/
fig6a.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
load_file("nrngui.hoc")
cvode_active(1)
dist=7
rel=0.5
numbasal=70
xopen("geo9068802.hoc") // geometry file
xopen("fixnseg.hoc")
Cm = 0.75
Rm = 28000/Cm
RaAll= 500
RaAx = 50
Vrest = -65
dt = 0.1
gna = .045
AXONM = 3
gkdr = 0.02
celsius = 35.0
ka = 0.03
ghd=0.00001
gkm=0.006
gcat=0.0001
gahp=0.00001
objref g, b,c, stim, s, rsyn, nc, m, gt, gk
forsec "axon" {insert pas e_pas=Vrest g_pas = 1/Rm Ra=RaAx cm=Cm}
forsec "soma" {insert pas e_pas=Vrest g_pas = 1/Rm Ra=RaAll cm=Cm}
forsec "dendrite"{insert pas e_pas=Vrest g_pas = 1/Rm Ra=RaAll cm=Cm}
forsec "user5" {insert pas e_pas=Vrest g_pas = 1/Rm Ra=RaAll cm=Cm}
access soma
freq=50
geom_nseg()
distance()
stim = new IClamp(.5)
stim.del=5
stim.dur=400
stim.amp=0.47
tstop=500
flag=0
b = new VBox()
b.intercept(1)
g = new Graph()
g.size(0,tstop,-70,20)
g.xaxis(1)
g.exec_menu("10% Zoom out")
g.addexpr("v_soma","soma.v(rel)",1,1, 0.2,0.9,2)
xpanel("",1)
xcheckbox("mutant ",&flag)
xbutton("run", "run()")
xpanel()
b.intercept(0)
b.map()
forsec "axon" {
insert kmtwt
insert kmtquad
insert nax gbar_nax=gna*AXONM
insert kdr gkdrbar_kdr=gkdr*AXONM
insert kap gkabar_kap = ka
}
forsec "soma" {
insert kmtwt
insert kmtquad
insert hd ghdbar_hd=ghd
insert na3 gbar_na3=gna*AXONM
insert kdr gkdrbar_kdr=gkdr*AXONM
insert kap gkabar_kap = ka
insert cat gcatbar_cat=gcat
insert cacum tau_cacum=100 depth_cacum=diam/2
insert KahpM95 gbar_KahpM95 = gahp
}
for i=0, numbasal-1 dendrite[i] {
insert na3 gbar_na3=0
insert cat gcatbar_cat=gcat
insert cacum tau_cacum=100 depth_cacum=diam/2
insert KahpM95 gbar_KahpM95 = gahp
}
forsec "apical_dendrite" {
insert hd ghdbar_hd=ghd
insert na3 gbar_na3=gna
insert kdr gkdrbar_kdr=gkdr
insert kap gkabar_kap=0
insert kad gkabar_kad=0
insert cacum tau_cacum=100 depth_cacum=diam/2
insert KahpM95 gbar_KahpM95 = gahp
insert cat gcatbar_cat=gcat
for (x,0) { xdist = distance(x)
ghdbar_hd(x) = ghd*(1+3*xdist/100)
if (xdist > 100){
gkabar_kad(x) = ka*(1+xdist/100)
} else {
gkabar_kap(x) = ka*(1+xdist/100)
}
}
}
forsec "user5" {
insert hd ghdbar_hd=ghd
insert na3 gbar_na3=gna
insert kdr gkdrbar_kdr=gkdr
insert kap gkabar_kap=0
insert kad gkabar_kad=0
insert cacum tau_cacum=100 depth_cacum=diam/2
insert cat gcatbar_cat=gcat
insert KahpM95 gbar_KahpM95 = gahp
for (x,0) { xdist = distance(x)
ghdbar_hd(x) = ghd*(1+3*xdist/100)
if (xdist > 100){
gkabar_kad(x) = ka*(1+xdist/100)
} else {
gkabar_kap(x) = ka*(1+xdist/100)
}
}
}
proc init() {
t=0
if (flag) {perc=100} else {perc=0}
forsec "axon" {
gbar_kmtwt=4*gkm*(100-perc)/100
gbar_kmtquad=4*gkm*perc/100
}
forsec "soma" {
gbar_kmtwt=gkm*(100-perc)/100
gbar_kmtquad=gkm*perc/100
}
forall {
v=Vrest
if (ismembrane("nax") || ismembrane("na3")) {ena=55}
if (ismembrane("KahpM95") || ismembrane("kap") || ismembrane("kad")) {ek=-90}
if (ismembrane("hd") ) {ehd_hd=-30}
}
finitialize(Vrest)
fcurrent()
forall {
for (x) {
if (ismembrane("na3")||ismembrane("nax")){e_pas(x)=v(x)+(ina(x)+ik(x))/g_pas(x)}
if (ismembrane("hd")) {e_pas(x)=e_pas(x)+i_hd(x)/g_pas(x)}
if (ismembrane("cat")){e_pas(x)=e_pas(x)+ica(x)/g_pas(x)}
}
}
cvode.re_init()
cvode.event(tstop)
access soma
g.begin()
}
proc advance() {
fadvance()
g.plot(t)
g.flush()
doNotify()
}