confusing about finitialize() and fadvance()

The basics of how to develop, test, and use models.
Post Reply
nancyShu
Posts: 7
Joined: Tue May 24, 2016 2:27 am

confusing about finitialize() and fadvance()

Post by nancyShu »

Hi all,

Currently I have been using a mod file ribbon_tiger.mod from modelDB, and I found that when I called finitialize() or fadvance() in hoc file, the content in BREAKPOINT BLOCK would be computed twice, sometimes once.
I wonder, in which circumstance, such things (computed twice/once) would happen? Is there a setting switcher?


Thanks
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: confusing about finitialize() and fadvance()

Post by ted »

At each fadvance the effects of channel conductance changes on model dynamics are taken into account by executing statements in the BREAKPOINT block twice--once with an argument of v+0.001 and again with an argument of v--in order to calculate a numerical estimate of the derivative di/dv. This is done for every instance of the NMODL-specified mechanism (i.e. for each instance of a POINT_PROCESS, or for each segment in which a particular density mechanism exists). This conductance is added to the corresponding diagonal element of the Jacobian matrix that had been set up during initialization. This means that if a density mechanism or point process generates a current, the statement in which that current is calculated should be in the BREAKPOINT block. It also means that the statements in the BREAKPOINT block should not do anything that confounds the numerical estimate of di/dv (e.g. by changing a parameter value on each pass through the BREAKPOINT block).

If the BREAKPOINT block contains a SOLVE statement, an fadvance causes the PROCEDURE named in that SOLVE statement to be executed only once--on the first pass through the BREAKPOINT block.
Post Reply