-
Notifications
You must be signed in to change notification settings - Fork 188
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
Fix bond drawing bugs in the OpenGL visualizer #3511
Conversation
The NameError was caused by a regression in 0a22eeb. The `dim` variable was not defined, but the compiler warning was hidden by the wildcard import `from math import *`.
Calculate how to cut bonds that cross one side of the simulation box using an analytical solution instead of a heuristic algorithm. The heuristic was incorrectly configured, leading to wrong bond angles for cut bonds. This was particularly visible when drawing periodic images. Also, the old algorithm assumed the box was cubic, but now all directions are checked.
@christophlohrmann please check the bond connectivity between the unit cell and periodic images by adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, can be merged if @christophlohrmann approves.
Codecov Report
@@ Coverage Diff @@
## python #3511 +/- ##
======================================
Coverage 87% 87%
======================================
Files 537 537
Lines 24433 24433
======================================
Hits 21277 21277
Misses 3156 3156 Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## python #3511 +/- ##
======================================
Coverage 87% 87%
======================================
Files 537 537
Lines 24433 24433
======================================
Hits 21277 21277
Misses 3156 3156 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bonds in polymer-type simulations look correct now. Also periodic images are displayed nicely. => Visual inspection test passed.
Fixes #3497
Description of changes:
NameError
exception)