descent.utils.molecule

Functions

map_smiles(smiles)

Add atom mapping to a SMILES string.

mol_to_smiles(mol[, canonical])

Convert a molecule to a SMILES string with atom mapping.

unmap_smiles(smiles)

Remove atom mapping from a SMILES string.

descent.utils.molecule.mol_to_smiles(mol: Chem.Mol, canonical: bool = True) str[source]

Convert a molecule to a SMILES string with atom mapping.

Args:

mol: The molecule to convert. canonical: Whether to canonicalize the atom ordering prior to assigning

map indices.

Returns:

The SMILES string.

descent.utils.molecule.unmap_smiles(smiles: str) str[source]

Remove atom mapping from a SMILES string.

Args:

smiles: The SMILES string to unmap.

Returns:

The unmapped SMILES string.

descent.utils.molecule.map_smiles(smiles: str) str[source]

Add atom mapping to a SMILES string.

Notes:

Fully mapped SMILES strings are returned as-is.

Args:

smiles: The SMILES string to add map indices to.

Returns:

The mapped SMILES string.