BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Private Member Functions | Friends | List of all members
BALL::Bond Class Reference

#include <BALL/KERNEL/bond.h>

Inheritance diagram for BALL::Bond:
BALL::Composite BALL::PropertyManager BALL::PersistentObject BALL::Selectable BALL::Object BALL::AutoDeletable BALL::SmilesParser::SPBond

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
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
 
enum  StampType { MODIFICATION = 1, SELECTION = 2, BOTH = 3 }
 
typedef UnaryPredicate< CompositeKernelPredicateType
 

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. More...
 
bool operator!= (const Bond &bond) const
 Inequality operator. Two bonds are not equal, if they are different instances. More...
 
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
Bondoperator= (const Bond &bond)
 
void swap (Bond &bond)
 
Accessors
void setFirstAtom (Atom *atom)
 
void setSecondAtom (Atom *atom)
 
const AtomgetFirstAtom () const
 Return a pointer to the first atom. More...
 
AtomgetFirstAtom ()
 Return a pointer to the first atom. More...
 
const AtomgetSecondAtom () const
 Return a pointer to the second atom. More...
 
AtomgetSecondAtom ()
 Return a pointer to the second atom. More...
 
AtomgetPartner (const Atom &atom) const
 
void setName (const String &name)
 Assign the atom name. More...
 
const StringgetName () const
 Return the atom name. More...
 
void setOrder (Order bond_order)
 Assign the bond order. More...
 
Order getOrder () const
 Return the bond order. More...
 
bool isAromatic () const
 
void setType (Type bond_type)
 Set the bond type. More...
 
Type getType () const
 Return the bond type. More...
 
float getLength () const
 
const AtomgetBoundAtom (const Atom &atom) const
 
AtomgetBoundAtom (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
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)
 
template<typename T >
BALL_INLINE bool apply (UnaryProcessor< T > &processor)
 
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
 
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)
 
