Add a current frame iterator for streamed trajectories#5184
Add a current frame iterator for streamed trajectories#5184PardhavMaradani wants to merge 13 commits intoMDAnalysis:developfrom
Conversation
There was a problem hiding this comment.
Hello there first time contributor! Welcome to the MDAnalysis community! We ask that all contributors abide by our Code of Conduct and that first time contributors introduce themselves on GitHub Discussions so we can get to know you. You can learn more about participating here. Please also add yourself to package/AUTHORS as part of this PR.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5184 +/- ##
===========================================
+ Coverage 92.72% 92.76% +0.03%
===========================================
Files 180 180
Lines 22472 22495 +23
Branches 3188 3194 +6
===========================================
+ Hits 20838 20867 +29
+ Misses 1176 1174 -2
+ Partials 458 454 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This seems like a good idea to me - but I would defer to those more experienced with MDA & streaming as for why this approach maybe wasn't already taken. |
|
I’m away from most of work (and open source) and won’t get to reviewing until the new year. But please let this not halt any discussions here! |
* This enables analysis classes to use current frame as reference in `__init__`
* Added more tests
|
I have high-level questions before diving into code and I am using issue #5183 for the discussion. |
Fixes #5183
Changes made in this Pull Request:
runmethod as.run(frames=[u.trajectory.frame])u.trajectory[u.trajectory.frame]to get current timestepRMSD,AverageStructure) to use current frame as aref_frame(in their__init__method)This PR allows us to do something like the following:
Here is a sample output of the per-frame analysis above:
LLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no
PR Checklist
package/CHANGELOGfile updated?package/AUTHORS? (If it is not, add it!)Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.
📚 Documentation preview 📚: https://mdanalysis--5184.org.readthedocs.build/en/5184/