-
Notifications
You must be signed in to change notification settings - Fork 998
Tautomer canonicalization loses track of chirality #8390
Copy link
Copy link
Closed as not planned
Description
Describe the Bug
In some cases, a molecule with explicit chirality loses its chirality after being run through rdMolStandardize.CanonicalTautomer() or TautomerEnumerator.Canonicalize(). This seems to happen when an atom next to the chiral center has double bonds (maybe only with ketones, amides, etc?).
To Reproduce
# A really simple test function:
from rdkit.Chem import MolFromSmiles, MolToSmiles
from rdkit.Chem.MolStandardize.rdMolStandardize import CanonicalTautomer
def demo(smiles):
mol = MolFromSmiles(smiles)
mol = CanonicalTautomer(mol)
print(MolToSmiles(mol))
# These work as expected:
demo('NC[C@H](Cl)F')
# -> NC[C@@H](F)Cl
demo('NC[C@@H](Cl)F')
# -> NC[C@H](F)Cl
# These don't:
demo('NC(=O)[C@H](Cl)F')
# -> NC(=O)C(F)Cl
demo('NC(=O)[C@@H](Cl)F')
# -> NC(=O)C(F)Cl
# A few more test cases (only the second preserves chirality):
demo('NC(=C)[C@@H](Cl)F')
# -> CC(=N)C(F)Cl
demo('C(=C)[C@@H](Cl)F')
# -> C=C[C@H](F)Cl
demo ('C(=O)[C@@H](Cl)F')
# -> O=CC(F)ClExpected Behavior
Explicit chiral centers should remain chiral (unless this doesn't make sense in the canonical tautomer).
Configuration
- RDKit version: 2024.9.6
- OS: Ubuntu 22.04 (in Docker)
- Python version: 3.10.12
- Are you using conda? No
Reactions are currently unavailable