Loading...
Searching...
No Matches
atomContainer.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_KERNEL_ATOMCONTAINER_H
#define BALL_KERNEL_ATOMCONTAINER_H
#ifndef BALL_KERNEL_ATOMITERATOR_H
# include <BALL/KERNEL/atomIterator.h>
#endif
#ifndef BALL_KERNEL_ATOMCONTAINERITERATOR_H
# include <BALL/KERNEL/atomContainerIterator.h>
#endif
#define BALL_ATOMCONTAINER_DEFAULT_NAME ""
namespace BALL
{
class Molecule;
class BALL_EXPORT AtomContainer
: public Composite,
public PropertyManager
{
public:
BALL_CREATE_DEEP(AtomContainer)
enum Property
{
NUMBER_OF_PROPERTIES = 0
};
AtomContainer();
AtomContainer(const AtomContainer& atom_container, bool deep = true);
AtomContainer(const String& name);
virtual ~AtomContainer();
virtual void clear();
virtual void destroy();
virtual void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
virtual void persistentRead(PersistenceManager& pm);
void set(const AtomContainer& atom_container, bool deep = true);
AtomContainer& operator = (const AtomContainer& atom_container);
void get(AtomContainer& atom_container, bool deep = true) const;
void swap(AtomContainer& atom_container);
bool operator == (const AtomContainer& atom_container) const;
bool operator != (const AtomContainer& atom_container) const;
void setName(const String& name);
const String& getName() const;
AtomContainer* getSuperAtomContainer();
const AtomContainer* getSuperAtomContainer() const;
AtomContainer* getAtomContainer(Position position);
const AtomContainer* getAtomContainer(Position position) const;
Atom* getAtom(Position position);
const Atom* getAtom(Position position) const;
Atom* getAtom(const String& name);
const Atom* getAtom(const String& name) const;
Size countAtomContainers() const;
Size countAtoms() const;
Size countBonds() const;
Size countInterBonds() const;
Size countIntraBonds() 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);
Size removeHavingProperty(BALL::Property p);
Size removeNotHavingProperty(BALL::Property p);
Size removeHavingProperty(const string& name);
Size removeNotHavingProperty(const string& name);
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);
void destroyBonds();
bool isSubAtomContainerOf(const AtomContainer& atom_container) const;
bool isSuperAtomContainerOf(const AtomContainer& atom_container) const;
virtual bool isValid() const;
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
bool applyIntraBond(UnaryProcessor<Bond>& processor);
bool applyInterBond(UnaryProcessor<Bond>& processor);
// --- EXTERNAL ITERATORS
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Atom)
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(AtomContainer)
BALL_DECLARE_STD_ITERATOR_WRAPPER(AtomContainer, Atom, atoms)
BALL_DECLARE_STD_ITERATOR_WRAPPER(AtomContainer, AtomContainer, atomContainers)
private:
/*_ The name of this container
*/
String name_;
};
} // namespace BALL
#endif // BALL_KERNEL_ATOMCONTAINER_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
atomContainerIterator.h
atomIterator.h
BALL::AtomContainer::getAtom
const Atom * getAtom(const String &name) const
BALL::AtomContainer::getAtom
const Atom * getAtom(Position position) const
BALL::AtomContainer::setName
void setName(const String &name)
BALL::AtomContainer::countBonds
Size countBonds() const
BALL::AtomContainer::removeNotHavingProperty
Size removeNotHavingProperty(BALL::Property p)
BALL::AtomContainer::prepend
void prepend(Atom &atom)
BALL::AtomContainer::getAtomContainer
const AtomContainer * getAtomContainer(Position position) const
BALL::AtomContainer::swap
void swap(AtomContainer &atom_container)
BALL::AtomContainer::persistentWrite
virtual void persistentWrite(PersistenceManager &pm, const char *name=0) const
BALL::AtomContainer::AtomContainer
AtomContainer(const AtomContainer &atom_container, bool deep=true)
BALL::AtomContainer::removeHavingProperty
Size removeHavingProperty(const string &name)
BALL::AtomContainer::spliceBefore
void spliceBefore(AtomContainer &atom_container)
BALL::AtomContainer::getAtom
Atom * getAtom(const String &name)
BALL::AtomContainer::destroy
virtual void destroy()
BALL::AtomContainer::remove
bool remove(AtomContainer &atom_container)
BALL::AtomContainer::insertAfter
void insertAfter(AtomContainer &atom_container, Composite &after)
BALL::AtomContainer::removeHavingProperty
Size removeHavingProperty(BALL::Property p)
BALL::AtomContainer::append
void append(Atom &atom)
BALL::AtomContainer::remove
bool remove(Atom &atom)
BALL::AtomContainer::removeNotHavingProperty
Size removeNotHavingProperty(const string &name)
BALL::AtomContainer::applyInterBond
bool applyInterBond(UnaryProcessor< Bond > &processor)
Apply to all bonds connected to atoms outside this AtomContainer.
BALL::AtomContainer::append
void append(AtomContainer &atom_container)
BALL::AtomContainer::countAtomContainers
Size countAtomContainers() const
BALL::AtomContainer::insert
void insert(Atom &atom)
BALL::AtomContainer::getAtomContainer
AtomContainer * getAtomContainer(Position position)
BALL::AtomContainer::applyIntraBond
bool applyIntraBond(UnaryProcessor< Bond > &processor)
Apply to all bonds connecting two atoms inside this AtomContainer.
BALL::AtomContainer::persistentRead
virtual void persistentRead(PersistenceManager &pm)
BALL::AtomContainer::splice
void splice(AtomContainer &atom_container)
BALL::AtomContainer::isSuperAtomContainerOf
bool isSuperAtomContainerOf(const AtomContainer &atom_container) const
BALL::AtomContainer::get
void get(AtomContainer &atom_container, bool deep=true) const
BALL::AtomContainer::AtomContainer
AtomContainer()
BALL::AtomContainer::getAtom
Atom * getAtom(Position position)
BALL::AtomContainer::countAtoms
Size countAtoms() const
BALL::AtomContainer::getSuperAtomContainer
AtomContainer * getSuperAtomContainer()
BALL::AtomContainer::getName
const String & getName() const
BALL::AtomContainer::insert
void insert(AtomContainer &atom_container)
BALL::AtomContainer::insertAfter
void insertAfter(Atom &atom, Composite &after)
BALL::AtomContainer::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::AtomContainer::set
void set(const AtomContainer &atom_container, bool deep=true)
BALL::AtomContainer::AtomContainer
AtomContainer(const String &name)
BALL::AtomContainer::insertBefore
void insertBefore(Atom &atom, Composite &before)
BALL::AtomContainer::prepend
void prepend(AtomContainer &atom_container)
BALL::AtomContainer::destroyBonds
void destroyBonds()
BALL::AtomContainer::clear
virtual void clear()
BALL::AtomContainer::isSubAtomContainerOf
bool isSubAtomContainerOf(const AtomContainer &atom_container) const
BALL::AtomContainer::Property
Property
The number of predefined properties for AtomContainer.
Definition atomContainer.h:43
BALL::AtomContainer::NUMBER_OF_PROPERTIES
@ NUMBER_OF_PROPERTIES
Definition atomContainer.h:45
BALL::AtomContainer::isValid
virtual bool isValid() const
BALL::AtomContainer::countIntraBonds
Size countIntraBonds() const
BALL::AtomContainer::~AtomContainer
virtual ~AtomContainer()
BALL::AtomContainer::countInterBonds
Size countInterBonds() const
BALL::AtomContainer::insertBefore
void insertBefore(AtomContainer &atom_container, Composite &before)
BALL::AtomContainer::spliceAfter
void spliceAfter(AtomContainer &atom_container)
BALL::AtomContainer::getSuperAtomContainer
const AtomContainer * getSuperAtomContainer() const
BALL::Atom
Definition atom.h:90
BALL::Composite::Composite
Composite()
BALL::PersistenceManager
Definition persistenceManager.h:73
BALL::PropertyManager::PropertyManager
BALL_INLINE PropertyManager()
Default constructor.
BALL::String
Definition string.h:57
BALL::UnaryProcessor
Definition processor.h:60
BALL_CREATE_DEEP
#define BALL_CREATE_DEEP(name)
Definition create.h:26
BALL::atoms
BALL_EXPORT AtomList atoms(const AtomContainer &fragment, const String &expression=String())
BALL_KERNEL_DEFINE_ITERATOR_CREATORS
#define BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Type)
Definition iterator.h:25
BALL
Definition constants.h:13
BALL::atomContainers
BALL_EXPORT AtomContainerList atomContainers(const AtomContainer &fragment, bool selected_only=false)
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Property
BALL_SIZE_TYPE Property
Definition COMMON/global.h:165
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
BALL_DECLARE_STD_ITERATOR_WRAPPER
#define BALL_DECLARE_STD_ITERATOR_WRAPPER(container, type, method_name)
Definition stdIteratorWrapper.h:30