mdtraj.formats.LH5TrajectoryFile
- class mdtraj.formats.LH5TrajectoryFile(filename, mode='r', force_overwrite=True)[source]
Interface for reading and writing to a MSMBuilder2 “LH5” molecular dynamics trajectory file, a deprecated format.
- Parameters:
filename (path-like) – Path to the file to open
mode ({'r, 'w'}) – Mode in which to open the file. ‘r’ is for reading and ‘w’ is for writing
force_overwrite (bool) – In mode=’w’, how do you want to behave if a file by the name of filename already exists? if force_overwrite=True, it will be overwritten.
- Attributes:
topologyGet the topology out from the file
Methods
close()Close the HDF5 file handle
flush()Write all buffered data in the to the disk file.
read([n_frames, stride, atom_indices])Read one or more frames of data from the file
read_as_traj([n_frames, stride, atom_indices])Read a trajectory from the LH5 file
seek(offset[, whence])Move to a new file position
tell()Current file position
write(coordinates)Write one or more frames of data to the file
Methods
__init__(filename[, mode, force_overwrite])close()Close the HDF5 file handle
flush()Write all buffered data in the to the disk file.
read([n_frames, stride, atom_indices])Read one or more frames of data from the file
read_as_traj([n_frames, stride, atom_indices])Read a trajectory from the LH5 file
seek(offset[, whence])Move to a new file position
tell()Current file position
write(coordinates)Write one or more frames of data to the file
Attributes
distance_unittopologyGet the topology out from the file