msmbuilder.Trajectory.Trajectory.enum_chunks_from_hdf¶
- classmethod Trajectory.enum_chunks_from_hdf(TrajFilename, Stride=None, AtomIndices=None, ChunkSize=50000)[source]¶
Function to read trajectory files which have been saved as HDF.
This function is an iterable, so should be used like:
from msmbuilder import Trajectory for trajectory_chunk in Trajectory.enum_chunks_from_hdf(
... # Do something with each chunk. The chunk looks like a regular Trajectory instanceInputs: - TrajFilename: Filename to find the trajectory - Stride [None]: Integer number of frames to subsample the trajectory - AtomIndices [None]: np.ndarray of atom indices to read in (0-indexed) - ChunkSize [100000]: Integer number of frames to read in a chunk
- NOTE: ChunkSize will change in order to be a multiple of the input Stride
- This is necessary in order to make sure the Stride and chunks line up
Outputs: - Nothing. This is an iterable function, so it yields Trajectory instances