Is inserting the hh mechanism compulsory?

NMODL and the Channel Builder.
Post Reply
ipv1313
Posts: 5
Joined: Wed Nov 09, 2022 3:51 am
Location: Indian Institute of Technology Delhi

Is inserting the hh mechanism compulsory?

Post by ipv1313 »

Hello,
I am trying to implement the persistent sodium current in my model. For this, I have removed the hh mechanism from my code. By doing so, the following error occurs:

Code: Select all

hh mechanism not inserted in section dopaminergic[0].soma
C:\nrn\bin\nrniv.exe:
 in C:/Users/verma/OneDrive/Model_OneDrive/test.hoc near line 244
 addgraph("dopa.soma.ina", 2, 1)
I am using this implementation of persistent sodium current:

Code: Select all

UNITS {
        (S) = (siemens)
        (mA) = (milliamp)
        (mV) = (millivolt)
}
 
NEURON {
        SUFFIX NaP
        USEION na READ ena WRITE ina
        RANGE gnaPbar,ena, ina
        RANGE minf
        RANGE tau_m
        RANGE vhalfAct,slopeAct
}
 
PARAMETER {
        v   (mV)
        dt  (ms)
       gnaPbar  = 0.00002  (S/cm2)
        ena = 50 (mV)
        tau_m = 0.1 (ms)
        vhalfAct = -57 (mV)
		slopeAct = 3.5
}
 
STATE {
        m
}
 
ASSIGNED {
        ina (mA/cm2)
        minf
}
 
BREAKPOINT {
        SOLVE states METHOD cnexp
        ina = gnaPbar*m*(v - ena)      
}
 
UNITSOFF

INITIAL {
        m = minf
}

DERIVATIVE states { 
        LOCAL minf
        minf = 1/(1 + exp(-(v - vhalfAct)/slopeAct))
        m' = (minf-m)/tau_m
}
 

 
UNITSON


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

Re: Is inserting the hh mechanism compulsory?

Post by ted »

Clearly you have missed the latest ukase: "everything is forbidden, except that which is mandatory."

Regarding your question:

"addgraph" is not a NEURON keyword. Nobody knows what it is except you (and maybe someone else if you're reusing code that was written by a third party).

This

Code: Select all

hh mechanism not inserted in section dopaminergic[0].soma
C:\nrn\bin\nrniv.exe:
 in C:/Users/verma/OneDrive/Model_OneDrive/test.hoc near line 244
 addgraph("dopa.soma.ina", 2, 1)
looks like a concatenation of two different error messages. I suppose it is possible for a single statement to provoke such a pair of messages, but I don't recall running into such a situation.

The first line indicates that NEURON encountered a statement that expects the hh mechanism to be present in the currently accessed section. The second line indicates that NEURON encountered a statement that expects a section to have a mechanism that WRITEs ina, but the section lacked such a mechanism.

Remember that sequence of execution is important in a procedural programming language like hoc or Python. A thing must exist before you can use it. If a section doesn't have a mechanism that WRITEs ina, trying to refer to the sodium current at any location in that section will produce an error message.
Post Reply