Persistent state variables?

NMODL and the Channel Builder.
Post Reply
kparikh

Persistent state variables?

Post by kparikh » Wed May 24, 2006 2:08 am

Hello, I am trying to model the Schwarz/Eikhoff nonlinear model as modified by Frijns (SEF), based on myelinated rat/cat data (IEEE Trans. Biomed. Engr, v41-6,1994). The model is very similar to Frankenhauser/Huxley (FH). It consists of sodium activation (m), sodium inactivation (h), and potassium activation (n) states with corresponding rates, alpha and beta.

I have modified the FH mod file to fit the SEF parameters, henceforth referred to as the FHSEF model. I have gone over the code for the past couple of days and the units check out and the equations seem to be correct.

To test my model, I have constructed a hoc file, test.hoc that consists of a single node driven by current clamp. Behavior of the model for both HH and FH models seems normal. I get an action potential of correct shape and the state variables seem to rise and decay as they should, and the currents seem fine as well.

When I test the single node with the FHSEF model, the action potential does not look right. On a plot of "v+vrest", the action potential starts at zero, approaches its peak at 120 mV, but then does not decay back to zero. Instead, the potential stays near the Nerst potential of sodium, 71 mV. Likewise, the state variables do not decay back to their steady-state (inf) values either. m and n stay near 1 (remain active), and h remains near zero (inactive). Plot available in test.hoc

I have checked the steady-state values and time constants of the states by using the Grapher to plot them against v. They have been verified against the same functions coded in Matlab as correct.

If someone could provide some insight into the reason v+vrest hovers at the sodium equilibrium potential, I would much appreciate it. v should return back to its resting value, ie v+vrest should return back to zero.

Frijns' paper shows a comparison of the AP generated by FH and one generated by SEF. Although I can reproduce the FH AP, I cannot do the same for the SEF model. I would like to believe my code is error free =), but that may not be the case. Both fhsef.mod and test.hoc are listed below.

Many thanks for the input!

-----Begin test.hoc---------

Code: Select all

load_file("nrngui.hoc")

// Physical properties
create node
access node
node { 
  nseg=1
  L=2.5
  diam=15
  insert fhsef
  Ra = 70
  nai=10  nao=142.0  ki=141.0 ko=4.2
}

// Set temperature and v_init
{celsius=37}
vrest = -84.6
v_init = vrest


// experimental tools
objref stim
stim = new IClamp(.5)
stim.del = .1
stim.dur = .1
stim.amp = 2
ts = 1

// graphical interface appearance
objref g
g = new Graph(0)
g.view(0, 0, 2, 100, 120, 110, 300, 200)
addplot(g,1)

proc fig1() {
	g.erase_all()
	g.size(0,ts,0,120)
	g.addexpr("v-vrest",2,1)
	tstop = ts
	run()
}

proc fig2() {
	g.erase_all()
	g.size(0,ts,0,1)
	g.addexpr("m_fhsef",2,1)
	g.addexpr("h_fhsef",3,1)
	g.addexpr("n_fhsef",4,1)
	tstop=ts
	run()
}

proc fig3() {
	g.erase_all
	g.size(0,ts,-5,5)
	g.addexpr("ina",2,1)
	g.addexpr("ik",3,1)
	g.addexpr("il_fhsef",5,1)
	tstop = ts
	run()
}

proc fig4() {
	g.erase_all
	g.size(0,ts,-5,5)
	g.addexpr("ina+ik+il_fhsef",2,1)
	g.addexpr("i_cap",3,1)
    g.addexpr("ina+ik+il_fhsef+i_cap",5,1)
	tstop = ts
	run()
}

proc menu() {
	xpanel("Choose graph")
	xbutton("Membrane Voltage", "fig1()")
	xbutton("State variables", "fig2()")
	xbutton("Currents", "fig3()")
    xbutton("Ionic Currents", "fig4()")
	xpanel(0,100)
}
// run simulation
menu()

-----End test.hoc----------
Last edited by kparikh on Mon Jun 05, 2006 1:49 pm, edited 1 time in total.

ted
Site Admin
Posts: 5107
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Persistent state variables?

Post by ted » Fri May 26, 2006 6:00 pm

