MolVS
MolVS copied to clipboard
Defines `super_parent_syn`
During compound standardization/registration, it can be helpful to preserve molecule identifiers for mapping synonyms or related molecules. This function mirrors the super_parent function, but captures InChI identifiers at each sanitization step and assigns them as properties of the sanitized molecule (either InChI or InChI Key).
smi = '[13CH3][C@@H](C)C/C=C([O-])\O.[Na+]'
mol = Chem.MolFromSmiles(smi)
mol_san = super_parent_syn(mol, 'inchikey')
mol_san.GetPropsAsDict()
{'fragment_inchikey': 'GCBSTXJCFNXFGB-DQIXCRJTSA-M', 'charge_inchikey': 'VBJZLOGJBQCFRJ-BBAZYXFWSA-M', 'isotope_inchikey': 'VBJZLOGJBQCFRJ-BBAZYXFWSA-N', 'stereo_inchikey': 'VBJZLOGJBQCFRJ-UHFFFAOYSA-N', 'tautomer_inchikey': 'VBJZLOGJBQCFRJ-UHFFFAOYSA-N', 'standardize_inchikey': 'FGKJLKRYENPLQH-UHFFFAOYSA-N', 'inchikey': 'FGKJLKRYENPLQH-UHFFFAOYSA-N'}