Indeed, inconsistency of units is the problem. But before we get to that, here are a couple of suggestions.
First, you may have noticed that NEURON's point process and artificial spiking cell classes have names that are capitalized, but that the names of density mechanisms use lower case. This reflects a common practice of using capitalized names for class names (density mechanisms are not treated as classes). Since your NMODL code defines a density mechanism, you might want to follow this practice and use a lower case name for your mechanism, such as
SUFFIX chr2.
Second, you might want to change the name of the current variable from ichr2 to plain old i, so its name in hoc will be i_chr2. Otherwise its hoc name will be something like ichr2_chr2 or ichr2_CHR2. That that would be would be redundant redundant, no no? Besides, i_chr2 is easier to type. For similar reasons, you might also want to change the name of the channel density parameter from gchr2 to plain old g.
i have assigned mS/cm2 for gchr2 and mv for v so ichr2 should be mA/cm2.
Figuring out how to fix inconsistent units is a recurring headache. A quick and easy trick that often works is to start with something you are absolutely certain about, then make one change at a time until the answer jumps out at you. Here's how to get the right answer for this one:
1 S * 1 volt = 1 ___
1 S * 1 mV = 1 ___
1 mS * 1 mV = 1 ___
So if you use units of ___/cm2 for g, i (the product of g and v) will be in units of mA/cm2, and no scale factor will be necessary.
Another trick is to look at the source code for a mod file that has no inconsistency of units, like hh.mod.
gl (S/cm2) : leak conductance
v (mV)
el (mV)
il (mA/cm2)
il = gl*(v - el)
It won't tell you why units are consistent, but at least it'll show you what units to use.
"But that's cheating!"
Only if you cheat yourself by not taking the time to figure out why these units are consistent.
Final hints:
1. Make sure that your kinetic scheme accurately reproduces the authors' original model description.
2. In the INTIAL block you'll want to use
SOLVE states STEADYSTATE sparse
instead of
SOLVE states METHOD sparse
This is discussed in the NEURON book (see Appendix for entries related to
INITIAL block / SOLVE )
3. In the BREAKPOINT block are you sure that
i = g*(v)
? Isn't channel conductance a function of the fraction of open channels, and isn't current proportional to the electrochemical gradient (not just the electric potential difference across the membrane)?