BioSimSpace.Trajectory.Trajectory

class BioSimSpace.Trajectory.Trajectory(process=None, trajectory=None, topology=None)

A class for reading a manipulating biomolecular trajectories.

__init__(process=None, trajectory=None, topology=None)

Constructor.

Parameters
  • process (Process) – A BioSimSpace process object.

  • trajectory (str) – A trajectory file.

  • topology (str) – A topology file.

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.

getFrames(indices=None)

Get trajectory frames as a list of System objects.

Parameters

indices ([int], [Time]) – A list of trajectory frame indices, or time stamps (in ns).

Returns

frames – The list of System objects.

Return type

[System]

getTrajectory(format='mdtraj')

Get the current trajectory object.

Parameters

format (str) – Whether to return an ‘MDTraj’ or ‘MDAnalysis’ object.

Returns

trajectory – The trajectory in MDTraj or MDAnalysis format.

Return type

mdtraj.core.trajectory.Trajectory, MDAnalysis.core.universe.Universe

nFrames()

Return the current number of trajectory frames.

Returns

nFrames – The number of trajectory frames.

Return type

int

rmsd(frame=None, atoms=None)

Compute the root mean squared displacement.

Parameters
  • frame (int) – The index of the reference frame.

  • atoms ([int]) – A list of reference atom indices.

Returns

rmsd – A list containing the RMSD value at each time point.

Return type

[float]