Avogadro  1.1.0
Public Member Functions | Protected Attributes
Avogadro::Residue Class Reference

A biological residue that contains atoms and bonds. More...

#include <avogadro/residue.h>

Inheritance diagram for Avogadro::Residue:
Inheritance graph
[legend]

List of all members.

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< QStringm_atomId
unsigned int m_chainNumber
char m_chainID

Detailed Description

A biological residue that contains atoms and bonds.

Author:
Marcus D. Hanwell

The Residue class is a Fragment subclass that provides the unique additional information required for residues.


Constructor & Destructor Documentation

Constructor.

Destructor.


Member Function Documentation

void Avogadro::Residue::addAtom ( unsigned long  id)
QString Avogadro::Residue::atomId ( unsigned long  id)

Returns the atom text id, as in the Residue.

Parameters:
idThe unique id of the Atom.
Returns:
The text id of the supplied atom in the Residue.

References QList::at(), Avogadro::Primitive::index(), QList::indexOf(), m_atomId, Avogadro::Fragment::m_atoms, and QList::size().

Referenced by Avogadro::Molecule::OBMol().

Returns:
QList of all atom text ids in the Residue.

References m_atomId.

Referenced by Avogadro::Molecule::operator+=(), Avogadro::Molecule::operator=(), and setAtomIds().

Returns:
The chain ID (' ', 'A', 'B', ...) that the residue belongs to.

References m_chainID.

Referenced by Avogadro::Molecule::OBMol(), Avogadro::Molecule::operator+=(), and Avogadro::Molecule::operator=().

Returns:
The chain number that the residue belongs to.

References m_chainNumber.

Referenced by Avogadro::Molecule::operator+=(), and Avogadro::Molecule::operator=().

Returns:
The "number" of the residue, e.g. 5A, 69, etc.

Referenced by Avogadro::Molecule::OBMol(), Avogadro::Molecule::operator+=(), Avogadro::Molecule::operator=(), setChainNumber(), and setNumber().

void Avogadro::Residue::removeAtom ( unsigned long  id)
bool Avogadro::Residue::setAtomId ( unsigned long  id,
QString  atomId 
)

Set the text id of the Atom.

Parameters:
idThe unique id of the Atom.
atomIdThe text id of the Atom in the Residue.
Returns:
False if the atom id could not be set, true otherwise.

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.

Parameters:
atomIdsQList containing the text ids of all the atoms.
Returns:
False if the atom ids could not be set, true otherwise.

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().


Member Data Documentation

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().


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