Skip to content

Conversation

@VOD555
Copy link
Collaborator

@VOD555 VOD555 commented Jul 24, 2019

Changes made in this Pull Request:

  • Add cdf function to InterRDF

PR Checklist

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

@VOD555 VOD555 requested a review from orbeckst July 24, 2019 18:48
@VOD555 VOD555 self-assigned this Jul 24, 2019
@codecov
Copy link

codecov bot commented Jul 24, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@3605ee8). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #99   +/-   ##
=========================================
  Coverage          ?   97.82%           
=========================================
  Files             ?       11           
  Lines             ?      644           
  Branches          ?       78           
=========================================
  Hits              ?      630           
  Misses            ?        8           
  Partials          ?        6
Impacted Files Coverage Δ
pmda/leaflet.py 91.3% <ø> (ø)
pmda/rdf.py 100% <100%> (ø)

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 3605ee8...5d3716a. Read the comment docs.

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

I don't like get_cdf(): either make it a function or calculate InterRDF.cdf and make it an attribute.

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

This looks ok.

However, you should also submit a PR to change the same thing in MDAnalysis so that the user interface stays as much the same as possible, namely MDAnalysis.analysis.rdf.InterRDF_s.get_cdf() – over there you'll need to deprecate the method. But we can discuss in the PR there.

@orbeckst
Copy link
Member

(And please fix PEP8...)

@orbeckst
Copy link
Member

Please also address the remaining comments.

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

Please make clear what was removed/changed/added. See comments.

Note that we are not bothering deprecating the get_cdf() method – PMDA does not have the same user base as MDA yet and we are in early development so we move quickly...

CHANGELOG Outdated
* add parallel density class (Issue #8)
* add `cdf` attribute to `pmda.rdf.InterRDF` for cumulative
distribution function
* deprecate `get_cdf` method in `pmda.rdf.InterRDF_s` and use
Copy link
Member

Choose a reason for hiding this comment

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

Put this in a separate category Changes

* The method rdf.InterRDF_s.get_cdf() was removed; just use the managed attribute
  rdf.InterRDF_s.cdf

Copy link
Member

Choose a reason for hiding this comment

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

In MDAnalysis we would tag it with a deprecation and keep it around for a while. In PMDA we can move a bit faster.

@orbeckst orbeckst added this to the 0.3.0 milestone Aug 25, 2019
@VOD555
Copy link
Collaborator Author

VOD555 commented Sep 5, 2019

@orbeckst All required changes have been done. Please have a look.

@orbeckst
Copy link
Member

orbeckst commented Oct 1, 2019

@VOD555 sorry, the PR fell off my radar. All looking good... will merge once Travis shows all green.

@orbeckst
Copy link
Member

orbeckst commented Oct 1, 2019

The RDF tests actually failed. Not sure why. Can you please look into this, @VOD555 ?

Perhaps changes in MDAnalysis?

@orbeckst
Copy link
Member

orbeckst commented Oct 1, 2019

Other tests (on master https://travis-ci.org/MDAnalysis/pmda ...) also fail in RDF, so it's not a problem with your PR but the reference values are not correct anymore.

Please have a look and decide what to do: either adjust the references or raise an issue for the upstream change that breaks our tests here.

@orbeckst
Copy link
Member

orbeckst commented Oct 1, 2019

@VOD555 I opened #110 for the RDF failure.

@orbeckst
Copy link
Member

orbeckst commented Oct 3, 2019

Hopefully the lint test passes now, too.

@orbeckst
Copy link
Member

orbeckst commented Oct 3, 2019

I am rebasing to master and squashing commits locally. I will force push this branch with the rewritten history

VOD555 and others added 3 commits October 2, 2019 20:46
- update changelog
- rename get_cdf to cdf and set it as a property
- add version information for cdf
- add more docs for cdf
- fix MDAnalysis#110
- The problem is due to the change in MDAnalysis that calculations
  within triclinic_box(), triclinic_vectors(), and box_volume()
  are performed in double precision. The test was calculating the
  RDF divided by the density for the molecule which was influenced
  by the precision of the volume value.
- disable pylint: unsubscriptable-object in leaflet
@orbeckst
Copy link
Member

orbeckst commented Oct 3, 2019

once this passes, do a simple merge

@orbeckst orbeckst merged commit 2055b8e into MDAnalysis:master Oct 3, 2019
@VOD555 VOD555 deleted the cdf branch October 18, 2019 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants