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

RDKit crashes on CIP label calculation #5142

Closed
ricrogz opened this issue Mar 28, 2022 · 0 comments · Fixed by #5164
Closed

RDKit crashes on CIP label calculation #5142

ricrogz opened this issue Mar 28, 2022 · 0 comments · Fixed by #5164
Labels
Milestone

Comments

@ricrogz
Copy link
Contributor

ricrogz commented Mar 28, 2022

This seems similar or related to issue #4996:

(I'm using RDKit Release 2022_03_1b1).

mb = """
  Mrv2202 03282213442D          

  0  0  0     0  0            999 V3000
M  V30 BEGIN CTAB
M  V30 COUNTS 12 12 0 0 1
M  V30 BEGIN ATOM
M  V30 1 C 3.3342 -1.54 0 0 CFG=1
M  V30 2 C 4.6679 -0.77 0 0 CFG=1
M  V30 3 C 4.6679 0.77 0 0
M  V30 4 C 3.3342 1.54 0 0
M  V30 5 C 2.0005 0.77 0 0
M  V30 6 C 2.0005 -0.77 0 0 CFG=2
M  V30 7 C 3.3342 -3.08 0 0
M  V30 8 C 0.6668 -1.54 0 0
M  V30 9 C -0.6668 -0.77 0 0
M  V30 10 * 3.3342 3.08 0 0
M  V30 11 C -2.0005 -1.54 0 0
M  V30 12 C 6.0016 -1.54 0 0
M  V30 END ATOM
M  V30 BEGIN BOND
M  V30 1 1 1 2
M  V30 2 1 2 3
M  V30 3 1 3 4
M  V30 4 1 4 5
M  V30 5 1 5 6
M  V30 6 1 6 1
M  V30 7 1 1 7 CFG=3
M  V30 8 1 6 8 CFG=1
M  V30 9 1 8 9
M  V30 10 1 4 10
M  V30 11 1 9 11
M  V30 12 1 2 12 CFG=1
M  V30 END BOND
M  V30 END CTAB
M  END"""
m = Chem.MolFromMolBlock(mb)
Chem.AssignCIPLabels(m)
                                                                                                                   
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-3-ad5ba0ccc1a6> in <module>
----> 1 Chem.AssignCIPLabels(m)

RuntimeError: Substituents should be topologically equivalent!
@ricrogz ricrogz added the bug label Mar 28, 2022
@ricrogz ricrogz mentioned this issue Apr 4, 2022
greglandrum pushed a commit that referenced this issue Apr 7, 2022
* add a test

* update more atomic num == 0 rules
@greglandrum greglandrum added this to the 2022_03_2 milestone Apr 7, 2022
greglandrum pushed a commit that referenced this issue Apr 25, 2022
* add a test

* update more atomic num == 0 rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants