Three questions on extracellular stimulation and recording
Posted: Fri Mar 31, 2017 12:54 pm
Hello,everyone!
I am simulating the extracellular potential recording with extracellular stimulation by NEURON and have three questions.
1. I found a relative program on extracellular stimulation and recording with -65 mV resting potential on NEURON website. Since the resting potential in my model is -60 mV, I have to add some additional program. Fortunately, there are such examples in the Chapter 8 of the NEURON Book and the forum. I try to apply them in my program. The detailed steps are below
(1) Write a "constant" mechanism and insert it into the “cell.ses” file.
The "constant" mechanism is shown as follows
:constant current for custom initialization
NEURON{
SUFFIX constant
NONSPECIFIC_CURRENT i
RANGE i,ic
}
UNITS{
(mA)=(milliamp)
}
PARAMETER{
ic=0(mA/cm2)
}
ASSIGNED{
i(mA/cm2)
}
BREAKPOINT{
i=ic
}
The program after inseting the "constant" mechanism is below
......
{
tobj = new MechanismStandard("constant")
tobj.set("ic_constant", 0, 0)
tobj = new MStanWrap(tobj, 1)
bild.topol.slist.object(0).ml.append(tobj)
}
......
(2) write some program to set resting potential.
vrec = 0 // extracellularly recorded potential
func fieldrec() { local sum
sum = 0
forall {
if (ismembrane("xtra")) {
for (x) if ((x>0) && (x<1)) sum += er_xtra(x)
}
}
return sum
}
proc init() {
finitialize(v_init)
//el_hh=(ina+ik+gl_hh*v)/gl_hh
ic_constant=-(ina+ik+il_hh)
if(cvode.active()){
cvode.re_init()
}else{
fcurrent()
}frecord_init()
vrec = fieldrec()
}
(3) the el_hh in Biophysics of CellBuilder GUI is set to be -39.387.
However, the computational results still seem a bit abnormal.
It seems that the -60 mV resting potential setting is not correct yet since the curve of dend.v(0.5) decreases gradually from -60 mV and approachs -65 mV which is a default resting potential in NEURON during the first millisecond when the stimulation is not applied. Therefore I suspect that the given resting potential -60 mV is not set correctly. Where is the mistake?
2. There are two "proc init()" in the chapter 8 of the NEURON Book to set given resting potential.
proc init() {
finitialize(v_init)
el_hh=(ina+ik+gl_hh*v)/gl_hh
if(cvode.active()){
cvode.re_init()
}else{
fcurrent()
}frecord_init()
vrec = fieldrec()
}
proc init() {
finitialize(v_init)
ic_constant=-(ina+ik+il_hh)
if(cvode.active()){
cvode.re_init()
}else{
fcurrent()
}frecord_init()
vrec = fieldrec()
}
while there is still an analogous proc init() in the forum
proc init() {
finitialize(v_init)
forall {
if (ismembrane("hh")) ic_constant = -(ina + ik + il_hh)
if (ismembrane("pas")) ic_constant = -i_pas
}
if (cvode.active()) {
cvode.re_init()
} else {
fcurrent()
} frecord_init()
}
Why does the statement el_hh=(ina+ik+el_hh*v)/ el_hh disappear in the last two "proc int()"? In other words, what function does this statement have?
3. I tried to output the soma.v(0.5) to a .txt file as follows
objref vec
vec=new Vector()
vec.record(&soma.v(0.5))
objref file
file=new File()
file.wopen("temp")
vec.printf(file)
file.close()
and failed. The problem is that soma.v(0.5) is not recorded in vec at all. How to solve this problem?
Thank you very much for your attention and help.
I am simulating the extracellular potential recording with extracellular stimulation by NEURON and have three questions.
1. I found a relative program on extracellular stimulation and recording with -65 mV resting potential on NEURON website. Since the resting potential in my model is -60 mV, I have to add some additional program. Fortunately, there are such examples in the Chapter 8 of the NEURON Book and the forum. I try to apply them in my program. The detailed steps are below
(1) Write a "constant" mechanism and insert it into the “cell.ses” file.
The "constant" mechanism is shown as follows
:constant current for custom initialization
NEURON{
SUFFIX constant
NONSPECIFIC_CURRENT i
RANGE i,ic
}
UNITS{
(mA)=(milliamp)
}
PARAMETER{
ic=0(mA/cm2)
}
ASSIGNED{
i(mA/cm2)
}
BREAKPOINT{
i=ic
}
The program after inseting the "constant" mechanism is below
......
{
tobj = new MechanismStandard("constant")
tobj.set("ic_constant", 0, 0)
tobj = new MStanWrap(tobj, 1)
bild.topol.slist.object(0).ml.append(tobj)
}
......
(2) write some program to set resting potential.
vrec = 0 // extracellularly recorded potential
func fieldrec() { local sum
sum = 0
forall {
if (ismembrane("xtra")) {
for (x) if ((x>0) && (x<1)) sum += er_xtra(x)
}
}
return sum
}
proc init() {
finitialize(v_init)
//el_hh=(ina+ik+gl_hh*v)/gl_hh
ic_constant=-(ina+ik+il_hh)
if(cvode.active()){
cvode.re_init()
}else{
fcurrent()
}frecord_init()
vrec = fieldrec()
}
(3) the el_hh in Biophysics of CellBuilder GUI is set to be -39.387.
However, the computational results still seem a bit abnormal.
It seems that the -60 mV resting potential setting is not correct yet since the curve of dend.v(0.5) decreases gradually from -60 mV and approachs -65 mV which is a default resting potential in NEURON during the first millisecond when the stimulation is not applied. Therefore I suspect that the given resting potential -60 mV is not set correctly. Where is the mistake?
2. There are two "proc init()" in the chapter 8 of the NEURON Book to set given resting potential.
proc init() {
finitialize(v_init)
el_hh=(ina+ik+gl_hh*v)/gl_hh
if(cvode.active()){
cvode.re_init()
}else{
fcurrent()
}frecord_init()
vrec = fieldrec()
}
proc init() {
finitialize(v_init)
ic_constant=-(ina+ik+il_hh)
if(cvode.active()){
cvode.re_init()
}else{
fcurrent()
}frecord_init()
vrec = fieldrec()
}
while there is still an analogous proc init() in the forum
proc init() {
finitialize(v_init)
forall {
if (ismembrane("hh")) ic_constant = -(ina + ik + il_hh)
if (ismembrane("pas")) ic_constant = -i_pas
}
if (cvode.active()) {
cvode.re_init()
} else {
fcurrent()
} frecord_init()
}
Why does the statement el_hh=(ina+ik+el_hh*v)/ el_hh disappear in the last two "proc int()"? In other words, what function does this statement have?
3. I tried to output the soma.v(0.5) to a .txt file as follows
objref vec
vec=new Vector()
vec.record(&soma.v(0.5))
objref file
file=new File()
file.wopen("temp")
vec.printf(file)
file.close()
and failed. The problem is that soma.v(0.5) is not recorded in vec at all. How to solve this problem?
Thank you very much for your attention and help.