linchemin.cheminfo.models.ChemicalEquation

class linchemin.cheminfo.models.ChemicalEquation(catalog: dict = <factory>, role_map: dict = <factory>, stoichiometry_coefficients: dict = <factory>, hash_map: dict = <factory>, uid: int = <factory>, rdrxn: ~rdkit.Chem.rdChemReactions.ChemicalReaction | None = None, smiles: str = <factory>, mapping: ~linchemin.cheminfo.models.Ratam | None = None, template: ~linchemin.cheminfo.models.Template | None = None, disconnection: ~linchemin.cheminfo.models.Disconnection | None = None)[source]

Dataclass holding information of a chemical reaction

__init__(catalog: dict = <factory>, role_map: dict = <factory>, stoichiometry_coefficients: dict = <factory>, hash_map: dict = <factory>, uid: int = <factory>, rdrxn: ~rdkit.Chem.rdChemReactions.ChemicalReaction | None = None, smiles: str = <factory>, mapping: ~linchemin.cheminfo.models.Ratam | None = None, template: ~linchemin.cheminfo.models.Template | None = None, disconnection: ~linchemin.cheminfo.models.Disconnection | None = None) None

Methods

__init__([catalog, role_map, ...])

build_rdrxn(use_reagents[, use_atom_mapping])

To build a rdkit ChemicalReaction object from the ChemicalEquation instance

build_reaction_smiles(use_reagents)

To build a reaction smiles from the smiles of the involved Molecule instances

get_products()

To get the list of products

get_reactants()

To get the list of reactants

get_reagents()

To get the list of reagents

to_dict()

To return a dictionary with all the attributes of the ChemicalEquation instance

Attributes

disconnection

(Union[Disconnection, None]) The Disconnection object (default None, if the ChemicalEquation is not mapped).

mapping

(Union[Ratam, None]) The Ratam object with the information about the atom mapping (default None, if the ChemicalEquation is not mapped).

rdrxn

(Union[cif.rdChemReactions.ChemicalReaction, None]) The RDKit ChemicalReaction object corresponding to the ChemicalEquation (default None)

template

(Union[Template, None]) The Template object (default None, if the ChemicalEquation is not mapped).

catalog

(dict) The catalog of the Molecule instances involved in the chemical reaction.

role_map

(dict) The dictionary mapping the uid of the involved Molecules to their roles (reactants, reagents and products).

stoichiometry_coefficients

(dict) The dictionary mapping each role to a dictionary containing the uids of the Molecules with that role and their stoichiometry coefficients {'role': {uid: n}}

hash_map

(dict) The dictionary mapping properties with hash value derived from them

uid

(int) The integer representing the unique identifier of the reaction.

smiles

(str) The SMILES representation of the reaction.