Skip to content

Added tolerance to balance check in multicompartmental_standard_dg_prime()

The multicompartmental_standard_dg_prime() function checks that a transport reaction is balanced by comparing the number or hydrogens and the charge in the inner and outer half reactions. Some floating point number issues can arise with fractional stoichiometries so I added a "tolerance" argument to the function. This defaults to 0 which maintains the previous behaviour but can be set to some small value to avoid raising an error when reactions are only unbalanced by ~10e-16.

Merge request reports