molecule
#
Functions:
-
mol_to_smiles
–Convert a molecule to a SMILES string with atom mapping.
-
unmap_smiles
–Remove atom mapping from a SMILES string.
-
map_smiles
–Add atom mapping to a SMILES string.
mol_to_smiles
#
Convert a molecule to a SMILES string with atom mapping.
Parameters:
-
mol
(Mol
) –The molecule to convert.
-
canonical
(bool
, default:True
) –Whether to canonicalize the atom ordering prior to assigning map indices.
Returns:
-
str
–The SMILES string.
Source code in descent/utils/molecule.py
unmap_smiles
#
Remove atom mapping from a SMILES string.
Parameters:
-
smiles
(str
) –The SMILES string to unmap.
Returns:
-
str
–The unmapped SMILES string.
Source code in descent/utils/molecule.py
map_smiles
#
Add atom mapping to a SMILES string.
Notes
Fully mapped SMILES strings are returned as-is.
Parameters:
-
smiles
(str
) –The SMILES string to add map indices to.
Returns:
-
str
–The mapped SMILES string.