Avogadro
1.1.0
|
A biological residue that contains atoms and bonds. More...
#include <avogadro/residue.h>
Public Member Functions | |
Residue (QObject *parent=0) | |
~Residue () | |
void | addAtom (unsigned long id) |
void | removeAtom (unsigned long id) |
void | setNumber (const QString &number) |
QString | number () |
void | setChainNumber (unsigned int number) |
unsigned int | chainNumber () |
void | setChainID (char id) |
char | chainID () |
bool | setAtomId (unsigned long id, QString atomId) |
bool | setAtomIds (const QList< QString > &atomIds) |
QString | atomId (unsigned long id) |
const QList< QString > & | atomIds () const |
Protected Attributes | |
QString | m_number |
QList< QString > | m_atomId |
unsigned int | m_chainNumber |
char | m_chainID |
A biological residue that contains atoms and bonds.
The Residue class is a Fragment subclass that provides the unique additional information required for residues.
Avogadro::Residue::Residue | ( | QObject * | parent = 0 | ) |
Constructor.
Destructor.
void Avogadro::Residue::addAtom | ( | unsigned long | id | ) |
Reimplemented from Avogadro::Fragment.
References Avogadro::Molecule::atomById(), QObject::connect(), QList::contains(), Avogadro::Fragment::m_atoms, QList::push_back(), Avogadro::Atom::setResidue(), and Avogadro::Primitive::updated().
Referenced by Avogadro::Molecule::operator+=(), Avogadro::Molecule::operator=(), and Avogadro::Molecule::setOBMol().
QString Avogadro::Residue::atomId | ( | unsigned long | id | ) |
Returns the atom text id, as in the Residue.
id | The unique id of the Atom. |
References QList::at(), Avogadro::Primitive::index(), QList::indexOf(), m_atomId, Avogadro::Fragment::m_atoms, and QList::size().
Referenced by Avogadro::Molecule::OBMol().
const QList< QString > & Avogadro::Residue::atomIds | ( | ) | const |
References m_atomId.
Referenced by Avogadro::Molecule::operator+=(), Avogadro::Molecule::operator=(), and setAtomIds().
char Avogadro::Residue::chainID | ( | ) |
References m_chainID.
Referenced by Avogadro::Molecule::OBMol(), Avogadro::Molecule::operator+=(), and Avogadro::Molecule::operator=().
unsigned int Avogadro::Residue::chainNumber | ( | ) |
References m_chainNumber.
Referenced by Avogadro::Molecule::operator+=(), and Avogadro::Molecule::operator=().
Referenced by Avogadro::Molecule::OBMol(), Avogadro::Molecule::operator+=(), Avogadro::Molecule::operator=(), setChainNumber(), and setNumber().
void Avogadro::Residue::removeAtom | ( | unsigned long | id | ) |
Remove the Atom from the Fragment.
Reimplemented from Avogadro::Fragment.
References Avogadro::Molecule::atomById(), QObject::disconnect(), Avogadro::Primitive::index(), QList::indexOf(), Avogadro::Fragment::m_atoms, QList::removeAt(), Avogadro::Atom::setResidue(), and Avogadro::Primitive::updated().
bool Avogadro::Residue::setAtomId | ( | unsigned long | id, |
QString | atomId | ||
) |
Set the text id of the Atom.
References Avogadro::Primitive::index(), QList::indexOf(), m_atomId, Avogadro::Fragment::m_atoms, QList::push_back(), QList::size(), and QString::trimmed().
Referenced by Avogadro::Molecule::setOBMol().
bool Avogadro::Residue::setAtomIds | ( | const QList< QString > & | atomIds | ) |
Set the text id of all the Atom objects.
atomIds | QList containing the text ids of all the atoms. |
References atomIds(), QList::clear(), m_atomId, Avogadro::Fragment::m_atoms, and QList::size().
Referenced by Avogadro::Molecule::operator+=(), and Avogadro::Molecule::operator=().
void Avogadro::Residue::setChainID | ( | char | id | ) |
Set the chain ID (' ', 'A', 'B', ...) that this residue belongs to.
References Avogadro::Primitive::id(), and m_chainID.
Referenced by Avogadro::Molecule::operator+=(), Avogadro::Molecule::operator=(), and Avogadro::Molecule::setOBMol().
void Avogadro::Residue::setChainNumber | ( | unsigned int | number | ) |
Set the chain number that this residue belongs to.
References m_chainNumber, and number().
Referenced by Avogadro::Molecule::operator+=(), Avogadro::Molecule::operator=(), and Avogadro::Molecule::setOBMol().
void Avogadro::Residue::setNumber | ( | const QString & | number | ) |
Set the number of the Residue, as in the file, e.g. 5A, 69, etc.
References number().
Referenced by Avogadro::Molecule::operator+=(), Avogadro::Molecule::operator=(), and Avogadro::Molecule::setOBMol().
QList<QString> Avogadro::Residue::m_atomId [protected] |
Residue number as in the file, e.g. 5A, 69, etc.
Referenced by atomId(), atomIds(), setAtomId(), and setAtomIds().
char Avogadro::Residue::m_chainID [protected] |
The chain number that the residue belongs to.
Referenced by chainID(), and setChainID().
unsigned int Avogadro::Residue::m_chainNumber [protected] |
Atom text ids.
Referenced by chainNumber(), and setChainNumber().