CVode to solve a KINETIC block?

NMODL and the Channel Builder.
Post Reply
fred

CVode to solve a KINETIC block?

Post by fred »

The online documentation claims that CVode only works with DERIVATIVE blocks. Is this true, or can CVode also be used to solve KINETIC blocks?

I'm asking because the model that I'm building is quite large and has crashed NEURON using the small fixed step that the kinetic schemes recquire.

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

Re: CVode to solve a KINETIC block?

Post by ted »

fred wrote:The online documentation claims that CVode only works with DERIVATIVE blocks.
NEURON's adaptive integrators work with any kind of model description that
involves DERIVATIVE or KINETIC blocks. It would be helpful if you could
point me to the exact location of the statement that said otherwise, so that
we can correct it.
fred

Post by fred »

At www.neuron.duke.edu, click on: Neuron at Yale>Documentation>Programmer's Reference>Quick Index>CVode

There reads the following. I'm guessing that this reference is older than KINETIC blocks, but it was confusing. While I'm at it, it's confusing that my web browser thinks I'm still at neuron.duke.edu when I'm at the yale site. I think that the duke site should be taken down. It has much less information, and it's confusing to have 2 neuron sites with different information.
The two major energy barriers to using the method are the requirement that hh type models be expressed in a DERIVATIVE block (instead of the explicit exponential integration step commonly implemented in a PROCEDURE) and that the solver be explicitly notified of the exact time of any discontinuity such as step changes, pulses, and synaptic conductance onset's.
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

There is confusion on two counts, but the Duke site is not the cause.

You'll find exactly the same information at the Yale site
http://www.neuron.yale.edu/neuron/stati ... cvode.html
because this sequence of actions
fred wrote:At www.neuron.duke.edu, click on: Neuron at Yale>Documentation>Programmer's Reference>Quick Index>CVode
brings up the Yale WWW site in a frame. You have stumbled across one
reason why the use of frames has fallen out of favor--it can leave readers
confused about the origin of what they're reading.

That said, the information that you read was absolutely correct.
The two major energy barriers to using the method are the requirement that hh type models be expressed in a DERIVATIVE block (instead of the explicit exponential integration step commonly implemented in a PROCEDURE) and that the solver be explicitly notified of the exact time of any discontinuity such as step changes, pulses, and synaptic conductance onset's.
Let me disambiguate this for you. Hodgkin & Huxley modeled channel
gating in terms of states that are described by first order ordinary linear
differential equations. When such models are simulated using fixed time
steps, it is possible to shorten run times by using a little trick: if one
assumes that rates and steady state values (e.g. minf and mtau) remain
constant during a time step, then the new value of each state can be
found from the analytic solution of its ODE, e.g.
m(t+dt) = m(t) + (minf(t) - m(t)) * (1 - exp(dt/mtau))

This saves time because numerical integration of an ODE is much slower
than evaluation of an algebraic equation. Consequently, a lot of NMODL
code was written that took advantage of this trick. If you come across a
model that has such a mod file, you will have to replace the algebraic
forms with ODEs in a DERIVATIVE block if you want to use adaptive
integration.
Post Reply