rxn.chemutils.conversion.sanitize_mol
- rxn.chemutils.conversion.sanitize_mol(mol, *, include_sanitizations=None, exclude_sanitizations=None)[source]
Sanitize an RDKit Mol with the specification of sanitizations to include or to exclude.
Note: the RDKit sanitization function does not remove unnecessary hydrogens. See the function remove_hydrogens to do that.
- Raises
SanitizationError for unsuccessful sanitizations –
- Parameters
mol (
Mol
) – molecule to sanitizeinclude_sanitizations (
Optional
[List
[Union
[SanitizeFlags
,int
]]], default:None
) – sanitizations to do. Exclusive with exclude_sanitizations.exclude_sanitizations (
Optional
[List
[Union
[SanitizeFlags
,int
]]], default:None
) – sanitizations to exclude, all the other ones will be applied. Exclusive with include_sanitizations.
- Return type
None