msmbuilder.io.load_trajs¶
-
msmbuilder.io.
load_trajs
(fn, meta='meta.pandas.pickl', key_to_path=None)¶ Load trajectory-like data
Data is expected to be stored as if saved by
save_trajs
.This method finds trajectories based on the
meta
dataframe. If you remove a file (trajectory) from disk, be sure to remove its row from the dataframe. If you remove a row from the dataframe, be aware that that trajectory (file) will not be loaded, even if it exists on disk.Parameters: - fn : str
Where the data is saved. This should be a directory containing one file per trajectory.
- meta : pd.DataFrame or str
The DataFrame of metadata. If this is a string, it is interpreted as a filename and the dataframe is loaded from disk.
Returns: - meta : pd.DataFrame
The DataFrame of metadata. If you passed in a string (filename) to the
meta
input, this will be the loaded DataFrame. If you gave a DataFrame object, this will just be a reference back to that object- trajs : dict
Dictionary of trajectory-like np.ndarray’s keyed on the values of
meta.index
.