channels created with NMODL: problem of strange graphs

NMODL and the Channel Builder.
Post Reply
fl

channels created with NMODL: problem of strange graphs

Post by fl »

Hello,

I created some ion channels using NMODL, compiled them into a dll, and then inserted them into a simple soma created using HOC. Then, I applied an input current. Depending on the amplitude of current injected, the data lines on the graphs for voltage, current, and state begin normally, but then, when the current is applied, it flies off to the lower left hand side of the graph window at a 45 degrees angle, as shown in the image below. What is going on? Is there some sort of convergence problem? This image is already taken with a current amplitude value that causes the least problem. With different current values, it is even worse.

Image

When I inserted these channels into the pyramidal cell I'm trying to simulate, the problem is much worse since the currents/states aren't correct at all, as seen below:

Image

Do you know what could be causing this? I'm relatively new to Neuron and NMODL, so I'm not sure what could be causing this.

Thanks so much for your help.

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

Post by ted »

One or more of the mechanisms is incorrect.

Suggestions:
1. Be sure to read about similar mechanisms in chapter 9 of The
NEURON Book, or at least the "enhanced preprint" of
Hines, M.L. and Carnevale, N.T.
Expanding NEURON's repertoire of mechanisms with NMODL.
Neural Computation 12:995-1007, 2000
which you can find here
http://www.neuron.yale.edu/neuron/bib/nrnpubs.html
2. Test each mod file with modlunit. Fix every error that you encounter.
After each fix, test again until all errors have been eliminated.
3. Test each mechanism individually. Verify the voltage dependence of
the rates (if your implementation uses kinetic schemes) or of the gating
variables' time constants and steady state values. You might also consider
running a voltage clamp experiment on each mechanism, using a single
compartment model that contains only that individual mechanism, to
verify that the conductance and current time course and magnitude are
what you expect.

Alternatively you may consider implementing your mechanisms with the
Channel Builder (one instance of this tool per current). This is much
easier to work with than NMODL, not least because it provides its own
display of the voltage dependence of rates, steady states, and time
constants, and the mechanisms actually execute faster than compiled
NMODL code.

If this fails to eliminate the problem, at least it will help you identify
which mechanism is causing the trouble, at which point it will be
necessary to see your code in order to render further advice.
fl

Post by fl »

Ted, thanks for your detailed reply!

It turned out the main cause of the problem was a divide by zero error, which happened since some of the equations I was using were created using mathematical fits of experimental data (and so 0/0 was possible for some values of V).
Post Reply