BALL::Molecule Class Reference
[Molecular Datastructures]

Molecule class. More...

#include <molecule.h>

Inheritance diagram for BALL::Molecule:
Inheritance graph
[legend]

List of all members.


Public Types

Enums
enum Property { IS_SOLVENT = AtomContainer::NUMBER_OF_PROPERTIES, NUMBER_OF_PROPERTIES }
Properties.

Public Member Functions

bool operator== (const Molecule &molecule) const
Equality operator.
bool operator!= (const Molecule &molecule) const
Inequality operator.
Constructors and Destructors
Molecule ()
Default constructor.
Molecule (const Molecule &molecule, bool deep=true)
Copy constructor.
Molecule (const String &name)
Detailled constructor.
virtual ~Molecule ()
Destructor.
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException)
Writes a Molecule object to a persistent stream.
void persistentRead (PersistenceManager &pm) throw (Exception::GeneralException)
Reads a Molecule object from a persistent stream.
Assignment
void set (const Molecule &molecule, bool deep=true)
Assign from another Molecule.
Molecule & operator= (const Molecule &molecule)
Assignment operator.
void get (Molecule &molecule, bool deep=true) const
Assign to another Molecule.
void swap (Molecule &molecule)
Swap the contents of two molecules.
Accessors
System * getSystem ()
Access the parent System.
const System * getSystem () const
Get a const pointer to the parent System.
void prepend (Atom &atom)
Insert an atom as the first child.
void append (Atom &atom)
Insert an atom as the last child.
void insert (Atom &atom)
Insert an atom as the last child.
void insertBefore (Atom &atom, Composite &before)
Insert an atom before a Composite object.
void insertAfter (Atom &atom, Composite &after)
Insert an atom after a Composite object.
bool remove (Atom &atom)
Remove an atom.
void prepend (AtomContainer &atom_container)
Insert an AtomContainer as the first child.
void append (AtomContainer &atom_container)
Append an AtomContainer as the last child.
void insert (AtomContainer &atom_container)
Insert an AtomContainer as the last child.
void insertBefore (AtomContainer &atom_container, Composite &before)
Insert an AtomContainer before a given Composite object.
void insertAfter (AtomContainer &atom_container, Composite &after)
Insert an AtomContainer after a given Composite object.
void spliceBefore (AtomContainer &atom_container)
Cut all children of atom_container and prepend them before the children of this molecule.
void spliceAfter (AtomContainer &atom_container)
Cut all children of atom_container and append them after the children of this molecule.
void splice (AtomContainer &atom_container)
Move the children of atom_container into this molecule.
bool remove (AtomContainer &atom_container)
Remove an AtomContainer.
Debugging and Diagnostics
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
Internal state dump.

Protected Member Functions

Molecule * getMolecule ()
const Molecule * getMolecule () const
AtomContainer * getSuperAtomContainer ()
Get a mutable pointer to the parent AtomContainer.
const AtomContainer * getSuperAtomContainer () const
Get a constant pointer to the parent AtomContainer.
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
Test if an AtomContainer is a child.

Detailed Description

Molecule class.

Used to represent general molecules without specific properties.


Member Function Documentation

void BALL::Molecule::append ( AtomContainer & atom_container )

Append an AtomContainer as the last child.

Parameters:
atom_container the AtomContainer to add

Reimplemented from BALL::AtomContainer.

void BALL::Molecule::append ( Atom & atom )

Insert an atom as the last child.

Parameters:
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 .

Parameters:
s output stream where to output the internal state
depth the dumping depth

Reimplemented from BALL::AtomContainer.

Reimplemented in BALL::NucleicAcid, and BALL::Protein.

void BALL::Molecule::get ( Molecule & molecule,
bool deep = true
) const

Assign to another Molecule.

Parameters:
molecule the Molecule to be assigned to
deep make a deep (=true) or shallow (=false) copy

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.

Returns:
AtomContainer* - constant pointer to the 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.

Returns:
AtomContainer* - mutable pointer to the parent AtomContainer

Reimplemented from BALL::AtomContainer.

const System* BALL::Molecule::getSystem ( ) const

Get a const pointer to the parent System.

Returns:
System* pointer to the parent System

System* BALL::Molecule::getSystem ( )

Access the parent System.

Returns:
System* pointer to the parent System

void BALL::Molecule::insert ( AtomContainer & atom_container )

Insert an AtomContainer as the last child.

Parameters:
atom_container the AtomContainer to add

Reimplemented from BALL::AtomContainer.

void BALL::Molecule::insert ( Atom & atom )

Insert an atom as the last child.

Parameters:
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.

Parameters:
atom_container the AtomContainer to insert
after the Composite object to insert after

Reimplemented from BALL::AtomContainer.

void BALL::Molecule::insertAfter ( Atom & atom,
Composite & after
)

Insert an atom after a Composite object.

Parameters:
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.

Parameters:
atom_container the AtomContainer to insert
before the Composite object to insert before

Reimplemented from BALL::AtomContainer.

void BALL::Molecule::insertBefore ( Atom & atom,
Composite & before
)

Insert an atom before a Composite object.

Parameters:
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.

Parameters:
atom_container the AtomContainer to test

Reimplemented from BALL::AtomContainer.

bool BALL::Molecule::operator!= ( const Molecule & molecule ) const

Inequality operator.

See also:
operator ==

Molecule& BALL::Molecule::operator= ( const Molecule & molecule )

Assignment operator.

Parameters:
molecule the Molecule to assign from

bool BALL::Molecule::operator== ( const Molecule & molecule ) const

Equality operator.

Two molecules are equal if they have the same handle.

See also:
Object::operator ==.

void BALL::Molecule::persistentRead ( PersistenceManager & pm ) throw (Exception::GeneralException) [virtual]

Reads a Molecule object from a persistent stream.

Parameters:
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.

Parameters:
pm the persistence manager

Reimplemented from BALL::AtomContainer.

Reimplemented in BALL::NucleicAcid, and BALL::Protein.

void BALL::Molecule::prepend ( AtomContainer & atom_container )

Insert an AtomContainer as the first child.

Parameters:
atom_container the AtomContainer to add

Reimplemented from BALL::AtomContainer.

void BALL::Molecule::prepend ( Atom & atom )

Insert an atom as the first child.

Parameters:
atom the atom to add

Reimplemented from BALL::AtomContainer.

bool BALL::Molecule::remove ( AtomContainer & atom_container )

Remove an AtomContainer.

Parameters:
atom_container the AtomContainer to remove

Reimplemented from BALL::AtomContainer.

bool BALL::Molecule::remove ( Atom & atom )

Remove an atom.

Parameters:
atom the atom to remove

Reimplemented from BALL::AtomContainer.

void BALL::Molecule::set ( const Molecule & molecule,
bool deep = true
)

Assign from another Molecule.

Parameters:
molecule the Molecule object to assign from
deep make a deep (=true) or shallow (=false) copy

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.

Parameters:
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.

Parameters:
atom_container the AtomContainer to access

Reimplemented from BALL::AtomContainer.

void BALL::Molecule::swap ( Molecule & molecule )

Swap the contents of two molecules.

Parameters:
molecule the Molecule to swap contents with

Generated on Thu Aug 6 18:30:31 2009 for BALL by doxygen 1.5.8