NMODL and the Channel Builder.
- Posts: 77
- Joined: Sun Feb 20, 2011 7:15 pm
I am using the gap junction version that is mentioned in NEURON book(chapter 10). In that piece of code(gap.mod), even if i change the units of resistance r there is no impact on the result. For example if I change the units of r to ohm or gigaohm or leave it dimensionless it neither produces error or alters the result. May i know the reason for this ? By result i mean voltage response of either of the cell.
I am pasting the code here.
Code: Select all
RANGE r, i
r = 5e3 (megohm)
i = (v - vgap)/r
Thanks in advance.
- Site Admin
- Posts: 5810
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
The NMODL-to-C translator does not do anything about units. It is up to the user to ensure that all assignment statements involve consistent units. A separate program called modlunit, which is invoked from the command line, e.g.
will check somefile.mod and report the first instance of inconsistent units that it finds. It also reports undeclared user-defined symbols, and finds some simple syntax errors. Only one error is identified at a time, so it is necessary to repeatedly revise and test if a file contains more than one error. Unit inconsistencies are fixed by including appropriate scale factors into NMODL code.