OBBond Class Reference

Bond class. More...

#include <mol.h>

Inheritance diagram for OBBond:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 OBBond ()
 Constructor.
virtual ~OBBond ()
 Destructor.
virtual OBGraphBaseGetParent ()
void SetParent (OBGraphBase *)
unsigned int GetIdx ()
void SetBgn (OBNodeBase *n)
void SetEnd (OBNodeBase *n)
void SwapEnds ()
OBNodeBaseGetBgn ()
OBNodeBaseGetEnd ()
void Error (int f)
virtual OBBaseDoTransformations (const std::map< std::string, std::string > *pOptions)
Bond modification methods
void SetIdx (int idx)
void SetBO (int order)
void SetBegin (OBAtom *begin)
void SetEnd (OBAtom *end)
void SetLength (OBAtom *, double)
void Set (int, OBAtom *, OBAtom *, int, int)
void SetKSingle ()
void SetKDouble ()
void SetKTriple ()
void SetAromatic ()
void SetHash ()
void SetWedge ()
void SetUp ()
void SetDown ()
void SetInRing ()
void SetClosure ()
void UnsetAromatic ()
void UnsetKekule ()
bond data request methods
unsigned int GetBO () const
unsigned int GetBondOrder () const
unsigned int GetFlags () const
unsigned int GetBeginAtomIdx () const
unsigned int GetEndAtomIdx () const
OBAtomGetBeginAtom ()
OBAtomGetEndAtom ()
OBAtomGetNbrAtom (OBAtom *ptr)
double GetEquibLength ()
double GetLength ()
int GetNbrAtomIdx (OBAtom *ptr)
property request methods
bool IsAromatic () const
bool IsInRing () const
bool IsRotor ()
bool IsAmide ()
bool IsPrimaryAmide ()
bool IsSecondaryAmide ()
bool IsEster ()
bool IsCarbonyl ()
bool IsSingle ()
bool IsDouble ()
bool IsTriple ()
bool IsKSingle ()
bool IsKDouble ()
bool IsKTriple ()
bool IsClosure ()
bool IsUp ()
bool IsDown ()
bool IsWedge ()
bool IsHash ()
bool IsDoubleBondGeometry ()
 
Returns:
whether the geometry around this bond looks unsaturated

Methods for handling generic data
bool HasData (std::string &)
bool HasData (const char *)
bool HasData (unsigned int type)
void DeleteData (unsigned int type)
void DeleteData (OBGenericData *)
void DeleteData (std::vector< OBGenericData * > &)
void SetData (OBGenericData *d)
unsigned int DataSize ()
 
Returns:
the number of OBGenericData items attached to this bond

OBGenericDataGetData (unsigned int type)
OBGenericDataGetData (std::string &)
OBGenericDataGetData (const char *)
std::vector< OBGenericData * > & GetData ()
std::vector< OBGenericData
* >::iterator 
BeginData ()
std::vector< OBGenericData
* >::iterator 
EndData ()
Nonfunctional members
Nonfunctional or unused members of OpenBabel::OBEdgeBase are to be added by a derived class (e.g., OpenBabel::OBBond)

virtual bool Eval (OBEdgeBase *)

Static Public Member Functions

static const char * ClassDescription ()

Public Attributes

bool Visit

Protected Member Functions

bool HasFlag (int flag)
void SetFlag (int flag)

Protected Attributes

char _order
 Bond order (1, 2, 3, 5=aromatic).
unsigned short int _flags
 Any flags for this bond.
std::vector< OBGenericData * > _vdata
 Generic data for custom information.
unsigned short int _idx
 What is my unique edge index? GetIdx(), SetIdx(int idx).
OBNodeBase_bgn
 I connect one node.
OBNodeBase_end
OBGraphBase_parent
 To which graph do I belong? GetParent(), SetParent(OBGraphBase*).

Detailed Description

Bond class.

The OBBond class is straightforward in its data access and modification methods. OBBonds store pointers to the atoms on each end of the bond. In storing pointers to atoms instead of integer indices, the necessity of having to reorder bonds when atoms are shuffled, added, or delete is obviated.


Constructor & Destructor Documentation

OBBond (  ) 

Constructor.

~OBBond (  )  [virtual]

Destructor.


Member Function Documentation

bool HasFlag ( int  flag  )  [inline, protected]

void SetFlag ( int  flag  )  [inline, protected]

void SetIdx ( int  idx  )  [inline]

Reimplemented from OBEdgeBase.

void SetBO ( int  order  ) 

void SetBegin ( OBAtom begin  )  [inline]

void SetEnd ( OBAtom end  )  [inline]

void SetLength ( OBAtom ,
double   
)

void Set ( int  ,
OBAtom ,
OBAtom ,
int  ,
int   
)

void SetKSingle (  ) 

void SetKDouble (  ) 

void SetKTriple (  ) 

void SetAromatic (  )  [inline]

void SetHash (  )  [inline]

void SetWedge (  )  [inline]

