Brief description: 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+ channel. This reduction factor equals 1/(1+2×Ca.bgr×V), where V is the diffusion volume (in units of μm3), and Ca.bgr 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 scripts!

Technical explanation: 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+ channel, or 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 Ca.source specifications and 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 in question, 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%).

Epilogue: 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.

Most recent buggy versions (6.8.9 and 7.8.9): provided for bug verification only, do not use otherwise!
VersionCa2+ buffers: Source: Executables:
Release 7.8.9 Apr 9, 2018 Cooperative UNIX MSDN C++ Win64 OS X 10.13.4
Release 6.8.9 Apr 9, 2018 Simple (faster code) UNIX MSDN C++ Win64 OS X 10.13.4
Older versions of CalC are free of this bug (but not as accurate as the latest versions x.9.2):
VersionCa2+ buffers: Source: Executables:
Release 7.7.4 Mar 17, 2014 Cooperative UNIX MSDN C++ Win64 Mac OS X
Release 6.7.4 Mar 17, 2014 Simple (faster code) UNIX MSDN C++ Win64 Mac OS X
Most recent bug-free versions of CalC (6.9.4 and 7.9.4):
VersionCa2+ buffers: Source: Executables:
Release 7.9.4 Aug 9, 2018 Cooperative UNIX MSDN C++ Win64 OS X 10.11.6
Release 6.9.4 Aug 9, 2018 Simple (faster code) UNIX MSDN C++ Win64 OS X 10.11.6
[ Link to full descriptions of all CalC release updates ]



Supported in part by the National Science Foundation grants 0417416, 0817703 and 1517085. However, NSF bears no responsibility for any findings, recommendations or conclusions provided by this material.
Last modified: May 1, 2018             Maintained by Victor Matveev