-
Notifications
You must be signed in to change notification settings - Fork 663
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 ignore_same_residue
kwarg to InterRDF
#4161
add ignore_same_residue
kwarg to InterRDF
#4161
Conversation
Linter Bot Results:Hi @orionarcher! Thanks for making this PR. We linted your code and found the following: Some issues were found with the formatting of your code.
Please have a look at the Please note: The |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #4161 +/- ##
===========================================
+ Coverage 93.61% 93.62% +0.01%
===========================================
Files 193 193
Lines 25170 25295 +125
Branches 4059 4063 +4
===========================================
+ Hits 23562 23683 +121
- Misses 1092 1096 +4
Partials 516 516
☔ View full report in Codecov by Sentry. |
ignore_same_residue
kwarg to InterRDF
ignore_same_residue
kwarg to InterRDFignore_same_residue
kwarg to InterRDF
Iterated slightly on this. Now users can select "residue", "segment", or "chain" to exclude. It will automatically map to the |
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.
Quick comments.
Fixed @hmacdope's requested. Unless there are further requests for changes, this is ready to merge. |
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.
Few changes and a tiny bit more testing but almost there.
Co-authored-by: Rocco Meli <[email protected]>
Co-authored-by: Rocco Meli <[email protected]>
I added new tests for segment and chain and added @RMeli cleanup suggestions. Thanks for all the feedback. |
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.
Thanks @orionarcher. A few last nitpicks (sorry), otherwise LGTM.
Co-authored-by: Rocco Meli <[email protected]>
Co-authored-by: Rocco Meli <[email protected]>
LGTM, thanks @orionarcher. I'll try to re-run the failed actions before approving, it failed because of time limits: https://dev.azure.com/mdanalysis/mdanalysis/_build/results?buildId=5981&view=logs&j=7a9c7d2c-346e-591b-84bb-5490fd358201 |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Thanks @orionarcher. @hmacdope would you mind having the last look and merge? Thanks.
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.
Looks great @orionarcher thanks so much. This is a great contribution and will be super useful to many.
Yay thanks y'all! |
Changes made in this Pull Request:
This adds the ability to include the same residues in both g1 and g2 without blowing up the RDF calculation. Specifically, it adds a
ignore_same_residue
kwarg that excludes pairs of atoms with the sameresindice
from the distance calculation. This should be useful when a user wants to understand the correlation of a species with itself (as I do now).PR Checklist
📚 Documentation preview 📚: https://mdanalysis--4161.org.readthedocs.build/en/4161/