Injecting high current value

NMODL and the Channel Builder.
Post Reply
shyam_u2
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Injecting high current value

Post by shyam_u2 »

Hi,

In my model I want to inject a current of 40000 nA (0.04 mA) for 0.05 ms. I am delivering it as a single stimulus (using IClamp) or as a stimulus train (using the method which is given as answer to the following question in FAQ section "I just want a current clamp that will deliver a sequence of current pulses at regular intervals. Vector play seems like overkill for this" ). In both cases NEURON says "exp(999.222) out of range, returning exp(700)". I know that exp(900) is Inf, but where this exp term is involved ? Is it not possible to inject such a high value of current ?
I tried converting the unit of current stimulus to mA in iPulse3.mod. But NEURON cries unit descrepancy, and throws the following error.
The previous primary expression with units: 0.001 coul/sec

is missing a conversion factor and should read:

(1e+06)*()

at line 46 in file iPulse.mod

ival = amp<<ERROR>>
Can someone help me on this ?
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Injecting high current value

Post by ted »

shyam_u2 wrote:I know that exp(900) is Inf, but where this exp term is involved ?
Does your model have any voltage gated currents whose gating variables are functions of membrane potential that involve exp()?
Is it not possible to inject such a high value of current ?
In the real world, probably not. The resistance of a patch clamp electrode is generally > 10 megohms, and almost never smaller than 5 megohms. 40 uA requires a driving force of no less than 200 V, which is probably sufficient to destroy the electrode and the patch clamp itself. In NEURON, _many_ amperes can be injected into a model cell. That won't break a simulation of a passive model, but it might cause some numeric overflow problems for mechanisms that involve exponential functions of membrane potential. It may be possible to revise such mechanisms in a way that allows them to work properly even when driven so far beyond the physiological / physically achievable range, but to what end?
shyam_u2
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Re: Injecting high current value

Post by shyam_u2 »

OK.I can understand that it is due to numeric overflow problems for mechanisms that involve exponential functions of membrane potential.

But why does NEURON show segmentation fault when I inject a high value of current.
/usr/local//i386/bin/nrniv: Segmentation violation
in init.hoc near line 71
run() //run a single time step
^
fadvance()
advance()
step()
continuerun(2000)
and others
errno set 16 times on last execution
shyam_u2
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Re: Injecting high current value

Post by shyam_u2 »

I have seen this segmentation error at many occasion. Can you please explain what does it actually mean ?
hines
Site Admin
Posts: 1607
Joined: Wed May 18, 2005 3:32 pm

Re: Injecting high current value

Post by hines »

A segmentation violation indicates a serious memory bug which should not occur in your situation (no obvious precursor error).
I'd like to reproduce this and diagnose the underlying reason for it. Could you send a zip file to me with all the hoc,ses,mod files
needed to generate the problem to michael dot hines at yale dot edu
hines
Site Admin
Posts: 1607
Joined: Wed May 18, 2005 3:32 pm

Re: Injecting high current value

Post by hines »

Acutally, I'm going to predict that the latter part of the error sequence is an overflow voltage value of NaN which, in some TABLE of some mod file,
got past the "if (v > 200)" or "if (v < 100)" traps to generate a table index outside of the table memory, finally ending in a segmentation violation.
But I'm curious how the voltage ever got to NaN.
shyam_u2
Posts: 77
Joined: Sun Feb 20, 2011 7:15 pm

Re: Injecting high current value

Post by shyam_u2 »

Thank you Hines.. I will send the zip version of the code to you..
Post Reply