You are reading the documentation for version 1.7 of OpenStructure. You may also want to read the documentation for: 1.1 1.2 1.3 1.4 1.5 1.6 devel

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

Contents

Search

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

Previous topic

Surfaces

Next topic

mol.alg – Algorithms for Structures

You are here