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

Nglview renders molecule incorrectly #161

Closed
mattwelborn opened this issue Nov 5, 2019 · 3 comments · Fixed by #164
Closed

Nglview renders molecule incorrectly #161

mattwelborn opened this issue Nov 5, 2019 · 3 comments · Fixed by #164

Comments

@mattwelborn
Copy link
Collaborator

Describe the bug
A benzene molecule is rendered incorrectly in Jupyter.
image

To Reproduce
nglview-sdf string:

"""
QCElemental

 12 12  0  0  0  0  0  0  0  0  0
   -36.7161    41.9528   -36.0171 C   0  0     0  0  0  0  0  0
   -36.0692    41.9257   -34.7771 C   0  0     0  0  0  0  0  0
   -36.8074    41.7153   -33.6075 C   0  0     0  0  0  0  0  0
   -38.1924    41.5319   -33.6781 C   0  0     0  0  0  0  0  0
   -38.8393    41.5589   -34.9181 C   0  0     0  0  0  0  0  0
   -38.1012    41.7694   -36.0877 C   0  0     0  0  0  0  0  0
   -36.1398    42.1171   -36.9301 H   0  0     0  0  0  0  0  0
   -34.9879    42.0689   -34.7220 H   0  0     0  0  0  0  0  0
   -36.3024    41.6941   -32.6394 H   0  0     0  0  0  0  0  0
   -38.7687    41.3675   -32.7651 H   0  0     0  0  0  0  0  0
   -39.9206    41.4158   -34.9732 H   0  0     0  0  0  0  0  0
   -38.6062    41.7906   -37.0558 H   0  0     0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  6  1  0  0  0  0
  1  7  1  0  0  0  0
  2  3  1  0  0  0  0
  2  8  1  0  0  0  0
  3  4  1  0  0  0  0
  3  9  1  0  0  0  0
  4  5  1  0  0  0  0
  4 10  1  0  0  0  0
  5  6  1  0  0  0  0
  5 11  1  0  0  0  0
  6 12  1  0  0  0  0
"""

Additional context

  • qcelemental version 0.11.1
  • nglview version 2.7.1
@dgasmith
Copy link
Collaborator

dgasmith commented Nov 5, 2019

Is there a flat on-look?

@mattwelborn
Copy link
Collaborator Author

image
image
image

@mattwelborn
Copy link
Collaborator Author

Most molecules display just fine:
image

QCElemental

 19 21  0  0  0  0  0  0  0  0  0
   -3.0223    1.9501    2.9352 O   0  0     0  0  0  0  0  0
   -2.1248    1.9789    1.9455 C   0  0     0  0  0  0  0  0
   -0.7563    1.2607    2.1500 C   0  0     0  0  0  0  0  0
   -0.7563    1.1938    0.5841 C   0  0     0  0  0  0  0  0
   -0.1608    0.0294   -0.0901 O   0  0     0  0  0  0  0  0
   -0.1495    2.5867    0.0036 C   0  0     0  0  0  0  0  0
   -1.1541    3.6691    0.3283 C   0  0     0  0  0  0  0  0
   -2.4019    2.9513    0.7586 C   0  0     0  0  0  0  0  0
   -2.3282    1.4513    0.5476 C   0  0     0  0  0  0  0  0
   -3.5040    2.7519    3.1831 H   0  0     0  0  0  0  0  0
    0.1035    1.8126    2.6643 H   0  0     0  0  0  0  0  0
   -1.0802    0.2373    2.6823 H   0  0     0  0  0  0  0  0
    0.5463    0.4893   -0.5962 H   0  0     0  0  0  0  0  0
    0.9584    2.7226    0.3878 H   0  0     0  0  0  0  0  0
    0.0348    2.4198   -1.0601 H   0  0     0  0  0  0  0  0
   -0.8218    4.3203    1.1869 H   0  0     0  0  0  0  0  0
   -1.5716    4.1494   -0.5576 H   0  0     0  0  0  0  0  0
   -3.3213    3.5344    0.9451 H   0  0     0  0  0  0  0  0
   -2.9381    0.6619    0.1861 H   0  0     0  0  0  0  0  0
  1  2  1  0  0  0  0
  1 10  1  0  0  0  0
  2  3  1  0  0  0  0
  2  8  1  0  0  0  0
  2  9  1  0  0  0  0
  3  4  1  0  0  0  0
  3 11  1  0  0  0  0
  3 12  1  0  0  0  0
  4  5  1  0  0  0  0
  4  6  1  0  0  0  0
  4  9  1  0  0  0  0
  5 13  1  0  0  0  0
  6  7  1  0  0  0  0
  6 14  1  0  0  0  0
  6 15  1  0  0  0  0
  7  8  1  0  0  0  0
  7 16  1  0  0  0  0
  7 17  1  0  0  0  0
  8  9  1  0  0  0  0
  8 18  1  0  0  0  0
  9 19  1  0  0  0  0

dgasmith pushed a commit to dgasmith/QCElemental that referenced this issue Nov 7, 2019
dgasmith added a commit that referenced this issue Nov 7, 2019
Molecule: Centers molecule before SDF rendering, fixes #161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants