-
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
Ensure Timestep in ChainReader is updated for multiple trajectory files #3834
Conversation
Without this check, when multiple trajectory files are referenced, then the first frame will not undergo a transform since the group Timestep has not yet changed to the new trajectory Timestep object. This chicken or the egg issue can be resolved with this check.
Codecov ReportBase: 94.38% // Head: 94.38% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #3834 +/- ##
========================================
Coverage 94.38% 94.38%
========================================
Files 194 194
Lines 25242 25250 +8
Branches 3493 3497 +4
========================================
+ Hits 23825 23833 +8
Misses 1368 1368
Partials 49 49
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@tylerjereddy I cleared it on the original issue, but you'll see the edits to applicable transforms with tests have been merged. |
The CodeCoverage stipulation is failing because of the most recent merge into the development branch related to RDKit... is there a work around for this? The code relevant to this pull request is fully covered. |
I think you're good now as far as codecov checks are concerned. I think they can take a while to properly aggregate. |
* Add isolayer selection method * Added test_isolayer assertion that comparison isn't with empty * Added author and docs * Isolayer: Fix documentation and removed unused code * Update CHANGELOG Co-authored-by: Hugo MacDermott-Opeskin <[email protected]>
I had a dig into this. I think this fix is probably fine, but I think there's a more fundamental issue with ChainReader not respecting the Reader base class, which makes lots of annoying bugs like this appear. I think a better fix (which I'll try and put together) is to put ChainReader under the boot of ProtoReader, rather than have it be "equal". |
Ok sure, let me know when you decide to go with this fix or if I should delete it. To find this solution I followed the order of operations in updating the timestep and this cuts through the chicken and the egg cycle. I didn't see another solution, but I'm a novice with MDAnalysis' structure. |
@richardjgowers any thoughts on this? I think this is a glaring issue in MDAnalysis, although it seems that an analysis that relies on capped_distances won't be affected as long as a box is defined to correct it. However, if one were to attempt to make a movie like the "Centering a trajectory in the box" example for a case with multiple trajectories, they would not achieve a clean movie. The solution presented here resolves the issue simply for the time being. |
Fixes #3657
Changes made in this Pull Request:
PR Checklist