Add unwrap to radius_of_gyration#2299
Add unwrap to radius_of_gyration#2299NinadBhat wants to merge 3 commits intoMDAnalysis:developfrom NinadBhat:rog_copy
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 -597Continue 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.
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.
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.
@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