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

Regression in depicting molecules with MDL query atoms #6054

Closed
ptosco opened this issue Feb 4, 2023 · 1 comment · Fixed by #6055
Closed

Regression in depicting molecules with MDL query atoms #6054

ptosco opened this issue Feb 4, 2023 · 1 comment · Fixed by #6055

Comments

@ptosco
Copy link
Contributor

ptosco commented Feb 4, 2023

Describe the bug
#5931 caused a regression in depicting molecules with MDL query atoms, which now hit a PRECONDITION.

To Reproduce

from rdkit import Chem
from rdkit.Chem.Draw import rdMolDraw2D

mol = Chem.MolFromMolBlock("""
  MJ201100                      

  6  6  0  0  0  0  0  0  0  0999 V2000
   -1.7633    0.8919    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.4778    0.4794    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.4778   -0.3456    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.7633   -0.7580    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.0488   -0.3456    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.0488    0.4794    0.0000 A   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  2  3  1  0  0  0  0
  3  4  1  0  0  0  0
  4  5  1  0  0  0  0
  1  6  1  0  0  0  0
  5  6  1  0  0  0  0
M  END
""")

drawer = rdMolDraw2D.MolDraw2DSVG(-1, -1)
drawer.DrawMolecule(mol)

****
Pre-condition Violation
bad query type
Violation occurred on line 1169 in file /scratch/toscopa1/src/rdkit/Code/GraphMol/MolDraw2D/DrawMol.cpp
Failed Expression: atom.getQuery()->getDescription() == "AtomOr"
****

Expected behavior
An exception should not occur

@ptosco ptosco added the bug label Feb 4, 2023
ptosco pushed a commit to ptosco/rdkit that referenced this issue Feb 4, 2023
@ptosco ptosco mentioned this issue Feb 4, 2023
@greglandrum
Copy link
Member

greglandrum commented Feb 5, 2023

I think this is a duplicate of #6033

@greglandrum greglandrum added this to the 2022_09_5 milestone Feb 5, 2023
greglandrum pushed a commit that referenced this issue Feb 5, 2023
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
ricrogz pushed a commit to ricrogz/rdkit that referenced this issue Feb 7, 2023
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
greglandrum pushed a commit that referenced this issue Feb 23, 2023
Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants