OpenStructure
Data Structures | Public Member Functions
ChainImpl Class Reference

#include <chain_impl.hh>

Inherits GenericPropContainerImpl, and enable_shared_from_this< ChainImpl >.

Public Member Functions

 ChainImpl (const EntityImplPtr &e, const String &name)
 
void SetName (const String &new_name)
 
String GetName () const
 
void SetType (const ChainType type)
 
ChainType GetType () const
 
bool IsPolymer () const
 
bool IsPolysaccharide () const
 
bool IsOligosaccharide () const
 
bool IsPolypeptide () const
 
bool IsPolynucleotide () const
 
void SetDescription (const String desc)
 
String GetDescription () const
 
ResidueImplPtr AppendResidue (const ResidueImplPtr &res, bool deep)
 
ResidueImplPtr InsertResidueBefore (int index, const ResNum &n, const ResidueKey &k)
 
ResidueImplPtr InsertResidueAfter (int index, const ResNum &n, const ResidueKey &k)
 
ResidueImplPtr AppendResidue (const ResidueKey &k)
 
ResidueImplPtr AppendResidue (const ResidueKey &k, const ResNum &n)
 
ResidueImplPtr GetPrev (const ResidueImplPtr &r) const
 
ResidueImplPtr GetNext (const ResidueImplPtr &r) const
 
const ResidueImplListGetResidueList () const
 
bool InSequence () const
 
ResidueImplListGetResidueList ()
 
Real GetMass () const
 
geom::Vec3 GetCenterOfMass () const
 
geom::Vec3 GetCenterOfAtoms () const
 
geom::AlignedCuboid GetBounds () const
 
ResidueImplPtr FindResidue (const ResNum &number) const
 
AtomImplPtr FindAtom (const ResNum &number, const String &atom_name) const
 
int GetResidueCount () const
 
int GetAtomCount () const
 
int GetBondCount () const
 
void Apply (EntityVisitor &v)
 
EntityImplPtr GetEntity () const
 
void DeleteResidue (const ResNum &number)
 
void DeleteResidue (const ResidueImplPtr &residue)
 
void DeleteAllResidues ()
 
void ReorderResidues ()
 
void RenumberAllResidues (int start, bool keep_spacing)
 
void RenumberAllResidues (const ResNumList &new_numbers)
 
int GetIndex (const ResidueImplPtr &res) const
 
void AssignSecondaryStructure (SecStructure ss, const ResNum &start, const ResNum &end)
 
int GetIndexForResNum (const ResNum &number) const
 
void SetInSequence (int index)
 
void UpdateTransformedPos ()
 
- Public Member Functions inherited from GenericPropContainerImpl
 GenericPropContainerImpl ()
 
 ~GenericPropContainerImpl ()
 
 GenericPropContainerImpl (const GenericPropContainerImpl &rhs)
 
GenericPropContainerImploperator= (const GenericPropContainerImpl &r)
 
GenericPropValueGenericProp (const String &key)
 
const GenericPropValueGenericProp (const String &key) const
 
bool HasProp (const String &key) const
 
void ClearProps ()
 
void RemoveProp (const String &key)
 
void Assign (const GenericPropContainerImpl &impl)
 
PropertyMap GetPropMap () const
 
std::vector< StringGetPropList () const
 

Detailed Description

Definition at line 42 of file chain_impl.hh.

Constructor & Destructor Documentation

◆ ChainImpl()

ChainImpl ( const EntityImplPtr e,
const String name 
)

Member Function Documentation

◆ AppendResidue() [1/3]

ResidueImplPtr AppendResidue ( const ResidueImplPtr res,
bool  deep 
)

append new residue with exactly the same parameters as res, but no atoms and bonds

◆ AppendResidue() [2/3]

ResidueImplPtr AppendResidue ( const ResidueKey k)

Append residue at end of chain.

Residue number will be automatically set to last+1. The first residue will have the number 1. insertion code from a previous residue are copied.

◆ AppendResidue() [3/3]

ResidueImplPtr AppendResidue ( const ResidueKey k,
const ResNum n 
)

Append residue at end of chain.

◆ Apply()

void Apply ( EntityVisitor v)

◆ AssignSecondaryStructure()

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

◆ DeleteAllResidues()

void DeleteAllResidues ( )

◆ DeleteResidue() [1/2]

