How to change units in a mod file so that after running neuoConstract
the units will be saved?
units: 0.001 sec
units: 1
The units of the previous two expressions are not conformable
at line 75 in file C:/Users/miria/Desktop/neuro/neuroConstruct_1.7.2/nCexamples/Ex4_HHcell/generatedNEURON/CurrentClampExt.mod
beginNextCycle = beginNextCycle + (del + dur)<<ERROR>>
I have tried to change with Notepad++ but the changes can not be saved for the next time.
The error that you are getting here is the result of unit mismatch between the RHS and LHS of the equation:
beginNextCycle = beginNextCycle + (del + dur)
in
CurrentClampExt.mod
file.beginNextCycle
,del
anddur
should have the same units e.g. millisecond.For editing the
CurrentClampExt.mod
file, you can use Notepad++ or any other text editor. The constants/variables for equation are declared most likely in the mod file's ASSIGNED or PARAMETER block. Make sure that the these variables follow a unit. For example:where (ms) refers to millisecond.
You can check the units of mod files by using NEURON simulator's 'modlunit' feature. See here for more details: https://www.neuron.yale.edu/neuron/static/docs/nmodl/mswin.html
Once you are done with unit correction, then compile the mod file(s) using nrnivmodl (as shown in the above link). If there are no errors, then try to run the code using
neuroConstruct
.