I have a model neuron with several conductances, and I want to test its behavior with both v-clamp and i-clamp experiments (not at the same time, of course).
My .hoc file defines the procedures 'dovc' and 'doic', which perform several pulses of either voltage or current clamp and plot the results in a graph.
However, I became aware that I can not have both clamps 'turned on' at the same time, so I wonder if there is a way to 'turn off' a stimulus object that has already been declared.
Otherwise, I guess I will have to write separate hoc files, one for v-clamping and the other for i-clamping.
Just in case, here is the code I'm writing:
Code: Select all
load_file("nrngui.hoc")
create soma
access soma
insert trpm8
insert hcn_po
dt = 0.5
tstop = 500
objectvar vstim,grph,istim
objectvar vec[2],ivec
vstim = new VClamp(0.5)
vstim.dur(0) = 50
vstim.dur(1) = 300
vstim.dur(2) = 150
vstim.amp(0)= -60
vstim.amp(2)= 40
istim = new IClamp(0.5)
istim.del = 50
istim.dur = 300
numpulses = 4
for i=0,1 vec[i] = new Vector()
ivec = new Vector()
vec[0].record(&soma.i_hcn_po(0.5),1)
vec[1].record(&soma.i_trpm8(0.5),1)
ivec.record(&soma.v(0.5),1)
grph = new Graph()
proc dovc() {
grph.erase()
grph.size(0, 500, -0.05, 0.1)
for i=0,numpulses-1 {
vstim.amp(1)= -100 + i*20
run()
for j=0,1 vec[j].line(grph,j+1,1)
}
}
proc doic() {
grph.size(0, 500, -150, 100)
for i=0,numpulses-1 {
istim.amp= -120 + i*20
run()
ivec.line(grph,3,1)
}
}