Higher order derivatives in NMODL

NMODL and the Channel Builder.
Post Reply
theiera
Posts: 8
Joined: Mon Feb 26, 2007 5:37 am

Higher order derivatives in NMODL

Post by theiera »

We're currently trying to implement a second order equation in a mod file.
According to the example given inside the deriv.c file (src/nmodl/deriv.c) it should be easy to do so.
However, the given example does not compile and it contains old NMODL commands. The article, which so far has been my reference for tricky implementations in NEURON, nmodl400.pdf states that higher order ODE can be solved by NEURON but does not show how to write them in the mod file.
Did anybody face this problem before?

Best regards
Sergio
ted
Site Admin
Posts: 5814
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Did anybody face this problem before?
Which one--sketchy documentation, obscure syntax, high order ODEs? All of them, I'd bet.
According to the example given inside the deriv.c file (src/nmodl/deriv.c) it should be easy to do so.
It's not possible to just rewrite it as a family of 1st order ODEs?
theiera
Posts: 8
Joined: Mon Feb 26, 2007 5:37 am

Post by theiera »

I already wrote the mod file to solve a family of 1st order ODE.
Since in the nmodl400.pdf file (pg18) is written that it's possible to write ODE with higher order derivatives I tried to do so, without success.
Searching for info i got to the file deriv.c where a long comment shows an example for MODL where a 3rd order ODE is implemented.
However i could not get nrnivmodl to compile it.
I'll keep on using the first version of my mod file.

Thanks
Sergio
hines
Site Admin
Posts: 1607
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

It was broken by the cvode extensions
back in the 90's. Hence the

Code: Select all

nocmodl: ../../../nrn/src/nmodl/deriv.c:1151: cvode_diffeq: Assertion `s' failed.
My feeling is that the limitation is not
significant but the documentation should
be updated to reflect that only first order
equations are supported.
Post Reply