void SetUp (  )  [inline]

void SetDown (  )  [inline]

void SetInRing (  )  [inline]

void SetClosure (  )  [inline, virtual]

Reimplemented from OBEdgeBase.

void UnsetAromatic (  )  [inline]

void UnsetKekule (  )  [inline]

unsigned int GetBO (  )  const [inline, virtual]

Reimplemented from OBEdgeBase.

unsigned int GetBondOrder (  )  const [inline]

unsigned int GetFlags (  )  const [inline]

unsigned int GetBeginAtomIdx (  )  const [inline]

unsigned int GetEndAtomIdx (  )  const [inline]

OBAtom* GetBeginAtom (  )  [inline]

OBAtom* GetEndAtom (  )  [inline]

OBAtom* GetNbrAtom ( OBAtom ptr  )  [inline]

double GetEquibLength (  ) 

double GetLength (  ) 

int GetNbrAtomIdx ( OBAtom ptr  )  [inline]

bool IsAromatic (  )  const [virtual]

Reimplemented from OBEdgeBase.

bool IsInRing (  )  const [virtual]

Reimplemented from OBEdgeBase.

bool IsRotor (  ) 

Is the bond a rotatable bond? Currently, this function classifies any bond with at least one heavy atom, no sp-hybrid atoms (e.g., a triple bond somewhere) not in a ring as a potential rotor. No other bond typing is attempted.

bool IsAmide (  ) 

bool IsPrimaryAmide (  ) 

bool IsSecondaryAmide (  ) 

Todo:
Implement this properly -- currently always returns false

bool IsEster (  ) 

bool IsCarbonyl (  ) 

bool IsSingle (  ) 

bool IsDouble (  ) 

bool IsTriple (  ) 

bool IsKSingle (  ) 

bool IsKDouble (  ) 

bool IsKTriple (  ) 

bool IsClosure (  )  [virtual]

Reimplemented from OBEdgeBase.

bool IsUp (  )  [inline]

Returns:
whether this is the "upper" bond in a double bond cis/trans isomer (i.e., "/" in SMILES)

bool IsDown (  )  [inline]

Returns:
whether this is the "lower" bond in a double bond cis/trans isomer (i.e., "\" in SMILES)

bool IsWedge (  )  [inline]

bool IsHash (  )  [inline]

bool IsDoubleBondGeometry (  ) 

Returns:
whether the geometry around this bond looks unsaturated

This method checks if the geometry around this bond looks unsaturated by measuring the torsion angles formed by all connected atoms X-start=end-Y and checking that they are close to 0 or 180 degrees

bool HasData ( std::string &   ) 

bool HasData ( const char *   ) 

bool HasData ( unsigned int  type  ) 

void DeleteData ( unsigned int  type  ) 

void DeleteData ( OBGenericData  ) 

void DeleteData ( std::vector< OBGenericData * > &   ) 

void SetData ( OBGenericData d  )  [inline]

unsigned int DataSize (  )  [inline]

Returns:
the number of OBGenericData items attached to this bond

OBGenericData * GetData ( unsigned int  type  ) 

OBGenericData * GetData ( std::string &   ) 

OBGenericData * GetData ( const char *   ) 

std::vector<OBGenericData*>& GetData (  )  [inline]

std::vector<OBGenericData*>::iterator BeginData (  )  [inline]

std::vector<OBGenericData*>::iterator EndData (  )  [inline]

virtual OBGraphBase* GetParent (  )  [inline, virtual, inherited]

void SetParent ( OBGraphBase  )  [inherited]

unsigned int GetIdx (  )  [inline, inherited]

void SetBgn ( OBNodeBase n  )  [inline, inherited]

void SetEnd ( OBNodeBase n  )  [inline, inherited]

void SwapEnds (  )  [inline, inherited]

OBNodeBase* GetBgn (  )  [inline, inherited]

OBNodeBase* GetEnd (  )  [inline, inherited]

void Error ( int  f  )  [inline, inherited]

virtual bool Eval ( OBEdgeBase  )  [inline, virtual, inherited]

virtual OBBase* DoTransformations ( const std::map< std::string, std::string > *  pOptions  )  [inline, virtual, inherited]

Reimplemented in OBMol.

static const char* ClassDescription (  )  [inline, static, inherited]

Reimplemented in OBMol.


Member Data Documentation

char _order [protected]

Bond order (1, 2, 3, 5=aromatic).

unsigned short int _flags [protected]

Any flags for this bond.

std::vector<OBGenericData*> _vdata [protected]

Generic data for custom information.

unsigned short int _idx [protected, inherited]

What is my unique edge index? GetIdx(), SetIdx(int idx).

OBNodeBase* _bgn [protected, inherited]

I connect one node.

OBNodeBase* _end [protected, inherited]

to another node

OBGraphBase* _parent [protected, inherited]

To which graph do I belong? GetParent(), SetParent(OBGraphBase*).

bool Visit [inherited]


The documentation for this class was generated from the following files: