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

Bad double bond drawn for collinear atoms #6027

Closed
DavidACosgrove opened this issue Jan 28, 2023 · 0 comments · Fixed by #6028
Closed

Bad double bond drawn for collinear atoms #6027

DavidACosgrove opened this issue Jan 28, 2023 · 0 comments · Fixed by #6028
Labels
Milestone

Comments

@DavidACosgrove
Copy link
Collaborator

Describe the bug
When drawing a double bond on an exactly collinear bond, one end of the bond is badly wrong.

To Reproduce

collinear_molblock = """
  MJ201100                      

 15 16  0  0  0  0  0  0  0  0999 V2000
   -2.6052   -0.0931    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.6052    0.7318    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.3197    1.1444    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0
   -4.0346    0.7318    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -4.0347   -0.0931    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.3197   -0.5055    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.3197    1.9693    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.3197    2.7943    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.8908   -0.5055    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.1764    0.7318    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.1764   -0.0931    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.4620   -0.5055    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.2523   -0.0931    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.2524    0.7318    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.4620    1.1444    0.0000 C   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
  5  6  1  0  0  0  0
  6  1  1  0  0  0  0
  3  7  1  0  0  0  0
  7  8  2  0  0  0  0
 13 14  1  0  0  0  0
 14 15  1  0  0  0  0
 10 11  1  0  0  0  0
 15 10  1  0  0  0  0
 11 12  1  0  0  0  0
 12 13  1  0  0  0  0
  3  4  1  0  0  0  0
  4  5  1  0  0  0  0
  9  1  1  0  0  0  0
 11  9  1  0  0  0  0
M  END
"""
collinear_mol = Chem.MolFromMolBlock(collinear_molblock)
collinear_mol

Expected behavior
A double bond drawn correctly.

Screenshots
image

Configuration (please complete the following information):

  • RDKit version: 2022.09.3, master
  • OS: macOS Monterey 13.2, Apple Silicon
  • Python version (if relevant): 3.10.4
  • Are you using conda? mamba
  • If you are using conda, which channel did you install the rdkit from? conda-forge
  • If you are not using conda: how did you install the RDKit? Also built from master branch.

Additional context
Discovered by @ptosco
Fix imminent.

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