Loading...
Searching...
No Matches
BALL::Bond Class Reference
Kernel Classes » Miscellaneous

`#include <BALL/KERNEL/bond.h>`

Inheritance diagram for BALL::Bond:

## Classes

class | NotBound

## Public Types

Enumerations
enum | BondOrder { ORDER__UNKNOWN = 0 , ORDER__SINGLE = 1 , ORDER__DOUBLE = 2 , ORDER__TRIPLE = 3 , ORDER__QUADRUPLE = 4 , ORDER__AROMATIC = 5 , ORDER__ANY = 6 , NUMBER_OF_BOND_ORDERS }
enum | BondType { TYPE__UNKNOWN = 0 , TYPE__COVALENT = 1 , TYPE__HYDROGEN = 2 , TYPE__DISULPHIDE_BRIDGE = 3 , TYPE__SALT_BRIDGE = 4 , TYPE__PEPTIDE = 5 , NUMBER_OF_BOND_TYPES }
enum | Property { IS_AROMATIC = 0 , NUMBER_OF_PROPERTIES }
Type definitions
typedef short | Order
typedef short | Type
Public Types inherited from BALL::Composite
enum | StampType { MODIFICATION = 1 , SELECTION = 2 , BOTH = 3 }
typedef UnaryPredicate< Composite > | KernelPredicateType
typedef ForwardIterator< Composite, Composite, Composite *, AncestorIteratorTraits > | AncestorIterator
typedef ConstForwardIterator< Composite, Composite, Composite *, AncestorIteratorTraits > | AncestorConstIterator
typedef BidirectionalIterator< Composite, Composite, Composite *, ChildCompositeIteratorTraits > | ChildCompositeIterator
typedef ConstBidirectionalIterator< Composite, Composite, Composite *, ChildCompositeIteratorTraits > | ChildCompositeConstIterator
typedef std::reverse_iterator< ChildCompositeIterator > | ChildCompositeReverseIterator
typedef std::reverse_iterator< ChildCompositeConstIterator > | ChildCompositeConstReverseIterator
typedef BidirectionalIterator< Composite, Composite, Composite *, CompositeIteratorTraits > | CompositeIterator
typedef ConstBidirectionalIterator< Composite, Composite, Composite *, CompositeIteratorTraits > | CompositeConstIterator
typedef std::reverse_iterator< CompositeIterator > | CompositeReverseIterator
typedef std::reverse_iterator< CompositeConstIterator > | CompositeConstReverseIterator

## Public Member Functions

