Skip to content

Conversation

@lilyminium
Copy link
Member

@lilyminium lilyminium commented Feb 7, 2020

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?

Copy link
Member

@orbeckst orbeckst left a 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.

@lilyminium
Copy link
Member Author

@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.
Copy link
Member

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?

Copy link
Member Author

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 lilyminium added the version-1.0 Contains 1.0 features label Feb 24, 2020
@richardjgowers
Copy link
Member

@lilyminium this needs to get merged right? I didn't understand the merge conflict :(

@lilyminium
Copy link
Member Author

Yes! Fixed the merge conflicts. This will be more informative than the current stub.

@lilyminium
Copy link
Member Author

@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

@orbeckst
Copy link
Member

orbeckst commented Jun 11, 2020 via email

@lilyminium
Copy link
Member Author

Thanks @orbeckst, that's a good idea and we could just link it instead of replicating it; I'll look into it tomorrow :-)

Copy link
Member

@orbeckst orbeckst left a 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)

@lilyminium lilyminium merged commit 7f70e36 into master Jun 12, 2020
@lilyminium lilyminium deleted the trajectories branch June 12, 2020 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

version-1.0 Contains 1.0 features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use a explicit iteration scheme

4 participants