Skip to content

Adds unwrap keyword to shape_parameter#2296

Closed
NinadBhat wants to merge 43 commits intoMDAnalysis:developfrom
NinadBhat:shape_parameter
Closed

Adds unwrap keyword to shape_parameter#2296
NinadBhat wants to merge 43 commits intoMDAnalysis:developfrom
NinadBhat:shape_parameter

Conversation

@NinadBhat
Copy link
Copy Markdown
Contributor

Fixes #2292

Changes made in this Pull Request:

  • Adds unwrap keyword to shape_parameter

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 11, 2019

Codecov Report

Merging #2296 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #2296      +/-   ##
==========================================
+ Coverage     89.7%   89.7%   +<.01%     
==========================================
  Files          173     173              
  Lines        21499   21505       +6     
  Branches      2801    2803       +2     
==========================================
+ Hits         19286   19292       +6     
  Misses        1616    1616              
  Partials       597     597
Impacted Files Coverage Δ
package/MDAnalysis/core/topologyattrs.py 97.81% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1c68e4...d5c865c. Read the comment docs.

@NinadBhat NinadBhat mentioned this pull request Jul 12, 2019
4 tasks
@orbeckst
Copy link
Copy Markdown
Member

orbeckst commented Jul 23, 2019

@NinadBhat only the linter complains https://travis-ci.com/MDAnalysis/mdanalysis/jobs/215053492

************* Module MDAnalysisTests.core.test_atomgroup
testsuite/MDAnalysisTests/core/test_atomgroup.py:850: [W0109(duplicate-key), TestUnwrapFlag.ref_noUnwrap_residues] Duplicate key 'Shape' in dictionary
testsuite/MDAnalysisTests/core/test_atomgroup.py:868: [W0109(duplicate-key), TestUnwrapFlag.ref_Unwrap_residues] Duplicate key 'Shape' in dictionary
testsuite/MDAnalysisTests/core/test_atomgroup.py:885: [W0109(duplicate-key), TestUnwrapFlag.ref_noUnwrap] Duplicate key 'Shape' in dictionary
testsuite/MDAnalysisTests/core/test_atomgroup.py:899: [W0109(duplicate-key), TestUnwrapFlag.ref_Unwrap] Duplicate key 'Shape' in dictionary

Once you fix this then all tests pass and that might help with getting it reviewed faster.

P.S.: Run the linter locally when fixing these kind of minor issues:

pylint --rcfile=package/.pylintrc package/MDAnalysis
pylint --rcfile=package/.pylintrc testsuite/MDAnalysisTests

assert_almost_equal(ag.center_of_geometry(unwrap=True, compound='residues'), ref_Unwrap_residues['COG'], self.prec)
assert_almost_equal(ag.center_of_mass(unwrap=True, compound='residues'), ref_Unwrap_residues['COM'], self.prec)
assert_almost_equal(ag.moment_of_inertia(unwrap=True, compound='residues'), ref_Unwrap_residues['MOI'], self.prec)
assert_almost_equal(ag.asphericity(unwrap=True, compound='residues'), ref_Unwrap_residues['Asph'], self.prec)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this deliberate?


com = group.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()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs tests for compound != group

@IAlibay IAlibay added the close? Evaluate if issue/PR is stale and can be closed. label May 18, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

close? Evaluate if issue/PR is stale and can be closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "unwrap" keyword to shape_parameter

4 participants