Molecular standardization aligns different representations of the same compound into a consistent form, preventing redundant structures from confusing comparisons and machine-learning models. section 2.2.2 section 3.2.2
A practical standardization pipeline can:
- Disconnect covalently bonded metal atoms, clean functional groups, and assign stereochemistry. section 3.2.2
- Remove redundant chirality specifications, salts, solvents, and other fragments while retaining the largest parent fragment. section 3.2.2
- Neutralize molecules where possible and select a deterministic canonical tautomer for reproducible comparisons. section 3.2.2
GBR-12909 and clofilium phosphate
Standardization neutralizes GBR-12909 and removes excess fragments from clofilium phosphate, producing entries suitable for downstream fingerprint representation. section 3.2.2
Listing 3.5 SMILES to Mol Conversion & Mol Standardization
from rdkit.Chem.MolStandardize.rdMolStandardize import (
Cleanup,
LargestFragmentChooser,
TautomerEnumerator,
Uncharger
)
def process_smiles(smi):
mol = rdkit.Chem.MolFromSmiles(smi)
if mol is None: return None
mol = Cleanup(mol) #A
mol = LargestFragmentChooser().choose(mol) #B
mol = Uncharger().uncharge(mol) #C
return TautomerEnumerator().Canonicalize(mol) #DInspect a compact RDKit implementation that converts SMILES, cleans molecules, keeps the largest fragment, uncharges structures, and canonicalizes tautomers. section 3.2.2
