-
Notifications
You must be signed in to change notification settings - Fork 670
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 intra_connections (intra_bonds, intra_angles, etc) #3200
Add intra_connections (intra_bonds, intra_angles, etc) #3200
Conversation
Hello @lilyminium! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-05-02 17:03:39 UTC |
Codecov Report
@@ Coverage Diff @@
## develop #3200 +/- ##
========================================
Coverage 92.85% 92.86%
========================================
Files 170 170
Lines 22840 22865 +25
Branches 3240 3243 +3
========================================
+ Hits 21208 21233 +25
Misses 1584 1584
Partials 48 48
Continue to review full report at Codecov.
|
f37d148
to
a65edfa
Compare
a65edfa
to
981c22a
Compare
967ebf7
to
c0f0f52
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.
The good thing with a good self-contained and well scoped PR is that I can nitpick. So here is my nitpicking.
ugroup = getattr(self.universe.atoms, typename) | ||
if not len(ugroup): | ||
return ugroup | ||
func = np.any if outside else np.all |
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.
I'd prefer a more explicit name for that. logic_comparator
maybe?
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.
I see the conversation marked as resolved, but the variable is still named func
.
@@ -2296,14 +2309,22 @@ def set_atoms(self, ag): | |||
return NotImplementedError("Cannot set bond information") | |||
|
|||
def get_atoms(self, ag): | |||
""" | |||
Get subset for atoms. |
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.
It is good to add a docstring, but I am not sure this one helps much: what subset of the atoms?
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.
I hope this new one is more helpful, although I'm not certain users will ever really see it
Co-authored-by: Jonathan Barnoud <[email protected]>
Fixes MDAnalysis#3037 Co-authored-by: Lily Wang <[email protected]>
Towards MDAnalysis#2468 ## Work done in this PR * Add aromaticity and Gasteiger charges guessers which work via the RDKIT converter.
Fixes MDAnalysis#3109 ## Work done in this PR * gracefully handle the case where `gcc` toolchain in use on MacOS has been built from source using `clang` by `spack` (so it really is `gcc` in use, not `clang`) ## Notes * we could try to add regression testing, but a few problems: - `using_clang()` is inside `setup.py`, which probably can't be safely imported because it has unguarded statements/ code blocks that run right away - testing build issues is typically tricky with mocking, etc. (though in this case, probably just need to move `using_clang()` somewhere else and then test it against a variety of compiler metadata strings
* Fixes MDAnalysis#2974 * Python 3.9 officially supported * Add Python 3.9 to testing matrix * Adds macOS CI entry, formalises 3.9 support
385f956
to
eb0e5c0
Compare
…lysis into get_connections_develop
…lysis into get_connections_develop
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.
There is one tiny little thing left, really tiny tiny one. I approve the PR, but I'll merge only tomorrow to give you a chance to look at it if you think it is worth changing.
ugroup = getattr(self.universe.atoms, typename) | ||
if not len(ugroup): | ||
return ugroup | ||
func = np.any if outside else np.all |
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.
I see the conversation marked as resolved, but the variable is still named func
.
Sorry, I thought I clicked the button already. |
Fixes #1264
Fixes #2821
Changes made in this Pull Request:
After PR Added get_connections #3160, sets the defaultget_atoms
to only return connections where all atoms are within the queried AtomGroup (i.e.outside=False
)However, it still returns all connections involving the atom in Atom.bonds/angles/dihedrals etc (i.e.outside=True
)I would expect Atom.bonds to include all the bonds involving that Atom, but AtomGroup to only include the bonds within the group.Also changes various parsers and writers to useget_connections
instead of.bonds
etc to get the previous dataChanges a bunch of tests to passPR Checklist