#include <BALL/KERNEL/molecule.h>
Public Types | |
Enums | |
enum | Property { IS_SOLVENT = AtomContainer::NUMBER_OF_PROPERTIES, NUMBER_OF_PROPERTIES } |
Public Member Functions | |
bool | operator== (const Molecule &molecule) const |
bool | operator!= (const Molecule &molecule) const |
Constructors and Destructors | |
Molecule () | |
Molecule (const Molecule &molecule, bool deep=true) | |
Molecule (const String &name) | |
virtual | ~Molecule () |
Persistence | |
void | persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException) |
void | persistentRead (PersistenceManager &pm) throw (Exception::GeneralException) |
Assignment | |
void | set (const Molecule &molecule, bool deep=true) |
Molecule & | operator= (const Molecule &molecule) |
void | get (Molecule &molecule, bool deep=true) const |
void | swap (Molecule &molecule) |
Accessors | |
System * | getSystem () |
const System * | getSystem () const |
void | prepend (Atom &atom) |
void | append (Atom &atom) |
void | insert (Atom &atom) |
void | insertBefore (Atom &atom, Composite &before) |
void | insertAfter (Atom &atom, Composite &after) |
bool | remove (Atom &atom) |
void | prepend (AtomContainer &atom_container) |
void | append (AtomContainer &atom_container) |
void | insert (AtomContainer &atom_container) |
void | insertBefore (AtomContainer &atom_container, Composite &before) |
void | insertAfter (AtomContainer &atom_container, Composite &after) |
void | spliceBefore (AtomContainer &atom_container) |
void | spliceAfter (AtomContainer &atom_container) |
void | splice (AtomContainer &atom_container) |
bool | remove (AtomContainer &atom_container) |
Debugging and Diagnostics | |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Protected Member Functions | |
Molecule * | getMolecule () |
const Molecule * | getMolecule () const |
AtomContainer * | getSuperAtomContainer () |
const AtomContainer * | getSuperAtomContainer () const |
void | prepend (Molecule &molecule) |
void | append (Molecule &molecule) |
void | insert (Molecule &molecule) |
void | insertBefore (Molecule &molecule, Composite &composite) |
void | insertAfter (Molecule &molecule, Composite &composite) |
bool | remove (Molecule &molecule) |
bool | isSubAtomContainerOf (const AtomContainer &atom_container) const |
Molecule class. Used to represent general molecules without specific properties.
Properties
Reimplemented from BALL::AtomContainer.
Reimplemented in BALL::NucleicAcid, and BALL::Protein.
BALL::Molecule::Molecule | ( | ) |
Default constructor.
BALL::Molecule::Molecule | ( | const String & | name | ) |
Detailled constructor.
virtual BALL::Molecule::~Molecule | ( | ) | [virtual] |
Destructor.
void BALL::Molecule::append | ( | Molecule & | molecule | ) | [protected] |
void BALL::Molecule::append | ( | AtomContainer & | atom_container | ) |
Append an AtomContainer as the last child.
atom_container | the AtomContainer to add |
Reimplemented from BALL::AtomContainer.
void BALL::Molecule::append | ( | Atom & | atom | ) |
Insert an atom as the last child.
atom | the atom to add |
Reimplemented from BALL::AtomContainer.
virtual void BALL::Molecule::dump | ( | std::ostream & | s = std::cout , |
|
Size | depth = 0 | |||
) | const [virtual] |
Internal state dump. Dump the current internal state to the output ostream s with dumping depth depth .
s | output stream where to output the internal state | |
depth | the dumping depth |
Reimplemented from BALL::AtomContainer.
Reimplemented in BALL::NucleicAcid, and BALL::Protein.
const Molecule* BALL::Molecule::getMolecule | ( | ) | const [protected] |
Molecule* BALL::Molecule::getMolecule | ( | ) | [protected] |
const AtomContainer* BALL::Molecule::getSuperAtomContainer | ( | ) | const [protected] |
Get a constant pointer to the parent AtomContainer. The pointer is 0 if this instance does not have a parent AtomContainer.
Reimplemented from BALL::AtomContainer.
AtomContainer* BALL::Molecule::getSuperAtomContainer | ( | ) | [protected] |
Get a mutable pointer to the parent AtomContainer. The pointer is 0 if this instance does not have a parent AtomContainer.
Reimplemented from BALL::AtomContainer.
const System* BALL::Molecule::getSystem | ( | ) | const |
System* BALL::Molecule::getSystem | ( | ) |
void BALL::Molecule::insert | ( | Molecule & | molecule | ) | [protected] |
void BALL::Molecule::insert | ( | AtomContainer & | atom_container | ) |
Insert an AtomContainer as the last child.
atom_container | the AtomContainer to add |
Reimplemented from BALL::AtomContainer.
void BALL::Molecule::insert | ( | Atom & | atom | ) |
Insert an atom as the last child.
atom | the atom to add |
Reimplemented from BALL::AtomContainer.
void BALL::Molecule::insertAfter | ( | AtomContainer & | atom_container, | |
Composite & | after | |||
) |
Insert an AtomContainer after a given Composite object.
atom_container | the AtomContainer to insert | |
after | the Composite object to insert after |
Reimplemented from BALL::AtomContainer.
Insert an atom after a Composite object.
atom | the atom to insert | |
after | the Composite object to insert after |
Reimplemented from BALL::AtomContainer.
void BALL::Molecule::insertBefore | ( | AtomContainer & | atom_container, | |
Composite & | before | |||
) |
Insert an AtomContainer before a given Composite object.
atom_container | the AtomContainer to insert | |
before | the Composite object to insert before |
Reimplemented from BALL::AtomContainer.
Insert an atom before a Composite object.
atom | the atom to insert | |
before | the Composite object to insert before |
Reimplemented from BALL::AtomContainer.
bool BALL::Molecule::isSubAtomContainerOf | ( | const AtomContainer & | atom_container | ) | const [protected] |
Test if an AtomContainer is a child.
atom_container | the AtomContainer to test |
Reimplemented from BALL::AtomContainer.
Inequality operator
Assignment operator.
molecule | the Molecule to assign from |
Equality operator. Two molecules are equal if they have the same handle.
void BALL::Molecule::persistentRead | ( | PersistenceManager & | pm | ) | throw (Exception::GeneralException) [virtual] |
Reads a Molecule object from a persistent stream.
pm | the persistence manager |
Reimplemented from BALL::AtomContainer.
Reimplemented in BALL::NucleicAcid, and BALL::Protein.
void BALL::Molecule::persistentWrite | ( | PersistenceManager & | pm, | |
const char * | name = 0 | |||
) | const throw (Exception::GeneralException) [virtual] |
Writes a Molecule object to a persistent stream.
pm | the persistence manager |
Reimplemented from BALL::AtomContainer.
Reimplemented in BALL::NucleicAcid, and BALL::Protein.
void BALL::Molecule::prepend | ( | Molecule & | molecule | ) | [protected] |
void BALL::Molecule::prepend | ( | AtomContainer & | atom_container | ) |
Insert an AtomContainer as the first child.
atom_container | the AtomContainer to add |
Reimplemented from BALL::AtomContainer.
void BALL::Molecule::prepend | ( | Atom & | atom | ) |
Insert an atom as the first child.
atom | the atom to add |
Reimplemented from BALL::AtomContainer.
bool BALL::Molecule::remove | ( | AtomContainer & | atom_container | ) |
Remove an AtomContainer.
atom_container | the AtomContainer to remove |
Reimplemented from BALL::AtomContainer.
void BALL::Molecule::splice | ( | AtomContainer & | atom_container | ) |
Move the children of atom_container into this molecule. The children of atom_container
are inserted at the position of atom_container
if it is a child of this
. Otherwise the children are inserted using spliceBefore .
Reimplemented from BALL::AtomContainer.
void BALL::Molecule::spliceAfter | ( | AtomContainer & | atom_container | ) |
Cut all children of atom_container
and append them after the children of this molecule.
atom_container | the AtomContainer to access |
Reimplemented from BALL::AtomContainer.
void BALL::Molecule::spliceBefore | ( | AtomContainer & | atom_container | ) |
Cut all children of atom_container
and prepend them before the children of this molecule.
atom_container | the AtomContainer to access |
Reimplemented from BALL::AtomContainer.