Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent canonical tautomer on repeated application #3755

Closed
darintay opened this issue Jan 20, 2021 · 1 comment
Closed

Inconsistent canonical tautomer on repeated application #3755

darintay opened this issue Jan 20, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@darintay
Copy link

Describe the bug
Tautomer canonicalization seems to be occasionally inconsistent, repeated canonicalizations will produce different results.

To Reproduce

Repeatedly pick the canonical tautomer for Serine.

from rdkit import Chem
from rdkit.Chem.MolStandardize import rdMolStandardize

enumerator = rdMolStandardize.TautomerEnumerator()

mol1 = Chem.MolFromSmiles('C([C@@H](C(=O)O)N)O')
mol2 = enumerator.Canonicalize(mol1)
mol3 = enumerator.Canonicalize(mol2)

print('\n'.join([
    Chem.MolToSmiles(mol1),
    Chem.MolToSmiles(mol2),
    Chem.MolToSmiles(mol3)
]))

Output:

N[C@@H](CO)C(=O)O
NC(CO)C(=O)O
NC(C=O)C(O)O

Expected behavior

I would expect mol2 to be the same as mol3. The canonical tautomer of the canonical tautomer should still be the original canonical tautomer (unless we hit MaxTautomers or something like that, which is not occurring here).

Instead mol2 and mol3 differ in where they've put the double bond.

Configuration (please complete the following information):

  • RDKit version: 2020.09.3
  • OS: Ubuntu 20.04
  • Python version (if relevant): 3.7.9
  • Are you using conda? Yes
  • If you are using conda, which channel did you install the rdkit from? conda-forge
@darintay darintay added the bug label Jan 20, 2021
@ptosco ptosco self-assigned this Jan 21, 2021
@ptosco
Copy link
Contributor

ptosco commented Jan 21, 2021

@darintay This does look like a bug to me, I'll take a look. Thanks for reporting it!

ptosco added a commit to ptosco/rdkit that referenced this issue Jan 21, 2021
@ptosco ptosco mentioned this issue Jan 21, 2021
@greglandrum greglandrum added this to the 2021_03_1 milestone Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants