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

__delattr__

Implement delattr(self, name).

__dir__

Default dir() implementation.

__eq__

Return self==value.

__format__

Default object formatter.

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__([process, trajectory, topology])

Constructor.

__init_subclass__

This method is called when a class is subclassed.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__

Create and return a new object.

__reduce__

Helper for pickle.

__reduce_ex__

Helper for pickle.

__repr__()

Return a string showing how to instantiate the object.

__setattr__

Implement setattr(self, name, value).

__sizeof__

Size of object in memory, in bytes.

__str__()

Return a human readable string representation of the object.

__subclasshook__

Abstract classes can override this to customize issubclass().

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.

Attributes

__dict__

__doc__

__module__

__weakref__

list of weak references to the object (if defined)

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]