select_atoms accepts atomgroups#2375
Conversation
richardjgowers
left a comment
There was a problem hiding this comment.
Looks good barring some quibbles
Codecov Report
@@ Coverage Diff @@
## develop #2375 +/- ##
===========================================
+ Coverage 89.89% 89.92% +0.02%
===========================================
Files 173 173
Lines 21792 21808 +16
Branches 2862 2866 +4
===========================================
+ Hits 19591 19610 +19
+ Misses 1609 1607 -2
+ Partials 592 591 -1
Continue to review full report at Codecov.
|
|
The macOS job ran into the 50min time limit. I restarted it but we might be back in the bad, old days where we have to run our tests faster... |
orbeckst
left a comment
There was a problem hiding this comment.
Please don't forget docs and CHANGELOG!
|
In terms of tests I was thinking about MDAnalysis.analysis.rms.RMSD, ... such tests would be added to the tests of the analysis code to make sure it works with selection strings and AGs. |
|
Re: CHANGELOG: has to go into a 0.21.0 |
|
This definitely requires a bit more thought that I've currently put into it. Do we want What should happen when: Should this generate an error or should the static AtomGroup be turned into a selection string of indices? Should this return the intersection of ag and ag2? |
|
I modified rms.RMSD to accept AtomGroups and added a couple tests. I'll probably need to go through all the analysis classes individually. An UpdatingAtomGroup created from an AtomGroup uses |
|
Yeah the updating case is weird because it won’t work as maybe it looks like at first. Once the ‘around ...’ selection is done, the resulting AG has no memory of how/why it was made, so can’t then retroactively be made updating. I’m not super sold on the new way to perform intersections but I’ll think on it. This whole patch is getting messy and I’m wondering if it’s better that analysis classes learn to accept either strings or (U)AGs. |
|
I agree that switching from selection strings to only (U)AGs is the cleaner way to do this. Given that this might be more complicated than anticipated then let's put this on hold for 2.0. There's no good reason to break lots of user code just because we find this to be cleaner/neater... at least not in the short term. I see 1.0 as the "stable/old" MDAnalysis release (minus crud like flags #782 ...). For 2.0 we can apply our lessons learned. |
|
I can be persuaded to change my opinion, of course. But I learned that a good way to save time is to say "no" and stop work while you can. @lilyminium sorry to vote for killing the PR at this stage after you put the work in but this work was necessary to show potential problems. And I think that other things have higher priority. Again, I am happy to be disagreed with. |
|
Definitely happy to focus on other things. Not much work put in 😄 Analyses like rms.RMSD already accept both Universes and AtomGroups anyway, so it did feel a little unnecessary there. Should this be closed or left open? |
|
I’d close the PR (but don’t delete it) and leave the issue open. Add a quick note to the issue summarizing the discussion for future generations/future us, please. Thanks!
… Am 29.10.2019 um 00:28 schrieb Lily Wang ***@***.***>:
Definitely happy to focus on other things. Not much work put in 😄 Analyses like rms.RMSD already accept both Universes and AtomGroups anyway, so it did feel a little unnecessary there. Should this be closed or left open?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Implements #2369
Changes made in this Pull Request:
u.select_atomsis given an Updating/AtomGroup, it returns that Updating/AtomGroup@orbeckst commented on the need for careful testing:
There is a simple test to check that it does return an AtomGroup, but otherwise I haven't got many ideas for others. Suggestions are welcome.
PR Checklist