Loading...
Searching...
No Matches
molecule.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_KERNEL_MOLECULE_H
#define BALL_KERNEL_MOLECULE_H
#ifndef BALL_KERNEL_ATOMCONTAINER_H
# include <BALL/KERNEL/atomContainer.h>
#endif
#ifndef BALL_KERNEL_FRAGMENT_H
# include <BALL/KERNEL/fragment.h>
#endif
#ifndef BALL_KERNEL_FRAGMENTITERATOR_H
# include <BALL/KERNEL/fragmentIterator.h>
#endif
namespace BALL
{
class System;
class BALL_EXPORT Molecule
: public AtomContainer
{
public:
BALL_CREATE_DEEP(Molecule)
enum Property
{
IS_SOLVENT = AtomContainer::NUMBER_OF_PROPERTIES,
NUMBER_OF_PROPERTIES
};
Molecule();
Molecule(const Molecule& molecule, bool deep = true);
Molecule(const AtomContainer& atomContainer, bool deep = true);
Molecule(const String& name);
virtual ~Molecule();
void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
void persistentRead(PersistenceManager& pm);
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);
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);
virtual bool isMolecule() const { return true; }
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
bool operator == (const Molecule& molecule) const;
bool operator != (const Molecule& molecule) const;
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Fragment)
BALL_DECLARE_STD_ITERATOR_WRAPPER(Molecule, Fragment, fragments)
protected:
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;
};
} // namespace BALL
#endif // BALL_KERNEL_MOLECULE_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
atomContainer.h
BALL::AtomContainer::AtomContainer
AtomContainer()
BALL::AtomContainer::NUMBER_OF_PROPERTIES
@ NUMBER_OF_PROPERTIES
Definition atomContainer.h:45
BALL::Atom
Definition atom.h:90
BALL::Composite
Definition composite.h:74
BALL::Fragment
Definition fragment.h:22
BALL::Molecule::Molecule
Molecule()
BALL::Molecule::persistentRead
void persistentRead(PersistenceManager &pm)
BALL::Molecule::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::Molecule::persistentWrite
void persistentWrite(PersistenceManager &pm, const char *name=0) const
BALL::Molecule::getMolecule
Molecule * getMolecule()
BALL::Molecule::~Molecule
virtual ~Molecule()
BALL::Molecule::insertBefore
void insertBefore(Molecule &molecule, Composite &composite)
BALL::Molecule::getSystem
const System * getSystem() const
BALL::Molecule::insert
void insert(AtomContainer &atom_container)
BALL::Molecule::remove
bool remove(Atom &atom)
BALL::Molecule::insertBefore
void insertBefore(AtomContainer &atom_container, Composite &before)
BALL::Molecule::splice
void splice(AtomContainer &atom_container)
BALL::Molecule::prepend
void prepend(Atom &atom)
BALL::Molecule::swap
void swap(Molecule &molecule)
BALL::Molecule::prepend
void prepend(AtomContainer &atom_container)
BALL::Molecule::remove
bool remove(Molecule &molecule)
BALL::Molecule::set
void set(const Molecule &molecule, bool deep=true)
BALL::Molecule::insert
void insert(Atom &atom)
BALL::Molecule::get
void get(Molecule &molecule, bool deep=true) const
BALL::Molecule::append
void append(Atom &atom)
BALL::Molecule::Molecule
Molecule(const String &name)
BALL::Molecule::append
void append(Molecule &molecule)
BALL::Molecule::Molecule
Molecule(const AtomContainer &atomContainer, bool deep=true)
BALL::Molecule::insertAfter
void insertAfter(AtomContainer &atom_container, Composite &after)
BALL::Molecule::getSystem
System * getSystem()
BALL::Molecule::insertAfter
void insertAfter(Molecule &molecule, Composite &composite)
BALL::Molecule::insertBefore
void insertBefore(Atom &atom, Composite &before)
BALL::Molecule::spliceBefore
void spliceBefore(AtomContainer &atom_container)
BALL::Molecule::insert
void insert(Molecule &molecule)
BALL::Molecule::isMolecule
virtual bool isMolecule() const
Definition molecule.h:216
BALL::Molecule::Molecule
Molecule(const Molecule &molecule, bool deep=true)
BALL::Molecule::getMolecule
const Molecule * getMolecule() const
BALL::Molecule::remove
bool remove(AtomContainer &atom_container)
BALL::Molecule::append
void append(AtomContainer &atom_container)
BALL::Molecule::getSuperAtomContainer
const AtomContainer * getSuperAtomContainer() const
BALL::Molecule::prepend
void prepend(Molecule &molecule)
BALL::Molecule::insertAfter
void insertAfter(Atom &atom, Composite &after)
BALL::Molecule::spliceAfter
void spliceAfter(AtomContainer &atom_container)
BALL::Molecule::getSuperAtomContainer
AtomContainer * getSuperAtomContainer()
BALL::Molecule::Property
Property
Definition molecule.h:43
BALL::Molecule::IS_SOLVENT
@ IS_SOLVENT
Definition molecule.h:44
BALL::Molecule::NUMBER_OF_PROPERTIES
@ NUMBER_OF_PROPERTIES
Definition molecule.h:45
BALL::Molecule::isSubAtomContainerOf
bool isSubAtomContainerOf(const AtomContainer &atom_container) const
BALL::PersistenceManager
Definition persistenceManager.h:73
BALL::String
Definition string.h:57
BALL::System
Definition KERNEL/system.h:40
fragmentIterator.h
fragment.h
BALL_CREATE_DEEP
#define BALL_CREATE_DEEP(name)
Definition create.h:26
BALL_KERNEL_DEFINE_ITERATOR_CREATORS
#define BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Type)
Definition iterator.h:25
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::fragments
BALL_EXPORT FragmentList fragments(const AtomContainer &fragment, bool selected_only=false)
BALL_DECLARE_STD_ITERATOR_WRAPPER
#define BALL_DECLARE_STD_ITERATOR_WRAPPER(container, type, method_name)
Definition stdIteratorWrapper.h:30