This module defines a class for handling multiple trajectories.
A class for handling trajectories in multiple files.
Trajectory can be instantiated with a name or a filename. When name is a valid path to a trajectory file it will be opened for reading.
Add a file to the trajectory instance. Currently only DCD files are supported.
Close trajectory file.
Returns associated/selected atoms.
Returns a copy of reference coordinates for (selected) atoms.
Returnss coordinate sets at given indices. indices may be an integer, a list of ordered integers or
Nonereturns all coordinate sets. If a list of indices is given, unique numbers will be selected and sorted. That is, this method will always return unique coordinate sets in the order they appear in the trajectory file. Shape of the coordinate set array is (n_sets, n_atoms, 3).
Returns list of filenames opened for reading.
Returns list of first timestep values, one number from each file.
Returns list of timesteps between frames, one number from each file.
Returns list of timestep sizes, one number from each file.
Returns title of the ensemble.
Returns a copy of weights of (selected) atoms.
Go to the frame at index n.
n=0will rewind the trajectory to the beginning, same as calling
n=-1will go to the last frame. Frame n will not be parsed until one of
nextCoordset()methods is called.
Trueif trajectory has unitcell data.
Yield coordinate sets for (selected) atoms. Reference coordinates are not included. Iteration starts from the next frame in line.
Link, return, or unlink an
AtomGroupinstance. When a link to ag is established, coordinates of new frames parsed from the trajectory file will be set as the coordinates of ag and this will update coordinates of all selections and atom subsets pointing to it. At link time, if ag does not have any coordinate sets and reference coordinates of the trajectory is set, reference coordinates of the trajectory will be passed to ag. To break an established link, pass None argument, or to return the linked atom group instance, call with no arguments.
Every time a frame is parsed from the trajectory, all coordinate sets present in the linked
AtomGroupwill be overwritten.
Returns next coordinate set in a
Frameinstance. Note that when atoms are set for the trajectory, this method will return the same frame instance after updating its coordinates.
Returns next coordinate set.
Returns the index of the next frame.
Returns number of atoms.
Returns number of frames.
Returns number of open trajectory files.
Returns a list of fixed atom numbers, one from each file.
Returns number of frames.
Returns number of selected atoms. A subset of atoms can be selected by passing a selection to
Set atoms or specify a selection of atoms to be considered in calculations and coordinate requests. When a selection is set, corresponding subset of coordinates will be considered in, for example, alignments and RMSD calculations. Setting atoms also allows some functions to access atomic data when needed. For example,
Frameinstances become suitable arguments for
writePDB(). Passing None as atoms argument will deselect atoms. Note that setting atoms does not change the reference coordinates of the trajectory. To change the reference, use
Set coords as the trajectory reference coordinate set. coords must be an object with
getCoords()method, or a Numpy array with suitable data type, shape, and dimensionality.
Set title of the ensemble.
Set atomic weights.