Compositeoperator= (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
 
CompositegetRoot ()
 
const CompositegetRoot () const
 
CompositegetLowestCommonAncestor (const Composite &composite)
 
const CompositegetLowestCommonAncestor (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
 
CompositegetParent ()
 
const CompositegetParent () const
 
CompositegetChild (Index index)
 
const CompositegetChild (Index index) const
 
CompositegetSibling (Index index)
 
const CompositegetSibling (Index index) const
 
CompositegetFirstChild ()
 
const CompositegetFirstChild () const
 
CompositegetLastChild ()
 
const CompositegetLastChild () const
 
const PreciseTimegetModificationTime () const
 
const PreciseTimegetSelectionTime () 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 ()
 
PersistenceManageroperator>> (PersistenceManager &pm) const
 
- Public Member Functions inherited from BALL::Object
 Object ()
 Default constructor. More...
 
 Object (const Object &object)
 Copy constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
const Objectoperator= (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 Selectableoperator= (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. More...
 
BALL_INLINE PropertyManager (const PropertyManager &property_manager)
 Copy constructor. More...
 
virtual ~PropertyManager ()
 Destructor. More...
 
void set (const PropertyManager &property_manager)
 
const PropertyManageroperator= (const PropertyManager &property_manager)
 
void get (PropertyManager &property_manager) const
 
void swap (PropertyManager &property_manager)
 
BitVectorgetBitVector ()
 
const BitVectorgetBitVector () const
 
 operator BitVector & ()
 
void setProperty (Property property)
 
void clearProperty (Property property)
 
void toggleProperty (Property property)
 
Size countProperties () const
 
const NamedPropertygetNamedProperty (Position index) const
 
NamedPropertygetNamedProperty (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 NamedPropertygetProperty (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. More...
 
bool hasProperty (const string &name) const
 Query for a named property. More...
 
bool operator== (const PropertyManager &pm) const
 
bool operator!= (const PropertyManager &pm) const
 Inequality operator. More...
 
void write (PersistenceManager &pm) const
 Persistent stream writing. More...
 
bool read (PersistenceManager &pm)
 Persistent stream reading. More...
 
bool isValid () const
 
void dump (std::ostream &s=std::cout, Size depth=0) const
 

Protected Attributes

Atributes
Atomfirst_
 
Atomsecond_
 
String name_
 
Order bond_order_
 
Type bond_type_
 

Private Member Functions

void arrangeBonds_ ()
 
void clear_ ()
 

Friends

class Atom
 

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 BondcreateBond (Bond &bond, Atom &first, Atom &second)
 

Additional Inherited Members

- Static Public Member Functions inherited from BALL::Composite
static bool insertParent (Composite &parent, Composite &first, Composite &last, bool destroy_parent=true)
 
- Static Public Member Functions inherited from BALL::Object
static Handle getNextHandle ()
 
static Handle getNewHandle ()
 
- Static Public Member Functions inherited from BALL::AutoDeletable
static void clearLastPtr ()
 
- Static Public Attributes inherited from BALL::Composite
static UnaryProcessor< CompositeDEFAULT_PROCESSOR
 
static KernelPredicateType DEFAULT_UNARY_PREDICATE
 
- Protected Member Functions inherited from BALL::AutoDeletable
 AutoDeletable ()
 
 AutoDeletable (const AutoDeletable &auto_deletable, bool deep=false)
 

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:

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

typedef short BALL::Bond::Order

Bond type.

Definition at line 86 of file bond.h.

typedef short BALL::Bond::Type

Definition at line 87 of file bond.h.

Member Enumeration Documentation

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.

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.

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

BALL::Bond::Bond ( )

Default constructor. The state of this bond is:

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
bondthe bond to be copied
deepignored
See Also
createBond
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
namename of the constructed bond
firstfirst atom of the constructed bond
secondsecond atom of the constructed bond
orderorder of the constructed bond
typetype of the constructed bond
Exceptions
TooManyBondsif one of the atom already possesses Atom::MAX_NUMBER_OF_BONDS bonds.
virtual BALL::Bond::~Bond ( )
virtual

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

Member Function Documentation

void BALL::Bond::arrangeBonds_ ( )
private
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.

void BALL::Bond::clear_ ( )
private
static 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
bondthe instantiated bond that connects the first atom first to the second atom second
firstthe first atom of the bond
secondthe second atom of the bond
Returns
Bond* this
Exceptions
TooManyBondsif one of the atom already possesses Atom::MAX_NUMBER_OF_BONDS bonds.
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.

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
soutput stream where to output the internal state of this bond
depththe dumping depth

Reimplemented from BALL::Composite.

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.

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

Return the partner of the atom in this bond.

Parameters
atoman atom
Returns
Atom a constant pointer to the atom, 0 if the atom is not part of the bond
Atom* BALL::Bond::getBoundAtom ( const Atom atom)

Return the partner of the atom in this bond.

Parameters
atoman atom
Returns
Atom a pointer to the atom, 0 if the atom is not part of the bond
const Atom* BALL::Bond::getFirstAtom ( ) const

Return a pointer to the first atom.

Atom* BALL::Bond::getFirstAtom ( )

Return a pointer to the first atom.

float BALL::Bond::getLength ( ) const

Return the bond length

Returns
float - the distance between the two atoms
Exceptions
NotBoundif the bond is not bound to two atoms
const String& BALL::Bond::getName ( ) const

Return the atom name.

Order BALL::Bond::getOrder ( ) const

Return the bond order.

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
atomone of the bond's atoms
Returns
the atom's bond partner
const Atom* BALL::Bond::getSecondAtom ( ) const

Return a pointer to the second atom.

Atom* BALL::Bond::getSecondAtom ( )

Return a pointer to the second atom.

Type BALL::Bond::getType ( ) const

Return the bond type.

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

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

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

Parameters
atomthe 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
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
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
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_containerthe queried parent fragment.
Returns
bool - true if this bond is intermolecular, false otherwise
See Also
Composite::isDescendantOf
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
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_containerthe queried parent fragment.
Returns
bool - true if this bond is intramolecular, false otherwise
See Also
Composite::isDescendantOf
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.

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

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

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
bondthe bond to be copied
Returns
Bond - this bond
See Also
Bond::set
bool BALL::Bond::operator== ( const Bond bond) const

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

void BALL::Bond::persistentRead ( PersistenceManager pm)
virtual

Read a bond from a persistent stream.

Parameters
pmthe persistence manager

Reimplemented from BALL::Composite.

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

Write a bond to a persistent stream.

Parameters
pmthe persistence manager

Reimplemented from BALL::Composite.

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.

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

Assign the atom name.

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

Assign the bond order.

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.

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

Set the bond type.

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

Swap the contents of two bonds

Parameters
bondthe bond this is being swapped with
See Also
Bond::Bond

Friends And Related Function Documentation

friend class Atom
friend

Definition at line 61 of file bond.h.

Member Data Documentation

Order BALL::Bond::bond_order_
protected

Definition at line 455 of file bond.h.

Type BALL::Bond::bond_type_
protected

Definition at line 458 of file bond.h.

Atom* BALL::Bond::first_
protected

Definition at line 446 of file bond.h.

String BALL::Bond::name_
protected

Definition at line 452 of file bond.h.

Atom* BALL::Bond::second_
protected

Definition at line 449 of file bond.h.