extracellular stimulation with adaptive time step integration

Anything that doesn't fit elsewhere.
Post Reply
leanne
Posts: 5
Joined: Wed Oct 18, 2017 5:15 am

extracellular stimulation with adaptive time step integration

Post by leanne » Wed May 02, 2018 7:33 am

I have a question regarding extracellular stimulation of a fibre model using the files written by Ted (the files for extracellular stimulation and recording). I am using adaptive time step integration (CVode) in my nerve model, which works fine without implementing extracellular stimulation. However, when I implement extracellular stimulation, I get an error, namely:

IDA initialization failure, weighted norm of residual=23034.2
variable time step integration error
fadvance()
advance()
step(1)
run()

I'm guessing I need to implement something extra to make the extracellular stimulation work with adaptive time step integration, but I can't find what. Any help would be greatly appreciated!

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

Re: extracellular stimulation with adaptive time step integration

Post by ted » Wed May 02, 2018 9:29 am

Instead of using a hoc or Python statement to activate adaptive integration, use the VariableTimeStep tool (NeuronMainMenu / Tools / VariableStepControl). Then reduce Absolute Tolerance (by factors of 10) and see if you can find a value that eliminates the error message. If that works, click on the Atol Scale Tool button, which pops up an Absolute Tolerance Scale Factors panel. Click on that panel's Analysis Run button, then click on Rescale. If that succeeds, you might be able to increase the Absolute Tolerance a bit.

leanne
Posts: 5
Joined: Wed Oct 18, 2017 5:15 am

Re: extracellular stimulation with adaptive time step integration

Post by leanne » Fri May 04, 2018 1:29 pm

I just tried to use this method, but I still get the error for the minimum tolerance possible (1e-15).
Does that mean the adaptive time step method won't work with my model, using extracellular stimulation?

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

Re: extracellular stimulation with adaptive time step integration

Post by ted » Fri May 04, 2018 4:56 pm

Does that mean the adaptive time step method won't work with my model, using extracellular stimulation?
This discussion doesn't contain enough information to decide anything. Factors that determine whether adaptive integration succeeds include how your model has been discretized in space, the implementational details of NMODL-specified mechanisms especially ion channels, and even the amplitude of the stimulus that is used.

1. Are all of your NMODL-specified mechanisms compatible with CVODE? Examine the SOLVE statements in each mod file's BREAKPOINT block. Each SOLVE statement should be of the form
SOLVE blockname METHOD methodname
where blockname will be either a DERIVATIVE block (starts with the line
DERIVATIVE blockname {
)
or a KINETIC block (starts with the line
KINETIC blockname {
). The methodname should be cnexp or derivimplicit for a DERIVATIVE block, or sparse for a KINETIC block.]

If you see any other methods, that's not good. It's also not good if you find a SOLVE statement of the form
SOLVE blockname
i.e. the METHOD part is missing. In this case, blockname will be the name of a PROCEDURE block (starts with the line
PROCEDURE blockname {
).

Let me know whether all of your mod files are OK, or if you discover either of the "bad" cases.

2. How did you decide what values to use for nseg? Did you use the d_lambda rule, or did you do something else?

Post Reply