void DeleteResidue ( const ResidueImplPtr residue)

◆ DeleteResidue() [2/2]

void DeleteResidue ( const ResNum number)

◆ FindAtom()

AtomImplPtr FindAtom ( const ResNum number,
const String atom_name 
) const

◆ FindResidue()

ResidueImplPtr FindResidue ( const ResNum number) const

Get residue by number. Returns a invalid pointer if the chain does not have any residue with this number.

◆ GetAtomCount()

int GetAtomCount ( ) const

Get number of atoms of this chain.

◆ GetBondCount()

int GetBondCount ( ) const

Get number of bonds of this chain.

◆ GetBounds()

geom::AlignedCuboid GetBounds ( ) const

returns the axis-aligned bounding box of the entity

◆ GetCenterOfAtoms()

geom::Vec3 GetCenterOfAtoms ( ) const

◆ GetCenterOfMass()

geom::Vec3 GetCenterOfMass ( ) const

◆ GetDescription()

String GetDescription ( ) const
inline

Get information about a chain.

Returns
description

Definition at line 110 of file chain_impl.hh.

◆ GetEntity()

EntityImplPtr GetEntity ( ) const

◆ GetIndex()

int GetIndex ( const ResidueImplPtr res) const

◆ GetIndexForResNum()

int GetIndexForResNum ( const ResNum number) const

◆ GetMass()

Real GetMass ( ) const

◆ GetName()

String GetName ( ) const

◆ GetNext()

ResidueImplPtr GetNext ( const ResidueImplPtr r) const

previous residue, not necessarily in sequence

◆ GetPrev()

ResidueImplPtr GetPrev ( const ResidueImplPtr r) const

◆ GetResidueCount()

int GetResidueCount ( ) const

Get number of residues of this chain.

◆ GetResidueList() [1/2]

ResidueImplList& GetResidueList ( )
inline

Definition at line 145 of file chain_impl.hh.

◆ GetResidueList() [2/2]

const ResidueImplList& GetResidueList ( ) const

◆ GetType()

ChainType GetType ( ) const
inline

Get the type of a chain.

Returns
chain type of ChainType

Definition at line 62 of file chain_impl.hh.

◆ InSequence()

bool InSequence ( ) const

whether the residue numbers are in ascending order

◆ InsertResidueAfter()

ResidueImplPtr InsertResidueAfter ( int  index,
const ResNum n,
const ResidueKey k 
)

◆ InsertResidueBefore()

ResidueImplPtr InsertResidueBefore ( int  index,
const ResNum n,
const ResidueKey k 
)

◆ IsOligosaccharide()

bool IsOligosaccharide ( ) const
inline

whether the chain is a polysaccharide

Definition at line 82 of file chain_impl.hh.

◆ IsPolymer()

bool IsPolymer ( ) const
inline

whether the chain is a polymer

Definition at line 68 of file chain_impl.hh.

◆ IsPolynucleotide()

bool IsPolynucleotide ( ) const
inline

whether the chain is a polynucleotide

Definition at line 93 of file chain_impl.hh.

◆ IsPolypeptide()

bool IsPolypeptide ( ) const
inline

whether the chain is a polypeptide

Definition at line 87 of file chain_impl.hh.

◆ IsPolysaccharide()

bool IsPolysaccharide ( ) const
inline

whether the chain is a polysaccharide

Definition at line 76 of file chain_impl.hh.

◆ RenumberAllResidues() [1/2]

void RenumberAllResidues ( const ResNumList new_numbers)

◆ RenumberAllResidues() [2/2]

void RenumberAllResidues ( int  start,
bool  keep_spacing 
)

◆ ReorderResidues()

void ReorderResidues ( )

◆ SetDescription()

void SetDescription ( const String  desc)
inline

Assign a description to a chain.

Parameters
descdescription

Definition at line 102 of file chain_impl.hh.

◆ SetInSequence()

void SetInSequence ( int  index)

checks if the residue with that index breaks the in_sequence property and updates it accordingly

◆ SetName()

void SetName ( const String new_name)

◆ SetType()

void SetType ( const ChainType  type)
inline

Assign a type to a chain.

Parameters
typechain type of ChainType

Definition at line 54 of file chain_impl.hh.

◆ UpdateTransformedPos()

void UpdateTransformedPos ( )

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