OpenStructure
Public Member Functions
ChainHandle Class Reference

#include <chain_handle.hh>

Inherits ChainBase.

Public Member Functions

 ChainHandle ()
 
 ChainHandle (const impl::ChainImplPtr &impl)
 
EntityHandle GetEntity () const
 
void Apply (EntityVisitor &visitor)
 
ResidueHandle GetPrev (const ResidueHandle &rh)
 
ResidueHandle GetNext (const ResidueHandle &rh)
 
Single item addressing
ResidueHandle FindResidue (const ResNum &num) const
 
AtomHandle FindAtom (const ResNum &num, const String &atom_name) const
 
ResidueHandle GetResidueByIndex (int index) const
 
int GetAtomCount () const
 
int GetBondCount () const
 
int GetResidueCount () const
 
AtomHandleList GetAtomList () const
 
ResidueHandleList GetResidueList () const
 
Real GetMass () const
 
geom::Vec3 GetCenterOfMass () const
 
geom::Vec3 GetCenterOfAtoms () const
 
geom::AlignedCuboid GetBounds () const
 
void AssignSecondaryStructure (SecStructure ss, const ResNum &start, const ResNum &end)
 
EntityView Select (const Query &q, QueryFlags flags=0) const
 
EntityView Select (const String &query_string, QueryFlags flags=0) const
 
ChainHandle GetHandle () const
 
unsigned long GetHashCode () const
 
bool InSequence () const
 
bool operator== (const ChainHandle &ref) const
 
bool operator!= (const ChainHandle &ref) const
 
void SetInSequence (const int index)
 
- Public Member Functions inherited from ChainBase
 ChainBase ()
 
 ChainBase (const impl::ChainImplPtr &impl)
 
 operator bool () const
 
bool IsValid () const
 
String GetName () const
 
ChainType GetType () const
 
String GetDescription () const
 
const impl::ChainImplPtrImpl () const
 
bool IsPolymer () const
 
bool IsPolysaccharide () const
 
bool IsOligosaccharide () const
 
bool IsPolypeptide () const
 
bool IsPolynucleotide () const
 
impl::ChainImplPtrImpl ()
 
- Public Member Functions inherited from GenericPropContainer< ChainBase >
void ClearProps ()
 
void SetStringProp (const String &key, const String &value)
 
void SetFloatProp (const String &key, Real value)
 
void SetIntProp (const String &key, int value)
 
void SetBoolProp (const String &key, bool value)
 
void SetVec3Prop (const String &key, geom::Vec3 value)
 
void RemoveProp (const String &key)
 
- Public Member Functions inherited from ConstGenericPropContainer< H >
bool HasProp (const String &key) const
 
String GetPropAsString (const String &key) const
 
String GetStringProp (const String &key) const
 
Real GetFloatProp (const String &key) const
 
int GetIntProp (const String &key) const
 
bool GetBoolProp (const String &key) const
 
geom::Vec3 GetVec3Prop (const String &key) const
 
String GetStringProp (const String &key, const String &def) const
 
Real GetFloatProp (const String &key, Real def) const
 
int GetIntProp (const String &key, int def) const
 
bool GetBoolProp (const String &key, bool def) const
 
std::map< String, GenericPropValueGetPropMap () const
 
std::vector< StringGetPropList () const
 

Additional Inherited Members

- Protected Member Functions inherited from ChainBase
GenericPropContainerImplGpImpl ()
 
const GenericPropContainerImplGpImpl () const
 
void CheckValidity () const
 
- Protected Member Functions inherited from ConstGenericPropContainer< H >
template<typename T >
gp_get (const String &key) const
 
template<typename T >
gp_get (const String &key, const T &def) const
 
GenericPropContainerImplGetImpl ()
 
const GenericPropContainerImplGetImpl () const
 

Detailed Description

linear chain of residues

In peptide chain, the residues are ordered from N- to C-terminus. To obtain the n-th residue in the chain, use GetResidueByIndex. Alternatively, the residues may be adressed by their residue number with FindResidue. Residue numbers are unique within a chain. It is however not guaranteed that the residue numbers are in ascending order.

