aquakin.check_conservation#
- aquakin.check_conservation(model, composition, *, tol=0.01, params=None, quantities=None)[source]#
Return the list of conservation violations
(reaction, quantity, residual).A reaction/quantity pair is reported when
abs(residual) > tol. The defaulttol(1e-2) tolerates the two-decimal rounding of published stoichiometric coefficients while still flagging genuine imbalances (which are typically order 0.1-1). Restrict to specificquantitiesif desired.- Parameters:
model (CompiledModel)
composition (Composition)
tol (float)
params (Any | None)
quantities (list[str] | None)
- Return type:
list[tuple[str, str, float]]