AvogadroLibs 1.99.0
Loading...
Searching...
No Matches
Residue Class Reference

The Residue class represents a chemical residue, used commonly in the PDB format.

#include <avogadro/core/residue.h>

Public Types

enum  SecondaryStructure {
  piHelix = 0 ,
  bend = 1 ,
  alphaHelix = 2 ,
  betaSheet = 3 ,
  helix310 = 4 ,
  betaBridge = 5 ,
  turn = 6 ,
  coil = 7 ,
  maybeBeta = -3 ,
  undefined = -1
}
typedef std::map< std::string, AtomAtomNameMap

Public Member Functions

 Residue ()
 Residue (std::string &name)
 Residue (std::string &name, Index &number)
 Residue (std::string &name, Index &number, char &id)
 Residue (const Residue &other)
Residueoperator= (Residue other)
std::string residueName () const
void setResidueName (std::string &name)
Index residueId () const
void setResidueId (Index &number)
char chainId () const
void setChainId (const char &id)
SecondaryStructure secondaryStructure () const
void setSecondaryStructure (const SecondaryStructure &ss)
void addResidueAtom (const std::string &name, const Atom &atom)
std::vector< AtomresidueAtoms () const
AtomNameMapatomNameMap ()
void resolveResidueBonds (Molecule &mol)
Atom getAtomByName (std::string name) const
int getAtomicNumber (std::string name) const
std::string getAtomName (const Atom atom) const
std::string getAtomName (const Index index) const
bool hasAtomByIndex (Index index) const
void setHeterogen (bool heterogen)
bool isHeterogen () const
void setColor (const Vector3ub color)
Vector3ub color () const

Protected Attributes

std::string m_residueName
Index m_residueId
char m_chainId
AtomNameMap m_atomNameMap
bool m_heterogen
Vector3ub m_color
bool m_customColorSet
SecondaryStructure m_secondaryStructure

Member Typedef Documentation

◆ AtomNameMap

typedef std::map<std::string, Atom> AtomNameMap

Type for atom name map.

Constructor & Destructor Documentation

◆ Residue()

Residue ( )

Creates a new, empty residue.

Member Function Documentation

◆ addResidueAtom()

void addResidueAtom ( const std::string & name,
const Atom & atom )

Adds an atom to the residue class

◆ residueAtoms()

std::vector< Atom > residueAtoms ( ) const
Returns
a vector containing the atoms added to the residue

◆ atomNameMap()

AtomNameMap & atomNameMap ( )
Returns
the atom map for the residue

◆ resolveResidueBonds()

void resolveResidueBonds ( Molecule & mol)

Sets bonds to atoms in the residue based on data from residuedata header

◆ getAtomByName()

Atom getAtomByName ( std::string name) const
Returns
the atom with the name specified (e.g., "CA")

◆ getAtomicNumber()

int getAtomicNumber ( std::string name) const
Returns
the atomic number of the atom with the name specified (e.g., "CA" = "C")

◆ getAtomName() [1/2]

std::string getAtomName ( const Atom atom) const
Returns
the name of atom or an empty string if not in this residue

◆ getAtomName() [2/2]

std::string getAtomName ( const Index index) const
Returns
the name of atom index or an empty string if not in this residue

◆ setHeterogen()

void setHeterogen ( bool heterogen)

Set whether this residue is a "HET" / "HETATOM" ligand

◆ isHeterogen()

bool isHeterogen ( ) const
Returns
is this residue a heterogen (HET / HETATM)

◆ setColor()

void setColor ( const Vector3ub color)

Set a custom color for this residue

◆ color()

Vector3ub color ( ) const
Returns
the color set for this residue, or a default from the chain id

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