-
Notifications
You must be signed in to change notification settings - Fork 43
Page on trajectories and on-the-fly transformations #40
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
Conversation
orbeckst
left a comment
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.
Covers the essentials very nicely, see comments for possible changes.
|
@orbeckst @richardjgowers I'll merge this tomorrow unless there are objections? |
| On-the-fly transformations | ||
| ========================== | ||
|
|
||
| An on-the-fly transformation is a function that modifies the data contained in a trajectory :class:`~MDAnalysis.coordinates.base.Timestep`. It is called for each current time step as it is loaded into memory. A transformation function must also return the current :class:`~MDAnalysis.coordinates.base.Timestep`, as transformations are often chained together. |
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.
Maybe clarify that the point is so that the transformations are applied automatically/silently as filters (though maybe this word in ambiguous) to provide the desired representation of your system.
One example of x+2 below is good for custom plugin demonstration, but the residue one is (as far as I can tell) useless? Maybe better is to show how to unwrap every frame to rectify a simulation output for visualisation?
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 took that out and added in an example unwrapping, entering a protein in a box, and wrapping water around it. Unfortunately normal reStructuredText files don't let me embed NGLView widgets, but I'll be able to link to related notebooks on transformations when #38 is merged.
|
@lilyminium this needs to get merged right? I didn't understand the merge conflict :( |
|
Yes! Fixed the merge conflicts. This will be more informative than the current stub. |
|
@orbeckst @richardjgowers if you're happy with the little addition of "how to set boxes for every frame" to the OTF transformations page, this PR can set the user guide to 1.0 |
|
The box setting example is good in principle. I would just use more realistic numbers such as 10,20,30 instead of an almost pathological box.
I don’t know if you have an example for wrap/unwrap (sorry no time to check) but if not, one could pretty much take the blog post with its animated gifs. Anyway, can come later, just remembered.
Oliver
… Am 11.06.2020 um 03:03 schrieb Lily Wang ***@***.***>:
@orbeckst @richardjgowers if you're happy with the little addition of "how to set boxes for every frame" to the OTF transformations page, this PR can set the user guide to 1.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
Thanks @orbeckst, that's a good idea and we could just link it instead of replicating it; I'll look into it tomorrow :-) |
orbeckst
left a comment
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.
lgtm (just in case more green approval marks make you feel good about work that's already outstanding)
Closes MDAnalysis/mdanalysis#2269
This PR fleshes out the Trajectories page to explain roughly how it works and why you have to iterate over it. It also has a brief intro to on-the-fly transformations.
Are there any other trajectory-related concepts that are important to cover?