ion valence must be defined in the USEION statement

NMODL and the Channel Builder.
Post Reply
GTR

ion valence must be defined in the USEION statement

Post by GTR »

Dear Ted,
Sorry for the incovenience but I have misled something.I have this .mod file:

Code: Select all

TITLE HCN channel
NEURON {
	SUFFIX HCN
	USEION hcn READ eh WRITE ih
	RANGE ghbar, ih
	GLOBAL finf,ftau
}

UNITS {
	(mA) = (milliamp)
	(mV) = (millivolt)
         (S)=(siemens)
}

PARAMETER {
	ghbar=1.01e-6 (S/cm2) 
        Q10 = 2.0 (1) 
  Q10TEMP = 22 (degC) 
}

STATE {
	f
}

ASSIGNED {
	v (mV)
	celsius (degC) 
	eh (mV)
	ih(mA/cm2)
	finf
	ftau (ms)
        qt (1) 
	}

INITIAL {
	rates(v)
	f = finf
qt = Q10^((celsius-Q10TEMP)/10) 

	
}

BREAKPOINT {
	SOLVE states METHOD cnexp
	ih=ghbar*f*(v-eh)
}

DERIVATIVE states {
	rates(v)
	f' = (finf - f)/ftau
	
}

UNITSOFF

PROCEDURE rates(v(mV)) {
	TABLE finf, ftau  DEPEND celsius FROM -100 TO 100 WITH 200
	ftau = 1/(exp(-14.59-0.086*v)+exp(-1.87+0.0701*v))
	finf = 1/(1+exp((v+75)/5.5))
}
UNITSON
and when I try to make load.dll to the GUI I get this error:

loading membrane mechanisms from nrnmech.dll
Additional mechanisms from files
HCN.mod
hcn_ion ion valence must be defined in
the USEION statement of any model using this ion

NEURON exited abnormally...


I have no problem with the compilation 'nrnmech.dll was built succesfully'
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

There are several errors in the USEION statement, but It's not clear to me why you
are bothering with a USEION statement at all. Is your model going to include an
accumulation mechanism for this new ionic species? Are there other mechanisms that
will affect, or be affected by, the concentration or equilibrium potential of the new ionic
species? If the answers are no and no, then use NONSPECIFIC_CURRENT. Here's
an example:
http://senselab.med.yale.edu/senselab/m ... e/hcno.mod
For more information about NONSPECIFIC_CURRENT, see chapter 9 of The NEURON
Book, or read 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 download from a link on this page
http://www.neuron.yale.edu/neuron/bib/nrnpubs.html

If you absolutely must use USEION, your particular example should be written thusly:

Code: Select all

USEION hcn READ ehcn WRITE ihcn VALENCE n
where n is a nonzero positive or negative integer. You will also need to define the initial
value of ehcn (see chapters 8 and 9 of The NEURON Book).

For an example of a mechanism that uses USEION repeatedly, see
http://senselab.med.yale.edu/senselab/m ... 04/CPR.mod

But unless you have a very good reason to define a new ionic species, you're just
adding complexity without benefit and increasing the likelihood of programmer/user
error.

Disclaimer: the mechanisms cited above are merely examples of proper syntax for
USEION and NONSPECIFIC_CURRENT. This should not be interpreted as an
endorsement of any other aspect of the material in those examples.
Post Reply