Interface for reading and writing to a MSMBuilder2 “LH5” molecular dynamics trajectory file, a deprecated format.
| Parameters: | filename : str 
 mode : {‘r, ‘w’} 
 force_overwrite : bool 
 | 
|---|
Methods
| __init__(filename[, mode, force_overwrite]) | |
| close() | Close the HDF5 file handle | 
| flush() | Write all buffered data in the to the disk file. | 
| read(*args, **kwargs) | Read one or more frames of data from the file | 
| seek(*args, **kwargs) | Move to a new file position | 
| tell() | Current file position | 
| write(*args, **kwargs) | Write one or more frames of data to the file | 
Attributes
| distance_unit | |
| topology | Get the topology out from the file | 
Close the HDF5 file handle
Write all buffered data in the to the disk file.
Read one or more frames of data from the file
| Parameters: | n_frames : {int, None} 
 stride : {int, None} 
 atom_indices : {int, None} 
 | 
|---|---|
| Returns: | xyz : np.ndarray, shape=(n_frames, n_atoms, 3), dtype=np.float32 
 | 
Move to a new file position
| Parameters: | offset : int 
 whence : {0, 1, 2} 
 | 
|---|
Current file position
| Returns: | offset : int 
 | 
|---|
Get the topology out from the file
| Returns: | topology : mdtraj.Topology 
 | 
|---|
Write one or more frames of data to the file
| Parameters: | coordinates : np.ndarray, dtype=np.float32, shape=(n_frames, n_atoms, 3) 
 | 
|---|