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

Small rings can have STEREOANY/EITHERDOUBLE bonds #4494

Closed
ricrogz opened this issue Sep 10, 2021 · 0 comments · Fixed by #4495
Closed

Small rings can have STEREOANY/EITHERDOUBLE bonds #4494

ricrogz opened this issue Sep 10, 2021 · 0 comments · Fixed by #4495
Assignees
Labels
Milestone

Comments

@ricrogz
Copy link
Contributor

ricrogz commented Sep 10, 2021

We don't allow bond stereo in rings smaller than 8 atoms, but we do allow STEREOANY/EITHERDOUBLE, which doesn't make much sense to me:

In [1]: from rdkit import Chem 
   ...:  
   ...: m = Chem.MolFromMolBlock(""" 
   ...:   MJ201500                       
   ...:  
   ...:   9  9  0  0  0  0  0  0  0  0999 V2000 
   ...:    -5.9375    1.9076    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0 
   ...:    -6.6519    1.4951    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0 
   ...:    -5.2230    1.4951    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0 
   ...:    -5.9375    2.7326    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0 
   ...:    -6.6519    0.6700    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0 
   ...:    -7.3664    1.9076    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0 
   ...:    -5.2230    0.6700    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0 
   ...:    -5.9375    0.2575    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0 
   ...:    -4.5085    0.2575    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0 
   ...:   1  2  2  3  0  0  0 
   ...:   3  1  1  0  0  0  0 
   ...:   1  4  1  0  0  0  0 
   ...:   2  5  1  0  0  0  0 
   ...:   2  6  1  0  0  0  0 
   ...:   7  3  2  3  0  0  0 
   ...:   5  8  2  3  0  0  0 
   ...:   8  7  1  0  0  0  0 
   ...:   7  9  1  0  0  0  0 
   ...: M  END 
   ...: $$$$ 
   ...: """) 
   ...:  
   ...: print(Chem.MolToMolBlock(m))                                                                                                                                                

     RDKit          2D

  9  9  0  0  0  0  0  0  0  0999 V2000
   -5.9375    1.9076    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -6.6519    1.4951    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -5.2230    1.4951    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -5.9375    2.7326    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -6.6519    0.6700    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -7.3664    1.9076    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -5.2230    0.6700    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -5.9375    0.2575    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -4.5085    0.2575    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  2  3
  3  1  1  0
  1  4  1  0
  2  5  1  0
  2  6  1  0
  7  3  2  3
  5  8  2  3
  8  7  1  0
  7  9  1  0
M  END

This is happening in current master.

@ricrogz ricrogz added the bug label Sep 10, 2021
@ricrogz ricrogz self-assigned this Sep 10, 2021
@ricrogz ricrogz mentioned this issue Sep 10, 2021
greglandrum added a commit that referenced this issue Sep 13, 2021
* add fix

* add test

* Update Code/GraphMol/Chirality.cpp

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>

Co-authored-by: Greg Landrum <greg.landrum@gmail.com>
@greglandrum greglandrum added this to the 2021_09_1 milestone Sep 13, 2021
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