New residues are inserted via one of the editors obtained from EntityHandle::EditXCS() or EntityHandle::EditICS(). To append a residue to the C-terminal end, use EditorBase::AppendResidue, to insert after or before a specific residue, EditorBase::InsertResidueAfter and ditorBase::InsertResidueABefore will do the job, respectively.

Definition at line 52 of file chain_handle.hh.

Constructor & Destructor Documentation

◆ ChainHandle() [1/2]

◆ ChainHandle() [2/2]

ChainHandle ( const impl::ChainImplPtr impl)

Member Function Documentation

◆ Apply()

void Apply ( EntityVisitor visitor)

Apply visitor.

Parameters
visitoris the visitor to apply

◆ AssignSecondaryStructure()

void AssignSecondaryStructure ( SecStructure  ss,
const ResNum start,
const ResNum end 
)

assign secondary structure to the inclusive residue range start, end

◆ FindAtom()

AtomHandle FindAtom ( const ResNum num,
const String atom_name 
) const

◆ FindResidue()

ResidueHandle FindResidue ( const ResNum num) const

Find residue by number. If the chain does not contain a residue with the given number, an invalid ResidueHandle will be returned.

See also
ResidueBase::IsValid, FindAtom, EntityHandle::FindResidue

◆ GetAtomCount()

int GetAtomCount ( ) const

Get number of atoms of this chain.

◆ GetAtomList()

AtomHandleList GetAtomList ( ) const

Retrieve atoms of this chain as a list.

The atoms are ordered by atom number in ascending order. If you only want to determine the number of atoms, use the dedicated ChainHandle::GetAtomCount

◆ GetBondCount()

int GetBondCount ( ) const

Get number of all inclusive bonds of this chain.

Warning
For a bond between two different chains, it is not clearly defined to which chain it belongs. Therefore, this method will only return the number of bonds where both bonded atoms are within the same chain (all inclusive bonds).

◆ GetBounds()

geom::AlignedCuboid GetBounds ( ) const

◆ GetCenterOfAtoms()

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

◆ GetCenterOfMass()

geom::Vec3 GetCenterOfMass ( ) const

Get entity's center of mass (mass weighted)

◆ GetEntity()

EntityHandle GetEntity ( ) const

Get parent entity.

◆ GetHandle()

ChainHandle GetHandle ( ) const

get this handle

Useful for duck-typing in Python and in templates

◆ GetHashCode()

unsigned long GetHashCode ( ) const

◆ GetMass()

Real GetMass ( ) const

Get entity's mass.

◆ GetNext()

ResidueHandle GetNext ( const ResidueHandle rh)

◆ GetPrev()

ResidueHandle GetPrev ( const ResidueHandle rh)

Get residue before the given residue.

A previous residue is returned regardless whether the residues are connected by a bond.

◆ GetResidueByIndex()

ResidueHandle GetResidueByIndex ( int  index) const

Get residue by index.

Indices are start at zero

◆ GetResidueCount()

int GetResidueCount ( ) const

Get number of residues of this chain.

See also
EntityHandle::GetResidueCount()

◆ GetResidueList()

ResidueHandleList GetResidueList ( ) const

Get residues of this chain as a list.

The residues are ordered by residue number in ascending order. If you only want to determine the number of residues, use the dedicated ChainHandle::GetResidueCount

◆ InSequence()

bool InSequence ( ) const

whether the residues form an ordered sequence with respect to their reside numbers.

◆ operator!=()

bool operator!= ( const ChainHandle ref) const

◆ operator==()

bool operator== ( const ChainHandle ref) const

◆ Select() [1/2]

EntityView Select ( const Query q,
QueryFlags  flags = 0 
) const

return view based on a query object

See also
Query

◆ Select() [2/2]

EntityView Select ( const String query_string,
QueryFlags  flags = 0 
) const

return view based on query String.

See also
Query

◆ SetInSequence()

void SetInSequence ( const int  index)

checks whether res breaks the in sequence property and updates it accordingly


The documentation for this class was generated from the following file: