Closed rcolpo closed 2 years ago
Sure, if you create a ReactionSystem (using .from_string
is the easiest when your substances are represented by their chemical formulae), you can call .obeys_mass_balance()
:
https://github.com/bjodah/chempy/blob/dd8b934e9f2732d26ba6b5a71e5ee908079bd739/chempy/reactionsystem.py#L356
Is there are why to check if a chemical equation is stoichiometry balanced?
For example, "C5H6N2O5 + H + HO4P = C4H6N1O4 + C1H2N1O5P1" is balanced and should return True. "C5H6N2O5 + HO4P = C4H6N1O4 + C1H2N1O5P1" is unbalanced and should return false.