mcs07 / MolVS

Molecule Validation and Standardization
https://molvs.readthedocs.io/
MIT License
153 stars 52 forks source link

Loss of chirality when converting to canon tautomer #10

Open jose-manuel opened 7 years ago

jose-manuel commented 7 years ago

Dear Matt,

sorry for spamming this page!

I have an issue when computing the canon tautomer of ibuprofen, see below the test code.

The chirality definition is lost upon processing.

Could you kindly indicate if this is a bug, a feature or simply if I'm doing something wrong?

This code actually worked for several other tests, so I'm not sure what is going on.

Thanks in advance for your help.

Cheers, Jose Manuel

Test code

from rdkit import Chem from molvs import tautomer

smiles = 'CC(C)C1=CC=C(C@HC(=O)[O-])C=C1' m = Chem.MolFromSmiles(smiles) canonicalizer = tautomer.TautomerCanonicalizer() m_canon = canonicalizer.canonicalize(m)

initial mol object:

print Chem.MolToSmiles(m, isomericSmiles=True) 'CC(C)C1=CC=C(C@HC(=O)[O-])C=C1'

canonicalized object:

print Chem.MolToSmiles(m_canon, isomericSmiles=True) CC(C)c1ccc(C(C)C(=O)[O-])cc1

jose-manuel commented 7 years ago

Dear Matt, I asked a colleague of mine and we did some more digging.

Please find attached a python notebook with more info.

What do you think?

Cheers, Jose Manuel

test_molvs_canon_tautomer_chirality.zip