25 #include <openbabel/babelconfig.h>    28 #  define EXTERN extern    41 #define OB_AROMATIC_BOND  (1<<1)    42 #define OB_WEDGE_BOND     (1<<2)    44 #define OB_HASH_BOND      (1<<3)    46 #define OB_RING_BOND      (1<<4)    48 #define OB_CLOSURE_BOND   (1<<10)    51 #define OB_WEDGE_OR_HASH_BOND     (1<<11)    53 #define SET_OR_UNSET_FLAG(X) \    54   if (value) SetFlag(X); \    73       bool HasFlag(
int flag)
 const { 
return ((_flags & flag) != 0); }
    77       void SetFlag(
int flag) { _flags |= flag; }
    92         WedgeOrHash = (1<<11), 
   110       void SetId(
unsigned long id) { _id = id; }
   112       void SetBondOrder(
int order);
   120       void SetLength(
OBAtom *fixed,
double length);
   123       void SetLength(
double length);
   125       void Set(
int index, 
OBAtom* begin,
OBAtom* end,
int order,
int flags);
   153       unsigned int     GetIdx()
           const { 
return(_idx);  }
   155       unsigned long GetId()
           const { 
return _id; }
   162         { 
return (_bgn ? _bgn->
GetIdx() : 0); }
   165         { 
return (_end ? _end->
GetIdx() : 0); }
   179           return((ptr != _bgn)? _bgn : _end);
   185       double  GetEquibLength() 
const;
   187       double  GetLength() 
const;
   194             return (_bgn ? _bgn->
GetIdx() : 0);
   196             return (_end ? _end->
GetIdx() : 0);
   199       OBRing* FindSmallestRing() 
const;
   204       bool IsAromatic() 
const;
   209       bool IsInRing() 
const;
   217       bool IsRotor(
bool includeRingBonds=
false);
   223       bool IsPrimaryAmide();
   226       bool IsSecondaryAmide();
   229       bool IsTertiaryAmide();
   255       bool IsDoubleBondGeometry();
 void SetFlag(int flag)
Definition: bond.h:77
bool IsCisOrTrans() const
Definition: bond.h:252
#define OB_WEDGE_BOND
A solid black wedge in 2D representations – i.e., "up" from the 2D plane. 
Definition: bond.h:43
unsigned int GetBeginAtomIdx() const
Definition: bond.h:161
Flag
Definition: bond.h:84
unsigned short int _flags
Any flags for this bond. 
Definition: bond.h:66
void SetHash(bool value=true)
Definition: bond.h:137
unsigned int GetNbrAtomIdx(OBAtom *ptr)
Definition: bond.h:191
Stores information on rings in a molecule from SSSR perception. 
Definition: ring.h:40
void SetEnd(OBAtom *end)
Set the ending atom of this bond to end. Does not update end. 
Definition: bond.h:116
Base classes to build a graph. 
const OBAtom * GetBeginAtom() const
Definition: bond.h:168
OBAtom * GetNbrAtom(OBAtom *ptr)
Definition: bond.h:177
#define OB_AROMATIC_BOND
An aromatic bond (regardless of bond order) 
Definition: bond.h:41
void SetWedgeOrHash(bool value=true)
Definition: bond.h:141
#define OB_CLOSURE_BOND
A bond which "closes" a ring when walking the molecular graph. 
Definition: bond.h:49
void SetWedge(bool value=true)
Definition: bond.h:132
unsigned int _idx
Unique edge index used by GetIdx() and SetIdx() 
Definition: bond.h:61
Bond class. 
Definition: bond.h:58
const OBAtom * GetEndAtom() const
Definition: bond.h:172
Molecule Class. 
Definition: mol.h:118
void SetBegin(OBAtom *begin)
Set the beginning atom of this bond to begin. Does not update begin. 
Definition: bond.h:114
bool IsWedge()
Definition: bond.h:238
bool Visit
Whether this bond has been visited by a graph algorithm. 
Definition: bond.h:97
bool IsWedgeOrHash() const
Definition: bond.h:247
unsigned int GetFlags() const
Definition: bond.h:159
void SetAromatic(bool value=true)
Mark that this bond is aromatic. Does not update atoms or validate. 
Definition: bond.h:127
StereoFlag
Definition: bond.h:89
OBAtom * _bgn
I connect one node. 
Definition: bond.h:63
OBAtom * GetBeginAtom()
Definition: bond.h:167
unsigned long GetId() const
Definition: bond.h:155
std::vector< OBBond * >::iterator OBBondIterator
A standard iterator over a vector of bonds. 
Definition: atom.h:46
void SetInRing(bool value=true)
Mark that this bond is in a ring. Primarily for internal use. 
Definition: bond.h:143
#define OB_HASH_BOND
A dashed "hash" bond in 2D representations – i.e., "down" from the 2D plane. 
Definition: bond.h:45
void SetParent(OBMol *ptr)
Set the parent molecule to ptr. Does not update parent. 
Definition: bond.h:118
void SetClosure(bool value=true)
Mark that this bond indicates a ring closure when walking the molecule. 
Definition: bond.h:148
#define SET_OR_UNSET_FLAG(X)
Definition: bond.h:53
unsigned int GetIdx() const
Definition: atom.h:189
#define OB_RING_BOND
A bond in a ring. 
Definition: bond.h:47
bool HasFlag(int flag) const
Definition: bond.h:73
unsigned int GetBondOrder() const
Definition: bond.h:157
OBMol * GetParent()
Definition: bond.h:182
void SetIdx(int idx)
Set the internal bond index. 
Definition: bond.h:109
OBMol * _parent
The molecule which contains me (if any) 
Definition: bond.h:62
void SetId(unsigned long id)
Definition: bond.h:110
OBAtom * GetEndAtom()
Definition: bond.h:171
void UnsetFlag(int flag)
Definition: bond.h:81
bool IsHash()
Definition: bond.h:241
unsigned int GetEndAtomIdx() const
Definition: bond.h:164
char _order
Bond order (1, 2, 3, 5=aromatic) 
Definition: bond.h:65
Base Class. 
Definition: base.h:239
OBAtom * _end
to another node 
Definition: bond.h:64
unsigned long _id
unique id 
Definition: bond.h:67
Global namespace for all Open Babel code. 
Definition: alias.h:22
Atom class. 
Definition: atom.h:71