-
Notifications
You must be signed in to change notification settings - Fork 679
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
Add unwrap to radius_of_gyration #2299
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2299 +/- ##
===========================================
+ Coverage 89.7% 90.74% +1.04%
===========================================
Files 173 16 -157
Lines 21499 1989 -19510
Branches 2801 0 -2801
===========================================
- Hits 19286 1805 -17481
+ Misses 1616 184 -1432
+ Partials 597 0 -597 Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## develop #2299 +/- ##
==========================================
+ Coverage 89.7% 89.7% +<.01%
==========================================
Files 173 173
Lines 21499 21506 +7
Branches 2801 2803 +2
==========================================
+ Hits 19286 19293 +7
Misses 1616 1616
Partials 597 597
Continue to review full report at Codecov.
|
@richardjgowers this is ready to be merged. |
@richardjgowers @orbeckst @jbarnoud @micaela-matta This needs to be reviewed. |
|
||
com = atomgroup.center_of_mass(pbc=pbc, unwrap=unwrap, compound=compound) | ||
if compound is not 'group': | ||
com = (com * group.masses[:, None]).sum(axis=0) / group.masses.sum() |
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.
You've added a compound parameter and not written tests for it, so this line never gets tested. What is this line doing?
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.
it gets tested here
If the compound is 'residue', atomgroup.center_of_mass will return COM of each residue. This line takes the mean of each COM.
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.
@richardjgowers is this sufficient or should I add some more tests?
I rebased this branch with develop and now the pull request is showing changes from all other commits. I have created #2305 in case I cant resolve this. |
Fixes #1760
Changes made in this Pull Request:
PR Checklist