-
Notifications
You must be signed in to change notification settings - Fork 725
Added a norm
attribute to InterRDF
classes
#3687
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
Conversation
This PR adds a `norm` attribute to the two rdf classes `InterRDF` and `InterRDF_s`. It works similar as the density parameter which was only available for `InterRDF_s`. Also, the universe attribute in `InterRDF_s` is depricated because the universe can be accessed via the AtomGroups. Finally, I slightly cleaned up the code and moved the attributes within the classes themselves.
Hello @PicoCentauri! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2022-06-07 07:26:38 UTC |
Codecov Report
@@ Coverage Diff @@
## develop #3687 +/- ##
========================================
Coverage 94.35% 94.35%
========================================
Files 191 191
Lines 24975 24984 +9
Branches 3365 3375 +10
========================================
+ Hits 23565 23574 +9
Misses 1362 1362
Partials 48 48
Continue to review full report at Codecov.
|
f7a6009
to
95b5027
Compare
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.
LGTM
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.
please update CHANGELOG --- new features should show up
I bumped the version informations to 2.3.0 and added a note to the CHANGELOG. Thanks at @orbeckst and @richardjgowers for rewieing. |
Did you push? The changes aren't showing up here for some reason. |
of course not 😅 |
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.
LGTM
(Minor formatting comment but that's all. Thanks for the clean-up!)
package/MDAnalysis/analysis/rdf.py
Outdated
The `exclusion_block` keyword allows the masking of pairs from | ||
within the same molecule. For example, if there are 7 of each | ||
atom in each molecule, the exclusion mask `(7, 7)` can be used. | ||
The ``exclusion_block`` keyword allows the masking of pairs from |
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.
We actually use the single backticks to refer to keyword arguments (which uses just the default reST role), although this may be inconsistent throughout.
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.
😅 o we should have docs about that because I've definitely been using double backticks for keywords because otherwise the italics is hard to read (and I use the :attr: and :meth: for other things)
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.
The example at https://userguide.mdanalysis.org/stable/contributing_code.html#guidelines-for-writing-docstrings use the single backticks.
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.
Good to know. I changed the docs and it actually also looks cleaner when one is able to distinguish between arguments and inline code snippets.
Changes made in this Pull Request:
This PR adds a
norm
attribute to the two RDF classesInterRDF
andInterRDF_s
. It works similarly to the density parameter which was only available forInterRDF_s
.Also, the universe attribute in
InterRDF_s
is deprecated because the universe is directly available via the AtomGroups.Finally, I slightly cleaned up the code and moved the attributes within the classes themselves.
PR Checklist