AvogadroLibs 1.97.0
|
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 , undefined = -1 } |
typedef std::map< std::string, Atom > | AtomNameMap |
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) | |
Residue & | operator= (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< Atom > | residueAtoms () const |
AtomNameMap & | atomNameMap () |
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 |
typedef std::map<std::string, Atom> AtomNameMap |
Type for atom name map.
Residue | ( | ) |
Creates a new, empty residue.
void addResidueAtom | ( | const std::string & | name, |
const Atom & | atom | ||
) |
Adds an atom to the residue class
std::vector< Atom > residueAtoms | ( | ) | const |
AtomNameMap & atomNameMap | ( | ) |
void resolveResidueBonds | ( | Molecule & | mol | ) |
Sets bonds to atoms in the residue based on data from residuedata header
Atom getAtomByName | ( | std::string | name | ) | const |
int getAtomicNumber | ( | std::string | name | ) | const |
std::string getAtomName | ( | const Atom | atom | ) | const |
atom
or an empty string if not in this residue std::string getAtomName | ( | const Index | index | ) | const |
index
or an empty string if not in this residue void setHeterogen | ( | bool | heterogen | ) |
Set whether this residue is a "HET" / "HETATOM" ligand
bool isHeterogen | ( | ) | const |
void setColor | ( | const Vector3ub | color | ) |
Set a custom color for this residue
Vector3ub color | ( | ) | const |