Load a trajectory from one or more files on disk.
This function dispatches to one of the specialized trajectory loaders based on the extension on the filename. Because different trajectory formats save different information on disk, the specific keyword argument options supported depend on the specific loaded.
Parameters: | filename_or_filenames : {str, list of strings}
discard_overlapping_frames : bool, default=False
|
---|---|
Returns: | trajectory : md.Trajectory
|
Other Parameters: | |
top : {str, Trajectory, Topology}
stride : int, default=None
atom_indices : array_like, optional
|
See also
Examples
>>> import mdtraj as md
>>> traj = md.load('output.xtc', top='topology.pdb')
>>> print traj
<mdtraj.Trajectory with 500 frames, 423 atoms at 0x110740a90>
>>> traj2 = md.load('output.xtc', stride=2, top='topology.pdb')
>>> print traj2
<mdtraj.Trajectory with 250 frames, 423 atoms at 0x11136e410>
>>> traj3 = md.load_hdf5('output.xtc', atom_indices=[0,1] top='topology.pdb')
>>> print traj3
<mdtraj.Trajectory with 500 frames, 2 atoms at 0x18236e4a0>