Migrates reaction_matrix_as_strings from a method of Composite into utils.chemistry
Uses this function in two new helper functions in tools.chemistry: reactions_from_stoichiometric_matrix and reactions_from_formulae, which generate a complete list of reactions (forward and reverse) from either the stoichiometric matrix (a 2D numpy array containing the amount of component j in phase i), or from a list of formulae (as strings or dictionaries of elemental amounts).
This PR:
reaction_matrix_as_strings
from a method ofComposite
intoutils.chemistry
tools.chemistry
:reactions_from_stoichiometric_matrix
andreactions_from_formulae
, which generate a complete list of reactions (forward and reverse) from either the stoichiometric matrix (a 2D numpy array containing the amount of component j in phase i), or from a list of formulae (as strings or dictionaries of elemental amounts).New tests are provided.