-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkinetics.hoc
166 lines (151 loc) · 3.13 KB
/
kinetics.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
load_file("nrngui.hoc")
cvode.active(1)
cvode.atol(1.e-3)
create a
a {nseg=1 diam=5 L=5
insert kamt ek=-85 sha_kamt=0 shi_kamt=0
insert kdrmt ek=-85
insert pas g_pas=1/10000 Ra=150 cm=1}
access a
celsius=24
tstop=200
vlow=-90
vhigh=60
dt=0.1
mtfac=1
htfac=5
drfac=10
objref gk, b,gt,vc, gs,c, gf,ic
b = new VBox()
c = new VBox()
b.intercept(1)
gk = new Graph(0)
gk.view(vlow,0,vhigh-vlow,1,0,0,100,200)
gk.exec_menu("New Axis")
gk.exec_menu("10% Zoom out")
gk.label(0.1,0.9,"Fig.4B: steady-states")
gk.addexpr("minf_kamt",3,2, 2*tstop,0,2)
gk.addexpr("hinf_kamt",2,2, 2*tstop,0,2)
gk.addexpr("minf_kdrmt",1,2, 2*tstop,0,2)
gt = new Graph(0)
gt.view(vlow,0,vhigh-vlow,15,0,0,100,200)
gt.exec_menu("New Axis")
gt.exec_menu("10% Zoom out")
gt.label(0.1,0.9,"time constants (scale in ms)")
gt.addexpr("mtau_kamt/mtfac",3,2, 2*tstop,0,2)
gt.addexpr("htau_kamt/htfac",2,2, 2*tstop,0,2)
gt.addexpr("mtau_kdrmt/drfac",1,2, 2*tstop,0,2)
xpanel("")
xbutton("run ", "run()")
xpanel()
b.intercept(0)
b.map("K-A and K-DR kinetics for Mitral Cells",100,0,200,400)
c.intercept(1)
gs = new Graph(0)
gs.view(0,0,tstop,20,0,0,100,200)
gs.exec_menu("New Axis")
gs.exec_menu("10% Zoom out")
gs.label(0.1,0.9,"K-A activation (pA), protocol as in Fig.6B")
gs.exec_menu("Keep Lines")
gf = new Graph(0)
gf.view(0,0,tstop,25,0,0,100,200)
gf.exec_menu("New Axis")
gf.exec_menu("10% Zoom out")
gf.label(0.1,0.9,"K-DR activation (pA), protocol as in Fig.6C")
gf.exec_menu("Keep Lines")
c.intercept(0)
c.map("activation",390,0,500,370)
vc = new SEClamp(0.5)
proc run() {
gk.begin()
gk.color(1)
gk.label(0.6,0.2,"K-DR act.")
for (v=vlow; v<vhigh; v=v+1) {
trates_kamt(v)
trates_kdrmt(v)
gk.plot(v)
}
gk.flush()
doNotify()
gt.begin()
gt.mark(-20,12.18/mtfac,"+",12,5,2)
gt.mark(-10,9.11/mtfac,"+",12,5,2)
gt.mark(0,6.68/mtfac,"+",12,5,2)
gt.mark(10,6.51/mtfac,"+",12,5,2)
gt.mark(20,4.94/mtfac,"+",12,5,2)
gt.mark(30,3.56/mtfac,"+",12,5,2)
gt.mark(40,3.45/mtfac,"+",12,5,2)
gt.mark(50,3.05/mtfac,"+",12,5,2)
gt.mark(-10,51.17/htfac,"+",12,6,2)
gt.mark(0,47.84/htfac,"+",12,6,2)
gt.mark(10,48.32/htfac,"+",12,6,2)
gt.mark(20,45.21/htfac,"+",12,6,2)
gt.mark(30,44.11/htfac,"+",12,6,2)
gt.mark(40,46.19/htfac,"+",12,6,2)
gt.mark(50,43.44/htfac,"+",12,6,2)
gt.color(1)
gt.label(0.55,0.2,"DR act./10")
gt.color(2)
gt.label(0.25,0.2,"A inact./5")
for (v=vlow; v<vhigh; v=v+1) {
trates_kamt(v)
trates_kdrmt(v)
gt.plot(v)
}
gt.flush()
doNotify()
gbar_kamt=0.0002
gbar_kdrmt=0.0
gs.begin()
k=-20
color=1
while (k<61) {
gs.addexpr("ik*area(0.5)*10",color,1, 2*tstop,0,2) // *10=pA, *1e-2=nA
t=0
vc.amp1=-70
vc.dur1=0.2
vc.amp2=k
vc.dur2=tstop
forall {finitialize(vc.amp1)}
while (t<tstop) {
fadvance()
gs.plot(t)
gs.flush()
doNotify()
}
gs.flush()
doNotify()
k=k+10
//color=color+1
gs.begin()
}
gbar_kamt=0.0
gbar_kdrmt=0.0002
gf.begin()
k=-20
color=1
while (k<61) {
gf.addexpr("ik*area(0.5)*10",color,1, 2*tstop,0,2) // *10=pA, *1e-2=nA
t=0
vc.amp1=-70
vc.dur1=0.2
vc.amp2=k
vc.dur2=tstop
forall {finitialize(vc.amp1)}
while (t<tstop) {
fadvance()
gf.plot(t)
gf.flush()
doNotify()
}
gf.flush()
doNotify()
k=k+10
//color=color+1
gf.begin()
}
vc.dur1=0
vc.dur2=0
vc.dur3=0
}