-
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
Some frames (the ones at the trajectory boundaries) are not transformed when using transformations on universes from chainreaders #4008
Comments
I agree that this is a (serious) bug. A bit more context from my side to explain why I think so: |
I can reproduce the error with your code (see below). Regarding the problem with DCD: the warning
may indicate that due to the above mentioned quirk in the DCDReader there may be issues with transformations and DCDs — the DCD trajectory is fitted/centered on part of the protein so the relatively small movements might just indicate that the transformation was effectively ignored (!). This needs to be looked at! |
@orbeckst My understanding is that ChainReader is currently broken for all formats. |
@hmacdope can you be more precise with "broken"? Do you mean "broken with transformations" or "does not concatenate trajectories correctly and cannot be used"? |
Sorry should have been clearer, broken with transformations in that transformations are not applied on the boundary frames. |
I think this is the PR you are thinking of: #3834 The issue is for transformations that require the #3343 is an independent issue/fix with no relevance here. If multiple |
the code in PR #3906 gives this graph, which I think looks better |
This does look much better, both for XTC/TRR and DCD. |
I say push forward with #3906 :) |
* make ChainReader subclass ReaderBase * deal with kwargs in ChainReader properly * add test for issue #4008 * stupid fucking linters * changelog
I am not sure if this is related (i.e. the same underlying cause) as #3343 (there it seems to happen more often than just at the trajectory boundaries, but for the DCD traj below I also have more issues than just at the traj boundaries).
Please let me know if you need any additional info.
Expected behavior
All frames in a trajectory are transformed according to the defined on-the-fly transformations.
Actual behavior
The first frame (frame 0) of all trajectories except the first trajectory one are not transformed (if my transformation depends on an atom group).
Although this seems to be True only for XTC and TRR. The behavior I get If I do the same with the DCD from the testfiles more closely resembles #3343 i.e. every second value is wrong (independent of the trajectory boundaries). See the code example below.
Code to reproduce the behavior
The below code will produce three plots, all of them should be a flat line (we substract the Center of Mass of all atoms in the trafo and plot the center of mass of all atoms). However for XTC and TRR we have one jump at frame 10 (which is the first frame of the second trajectory) and for DCD we have strange oscillations. Adding a third TRR/XTC results in another jump at frame 20. I dont see any correlation for the DCD with the trajectory boundary (at frame 98) except maybe that the oscillattions of the y-coordinate seem even stronger.
Current version of MDAnalysis
python -V
)? Python 3.9.7EDIT: nicer plot produced.
The text was updated successfully, but these errors were encountered: