This document is for OpenStructure version 1.5, the latest version is 2.9.0 !

Trajectories

CreateCoordGroup(atoms)
Parameters:atoms (AtomHandleList) – List of atoms. All atoms must be from the same entity.
Return type:CoordGroupHandle
Returns:A coord group with zero frames
class CoordGroupHandle

A collection of coordinate frames, e.g. an MD trajectory. Create with CreateCoordGroup().

entity

The attached entity.

Type:EntityHandle
atoms

The atoms of this coord group. The order of atoms is the same as the positions in the coord frames. All atoms are from the same entity.

Type:AtomHandleList
AddFrames(frames)

Combine two trajectories by appending the frames of the second to the first :param frames: a valid coord group :type frames: CoordGroupHandle

Capture()

Record the atom positions of the entity attached to this coord group in a new coordinate frame. Note that the atom positions transformed by the entity transform will be stored. Only available for mutable coord groups.

See:AtomHandle.pos
CaptureInto(frame_index)

Same as Capture(), but doesn’t create a new frame and stores the coordinates directly into frame with index frame_index. Only available for mutable coord groups.

Parameters:frame_index (int) – index of the frame
CopyFrame(frame_index)

Copies the coordinates of frame with index frame_index to the attached entity.

Parameters:frame_index (int) – index of the frame
Filter(view)

Returns a new trajectory containing only coordinates of the atoms in view. Useful to remove water and other solvent molecules from a trajectory to save memory.

Parameters:view (EntityView) – a valid entity view
Return type:CoordGroupHandle
GetAtomCount()

Returns the number of atoms in the coord group

Return type:int
GetAtomList()

Returns the atoms of the coord group in the same order they appear in the coordinate frames.

Return type:AtomHandleList
GetAtomPos(frame_index, atom)

Get position of atom in frame with index frame_index.

Parameters:
  • frame_index (int) – frame index
  • atom (AtomHandle) – A valid atom
Return type:

Vec3

GetEntity()

Returns the attached entity

Return type:EntityHandle
GetFrameCount()

Returns the number of frames of this coord group

Return type:int
IsValid()

Whether this coord group is valid

Return type:bool
SetAtomPos(frame_index, atom, pos)

Set position of atom in frame with index frame_index to pos

Parameters:
  • frame_index (int) – index of the frame
  • atom (AtomHandle) – a valid atom
  • pos (Vec3) – new position of the atom
SetFramePositions(frame_index, positions)

Set the frame positions of frame with index frame_index. Order and count of positions must match atoms.

Parameters:
  • frame_index (int) – index of frame
  • positions (Vec3List) – list of positions
class CoordFrame

A single frame of coordinates in a CoordGroupHandle.

GetAngle(atom1, atom2, atom3)
Parameters:
Returns:

the angle in radians between the 3 atoms

Return type:

float

GetAtomPos(atom)

Returns the position of the atom in the coord frame

Parameters:atom (AtomHandle) – A valid atom handle
Return type:Vec3
GetCenterOfMassPos(view)
Parameters:view (EntityView) – A valid entity view
Return type:Vec3
GetDihedralAngle(atom1, atom2, atom3, atom4)

Get dihedral angle of the four atoms.

Parameters:
  • atom1 (AtomHandle) – First atom. Must be valid
  • atom2 (AtomHandle) – Second atom. Must be valid
  • atom3 (AtomHandle) – Third atom. Must be valid
  • atom3 – Fourth atom. Must be valid
Return type:

float

GetDistanceBetwAtoms(atom1, atom2)

Get distance in (Angstroem) between atom1 and atom2 in coord frame.

Parameters:
  • atom1 (AtomHandle) – First atom. Must be valid
  • atom2 (AtomHandle) – Second atom. Must be valid
Return type:

float

GetDistanceBetwCenterOfMass(view1, view2)

Get distance between center of mass of the first selection and the second.

Parameters:
  • view1 (EntityView) – First view. Must be valid
  • view2 (EntityView) – Second view. Must be valid
Return type:

float

GetRMSD(view1, view2)

Get RMSD between two views in the coord frame. The coordinates of the views are taken as is without superposition. The two views must have the same number of atoms. Atoms are matches as they appear in EntityView.atoms.

Parameters:
  • view1 (EntityView) – First view. Must be valid
  • view2 (EntityView) – Second view. Must be valid
Return type:

float

Search

Enter search terms or a module, class or function name.

Contents

Documentation is available for the following OpenStructure versions:

dev / 2.9.0 / 2.8 / 2.7 / 2.6 / 2.5 / 2.4 / 2.3.1 / 2.3 / 2.2 / 2.1 / 2.0 / 1.9 / 1.8 / 1.7.1 / 1.7 / 1.6 / (Currently viewing 1.5) / 1.4 / 1.3 / 1.2 / 1.11 / 1.10 / 1.1

This documentation is still under heavy development!
If something is missing or if you need the C++ API description in doxygen style, check our old documentation for further information.