sanitize_molecule#
- sanitize_molecule(mol, update_charges=True, sanitize_aromaticity=False, sanitize_kekulize=False)[source]#
Sanitize TMC molecule by updating formal charges to apparent value based on connectivity and use RDKit sanitization without SANITIZE_SETAROMATICITY or SANITIZE_KEKULIZE.
- Parameters:
mol (rdkit.Chem.rdchem.Mol) – RDKit molecule to sanitize
update_charges (bool, optional, default=True) – If True, the charges are updated to apparent values based on connectivity
sanitize_aromaticity (bool, options, default=False) – If False, removes the flag
Chem.SanitizeFlags.SANITIZE_SETAROMATICITYsanitize_kekulize (bool, options, default=False) – If False, removes the flag
Chem.SanitizeFlags.SANITIZE_KEKULIZE