-
Notifications
You must be signed in to change notification settings - Fork 81
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
Dihedral rotator function #1039
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1039 +/- ##
==========================================
+ Coverage 90.40% 90.41% +0.01%
==========================================
Files 64 64
Lines 9036 9056 +20
==========================================
+ Hits 8169 8188 +19
- Misses 867 868 +1 ☔ View full report in Codecov by Sentry. |
…into dihedral_rotator
@@ -346,6 +346,19 @@ def test_rotate_around_z_away_from_origin(self, sixpoints): | |||
before[:, 1], -1 * after[:, 1], atol=1e-16 | |||
) and np.allclose(before[:, 0], -1 * after[:, 0], atol=1e-16) | |||
|
|||
def test_rotate_dihedral(self, ethane): |
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.
I think we should add a test with a less symmetric molecule than ethane. This is a better proof of concept that the atoms were translated properly, especially if we're dealing with a long molecule polymers.
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.
Added one more unit test and seems like it's doing what I expect. LGTM!
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.
Nice test implementation!
PR Summary:
Adds a function that allows you to rotate a proper dihedral angle in a compound about a specified central bond. This can be useful for setting up systems with specific molecular conformations and also for generating structures for obtaining dihedral free energies.
PR Checklist