BALL
1.4.1
|
#include <BALL/KERNEL/atomContainer.h>
Public Member Functions | |
Constructors and Destructors | |
AtomContainer () | |
AtomContainer (const AtomContainer &atom_container, bool deep=true) | |
AtomContainer (const String &name) | |
virtual | ~AtomContainer () |
virtual void | clear () |
virtual void | destroy () |
Persistence | |
virtual void | persistentWrite (PersistenceManager &pm, const char *name=0) const |
virtual void | persistentRead (PersistenceManager &pm) |
Assignment | |
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) |
Predicates | |
bool | operator== (const AtomContainer &atom_container) const |
bool | operator!= (const AtomContainer &atom_container) const |
bool | isSubAtomContainerOf (const AtomContainer &atom_container) const |
bool | isSuperAtomContainerOf (const AtomContainer &atom_container) const |
Accessors | |
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) |
Miscellaneous | |
void | destroyBonds () |
virtual bool | isValid () const |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Internal Iteration | |
bool | applyIntraBond (UnaryProcessor< Bond > &processor) |
Apply to all bonds connecting two atoms inside this AtomContainer. | |
bool | applyInterBond (UnaryProcessor< Bond > &processor) |
Apply to all bonds connected to atoms outside this AtomContainer. | |
![]() | |
AncestorIterator | beginAncestor () |
AncestorIterator | endAncestor () |
AncestorConstIterator | beginAncestor () const |
AncestorConstIterator | endAncestor () const |
ChildCompositeIterator | beginChildComposite () |
ChildCompositeIterator | endChildComposite () |
ChildCompositeConstIterator | beginChildComposite () const |
ChildCompositeConstIterator | endChildComposite () const |
ChildCompositeReverseIterator | rbeginChildComposite () |
ChildCompositeReverseIterator | rendChildComposite () |
ChildCompositeConstReverseIterator | rbeginChildComposite () const |
ChildCompositeConstReverseIterator | rendChildComposite () const |
CompositeIterator | beginComposite () |
CompositeIterator | endComposite () |
CompositeConstIterator | beginComposite () const |
CompositeConstIterator | endComposite () const |
CompositeReverseIterator | rbeginComposite () |
CompositeReverseIterator | rendComposite () |
CompositeConstReverseIterator | rbeginComposite () const |
CompositeConstReverseIterator | rendComposite () const |
void | deleteChildrenList_ (std::list< Composite * > &composites) |
Composite () | |
Composite (const Composite &composite, bool deep=true) | |
virtual | ~Composite () |
void | destroy (bool virtual_destroy) |
void * | clone (Composite &root) const |
bool | operator== (const Composite &composite) const |
bool | operator!= (const Composite &composite) const |
bool | isEmpty () const |
bool | isRoot () const |
bool | isRootOf (const Composite &composite) const |
bool | isInterior () const |
bool | hasChild () const |
bool | isChildOf (const Composite &composite) const |
bool | isFirstChild () const |
bool | isFirstChildOf (const Composite &composite) const |
bool | isLastChild () const |
bool | isLastChildOf (const Composite &composite) const |
bool | hasParent () const |
bool | isParentOf (const Composite &composite) const |
bool | hasSibling () const |
bool | isSiblingOf (const Composite &composite) const |
bool | hasPreviousSibling () const |
bool | isPreviousSiblingOf (const Composite &composite) const |
bool | hasNextSibling () const |
bool | isNextSiblingOf (const Composite &composite) const |
bool | isDescendantOf (const Composite &composite) const |
template<typename T > | |
bool | hasAncestor (const T &dummy) const |
bool | isAncestorOf (const Composite &composite) const |
bool | isRelatedWith (const Composite &composite) const |
bool | isHomomorph (const Composite &composite) const |
bool | containsSelection () const |
void | host (Visitor< Composite > &visitor) |
template<typename T > | |
bool | applyAncestor (UnaryProcessor< T > &processor) |
template<typename T > | |
bool | applyChild (UnaryProcessor< T > &processor) |
template<typename T > | |
bool | applyDescendantPreorder (UnaryProcessor< T > &processor) |
template<typename T > | |
bool | applyDescendantPostorder (UnaryProcessor< T > &processor) |
template<typename T > | |
bool | applyDescendant (UnaryProcessor< T > &processor) |
template<typename T > | |
bool | applyPreorder (UnaryProcessor< T > &processor) |
template<typename T > | |
bool | applyPostorder (UnaryProcessor< T > &processor) |
template<typename T > | |
bool | apply (UnaryProcessor< T > &processor) |
template<typename T > | |
bool | applyLevel (UnaryProcessor< T > &processor, long level) |
void | set (const Composite &composite, bool deep=true) |
Composite & | operator= (const Composite &composite) |
void | get (Composite &composite, bool deep=true) const |
Size | getDegree () const |
Size | count (const KernelPredicateType &predicate) const |
Size | countDescendants () const |
Size | getPathLength (const Composite &composite) const |
Size | getDepth () const |
Size | getHeight () const |
Composite & | getRoot () |
const Composite & | getRoot () const |
Composite * | getLowestCommonAncestor (const Composite &composite) |
const Composite * | getLowestCommonAncestor (const Composite &composite) const |
template<typename T > | |
T * | getAncestor (const T &) |
template<typename T > | |
const T * | getAncestor (const T &) const |
template<typename T > | |
T * | getPrevious (const T &) |
template<typename T > | |
const T * | getPrevious (const T &dummy) const |
template<typename T > | |
T * | getNext (const T &) |
template<typename T > | |
const T * | getNext (const T &dummy) const |
Composite * | getParent () |
const Composite * | getParent () const |
Composite * | getChild (Index index) |
const Composite * | getChild (Index index) const |
Composite * | getSibling (Index index) |
const Composite * | getSibling (Index index) const |
Composite * | getFirstChild () |
const Composite * | getFirstChild () const |
Composite * | getLastChild () |
const Composite * | getLastChild () const |
const PreciseTime & | getModificationTime () const |
const PreciseTime & | getSelectionTime () const |
void | stamp (StampType stamp=BOTH) |
void | prependChild (Composite &composite) |
void | appendChild (Composite &composite) |
void | insertBefore (Composite &composite) |
void | insertAfter (Composite &composite) |
void | spliceBefore (Composite &composite) |
void | spliceAfter (Composite &composite) |
void | splice (Composite &composite) |
bool | removeChild (Composite &child) |
Size | removeSelected () |
Size | removeUnselected () |
void | replace (Composite &composite) |
void | swap (Composite &composite) |
virtual void | select () |
virtual void | deselect () |
![]() | |
PersistentObject () | |
virtual | ~PersistentObject () |
PersistenceManager & | operator>> (PersistenceManager &pm) const |
virtual void | finalize () |
![]() | |
Object () | |
Default constructor. | |
Object (const Object &object) | |
Copy constructor. | |
virtual | ~Object () |
Destructor. | |
const Object & | operator= (const Object &) |
bool | operator== (const Object &object) const |
bool | operator!= (const Object &object) const |
bool | operator< (const Object &object) const |
bool | operator<= (const Object &object) const |
bool | operator>= (const Object &object) const |
bool | operator> (const Object &object) const |
int | compare (const Object &object) const |
virtual void | dump (::std::ostream &s=std::cout, Size depth=0) const |
Handle | getHandle () const |
![]() | |
virtual | ~AutoDeletable () |
void * | operator new (size_t size) |
void | operator delete (void *ptr) |
void * | operator new (size_t size, void *ptr) |
void | operator delete (void *ptr, void *) |
bool | isAutoDeletable () const |
void | setAutoDeletable (bool enable) |
![]() | |
Selectable () | |
Selectable (const Selectable &selectable, bool deep=true) | |
virtual | ~Selectable () |
void | set (const Selectable &selectable, bool deep=true) |
const Selectable & | operator= (const Selectable &selectable) |
void | get (Selectable &selectable, bool deep=true) const |
void | swap (Selectable &selectable) |
virtual void | setSelected (bool selected) |
bool | isSelected () const |
bool | operator== (const Selectable &selectable) const |
bool | operator!= (const Selectable &selectable) const |
void | write (PersistenceManager &pm) const |
bool | read (PersistenceManager &pm) |
virtual void | dump (::std::ostream &s=std::cout, Size depth=0) const |
![]() | |
BALL_INLINE | PropertyManager () |
Default constructor. | |
BALL_INLINE | PropertyManager (const PropertyManager &property_manager) |
Copy constructor. | |
virtual | ~PropertyManager () |
Destructor. | |
void | set (const PropertyManager &property_manager) |
const PropertyManager & | operator= (const PropertyManager &property_manager) |
void | get (PropertyManager &property_manager) const |
void | swap (PropertyManager &property_manager) |
BitVector & | getBitVector () |
const BitVector & | getBitVector () const |
operator BitVector & () | |
void | setProperty (Property property) |
void | clearProperty (Property property) |
void | toggleProperty (Property property) |
Size | countProperties () const |
const NamedProperty & | getNamedProperty (Position index) const |
NamedProperty & | getNamedProperty (Position index) |
void | setProperty (const NamedProperty &property) |
void | setProperty (const string &name) |
void | setProperty (const string &name, bool value) |
void | setProperty (const string &name, int value) |
void | setProperty (const string &name, unsigned int value) |
void | setProperty (const string &name, float value) |
void | setProperty (const string &name, double value) |
void | setProperty (const string &name, const string &value) |
void | setProperty (const string &name, const PersistentObject &value) |
const NamedProperty & | getProperty (const string &name) const |
NamedPropertyIterator | beginNamedProperty () |
NamedPropertyIterator | endNamedProperty () |
void | clearProperty (const string &name) |
Size | countNamedProperties () const |
bool | hasProperty (Property property) const |
Query for an unnamed property. | |
bool | hasProperty (const string &name) const |
Query for a named property. | |
bool | operator== (const PropertyManager &pm) const |
bool | operator!= (const PropertyManager &pm) const |
Inequality operator. | |
void | write (PersistenceManager &pm) const |
Persistent stream writing. | |
bool | read (PersistenceManager &pm) |
Persistent stream reading. |
Private Attributes | |
String | name_ |
Additional Inherited Members | |
![]() | |
static bool | insertParent (Composite &parent, Composite &first, Composite &last, bool destroy_parent=true) |
![]() | |
static Handle | getNextHandle () |
static Handle | getNewHandle () |
![]() | |
static void | clearLastPtr () |
![]() | |
static UnaryProcessor< Composite > | DEFAULT_PROCESSOR |
static KernelPredicateType | DEFAULT_UNARY_PREDICATE |
![]() | |
AutoDeletable () | |
AutoDeletable (const AutoDeletable &auto_deletable, bool deep=false) | |
![]() | |
bool | selected_ |
Atom Container Base Class. The AtomContainer
class is the base class of all kernel classes containing atoms.
Definition at line 30 of file atomContainer.h.
The number of predefined properties for AtomContainer.
Definition at line 43 of file atomContainer.h.
BALL::AtomContainer::AtomContainer | ( | ) |
Default constructor
BALL::AtomContainer::AtomContainer | ( | const AtomContainer & | atom_container, |
bool | deep = true |
||
) |
Copy constructor
atom_container | the AtomContainer to construct from |
deep | a flag indicating cloning |
BALL::AtomContainer::AtomContainer | ( | const String & | name | ) |
Detailed Constructor
name | the name of the AtomContainer |
|
virtual |
Destructor
void BALL::AtomContainer::append | ( | Atom & | atom | ) |
Append an atom to the last position.
atom | the atom to append |
Reimplemented in BALL::Nucleotide, and BALL::Molecule.
void BALL::AtomContainer::append | ( | AtomContainer & | atom_container | ) |
Append an AtomContainer at the last position.
atom_container | the AtomContainer to prepend |
Reimplemented in BALL::Molecule.
bool BALL::AtomContainer::applyInterBond | ( | UnaryProcessor< Bond > & | processor | ) |
Apply to all bonds connected to atoms outside this AtomContainer.
bool BALL::AtomContainer::applyIntraBond | ( | UnaryProcessor< Bond > & | processor | ) |
Apply to all bonds connecting two atoms inside this AtomContainer.
|
virtual |
Clear the contents of this instance of AtomContainer. This methods clears the base fragment's name, destroys all its children (as in Composite::clear ), but does not remove it from its parent composite structures.
Reimplemented from BALL::Composite.
Reimplemented in BALL::Residue, BALL::Nucleotide, BALL::SecondaryStructure, BALL::NucleicAcid, and BALL::Protein.
Size BALL::AtomContainer::countAtomContainers | ( | ) | const |
Count the child AtomContainers.
Size BALL::AtomContainer::countAtoms | ( | ) | const |
Size BALL::AtomContainer::countBonds | ( | ) | const |
Count the child bonds.
Size BALL::AtomContainer::countInterBonds | ( | ) | const |
Count all bonds which connect atoms in this instance with atoms outside.
Size BALL::AtomContainer::countIntraBonds | ( | ) | const |
Count all bonds which connect 2 atoms in this instance.
|
virtual |
Clear the contents of this instance of AtomContainer and removes it from parent composite structures. This methods clears the base fragment's name, destroys all its children (as in Composite::destroy ), and removes it from its parent composite structures.
Reimplemented from BALL::Composite.
Reimplemented in BALL::Residue, BALL::Nucleotide, BALL::SecondaryStructure, BALL::NucleicAcid, and BALL::Protein.
void BALL::AtomContainer::destroyBonds | ( | ) |
Destroy all bonds in this instance.
|
virtual |
Internal state dump. Dump the current internal state of this instance to the output ostream s with dumping depth depth .
s | - output stream where to output the internal state of this instance |
depth | - the dumping depth |
Reimplemented from BALL::Composite.
Reimplemented in BALL::Residue, BALL::Chain, BALL::SecondaryStructure, BALL::Protein, BALL::Nucleotide, BALL::Molecule, BALL::NucleicAcid, and BALL::Fragment.
void BALL::AtomContainer::get | ( | AtomContainer & | atom_container, |
bool | deep = true |
||
) | const |
Copy to another instance of AtomContainer. The assignment is either deep or shallow (default is deep).
atom_container | the AtomContainer to be assigned to |
Get a pointer to a child atom at a given position. The pointer is 0 if this instance does not have an atom at the given position.
position | the position of the child atom |
Get a pointer to a child atom at a given position. The pointer is 0 if this instance does not have an atom at the given position.
position | the position of the child atom |
Get a pointer to a child atom with the name name . The pointer is 0 if this instance does not have an atom with this name.
name | the name of the child atom |
Get a pointer to a child atom with the name name . The pointer is 0 if this instance AtomContainer does not have an atom with this name.
name | the name of the child atom |
AtomContainer* BALL::AtomContainer::getAtomContainer | ( | Position | position | ) |
Get a pointer to a child AtomContainer at a given position. The pointer is 0 if this instance does not have an AtomContainer at the given position.
position | of the child AtomContainer |
const AtomContainer* BALL::AtomContainer::getAtomContainer | ( | Position | position | ) | const |
Get a constant pointer to a child AtomContainer at a given position. The pointer is 0 if this instance does not have an AtomContainer at the given position.
position | of the child AtomContainer |
const String& BALL::AtomContainer::getName | ( | ) | const |
Return the name.
AtomContainer* BALL::AtomContainer::getSuperAtomContainer | ( | ) |
Get a mutable pointer to the parent AtomContainer. The pointer is 0 if this instance does not have a parent AtomContainer.
Reimplemented in BALL::Molecule.
const AtomContainer* BALL::AtomContainer::getSuperAtomContainer | ( | ) | const |
Get a constant pointer to the parent AtomContainer. The pointer is 0 if this instance does not have a parent AtomContainer.
Reimplemented in BALL::Molecule.
void BALL::AtomContainer::insert | ( | Atom & | atom | ) |
Insert an atom to the last position.
atom | the atom to insert |
Reimplemented in BALL::Nucleotide, and BALL::Molecule.
void BALL::AtomContainer::insert | ( | AtomContainer & | atom_container | ) |
Insert an AtomContainer at the last position.
atom_container | the AtomContainer to insert |
Reimplemented in BALL::Molecule.
Insert an atom after a given Composite object.
atom | the atom to insert |
after | the Composite object to insert after |
Reimplemented in BALL::Nucleotide, and BALL::Molecule.
void BALL::AtomContainer::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 in BALL::Molecule.
Insert an atom before a given Composite object.
atom | the atom to insert |
before | the Composite object to insert before |
Reimplemented in BALL::Nucleotide, and BALL::Molecule.
void BALL::AtomContainer::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 in BALL::Molecule.
bool BALL::AtomContainer::isSubAtomContainerOf | ( | const AtomContainer & | atom_container | ) | const |
Test if an AtomContainer is a child.
atom_container | the AtomContainer to test |
Reimplemented in BALL::Molecule.
bool BALL::AtomContainer::isSuperAtomContainerOf | ( | const AtomContainer & | atom_container | ) | const |
Test if an AtomContainer is the parent.
atom_container | the AtomContainer to test |
|
virtual |
Debugging and Diagnostics Internal state and consistency self-validation. If the internal state of this instance is correct (self-validated) and consistent true
is returned, false
otherwise.
Reimplemented from BALL::Composite.
Reimplemented in BALL::Residue, BALL::SecondaryStructure, BALL::Protein, BALL::Nucleotide, and BALL::NucleicAcid.
bool BALL::AtomContainer::operator!= | ( | const AtomContainer & | atom_container | ) | const |
Inequality operator.
AtomContainer& BALL::AtomContainer::operator= | ( | const AtomContainer & | atom_container | ) |
Assignment operator. The assignment is deep.
atom_container | the AtomContainer to be copied (cloned) |
bool BALL::AtomContainer::operator== | ( | const AtomContainer & | atom_container | ) | const |
Equality operator. Two instances of AtomContainer are equal if they have the same handle.
|
virtual |
Read an AtomContainer object from a persistent stream.
pm | the persistence manager |
Reimplemented from BALL::Composite.
Reimplemented in BALL::Residue, BALL::SecondaryStructure, BALL::Nucleotide, BALL::NucleicAcid, BALL::Protein, BALL::Molecule, BALL::Chain, BALL::System, and BALL::Fragment.
|
virtual |
Write an AtomContainer object to a persistent stream.
pm | the persistence manager |
Reimplemented from BALL::Composite.
Reimplemented in BALL::Residue, BALL::SecondaryStructure, BALL::Nucleotide, BALL::NucleicAcid, BALL::Protein, BALL::Molecule, BALL::Chain, BALL::System, and BALL::Fragment.
void BALL::AtomContainer::prepend | ( | Atom & | atom | ) |
Prepend an atom at position 0.
atom | the atom to prepend |
Reimplemented in BALL::Nucleotide, and BALL::Molecule.
void BALL::AtomContainer::prepend | ( | AtomContainer & | atom_container | ) |
Prepend an AtomContainer at position 0.
atom_container | the AtomContainer to prepend |
Reimplemented in BALL::Molecule.
Remove an atom
atom | the atom to remove |
Reimplemented in BALL::Nucleotide, and BALL::Molecule.
bool BALL::AtomContainer::remove | ( | AtomContainer & | atom_container | ) |
Remove an AtomContainer
atom_container | the AtomContainer to remove |
Reimplemented in BALL::Molecule.
Size BALL::AtomContainer::removeHavingProperty | ( | BALL::Property | p | ) |
Size BALL::AtomContainer::removeHavingProperty | ( | const string & | name | ) |
Size BALL::AtomContainer::removeNotHavingProperty | ( | BALL::Property | p | ) |
Size BALL::AtomContainer::removeNotHavingProperty | ( | const string & | name | ) |
void BALL::AtomContainer::set | ( | const AtomContainer & | atom_container, |
bool | deep = true |
||
) |
Assign the contents of an AtomContainer The assignment is either deep or shallow (default is deep).
atom_container | the atom_container to be copied (cloned) |
deep | make a deep (=true ) or shallow (=false ) copy |
void BALL::AtomContainer::setName | ( | const String & | name | ) |
Set the name.
name | the new name |
void BALL::AtomContainer::splice | ( | AtomContainer & | atom_container | ) |
Move the children of {atom_container} into this instance. The children of atom_container
are inserted at its position if it is is a child of this
. Otherwise the children are inserted using spliceBefore .
Reimplemented in BALL::Molecule.
void BALL::AtomContainer::spliceAfter | ( | AtomContainer & | atom_container | ) |
Cut all children of atom_container
and append them after the children of this instance.
atom_container | the AtomContainer to access |
Reimplemented in BALL::Molecule.
void BALL::AtomContainer::spliceBefore | ( | AtomContainer & | atom_container | ) |
Cut all children of atom_container
and prepend them before the children of this instance.
atom_container | the AtomContainer to access |
Reimplemented in BALL::Molecule.
void BALL::AtomContainer::swap | ( | AtomContainer & | atom_container | ) |
Swap the contents of two AtomContainers.
atom_container | the AtomContainer this instance is being swapped with. |
|
private |
Definition at line 404 of file atomContainer.h.