kparikh wrote:I have modified the FH mod file to fit the SEF parameters, henceforth referred to as the FHSEF model. I have gone over the code for the past couple of days and the units check out and the equations seem to be correct.
Your NMODL code does pass modlunit, compiles without complaint, and
is also clean and nicely structured. I was able to quickly reproduce your
observations with the fhsef mechanism (used your hoc code down to the
line "celsius = . . . ", but used the GUI to set up simulation controls,
IClamp, graphs).
On a plot of "v+vrest", the action potential starts at zero, approaches its peak at 120 mV, but then does not decay back to zero. Instead, the potential stays near the Nerst potential of sodium, 71 mV.
Membrane potential rests at ~-86mV, and after the spike v hangs up at
about -12mV. This is about 72mV depolarized relative to rest, but not
the same as ena.
Likewise, the state variables do not decay back to their steady-state (inf) values either. m and n stay near 1 (remain active), and h remains near zero (inactive).
h falls to about 0.09, but that's apparently not close enough to 0 for v to
be pulled back to -86mV.
I have checked the steady-state values and time constants of the states by using the Grapher to plot them against v. They have been verified against the same functions coded in Matlab as correct.
Did Frijns's paper include plots of these voltage-dependent variables?
If someone could provide some insight into the reason v+vrest hovers at the sodium equilibrium potential, I would much appreciate it. v should return back to its resting value, ie v+vrest should return back to zero.
Either there is a mismatch between what is in the paper and what is in
your model, or else this is just another example of the principle that,
in general, it is impossible to reproduce a published computational model
from the paper alone.

Are you certain that you have used the equations and parameters
exactly as presented in the paper? If it is critically important to reproduce
Frijns's model, you have a few options to consider:

First, check the journal to see if it ever published an erratum. Typos
are common, and sometimes somebody notices and gets the journal to
print a correction. This would be the best result for you.

Second, you might try contacting Frijns and asking for the source code.
If this is your lucky day, Frijns might just have it, and it might even be
the actual version used for the results in the paper, and it might also
be understandable. Pretty unlikely sounding, but worth a try.

Third, you might try tuning model parameters to find a set that reproduces
one or more figures (or tables of numerical results) from the paper. It
may be necessary to measure data points from graphs, either manually
or with an "automated scanning" algorithm. Then you can use the
MultipleRunFitter to automate the optimization. A pain? Yes, but doable
if you're working with a paper that gives the equations in the correct form
but lists incorrect values for one or more parameters. If the equation
forms are incorrect, you're out of luck unless you can correctly guess
the correct form.

kparikh

Thanks Ted

Post by kparikh » Mon May 29, 2006 3:13 am

Ted,

Thank you for taking the time to go over my code! As I am new to NEURON, it is good to know that I am at least coding a model correctly. However, you pointed out what I had feared--there must be a discrepency between my model and the one presented in Frijns' paper.

Frijns did not specify all of the parameters in his paper, so I relied on another reference (thesis) to fill in the gaps. I will investigate further, as a colleague of our group supervised the student whose thesis I referenced for parameter values.

Cheers,
kparikh

ted
Site Admin
Posts: 5107
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted » Mon May 29, 2006 10:54 am

Incomplete parameter specification in the original paper--seems to happen
all the time. That's one reason why journals should require authors to
deposit model source code in a publically serchable database when the
paper has been accepted for publication. After all, they already require
authors to deposit sequence data, make reagents and special animal strains
available etc..

My guess is that the spike isn't repolarizing because h is staying too high.
You might try tinkering with the slope of hinf's voltage dependence, or
shifting hinf(v) a few mv hyperpolarized, to see if that helps. Of course
this can be automated with the Multiple Run Fitter, to find the best fit, but
you'll need the time course of the published model's spike (eminently
doable, assuming that the paper has a figure of the spike with a
sufficient time scale).

AntonioC1980
Posts: 3
Joined: Fri Sep 25, 2015 8:17 am

Re: Persistent state variables?

Post by AntonioC1980 » Thu Nov 19, 2015 7:36 am

Dear Ted and kparikh,
I am having similar troubles implementing the SEF model. Was the case resolved, i.e. were you able to correctly implement the model?
There was a publication about your implementation or you uploaded your model (i.e. mod file) in any depository as ModelDB?

Many thanks,
AMC

ted
Site Admin
Posts: 5107
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Persistent state variables?

Post by ted » Thu Nov 19, 2015 10:20 am

Nothing by Schwarz, Eikhoff, or Parikh, and nothing with the string fhsef in ModelDB.

Post Reply