Avogadro::Core::Residue#
-
class Residue#
The Residue class represents a chemical residue, used commonly in the PDB format.
Public Types
Public Functions
-
Residue()#
Creates a new, empty residue.
-
Residue(std::string &name)#
-
Residue(std::string &name, Index &number)#
-
Residue(std::string &name, Index &number, char &id)#
-
virtual ~Residue()#
-
inline std::string residueName() const#
-
inline void setResidueName(std::string &name)#
-
inline Index residueId() const#
-
inline void setResidueId(Index &number)#
-
inline char chainId() const#
-
inline void setChainId(const char &id)#
-
inline SecondaryStructure secondaryStructure() const#
-
inline void setSecondaryStructure(const SecondaryStructure &ss)#
-
inline AtomNameMap &atomNameMap()#
- Returns:
the atom map for the residue
-
void resolveResidueBonds(Molecule &mol)#
Sets bonds to atoms in the residue based on data from residuedata header
-
int getAtomicNumber(std::string name) const#
- Returns:
the atomic number of the atom with the name specified (e.g., “CA” = “C”)
-
std::string getAtomName(const Atom atom) const#
- Returns:
the name of
atom
or an empty string if not in this residue
-
std::string getAtomName(const Index index) const#
- Returns:
the name of atom
index
or an empty string if not in this residue
-
bool hasAtomByIndex(Index index) const#
-
inline void setHeterogen(bool heterogen)#
Set whether this residue is a “HET” / “HETATOM” ligand
-
inline bool isHeterogen() const#
- Returns:
is this residue a heterogen (HET / HETATM)
-
void setColor(const Vector3ub color)#
Set a custom color for this residue
-
Vector3ub color() const#
- Returns:
the color set for this residue, or a default from the chain id
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#
-
Residue()#