mdtraj.load_lammpstrj

mdtraj.load_lammpstrj(filename, top=None, stride=None, atom_indices=None, frame=None, unit_set='real')

Load a LAMMPS trajectory file.

Parameters:

filename : str

String filename of LAMMPS trajectory file.

top : {str, Trajectory, Topology}

The lammpstrj format does not contain topology information. Pass in either the path to a pdb file, a trajectory, or a topology to supply this information.

stride : int, default=None

Only read every stride-th frame

atom_indices : array_like, optional

If not none, then read only a subset of the atoms coordinates from the file.

frame : int, optional

Use this option to load only a single frame from a trajectory on disk. If frame is None, the default, the entire trajectory will be loaded. If supplied, stride will be ignored.

unit_set : str, optional

The LAMMPS unit set that the simulation was performed in. See http://lammps.sandia.gov/doc/units.html for options. Currently supported unit sets: ‘real’.

Returns:

trajectory : md.Trajectory

The resulting trajectory, as an md.Trajectory object.

See also

mdtraj.LAMMPSTrajectoryFile
Low level interface to lammpstrj files