modlunit checks for units inconsistencies and also detects syntax errors. Note that some units inconsistencies are more "apparrent" and benign than others. Such is the case with this particular one:
- Code: Select all
~/Downloads/NEURON/MRGaxon$ modlunit AXNODE.mod
model 1.1.1.1 1994/10/12 17:22:51
Checking units of AXNODE.mod
units: 1
units: 1000 /sec
The units of the previous two expressions are not conformable
at line 106 in file AXNODE.mod
mp'= (mp_inf - mp) / tau_mp<<ERROR>>
as long as tau_mp is in units of ms (milliseconds). To eliminate the error message, in the ASSIGNED block change the declaration
tau_mp
to
tau_mp (ms)
Note that modlunit stops at the first error it encounters. If a file contains many errors, it is necessary to
- Code: Select all
repeat
run modlunit
fix the error it detected
until it detects no error
Looking inside the mod file I find a large section with UNITSOFF ... UNITSON which includes the assignment to tau_mp. Since this model has been used in a number of papers, I assume that it actually works and that the author just didn't want to bother with the units?
One would like to think so. You could remove the UNITSOFF...UNITSON, then check for and fix all units inconsistencies. For example, the formula for q10_1 would become
q10_1 = 2.2 ^ ((celsius-20 (degC))/(10 (degC)))
The result might be satisfying from one perspective, but applying such fixes everywhere that modlunit demands them would impair the readability of the code. Most of the formulas that are required by HH-style model specifications are pretty straightforward, and visual inspection is sufficient to reassure one that units are indeed consistent.
The most common serious errors are improper placement or omission of parentheses (usually causes gross code failure), or the more difficult to detect decimal points in the wrong place or +/- substitutions. modlunit might help detect the former, but it won't help with the latter.
I'm also wondering why the authors created 6 STIN sections in series (with nseg=1 in each) rather than a single longer STIN section with a larger nseg. I don't see any reason to add the extra sections.
It is always difficult to infer motivation. Maybe they were thinking about making these STIN sections have different lengths, or different values of Ra (cytoplasmic resistivity is a "section variable" i.e. applies to all of a section's segments), maybe 6 was the right number to reproduce a particular observation, or maybe it was pure accident. The only way to know is to ask the authors.