Page 1 of 1

Absolute tolerance scale in RxD

Posted: Wed Apr 19, 2017 12:25 pm
by bschneiders
I have been getting numerical errors when simulating my model in RxD, and I think they are due to scaling within CVode. I've seen how to use the absolute tolerance scale multiplier for species specified in MOD files ( ... .atolscale) and am using the following code in any MOD files containing calcium:

Code: Select all

      ca    (mM)  <1e-6> 
However, is there a way to set this scale for RxD species as well? While calcium is in my calcium channels and pump MOD files and can therefore be scaled there, I have several RxD species in my model that don't come up in MOD files (i.e. a calcium buffer), but they still need to be scaled. Any suggestions on how to do so?

See the following for a plot of the error I'm talking about (the image wouldn't display so here is the URL):

Re: Absolute tolerance scale in RxD

Posted: Thu Apr 20, 2017 3:53 pm
by ramcdougal
I just added this functionality to the development branch.

Get a copy via

Code: Select all

git clone
and then compile as normal.

Specify an atolscale when you define the rxd.Species, e.g.

Code: Select all

ca = rxd.Species(cyt, initial=0, atolscale=1e-3)
(If you've already set cvode.atol to 1e-3, this means that it would try to compute calcium to an absolute accuracy of 1e-6.)