What is the numeric integration method of cnexp?

NMODL and the Channel Builder.
Locked
gaoyy18
Posts: 11
Joined: Tue Mar 14, 2023 11:33 am

What is the numeric integration method of cnexp?

Post by gaoyy18 »

Hi,
I see the following codes for HH channel in hh.mod(https://raw.githubusercontent.com/neuro ... noc/hh.mod)

Code: Select all

BREAKPOINT {
        SOLVE states METHOD cnexp
        gna = gnabar*m*m*m*h
	ina = gna*(v - ena)
        gk = gkbar*n*n*n*n
	ik = gk*(v - ek)      
        il = gl*(v - el)
}
My question for HH channel and cnexp method is:
1. When setting 'secondorder=0' in NEURON scripts, does it mean NEURON will use implicit integration method when iteratively updating both the membrane voltage and voltage-gated variables m, n, h by solving differential equations?
2. if 1 is right, what is the updating sequence for a)membrane voltage and b)voltage-gated variables m, n, h?
The following is my guess, I'm not sure whether it is right, can anyone helps?
1) NEURON will first update a)membrane voltage from v(t) to v(t+1), using b)voltage-gated variables m, n, h at time t(i.e. m(t), n(t), h(t)), using implicit integration method.
2) Then update b)voltage-gated variables m, n, h from m(t), n(t), h(t) to m(t+1), n(t+1), h(t+1), also using implicit integration method.
3) After 1) 2), we get variables at time t+1, and repeat 1) 2)...

It is right or not? Or anyone can help for the correct updating sequence for HH channel?
gaoyy18
Posts: 11
Joined: Tue Mar 14, 2023 11:33 am

Re: What is the numeric integration method of cnexp?

Post by gaoyy18 »

To anyone who later sees this post:
I got it, cnexp uses analytical integration method instead of numerical method.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: What is the numeric integration method of cnexp?

Post by ted »

1) NEURON will first update . . .
Not quite. For implementational details and sequence of execution, see chapter 7 of The NEURON Book. If you don't have the book, you might want to pick up this preprint of that chapter https://www.neuron.yale.edu/ftp/ted/boo ... xedref.pdf

This thread is now closed because it is starting to duplicate the discussion in Using NMODL integration of ODEs: sparse viewtopic.php?t=4567; the conversation will be continued there.
Locked