Modified MC rotation moves#331
Open
kamran-haider wants to merge 2 commits intochoderalab:mainfrom
Open
Conversation
andrrizzi
reviewed
Feb 26, 2018
Contributor
andrrizzi
left a comment
There was a problem hiding this comment.
Thank you so much! Sorry it took me so long to review. I was in time crunch.
Looks great so far! Just a comment about the docstring. Also, it would be great if you could add a simple unit test in test_mcmc.py. Something like this would be enough:
- If nothing is passed to
rotation_center_indicesall atom positions change. - If the rotation is centered on a single atom, that position won't change.
| ---------- | ||
| positions : nx3 numpy.ndarray simtk.unit.Quantity | ||
| The positions to rotate. | ||
| rotation_center_indices : list |
Contributor
There was a problem hiding this comment.
Could you add a , optional here? Also, it would be fantastic to document that the center of rotation is chosen to be the center of geometry of this set of atoms, and that the default behavior uses all the atoms in positions.
Author
There was a problem hiding this comment.
No worries at all and thanks so much for the comments. I agree and will get back with the unit test and updated docstring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potential enhancement: Following up on discussion in #330, I modified the
rotate_positionsmethod ofMCRotationMoveto allow a subset of atom positions define the geometric center of rotation. The unit test for metropolized moves wouldn't test for this modification so when running tests locally, everything goes smoothly. I checked the output configurations, as shown in issue thread. Let me know if I should write a unit test for this.