-
Notifications
You must be signed in to change notification settings - Fork 1
/
Fig_9_left_panel.hoc
245 lines (181 loc) · 5.62 KB
/
Fig_9_left_panel.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
239
240
241
242
243
244
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Plot of VSFP responses in Fig. 9 A, 9B1, 9B2, 9C1, 9C2
of Akemann et al. Biophys. J. (2009) 96:3959-3976
Laboratory for Neuronal Circuit Dynamics
RIKEN Brain Science Institute, Wako City, Japan
http://www.neurodynamics.brain.riken.jp
Date of Implementation: July 2008
Contact: akemann@brain.riken.jp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
load_file("morphology_mechanisms.hoc")
load_file("nrngui.hoc")
objref fig9A, fig9B1, fig9B2, fig9C1, fig9C2
objref vbox
begintemplate protocol
public stimStart, stimEnd, end, ampBase, ampStim, traceDT
stimStart = 0
stimEnd = 0
end = 0
ampBase = 0
ampStim = 0
traceDT = 0
endtemplate protocol
//*********************************************************************************
proc run_model() { localobj time, voltage, VP23activation, VP23fluorescence, VP31activation, VP31fluorescence, electrode
// $o1 protocol
if( $o1.stimStart >= $o1.stimEnd || $o1.stimEnd >= $o1.end ) {
print "Input error!"
return }
time = new Vector()
voltage = new Vector()
VP23activation = new Vector()
VP23fluorescence = new Vector()
VP31activation = new Vector()
VP31fluorescence = new Vector()
soma electrode = new IClamp(0.5)
soma nc_VSFP23M3 = 0
soma nc_VSFP31M3 = 0
simulate( $o1, time, voltage, electrode )
soma nc_VSFP23M3 = 500e8 // 500 units per um2
soma nc_VSFP31M3 = 0
simulateVSFP23( $o1, VP23activation, VP23fluorescence, electrode )
if( stoprun == 1 ) return
soma nc_VSFP23M3 = 0
soma nc_VSFP31M3 = 500e8
simulateVSFP31( $o1, VP31activation, VP31fluorescence, electrode )
if( stoprun == 1 ) return
vbox=new VBox()
vbox.intercept(1)
fig9A = new Graph()
fig9A.size( 0, 10, -1, 1 )
voltage.line( fig9A, time )
fig9A.label("voltage")
fig9A.exec_menu("View = plot")
fig9A.label(0.15, 0.5, "fig9A")
fig9B1 = new Graph()
fig9B1.size( 0, 10, -1, 1 )
VP23activation.line( fig9B1, time )
fig9B1.label("VSFP23 activation")
fig9B1.exec_menu("View = plot")
fig9B1.label(0.15, 0.5, "fig9B1")
fig9B2 = new Graph()
fig9B2.size( 0, 10, -1, 1 )
VP23fluorescence.line( fig9B2, time )
fig9B2.label("VSFP23 fluorescence")
fig9B2.exec_menu("View = plot")
fig9B2.label(0.15, 0.5, "fig9B2")
fig9C1 = new Graph()
fig9C1.size( 0, 10, -1, 1 )
VP31activation.line( fig9C1, time )
fig9C1.label("VSFP31 activation")
fig9C1.exec_menu("View = plot")
fig9C1.label(0.15, 0.5, "fig9C1")
fig9C2 = new Graph()
fig9C2.size( 0, 10, -1, 1 )
VP31fluorescence.line( fig9C2, time )
fig9C2.label("VSFP31 fluorescence")
fig9C2.exec_menu("View = plot")
fig9C2.label(0.15, 0.5, "fig9C2")
vbox.intercept(0)
vbox.map("figure 9 left panel simulations Akemann et al. 2009",120,180,600,500)
}
//**********************************************************************
proc simulate() {
// $o1 protocol
// $o2 time vector
// $o3 voltage vector
// $o4 electrode
if($o1.traceDT > dt) {$o1.traceDT = int($o1.traceDT/dt) * dt} else {$o1.traceDT = dt}
$o2.resize(int($o1.end/$o1.traceDT)+1)
$o3.resize(int($o1.end/$o1.traceDT)+1)
$o2.record( &t, $o1.traceDT )
$o3.record( &soma.v(0.5), $o1.traceDT )
$o4.del = 0
$o4.dur = $o1.end
$o4.amp = $o1.ampBase
tstop = $o1.stimStart
run()
if( stoprun ==1 ) return
$o4.amp = $o1.ampStim
continuerun($o1.stimEnd)
if( stoprun == 1 ) return
$o4.amp = $o1.ampBase
continuerun($o1.end)
if ( stoprun == 1) return
}
//**********************************************************************
proc simulateVSFP23() {
// $o1 protocol
// $o2 VPactivation vector
// $o3 VPfluorescence vector
// $o4 electrode
if($o1.traceDT > dt) {$o1.traceDT = int($o1.traceDT/dt) * dt} else {$o1.traceDT = dt}
$o2.resize(int($o1.end/$o1.traceDT)+1)
$o3.resize(int($o1.end/$o1.traceDT)+1)
$o2.record( &soma.fluoActivation_VSFP23M3(0.5), $o1.traceDT )
$o3.record( &soma.fluoSignal_VSFP23M3(0.5), $o1.traceDT )
$o4.del = 0
$o4.dur = $o1.end
$o4.amp = $o1.ampBase
tstop = $o1.stimStart
run()
if( stoprun ==1 ) return
$o4.amp = $o1.ampStim
continuerun($o1.stimEnd)
if( stoprun == 1 ) return
$o4.amp = $o1.ampBase
continuerun($o1.end)
if ( stoprun == 1) return
}
// ***************************************************************************
proc simulateVSFP31() {
// $o1 protocol
// $o2 VPactivation vector
// $o3 VPfluorescence vector
// $o4 electrode
if($o1.traceDT > dt) {$o1.traceDT = int($o1.traceDT/dt) * dt} else {$o1.traceDT = dt}
$o2.resize(int($o1.end/$o1.traceDT)+1)
$o3.resize(int($o1.end/$o1.traceDT)+1)
$o2.record( &soma.fluoActivation_VSFP31M3(0.5), $o1.traceDT )
$o3.record( &soma.fluoSignal_VSFP31M3(0.5), $o1.traceDT )
$o4.del = 0
$o4.dur = $o1.end
$o4.amp = $o1.ampBase
tstop = $o1.stimStart
run()
if( stoprun ==1 ) return
$o4.amp = $o1.ampStim
continuerun($o1.stimEnd)
if( stoprun == 1 ) return
$o4.amp = $o1.ampBase
continuerun($o1.end)
if ( stoprun == 1) return
}
//************* Main *******************************************
objref prot
prot = new protocol()
prot.stimStart = 200
prot.stimEnd = 400
prot.end = 700
prot.ampBase = -0.020 // (nA)
prot.ampStim = 0 // (nA)
dt = 0.005
v_init = -69.7
nrnsecmenu(0.5, 1)
//if( ismembrane("VSFP23M3") ) nrnglobalmechmenu("VSFP23M3")
//if( ismembrane("VSFP31M3") ) nrnglobalmechmenu("VSFP31M3")
xpanel("Figure 9 left panel")
xvalue("Start stimulus (ms)", "prot.stimStart")
xvalue("End of Simulation (ms)", "prot.stimEnd")
xvalue("End of Protocol (ms)", "prot.end")
xlabel("")
xvalue("Baseline current (nA)", "prot.ampBase")
xvalue("Stimulus current (nA)", "prot.ampStim")
xlabel("")
xvalue("dt", "dt")
xvalue("t", "t")
xbutton("Stop", "stoprun = 1")
xlabel("")
xbutton("Start", "run_model( prot )")
xlabel("")
xpanel()