rxn.chemutils.reaction_equation.ReactionEquation
- class rxn.chemutils.reaction_equation.ReactionEquation(reactants, agents, products)[source]
Bases:
objectDefines a reaction equation, as given by the molecules involved in a reaction.
- reactants
SMILES strings for compounds on the left of the reaction arrow.
- Type
List[str]
- agents
SMILES strings for compounds above the reaction arrow. Are sometimes merged with the reactants.
- Type
List[str]
- products
SMILES strings for compounds on the right of the reaction arrow.
- Type
List[str]
- Parameters
reactants (
Iterable[str]) –agents (
Iterable[str]) –products (
Iterable[str]) –
- __init__(reactants, agents, products)[source]
Overwrite init function in order to enable instantiation from any iterator and to force copying the lists.
- Parameters
reactants (
Iterable[str]) –agents (
Iterable[str]) –products (
Iterable[str]) –
Methods
__init__(reactants, agents, products)Overwrite init function in order to enable instantiation from any iterator and to force copying the lists.
from_string(reaction_string[, fragment_bond])Convert a ReactionEquation from an "rxn" reaction SMILES.
Helper function to iterate over all the SMILES in the reaction equation
to_string([fragment_bond])Convert a ReactionEquation to an "rxn" reaction SMILES.
Attributes
- classmethod from_string(reaction_string, fragment_bond=None)[source]
Convert a ReactionEquation from an “rxn” reaction SMILES.
- Parameters
cls (
Type[TypeVar(T, bound=ReactionEquation)]) –reaction_string (
str) –fragment_bond (
Optional[str], default:None) –
- Return type
TypeVar(T, bound=ReactionEquation)