24 std::optional<std::string>
state;
33 if (
a.species !=
b.species)
34 return a.species <
b.species;
35 if (
a.state !=
b.state)
36 return a.state <
b.state;
37 return a.charge <
b.charge;
42 using Metadata = std::map<std::string, std::string>;
84 const std::string &
getMetaData(
const std::string & key)
const;
std::vector< Term > TermList
std::map< std::string, std::string > Metadata
std::vector< std::string > getProductSpecies() const
Get all product species involved in the reaction (on RHS)
const std::string & getMetaData(const std::string &key) const
Get the metadata from the reaction.
std::vector< VariableName > getReactantSpecies() const
Get all reactant species involved in the reaction (on LHS)
std::vector< Real > getStoichiometricCoefficients() const
Get the stoeichiometric coefficients for each species in the reaction The sign used matches the sign ...
std::vector< VariableName > getSpecies() const
Get all species involved in the reaction.
std::string stringify(const T &t)
std::vector< std::string > getUniqueProductSpecies() const
Get all unique product species involved in the reaction (on RHS)
std::map< VariableName, Real > getUniqueStoichiometricCoefficients() const
Get the stoeichiometric coefficients for each unique species in the reaction Note: if a species is bo...
std::vector< Reaction > parseReactionNetwork(const std::string &reaction_network_string, bool output_to_cout)
Parses the reaction network from a string form to a vector a Reaction.
std::vector< VariableName > getUniqueSpecies() const
Get all unique species involved in the reaction Note: a species will only appear once even if both a ...
std::optional< std::string > charge
std::vector< VariableName > getUniqueReactantSpecies() const
Get all unique reactant species involved in the reaction (on LHS)
friend bool operator<(const Term &a, const Term &b) noexcept
std::optional< std::string > state
bool hasMetaData(const std::string &key) const
Whether the reaction has the metadata with the given type.