I want to implement a channel in NMODL that uses both a kinetic scheme as well as an HH type inactivation parameter. Can I have two SOLVE statements within the same mod file-- one with a DERIVATIVE function and one with a KINETIC function? If so, I take it that I just list them one after the other in the BREAKPOINT section?
Thanks in advance for your help.
combining schemes
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
I haven't tried this myself; my guess is that the compiler would complain. My own
inclination would be to use the ChannelBuilder, which is perfectly capable of doing
exactly this, and less of a pain than dealing with NMODL. But you might as well try
NMODL first--the worst that might happen is that it would compile and seem to work,
but produce incorrect results. Of course, you always test each mechanism you use,
to make sure it is working properly, right?
inclination would be to use the ChannelBuilder, which is perfectly capable of doing
exactly this, and less of a pain than dealing with NMODL. But you might as well try
NMODL first--the worst that might happen is that it would compile and seem to work,
but produce incorrect results. Of course, you always test each mechanism you use,
to make sure it is working properly, right?
Thanks for getting back to me. You were right. The NMODL compiler does not like having 2 SOLVE statements and states that the results will be inaccurate. I don't think I can use the ChannelBuilder because (1) I need to include a Ca2+ accumulation mechanism and (2) my ionic current equation is non-standard and I don't see anywhere to modfy that in ChannelBuilder.
Therefore, I wrote out the 12 differential equations for my kinetic states, as well as the HH inactivation gate. Unfortunately, I am getting the following error when I compile, and I am not sure what the culprit is. Could you point in the direction of the likely cause? Would the reference to "diffeq.y" mean that there is an error in the DERIVATIVE block? What type of error could cause this message?
-->
gcc -mno-cygwin -I/cygdrive/c/nrn57/src/scopmath -I/cygdrive/c/nrn57/src/nrnoc -I/cygdrive/c/nrn57/src/oc -I/cygdrive/c/nrn57/lib -I/cygdrive/c/nrn57/mingw -c mod_func.c
nocmodl caLjaf
Translating caLjaf.mod into caLjaf.c
assertion "0" failed: file "diffeq.y", line 194
make: *** [caLjaf.o] Aborted (core dumped)
There was an error in the process of creating nrnmech.dll
Press Return key to exit
Therefore, I wrote out the 12 differential equations for my kinetic states, as well as the HH inactivation gate. Unfortunately, I am getting the following error when I compile, and I am not sure what the culprit is. Could you point in the direction of the likely cause? Would the reference to "diffeq.y" mean that there is an error in the DERIVATIVE block? What type of error could cause this message?
-->
gcc -mno-cygwin -I/cygdrive/c/nrn57/src/scopmath -I/cygdrive/c/nrn57/src/nrnoc -I/cygdrive/c/nrn57/src/oc -I/cygdrive/c/nrn57/lib -I/cygdrive/c/nrn57/mingw -c mod_func.c
nocmodl caLjaf
Translating caLjaf.mod into caLjaf.c
assertion "0" failed: file "diffeq.y", line 194
make: *** [caLjaf.o] Aborted (core dumped)
There was an error in the process of creating nrnmech.dll
Press Return key to exit
Previous occurence of error message
Moritz,
I remember seeing this error message before on the forum. You might therefore want to have a look at the following topic and then update your neuron version.
https://www.neuron.yale.edu/phpBB2/view ... ght=diffeq
Raj
I remember seeing this error message before on the forum. You might therefore want to have a look at the following topic and then update your neuron version.
https://www.neuron.yale.edu/phpBB2/view ... ght=diffeq
Raj
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Apply the principle of modular software design. Specify a Ca accumulation mechanismmoritz wrote:I don't think I can use the ChannelBuilder because (1) I need to include a Ca2+ accumulation mechanism
with NMODL, and specify the channel properties with a ChannelBuilder.
What is the equation? Sometimes a little algebraic rearrangement will put things in a(2) my ionic current equation is non-standard and I don't see anywhere to modfy that in ChannelBuilder.
more tractable form.
Raj and Ted--
Thank you both for your input.
Raj, the link to the postings about that error were very helpful. My DEs depended on multiple other states and were too complex for the intepreter. I broke them down a bit using local variables and was able to compile the mod file.
Since I got the channel working with NMODL, I think I will stick with that.
Again, thanks for your replies!
Mickey
Thank you both for your input.
Raj, the link to the postings about that error were very helpful. My DEs depended on multiple other states and were too complex for the intepreter. I broke them down a bit using local variables and was able to compile the mod file.
Since I got the channel working with NMODL, I think I will stick with that.
Again, thanks for your replies!
Mickey
I hope you read the topic to the end, because the first solution was discouraged by Michael Hines, because it leads to stability problems, see quote below. Instead he proposed and implemented a fix to Neuron.
Michael Hines wrote:Anyway, DO NOT replace multiargument functions involving the state
mentioned on the left hand side with local variables. That will ruin the numerical stability properties of the translated equations. i.e
Code:
D' = (alphad * sigmoid(D, thetad,sigmad) - D )/taud
cannot be written as
Code:
xxx = alphad*sigmoid(D, thetad, sigmad)
D' = (xxx - D)/taud
because xxx involves D and the diagonal jacobian element needs that
contribution.