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

assignChiralTypesFrom3D() ignores wiggly bonds #5328

Closed
greglandrum opened this issue May 25, 2022 · 0 comments
Closed

assignChiralTypesFrom3D() ignores wiggly bonds #5328

greglandrum opened this issue May 25, 2022 · 0 comments
Labels
Milestone

Comments

@greglandrum
Copy link
Member

greglandrum commented May 25, 2022

Describe the bug
Here's the demo:

In [24]: m = Chem.MolFromMolBlock(
    ...:     """
    ...:      RDKit          3D
    ...: 
    ...:   0  0  0  0  0  0  0  0  0  0999 V3000
    ...: M  V30 BEGIN CTAB
    ...: M  V30 COUNTS 5 4 0 0 0
    ...: M  V30 BEGIN ATOM
    ...: M  V30 1 C 0.900794 -0.086835 0.009340 0
    ...: M  V30 2 C -0.552652 0.319534 0.077502 0
    ...: M  V30 3 F -0.861497 0.413307 1.437370 0
    ...: M  V30 4 Cl -0.784572 1.925710 -0.672698 0
    ...: M  V30 5 O -1.402227 -0.583223 -0.509512 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 2 4 CFG=2
    ...: M  V30 4 1 2 5
    ...: M  V30 END BOND
    ...: M  V30 END CTAB
    ...: M  END"""
    ...: )

In [26]: Chem.AssignAtomChiralTagsFromStructure(m)  # calls assignChiralTypesFrom3D()

In [27]: m.Debug()
Atoms:
	0 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
	1 6 C chg: 0  deg: 4 exp: 4 imp: 0 hyb: 4 arom?: 0 chi: 1
	2 9 F chg: 0  deg: 1 exp: 1 imp: 0 hyb: 4 arom?: 0 chi: 0
	3 17 Cl chg: 0  deg: 1 exp: 1 imp: 0 hyb: 4 arom?: 0 chi: 0
	4 8 O chg: 0  deg: 1 exp: 1 imp: 1 hyb: 4 arom?: 0 chi: 0
Bonds:
	0 0->1 order: 1 conj?: 0 aromatic?: 0
	1 1->2 order: 1 conj?: 0 aromatic?: 0
	2 1->3 order: 1 conj?: 0 aromatic?: 0
	3 1->4 order: 1 conj?: 0 aromatic?: 0

the wiggly bond from atom 1 should prevent it from having stereochemistry assigned.

Configuration (please complete the following information):

  • RDKit version: all
  • OS: all
@greglandrum greglandrum changed the title AssignStereochemistryFrom3D() ignores wiggly bonds assignChiralTypesFrom3D() ignores wiggly bonds May 25, 2022
@greglandrum greglandrum added this to the 2022_03_3 milestone May 25, 2022
greglandrum added a commit to greglandrum/rdkit that referenced this issue May 25, 2022
Fixes rdkit#5327

probably a good idea to add a bit more testing here
greglandrum added a commit that referenced this issue Jun 2, 2022
* Fixes #5328
Fixes #5327

probably a good idea to add a bit more testing here

* more tests!
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

1 participant