The bug was unfortunately introduced during extensive optimizations to the CalC numerical engine in versions x.8.0.
Therefore, this bug is present in CalC versions x.8.0 through x.8.9, and affects scripts that define more than a single Ca2+
channel, in the case
of non-zero background [Ca2+]
The bug leads to a reduction of the Ca2+
current through the 2nd
and each consecutive Ca2+
This reduction factor equals
is the diffusion volume
(in units of μm3
is the background [Ca2+]
(in units of μM).
For example, if Ca.bgr=0.05 (in μM) and the volume
is 1x1x1 μm3
, the reduction is about 9% through all but the first channel
(see diagnostic output below for this case).
If on the other hand the volume is smaller, (0.5 μm)3
, this reduction is around 1.2%.
The bug is fixed in versions x.9.1 posted
on the main CalC homepage
and also below.
Great thanks to Christian Stricker
for alerting me to large charge loss in one of his
Ironically, the bug was a result of a second layer of current amplitude validation checks added in CalC versions 6.8.0 and 7.8.0
to remove the possibility of tiny Ca2+
current leaks due to the partial overlap of current source profile with domain boundaries.
The validation check had a mis-placed initialization statement that caused complex behavior described above when more than one channel is present, therefore it only affects
some of the scripts, thereby slipping by version deployment checks.
Which simulations may be affected:
If you used CalC
versions 6.7.4/7.7.4 or ealier, or
if your script defines only a single Ca2+
if your background [Ca2+]
is zero, your results were not
affected by the bug. If you think you may have used
versions of CalC
x.8.0-x.8.9, and your
model script had multiple
non-zero background [Ca2+]
, I recommend redoing your
simulations with the most recent version of CalC
(x.9.1 and above), to compare with the results you obtained previously.
How to detect the problem:
To spot the problem with your simulation results when running buggy versions of CalC
run your script with the version you had used, or if you didn't save that executable, use versions x.8.9 posted below.
You should look for the following diagnostic output indicating that your model script run results were affected:
#### Source #1 boundary spill-over adjustment factor = 2
#### Source #2 boundary spill-over adjustment factor = 1.82
#### Source #3 boundary spill-over adjustment factor = 1.82
For Cartesian coordinates and point currents on boundary surfaces, and for sufficiently high resolution, all adjustment factors should be close to an integer.
The diagnostic output above indicates that the bug indeed affects this script, reducing
the current through the second and third channels by 9%. You can confirm this further by monitoring the "Charge loss
" diagnostic output,
after removing any uptake
commands from your script, and switching to Noflux
(i.e. Neumann) boundary conditions.
Charge loss should remain small (< 1%).
I started this software project to facilitate reproducibility of simulation
results (in fact, the first CalC publication
was a correction to a previously published flawed simulation), so
this bug is quite upsetting to me. I hope none of the published results were affected (the ones I checked
so far were not). I would be happy to help with any requests to provide old executables,
run and verify your simulation scripts, or post your new or old simulation scripts on my script homepage
Although I run extensive checks on each version of CalC
before release, my battery of tests turns out to be insufficient.
I will improve my release test procedures to catch potential problems such as this one.