BALL::Molecule Class Reference
[Molecular Datastructures]

#include <BALL/KERNEL/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 }

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
void persistentRead (PersistenceManager &pm)
Assignment

void set (const Molecule &molecule, bool deep=true)
Moleculeoperator= (const Molecule &molecule)
void get (Molecule &molecule, bool deep=true) const
void swap (Molecule &molecule)
Accessors

SystemgetSystem ()
const SystemgetSystem () 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

MoleculegetMolecule ()
const MoleculegetMolecule () const
AtomContainergetSuperAtomContainer ()
const AtomContainergetSuperAtomContainer () 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

Detailed Description

Molecule class. Used to represent general molecules without specific properties.

Definition at line 29 of file molecule.h.


Member Enumeration Documentation

Properties

Enumerator:
IS_SOLVENT 
NUMBER_OF_PROPERTIES 

Reimplemented from BALL::AtomContainer.

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

Definition at line 42 of file molecule.h.


Constructor & Destructor Documentation

BALL::Molecule::Molecule (  ) 

Default constructor.

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

Copy constructor.

BALL::Molecule::Molecule ( const String name  ) 

Detailled constructor.

virtual BALL::Molecule::~Molecule (  )  [virtual]

Destructor.


Member Function Documentation

void BALL::Molecule::append ( Molecule molecule  )  [protected]
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 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.

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 ( Molecule molecule  )  [protected]
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 ( Molecule molecule,
Composite composite 
) [protected]
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 ( Molecule molecule,
Composite composite 
) [protected]
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  )  [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 [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 ( Molecule molecule  )  [protected]
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 ( Molecule molecule  )  [protected]
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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Generated by  doxygen 1.6.3