Helper functions#

gloryxr.utils#

Utility functions for GLORYxR metabolite prediction.

gloryxr.utils.reactions_to_table(reactions: list[ChemicalReaction]) DataFrame[source]#

Convert chemical reactions to a pandas DataFrame.

Parameters:

reactions – Iterable of chemical reactions

Returns:

DataFrame with Educt, Product, and Reaction columns, as well as additional columns for certain reaction properties.

gloryxr.utils.extract_smiles_for_soms(mol: Mol) list[str][source]#

Extract SMILES strings for sites of metabolism from a molecule.

Parameters:

mol – RDKit molecule object

Returns:

List of SMILES strings for each SOM

gloryxr.utils.mol_without_mappings(mol: Mol) Mol[source]#

Remove atom mapping number information from a molecule.

Parameters:

mol – RDKit molecule object

Returns:

Copy of the given molecule with mapping information removed.