#include <gcu/molecule.h>
Public Member Functions | |
Molecule (TypeId Type=MoleculeType) | |
Molecule (Atom *pAtom) | |
virtual | ~Molecule () |
void | AddChild (Object *object) |
virtual void | AddAtom (Atom *pAtom) |
virtual void | AddBond (Bond *pBond) |
virtual void | Remove (gcu::Object *pObject) |
void | UpdateCycles (Bond *pBond) |
void | UpdateCycles () |
bool | operator== (Molecule const &molecule) const |
virtual unsigned | GetAtomsNumber () const |
void | Clear () |
Atom const * | GetFirstAtom (std::list< Atom * >::const_iterator &i) const |
Atom const * | GetNextAtom (std::list< Atom * >::const_iterator &i) const |
Bond const * | GetFirstBond (std::list< Bond * >::const_iterator &i) const |
Bond const * | GetNextBond (std::list< Bond * >::const_iterator &i) const |
void | SetName (char const *name, char const *convention) |
char const * | GetName (char const *convention=NULL) |
std::string | Name () |
Static Public Member Functions | |
static Molecule * | MoleculeFromFormula (Document *Doc, Formula const &formula, bool add_pseudo=true) |
Protected Attributes | |
std::list< Cycle * > | m_Cycles |
std::list< Chain * > | m_Chains |
std::list< Atom * > | m_Atoms |
std::list< Bond * > | m_Bonds |
Definition at line 42 of file gcu/molecule.h.
gcu::Molecule::Molecule | ( | TypeId | Type = MoleculeType |
) |
Type | the type id of a derived class |
Reimplemented in gcp::Molecule.
gcu::Molecule::Molecule | ( | Atom * | pAtom | ) |
pAtom | Builds a molecule from an atom. If the atom has bonds, the connectivity will be explored and all atoms and bonds found will be added to the molecule. |
virtual gcu::Molecule::~Molecule | ( | ) | [virtual] |
The destructor.
Reimplemented in gcp::Molecule.
virtual void gcu::Molecule::AddAtom | ( | Atom * | pAtom | ) | [virtual] |
virtual void gcu::Molecule::AddBond | ( | Bond * | pBond | ) | [virtual] |
void gcu::Molecule::AddChild | ( | Object * | object | ) | [virtual] |
object | an object, generally an atom or a bond. |
Reimplemented from gcu::Object.
Reimplemented in gcp::Molecule.
void gcu::Molecule::Clear | ( | ) | [virtual] |
Clears cycles and chains and call gcu::Object::Clear().
Reimplemented from gcu::Object.
Reimplemented in gcp::Molecule.
virtual unsigned gcu::Molecule::GetAtomsNumber | ( | ) | const [inline, virtual] |
Reimplemented in gcp::Molecule.
Definition at line 108 of file gcu/molecule.h.
References m_Atoms.
Referenced by gcu::Chem3dDoc::IsEmpty().
i | an uninitialized iterator. |
i | an uninitialized iterator. |
char const* gcu::Molecule::GetName | ( | char const * | convention = NULL |
) |
convention | a naming convention. |
i | an iterator initialized by a call to GetFirstAtom(). |
i | an iterator initialized by a call to GetFirstBond(). |
static Molecule* gcu::Molecule::MoleculeFromFormula | ( | Document * | Doc, | |
Formula const & | formula, | |||
bool | add_pseudo = true | |||
) | [static] |
Doc | a document. | |
formula | a formula | |
add_pseudo | tells if a pseudo atom (with Z = 0) has to be added (used when building a gcu::Residue instance). |
std::string gcu::Molecule::Name | ( | ) | [virtual] |
bool gcu::Molecule::operator== | ( | Molecule const & | molecule | ) | const |
molecule | a molecule. |
virtual void gcu::Molecule::Remove | ( | gcu::Object * | pObject | ) | [virtual] |
pObject | an atom or a bond in the molecule. |
Reimplemented in gcp::Molecule.
void gcu::Molecule::SetName | ( | char const * | name, | |
char const * | convention | |||
) |
name | a name. | |
convention | a naming convention, might be NULL. |
void gcu::Molecule::UpdateCycles | ( | ) |
Updates the cycles list after a change.
void gcu::Molecule::UpdateCycles | ( | Bond * | pBond | ) |
pBond | a bond in the molecule. |
std::list<Atom*> gcu::Molecule::m_Atoms [protected] |
The atoms in the molecule.
Definition at line 183 of file gcu/molecule.h.
Referenced by GetAtomsNumber().
std::list<Bond*> gcu::Molecule::m_Bonds [protected] |
The bonds in the molecule.
Definition at line 187 of file gcu/molecule.h.
std::list<Chain*> gcu::Molecule::m_Chains [protected] |
The non cyclic chains contained in the molecules (not used at the moment).
Definition at line 179 of file gcu/molecule.h.
std::list<Cycle*> gcu::Molecule::m_Cycles [protected] |
The cycles contained in the molecules.
Definition at line 175 of file gcu/molecule.h.