Frame

This module defines a class for handling trajectory frames.

class Frame(traj, index, coords, unitcell=None, velocs=None)[source]

A class for storing trajectory frame coordinates and provide methods acting on them.

getAtoms()

Returns associated/selected atoms.

getCoords()

Returns a copy of coordinates of (selected) atoms.

getDeviations()

Returns deviations from the trajectory reference coordinates.

getIndex()

Returns index.

getRMSD()

Returns RMSD from the trajectory reference coordinates. If weights for the trajectory are set, weighted RMSD will be returned.

getTrajectory()

Returns the trajectory.

getUnitcell()

Returns a copy of unitcell array.

getVelocities()

Returns a copy of velocities of (selected) atoms.

getWeights()

Returns coordinate weights for selected atoms.

numAtoms()

Returns number of atoms.

numSelected()

Returns number of selected atoms.

superpose()

Superpose frame onto the trajectory reference coordinates. Note that transformation matrix is calculated based on selected atoms and applied to all atoms. If atom weights for the trajectory are set, they will be used to calculate the transformation.