BioSimSpace.Trajectory.Trajectory¶
- class BioSimSpace.Trajectory.Trajectory(process=None, trajectory=None, topology=None, system=None, backend='AUTO', property_map={})[source]¶
A class for reading a manipulating biomolecular trajectories.
- __init__(process=None, trajectory=None, topology=None, system=None, backend='AUTO', property_map={})[source]¶
Constructor.
- Parameters:
process (
Process
) – A BioSimSpace process object.trajectory (str) – A trajectory file.
topology (str) – A topology file.
system (
System
) – A BioSimSpace System object. If passed, then trajectory coordinates and velocities will be copied into this system and returned. This is useful if you wish to preserve all molecular properties, which might be lost during reading of the topology format required by the trajectory backend.backend (str) – The backend used to parse the trajectory file. Options are ‘Sire’, ‘MDTraj’, or ‘MDAnalysis’. Use “auto” if you are happy with any backend, i.e. it will try each in sequence and use the first that worked.
property_map (dict) – A dictionary that maps system “properties” to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }
Methods
__init__
([process, trajectory, topology, ...])Constructor.
getFrames
([indices])Get trajectory frames as a list of System objects.
getTrajectory
([format])Get the current trajectory object.
nFrames
()Return the current number of trajectory frames.
rmsd
([frame, atoms])Compute the root mean squared displacement.
- getTrajectory(format='auto')[source]¶
Get the current trajectory object.
- Parameters:
format (str) – Whether to return a ‘Sire’, ‘MDTraj’, or ‘MDAnalysis’ object. Use “auto” if you are happy with any format, i.e. it will try each backend in sequence and return an object from the first one that works.
- Returns:
trajectory – The trajectory in MDTraj or MDAnalysis format.
- Return type:
mdtraj.core.trajectory.Trajectory, MDAnalysis.core.universe.Universe