peppr.sanitize#
- peppr.sanitize(mol: Mol, max_fix_iterations: int = 1000) None [source]#
Fix small issues with RDKit SanitizeMol and sanitize molecule.
This is an alternative to using
SanitizeMol()
directly, in cases it fails due to issues with the molecule which are fixed by this function.- Parameters:
- molChem.rdchem.Mol
The molecule to sanitize.
- max_fix_iterationsint, optional
The maximum number of iterations to fix problems.
Notes
Deals with cases:
AtomValenceException
: add charge if total valence is exceeding default (for N, O atoms only)KekulizeException
: for ring N atoms with unspecified protonation