msmbuilder.Trajectory.Trajectory.enum_chunks_from_lhdf¶
- classmethod Trajectory.enum_chunks_from_lhdf(TrajFilename, precision=1000, Stride=None, AtomIndices=None, ChunkSize=50000)[source]¶
Method to read trajectory files which have been saved as LHDF. Note that this method simply calls the enum_chunks_from_hdf method.
This function is an iterable, so should be used like:
from msmbuilder import Trajectory for trajectory_chunk in Trajectory.enum_chunks_from_lhdf(
... # Do something with each chunk. The chunk looks like a regular Trajectory instanceInputs: - TrajFilename: Filename to find the trajectory - precision [1000]: precision used when saving as lossy integers - 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