Persistence
void | persistentWrite (PersistenceManager &pm, const char *name=0) const
void | persistentRead (PersistenceManager &pm)
void | finalize ()
Predicates
bool | operator== (const Bond &bond) const
| Equality operator. Two bonds are equal, if they are identical instances.
bool | operator!= (const Bond &bond) const
| Inequality operator. Two bonds are not equal, if they are different instances.
bool | isBondOf (const Atom &atom) const
bool | isBound () const
bool | isInterBond () const
bool | isInterBondOf (const AtomContainer &atom_container) const
bool | isIntraBond () const
bool | isIntraBondOf (const AtomContainer &atom_container) const
Assignment methods
Bond & | operator= (const Bond &bond)
void | swap (Bond &bond)
Accessors
void | setFirstAtom (Atom *atom)
void | setSecondAtom (Atom *atom)
const Atom * | getFirstAtom () const
| Return a pointer to the first atom.
Atom * | getFirstAtom ()
| Return a pointer to the first atom.
const Atom * | getSecondAtom () const
| Return a pointer to the second atom.
Atom * | getSecondAtom ()
| Return a pointer to the second atom.
Atom * | getPartner (const Atom &atom) const
void | setName (const String &name)
| Assign the atom name.
const String & | getName () const
| Return the atom name.
void | setOrder (Order bond_order)
| Assign the bond order.
Order | getOrder () const
| Return the bond order.
bool | isAromatic () const
void | setType (Type bond_type)
| Set the bond type.
Type | getType () const
| Return the bond type.
float | getLength () const
const Atom * | getBoundAtom (const Atom &atom) const
Atom * | getBoundAtom (const Atom &atom)
Debugging and diagnostics
virtual bool | isValid () const
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
Public Member Functions inherited from BALL::Composite
template<typename T>
BALL_INLINE bool | apply (UnaryProcessor< T > &processor)
template<typename T>
BALL_INLINE bool | apply (ConstUnaryProcessor< T > &processor) const
template<typename T>
BALL_INLINE T * | getAncestor (const T &)
template<typename T>
BALL_INLINE const T * | getAncestor (const T &) const
template<typename T>
BALL_INLINE T * | getPrevious (const T &)
template<typename T>
BALL_INLINE const T * | getPrevious (const T &dummy) const
template<typename T>
BALL_INLINE T * | getNext (const T &)
template<typename T>
BALL_INLINE const T * | getNext (const T &dummy) const
template<typename T>
BALL_INLINE bool | hasAncestor (const T &dummy) const
| 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
virtual bool | isAtom () const
virtual bool | isMolecule () const
virtual bool | isProtein () const
virtual bool | isFragment () const
virtual bool | isResidue () const
virtual bool | isChain () const
void | host (Visitor< Composite > &visitor)
template<typename T>
bool | applyAncestor (UnaryProcessor< T > &processor)
template<typename T>
bool | applyAncestor (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool | applyChild (UnaryProcessor< T > &processor)
template<typename T>
bool | applyChild (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool | applyDescendantPreorder (UnaryProcessor< T > &processor)
template<typename T>
bool | applyDescendantPreorder (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool | applyDescendantPostorder (UnaryProcessor< T > &processor)
template<typename T>
bool | applyDescendantPostorder (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool | applyDescendant (UnaryProcessor< T > &processor)
template<typename T>
bool | applyDescendant (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool | applyPreorder (UnaryProcessor< T > &processor)
template<typename T>
bool | applyPreorder (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool | applyPostorder (UnaryProcessor< T > &processor)
template<typename T>
bool | applyPostorder (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool | apply (UnaryProcessor< T > &processor)
template<typename T>
bool | apply (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool | applyLevel (UnaryProcessor< T > &processor, long level)
template<typename T>
bool | applyLevel (ConstUnaryProcessor< T > &processor, long level) const
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)
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 ()
Public Member Functions inherited from BALL::PersistentObject
| PersistentObject ()
virtual | ~PersistentObject ()
PersistenceManager & | operator>> (PersistenceManager &pm) const
Public Member Functions inherited from BALL::Object
| 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
Public Member Functions inherited from BALL::AutoDeletable
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)
Public Member Functions inherited from BALL::Selectable
| 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
Public Member Functions inherited from BALL::PropertyManager
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 std::string &name)
void | setProperty (const std::string &name, bool value)
void | setProperty (const std::string &name, int value)
void | setProperty (const std::string &name, unsigned int value)
void | setProperty (const std::string &name, float value)
void | setProperty (const std::string &name, double value)
void | setProperty (const std::string &name, const std::string &value)
void | setProperty (const std::string &name, const PersistentObject &value)
const NamedProperty & | getProperty (const std::string &name) const
NamedPropertyIterator | beginNamedProperty ()
NamedPropertyIterator | endNamedProperty ()
void | clearProperty (const std::string &name)
Size | countNamedProperties () const
bool | hasProperty (Property property) const
| Query for an unnamed property.
bool | hasProperty (const std::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.
bool | isValid () const
void | dump (std::ostream &s=std::cout, Size depth=0) const

## Friends

class | Atom

## Atributes

Atom * | first_
Atom * | second_
String | name_
Order | bond_order_
Type | bond_type_

## Constructors and Destructors

| Bond ()
| Bond (const Bond &bond, bool deep=true)
| Bond (const String &name, Atom &first, Atom &second, Order order=BALL_BOND_DEFAULT_ORDER, Type type=BALL_BOND_DEFAULT_TYPE)
virtual | ~Bond ()
virtual void | clear ()
virtual void | destroy ()
static Bond * | createBond (Bond &bond, Atom &first, Atom &second)

## 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_

## Detailed Description

Bond class. An instance of Bond represents a bond between two atoms. There can be only one bond between two atoms (double, triple, etc. bonds are represented using just one bond and an appropriate value for the bond order attribute, see setBondOrder ).

  The "first" and "second" atom are assigned in a unique way: the first atom is always the atom with the lower Handle than the second atom.

  The "state" of a bond is defined by its attributes:

- "first atom" ( Bond::first_ )
- "second atom" ( Bond::second_ )
- "bond name" ( Bond::name_ ): an arbitrary name
- "bond order" ( Bond::bond_order_ ): the order, i.e. single, double, triple,...
- "bond type" ( Bond::bond_type_ ): covalent, hydrogen bond, etc. to identify non-standard bond types

Bond equality is defined as bond identity. A linear ordering of bonds is defined as the linear order of the Object::Handle s.

Definition at line 54 of file bond.h.

## Member Typedef Documentation

## Order

typedef short BALL::Bond::Order

Bond type.

Definition at line 86 of file bond.h.

## Type

typedef short BALL::Bond::Type

Definition at line 87 of file bond.h.

## Member Enumeration Documentation

## BondOrder

enum BALL::Bond::BondOrder

Predefined constants for the bond order

Enumerator
ORDER__UNKNOWN | Default value.
ORDER__SINGLE | Single bond.
ORDER__DOUBLE | Double bond.
ORDER__TRIPLE | Triple Bond.
ORDER__QUADRUPLE | Quadruple bond.
ORDER__AROMATIC | Aromatic bonds.
ORDER__ANY | Any bond orders (useful for predicates).
NUMBER_OF_BOND_ORDERS | The number of bond orders.

Definition at line 96 of file bond.h.

## BondType

enum BALL::Bond::BondType

Predefined constants for the bond type. Those are just defined for convenience but they are not used right now.

Enumerator
TYPE__UNKNOWN |
TYPE__COVALENT |
TYPE__HYDROGEN |
TYPE__DISULPHIDE_BRIDGE |
TYPE__SALT_BRIDGE |
TYPE__PEPTIDE |
NUMBER_OF_BOND_TYPES |

Definition at line 120 of file bond.h.

## Property

enum BALL::Bond::Property

Predefined properties. Enumeration of all properties that are used by Bond.

Enumerator
IS_AROMATIC | This property can be used to store aromaticity information without overwriting bond orders.
NUMBER_OF_PROPERTIES |

Definition at line 141 of file bond.h.

## Constructor & Destructor Documentation

## Bond() [1/3]

BALL::Bond::Bond | ( |  | ) |

Default constructor. The state of this bond is:

- bond has no first atom (=0)
- bond has no second atom (=0)
- bond name is the empty string (="")
- bond order is unknown (= Bond::ORDER__UNKNOWN )
- bond type is unknown (= Bond::TYPE__UNKNOWN )

## Bond() [2/3]

BALL::Bond::Bond | ( | const Bond & | bond,
|  | bool | deep = true )

Copy constructor. Calls Bond::createBond . The state of this bond is initialized to the state of bond.

  Note: Deep copying of bonds makes no sense, the parameter deep is therefore ignored. The use of this method is not recommended because it may result in inconcistencies of the whole the kernel data structure. This if for internal use only!

Parameters

  bond | the bond to be copied
  deep | ignored

See also
  createBond

## Bond() [3/3]

BALL::Bond::Bond | ( | const String & | name,
|  | Atom & | first,
|  | Atom & | second,
|  | Order | order = BALL_BOND_DEFAULT_ORDER,
|  | Type | type = BALL_BOND_DEFAULT_TYPE )

Detailed constructor. Calls createBond to create a new bond between the two atoms

Parameters

  name | name of the constructed bond
  first | first atom of the constructed bond
  second | second atom of the constructed bond
  order | order of the constructed bond
  type | type of the constructed bond

Exceptions

  TooManyBonds | if one of the atom already possesses Atom::MAX_NUMBER_OF_BONDS bonds.

## ~Bond()

virtual BALL::Bond::~Bond | ( |  | ) |

virtual

Destructor. If the bond is connecting two atoms, they are disconnected.

## Member Function Documentation

## clear()

virtual void BALL::Bond::clear | ( |  | ) |

virtual

Disconnect and reset to default state. Reset the bond attributes to their default values. The state of this bond is:

- bond has no connectivity with first atom (=0)
- bond has no connectivity with second atom (=0)
- bond name is the empty string (="")
- bond order is unknown (= Bond::ORDER__UNKNOWN )
- bond type is unknown (= Bond::TYPE__UNKNOWN )

Reimplemented from BALL::Composite.

## createBond()

Bond * BALL::Bond::createBond | ( | Bond & | bond,
|  | Atom & | first,
|  | Atom & | second )

static

Create a bond. Connect the two atoms first and second via a bond.

Parameters

  bond | the instantiated bond that connects the first atom first to the second atom second
  first | the first atom of the bond
  second | the second atom of the bond

Returns
  Bond* this

Exceptions

  TooManyBonds | if one of the atom already possesses Atom::MAX_NUMBER_OF_BONDS bonds.

## destroy()

virtual void BALL::Bond::destroy | ( |  | ) |

virtual

Explicit destructor. Destroy this bond explicitly without releasing its heap memory thus this bond may exist further. Calls Bond::clear . Set the state of this bond to the default values. Note: Destroy is equivalent to Bond::clear .

See also
  Bond::clear

Reimplemented from BALL::Composite.

## dump()

virtual void BALL::Bond::dump | ( | std::ostream & | s = std::cout,
|  | Size | depth = 0 ) const

virtual

Internal state dump. Dump the current internal state of this bond to the output ostream s with dumping depth depth .

Parameters

  s | output stream where to output the internal state of this bond
  depth | the dumping depth

Reimplemented from BALL::Composite.

## finalize()

void BALL::Bond::finalize | ( |  | ) |

virtual

Finalize the deserialization. Bond might have to swap first_ and second_ to ensure the correct order (see Bond ).

Reimplemented from BALL::PersistentObject.

## getBoundAtom() [1/2]

Atom * BALL::Bond::getBoundAtom | ( | const Atom & | atom | ) |

Return the partner of the atom in this bond.

Parameters

  atom | an atom

Returns
  Atom a pointer to the atom, 0 if the atom is not part of the bond

## getBoundAtom() [2/2]

const Atom * BALL::Bond::getBoundAtom | ( | const Atom & | atom | ) | const

Return the partner of the atom in this bond.

Parameters

  atom | an atom

Returns
  Atom a constant pointer to the atom, 0 if the atom is not part of the bond

## getFirstAtom() [1/2]

Atom * BALL::Bond::getFirstAtom | ( |  | ) |

Return a pointer to the first atom.

## getFirstAtom() [2/2]

const Atom * BALL::Bond::getFirstAtom | ( |  | ) | const

Return a pointer to the first atom.

## getLength()

float BALL::Bond::getLength | ( |  | ) | const

Return the bond length

Returns
  float - the distance between the two atoms

Exceptions

  NotBound | if the bond is not bound to two atoms

## getName()

const String & BALL::Bond::getName | ( |  | ) | const

Return the atom name.

## getOrder()

Order BALL::Bond::getOrder | ( |  | ) | const

Return the bond order.

## getPartner()

Atom * BALL::Bond::getPartner | ( | const Atom & | atom | ) | const

Return the partner atom of an atom. If the given atom is part of this bond, the other atom of the bond is returned. 0 is returned if atom is not one of the bond's atoms.

Parameters

  atom | one of the bond's atoms

Returns
  the atom's bond partner

## getSecondAtom() [1/2]

Atom * BALL::Bond::getSecondAtom | ( |  | ) |

Return a pointer to the second atom.

## getSecondAtom() [2/2]

const Atom * BALL::Bond::getSecondAtom | ( |  | ) | const

Return a pointer to the second atom.

## getType()

Type BALL::Bond::getType | ( |  | ) | const

Return the bond type.

## isAromatic()

bool BALL::Bond::isAromatic | ( |  | ) | const

Returns true if this bond is aromatic.

A bond is defined as aromatic, if it has the property Bond::IS_AROMATIC or if it has the order Bond::ORDER__AROMATIC

## isBondOf()

bool BALL::Bond::isBondOf | ( | const Atom & | atom | ) | const

Determine whether the bond belongs to an atom. Calls Atom::hasBond .

Parameters

  atom | the atom that is queried to connect this bond to another atom

Returns
  bool - true if bond connects the atom atom with another atom, false otherwise

See also
  Atom::hasBond

## isBound()

bool BALL::Bond::isBound | ( |  | ) | const

Determine whether this bond contains any atom.

Returns
  bool - true if bond connects the atom atom with another atom, false otherwise

See also
  Atom::hasBond

## isInterBond()

bool BALL::Bond::isInterBond | ( |  | ) | const

Determine whether the bond connects two fragments. If both atoms have no roots, the result is false. Calls Composite::getRoot .

Returns
  bool - true if this bond is intermolecular, false otherwise

See also
  Composite::getRoot

## isInterBondOf()

bool BALL::Bond::isInterBondOf | ( | const AtomContainer & | atom_container | ) | const

Request for the intermolecular bonding of this bond within {atom_container}. Query, if this bond connects a atom within {atom_container} instance with an atom outside. Calls Composite::isDescendantOf .

Parameters

  atom_container | the queried parent fragment.

Returns
  bool - true if this bond is intermolecular, false otherwise

See also
  Composite::isDescendantOf

## isIntraBond()

bool BALL::Bond::isIntraBond | ( |  | ) | const

Request for the intramolecular bonding of this bond. Query, if this bond connects its two atoms within a common parent Composite instance. If both atoms have no roots, the result is true. Calls Composite::getRoot .

Returns
  bool - true if this bond is intramolecular, false otherwise

See also
  Composite::getRoot

## isIntraBondOf()

bool BALL::Bond::isIntraBondOf | ( | const AtomContainer & | atom_container | ) | const

Request for the intramolecular bonding of this bond within {atom_container}. Query, if this bond connects its two atoms within the common parent {atom_container} instance. Calls Composite::isDescendantOf .

Parameters

  atom_container | the queried parent fragment.

Returns
  bool - true if this bond is intramolecular, false otherwise

See also
  Composite::isDescendantOf

## isValid()

virtual bool BALL::Bond::isValid | ( |  | ) | const

virtual

Internal state and consistency self-validation.

Returns
  bool - true if the internal state of this bond is correct (self-validated) and consistent, false otherwise

Reimplemented from BALL::Composite.

## operator!=()

bool BALL::Bond::operator!= | ( | const Bond & | bond | ) | const

Inequality operator. Two bonds are not equal, if they are different instances.

## operator=()

Bond & BALL::Bond::operator= | ( | const Bond & | bond | ) |

Assignment operator. Assign a deep copy (on the level of Composite ).

Note: The use of this method is not recommended because it may result in inconcistencies of the whole system. This is for internal use only.

Parameters

  bond | the bond to be copied

Returns
  Bond - this bond

See also
  Bond::set

## operator==()

bool BALL::Bond::operator== | ( | const Bond & | bond | ) | const

Equality operator. Two bonds are equal, if they are identical instances.

## persistentRead()

void BALL::Bond::persistentRead | ( | PersistenceManager & | pm | ) |

virtual

Read a bond from a persistent stream.

Parameters

  pm | the persistence manager

Reimplemented from BALL::Composite.

## persistentWrite()

void BALL::Bond::persistentWrite | ( | PersistenceManager & | pm,
|  | const char * | name = 0 ) const

virtual

Write a bond to a persistent stream.

Parameters

  pm | the persistence manager

Reimplemented from BALL::Composite.

## setFirstAtom()

void BALL::Bond::setFirstAtom | ( | Atom * | atom | ) |

Set the first atom. This method does not ensure the correct order of atoms (see Bond ), so its use is recommended for internal purposes only.

## setName()

void BALL::Bond::setName | ( | const String & | name | ) |

Assign the atom name.

## setOrder()

void BALL::Bond::setOrder | ( | Order | bond_order | ) |

Assign the bond order.

## setSecondAtom()

void BALL::Bond::setSecondAtom | ( | Atom * | atom | ) |

Set the second atom. This method does not ensure the correct order of atoms (see Bond ), so its use is recommended for internal purposes only.

## setType()

void BALL::Bond::setType | ( | Type | bond_type | ) |

Set the bond type.

## swap()

void BALL::Bond::swap | ( | Bond & | bond | ) |

Swap the contents of two bonds

Parameters

  bond | the bond this is being swapped with

See also
  Bond::Bond

## Friends And Related Symbol Documentation

## Atom

friend class Atom

friend

Definition at line 61 of file bond.h.

## Member Data Documentation

## bond_order_

Order BALL::Bond::bond_order_

protected

Definition at line 455 of file bond.h.

## bond_type_

Type BALL::Bond::bond_type_

protected

Definition at line 458 of file bond.h.

## first_

Atom* BALL::Bond::first_

protected

Definition at line 446 of file bond.h.

## name_

String BALL::Bond::name_

protected

Definition at line 452 of file bond.h.

## second_

Atom* BALL::Bond::second_

protected

Definition at line 449 of file bond.h.