#include <residue_handle.hh>
Inherits ost::mol::ResidueBase.
Public Member Functions | |
| ResidueHandle () | |
| ResidueHandle (const impl::ResidueImplPtr &impl) | |
| EntityHandle | GetEntity () const |
| AtomHandle | GetCentralAtom () const |
| geom::Vec3 | GetCentralNormal () const |
| double | GetMass () const |
| geom::Vec3 | GetCenterOfMass () const |
| geom::Vec3 | GetCenterOfAtoms () const |
| geom::Vec3 | GetGeometricCenter () const |
| geom::Vec3 | GetGeometricStart () const |
| geom::Vec3 | GetGeometricEnd () const |
| ChainHandle | GetChain () const |
| ResidueHandle | GetPrev () const |
| ResidueHandle | GetNext () const |
| AtomHandle | FindAtom (const String &aname) const |
| void | Apply (EntityVisitor &visitor) |
| AtomHandleList | GetAtomList () const |
| int | GetAtomCount () const |
| int | GetBondCount () const |
| TorsionHandle | FindTorsion (const String &torsion_name) const |
| TorsionHandleList | GetTorsionList () const |
| int | GetIndex () const |
| AtomHandleIter | AtomsBegin () const |
| ResidueHandle | GetHandle () const |
| unsigned long | GetHashCode () const |
| AtomHandleIter | AtomsEnd () const |
| EntityView | Select (const Query &q, QueryFlags flags=0) const |
| EntityView | Select (const String &query_string, QueryFlags flags=0) const |
| bool | operator== (const ResidueHandle &ref) const |
| bool | operator!= (const ResidueHandle &ref) const |
Alternative atom positions | |
Alternative atom positions have traditionally been used to indicate that the position of an atom is not limited to one point, but that the atom may occur at more than one position. The following functions let you work with alternative atom locations on the level of residues. | |
| bool | HasAltAtomGroup (const String &group) const |
| const String & | GetCurrentAltGroupName () const |
| std::vector< String > | GetAltAtomGroupNames () const |
| bool | HasAltAtoms () const |
| geom::Vec3 | GetAltAtomPos (const AtomHandle &atom, const String &group) const |
| bool | SwitchAtomPos (const String &group) |
In a polymer a residue is a single unit such as a nucleotide or an amino acid. In case of ligands, a residue ofter represents a completye molecule, such as a HEM group.
Every residue belongs to a chain and has a defined position (GetIndex) in that chain. In a peptide chain, the previous (towards N-terminus) and next (towards C-terminus) can be obtained with GetPrev() and GetNext() respectively.
A residue consist of one or more atoms. The list of atoms can be retrieved with GetAtomList(), wheras FindAtom() will locate a particular atom in the residue.
To add atoms to the residue, you have to request an editor and call EditorBase::InsertAtom() or EditorBase::InsertAltAtom()
XCSEditor edi=residue.GetEntity().RequestXCSEditor();
edi.InsertAtom(residue, "CA", geom.Vec3(1.0, 0.0, 0.0));
Definition at line 54 of file residue_handle.hh.
| ResidueHandle | ( | ) |
| ResidueHandle | ( | const impl::ResidueImplPtr & | impl | ) | [inline] |
Definition at line 58 of file residue_handle.hh.
| void Apply | ( | EntityVisitor & | visitor | ) |
| AtomHandleIter AtomsBegin | ( | ) | const |
Get iterator pointing to the beginning of the atoms.
Atom iterators are not fail-safe, meaning that when new atoms are inserted the iterators become invalid and the behaviour is undefined. To iterate over the residue while inserting/deleting atoms use GetAtomList().
| AtomHandleIter AtomsEnd | ( | ) | const |
| AtomHandle FindAtom | ( | const String & | aname | ) | const |
Find atom by name.
| aname | is the atom name |
| TorsionHandle FindTorsion | ( | const String & | torsion_name | ) | const |
Find torsion by name.
| torsion_name | is the name of the torsion you are looking for. Torsions are named with uppercase letters. |
| std::vector<String> GetAltAtomGroupNames | ( | ) | const |
Get names of alternative atom groups.
| geom::Vec3 GetAltAtomPos | ( | const AtomHandle & | atom, | |
| const String & | group | |||
| ) | const |
Get alternative atom position for given atom.
If the atom is not in group, an IntegrityError is thrown.
| int GetAtomCount | ( | ) | const |
Get number of atoms of this residue.
| AtomHandleList GetAtomList | ( | ) | const |
| int GetBondCount | ( | ) | const |
Get number of bonds of this residue. This method might NOT work as expected (see warning below).
| geom::Vec3 GetCenterOfAtoms | ( | ) | const |
Get entity's center of atoms (not mass weighted).
Returns the center of all the atoms in an entity. This is similar to GetCenterOfMass(), but the atoms are not mass weighted
| geom::Vec3 GetCenterOfMass | ( | ) | const |
Get entity's center of mass (mass weighted).
| AtomHandle GetCentralAtom | ( | ) | const |
returns main atom, ie CA for amino acids
| geom::Vec3 GetCentralNormal | ( | ) | const |
| ChainHandle GetChain | ( | ) | const |
The chain this residue is attached to.
| const String& GetCurrentAltGroupName | ( | ) | const |
Name of active alternative atom group.
| EntityHandle GetEntity | ( | ) | const |
| geom::Vec3 GetGeometricCenter | ( | ) | const |
Get entity's geometric center.
Returns the geometric center of the entity's bounding box by calculating (GetGeometricStart()+GetGeometricEnd())/2
| geom::Vec3 GetGeometricEnd | ( | ) | const |
Get entity's maximum cartesian coordinates.
| geom::Vec3 GetGeometricStart | ( | ) | const |
Get entity's minimum cartesian coordinates.
| ResidueHandle GetHandle | ( | ) | const |
get this handle
This method exists as a convenience duck-typing in Python.
| unsigned long GetHashCode | ( | ) | const |
| int GetIndex | ( | ) | const |
Get position of residue in chain.
| double GetMass | ( | ) | const |
Get entity's mass.
| ResidueHandle GetNext | ( | ) | const |
Get next residue in chain.
| ResidueHandle GetPrev | ( | ) | const |
Get previous residue in chain.
| TorsionHandleList GetTorsionList | ( | ) | const |
Get list of all torsion angles of this residue.
| bool HasAltAtomGroup | ( | const String & | group | ) | const |
Test if residue has group of alternative atoms with a certain name.
| bool HasAltAtoms | ( | ) | const |
Test if the residue has any alternative atom positions.
| bool operator!= | ( | const ResidueHandle & | ref | ) | const |
| bool operator== | ( | const ResidueHandle & | ref | ) | const |
| EntityView Select | ( | const String & | query_string, | |
| QueryFlags | flags = 0 | |||
| ) | const |
| EntityView Select | ( | const Query & | q, | |
| QueryFlags | flags = 0 | |||
| ) | const |
| bool SwitchAtomPos | ( | const String & | group | ) |
switch atoms that have alternative positions to the position in the group. Atoms that do not have an alternative position are left untouched.
| group | is the group name to switch to. |
1.5.8