Loading...
Searching...
No Matches
OBBond Class Reference

`#include <openbabel/bond.h>`

Inheritance diagram for OBBond:
[legend]

## Public Types

enum | Flag { Aromatic = (1<<1) , Ring = (1<<4) , Closure = (1<<10) }
enum | StereoFlag { Wedge = (1<<2) , Hash = (1<<3) , WedgeOrHash = (1<<11) , CisOrTrans = (1<<12) }

## Public Member Functions

| OBBond ()
virtual | ~OBBond ()
virtual bool | Clear ()
virtual OBBase * | DoTransformations (const std::map< std::string, std::string > *, OBConversion *)
template<class T>
T * | CastAndClear (bool clear=true)
virtual const char * | GetTitle (bool replaceNewlines=true) const
virtual void | SetTitle (const char *)
Bond modification methods
void | SetIdx (int idx)
void | SetId (unsigned long id)
void | SetBondOrder (int order)
void | SetBegin (OBAtom *begin)
void | SetEnd (OBAtom *end)
void | SetParent (OBMol *ptr)
void | SetLength (OBAtom *fixed, double length)
void | SetLength (double length)
void | Set (int index, OBAtom *begin, OBAtom *end, int order, int flags)
void | SetAromatic (bool value=true)
void | SetWedge (bool value=true)
void | SetHash (bool value=true)
void | SetWedgeOrHash (bool value=true)
void | SetInRing (bool value=true)
void | SetClosure (bool value=true)
Bond data request methods
unsigned int | GetIdx () const
unsigned long | GetId () const
unsigned int | GetBondOrder () const
unsigned int | GetFlags () const
unsigned int | GetBeginAtomIdx () const
unsigned int | GetEndAtomIdx () const
OBAtom * | GetBeginAtom ()
const OBAtom * | GetBeginAtom () const
OBAtom * | GetEndAtom ()
const OBAtom * | GetEndAtom () const
OBAtom * | GetNbrAtom (OBAtom *ptr)
OBMol * | GetParent ()
double | GetEquibLength () const
double | GetLength () const
unsigned int | GetNbrAtomIdx (OBAtom *ptr)
OBRing * | FindSmallestRing () const
property request methods
bool | IsAromatic () const
bool | IsInRing () const
bool | IsRotor (bool includeRingBonds=false)
bool | IsPeriodic () const
bool | IsAmide ()
bool | IsPrimaryAmide ()
bool | IsSecondaryAmide ()
bool | IsTertiaryAmide ()
bool | IsEster ()
bool | IsCarbonyl ()
bool | IsClosure ()
bool | IsWedge ()
bool | IsHash ()
bool | IsWedgeOrHash () const
bool | IsCisOrTrans () const
bool | IsDoubleBondGeometry ()

## Static Public Member Functions

static const char * | ClassDescription ()

## Public Attributes

bool | Visit

## Protected Member Functions

bool | HasFlag (int flag) const
void | SetFlag (int flag)
void | UnsetFlag (int flag)

## Protected Attributes

unsigned int | _idx
OBMol * | _parent
OBAtom * | _bgn
OBAtom * | _end
char | _order
unsigned short int | _flags
unsigned long | _id

## Generic data handling methods (via OBGenericData)

std::vector< OBGenericData * > | _vdata
bool | HasData (const std::string &)
bool | HasData (const char *)
bool | HasData (const unsigned int type)
void | DeleteData (unsigned int type)
void | DeleteData (OBGenericData *)
void | DeleteData (std::vector< OBGenericData * > &)
bool | DeleteData (const std::string &s)
void | SetData (OBGenericData *d)
void | CloneData (OBGenericData *d)
size_t | DataSize () const
OBGenericData * | GetData (const unsigned int type)
OBGenericData * | GetData (const std::string &)
OBGenericData * | GetData (const char *)
std::vector< OBGenericData * > & | GetData ()
std::vector< OBGenericData * > | GetData (DataOrigin source)
std::vector< OBGenericData * > | GetAllData (const unsigned int type)
OBDataIterator | BeginData ()
OBDataIterator | EndData ()

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

While methods indicate "begin" and "end" atoms in the bond, all methods are designed to be independent of atom ordering, with the exception of stereochemically aware properties such as IsUp(), IsDown(), IsWedge, or IsHash().

## Member Enumeration Documentation

## Flag

enum Flag

Enumerator
Aromatic | An aromatic bond (regardless of bond order).
Ring | A bond in a ring.
Closure | A bond which "closes" a ring when walking the molecular graph.

## StereoFlag

enum StereoFlag

Enumerator
Wedge | A solid black wedge in 2D representations – i.e., "up" from the 2D plane.
Hash | A dashed "hash" bond in 2D representations – i.e., "down" from the 2D plane.
WedgeOrHash | The bond is either wedge or hash, this is a separate flag!
CisOrTrans | Indicates the 2D/3D coordinates are accidentally cis/trans.

## Constructor & Destructor Documentation

## OBBond()

OBBond | ( |  | ) |

Constructor.

Referenced by FindSmallestRing(), GetLength(), IsAmide(), IsAromatic(), IsEster(), IsInRing(), IsPeriodic(), IsPrimaryAmide(), IsSecondaryAmide(), and IsTertiaryAmide().

## ~OBBond()

~OBBond | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## HasFlag()

bool HasFlag | ( | int | flag | ) | const

inline protected

Returns
  True id the `flag` is set.

Referenced by IsAromatic(), IsCisOrTrans(), IsClosure(), IsHash(), IsInRing(), IsWedge(), and IsWedgeOrHash().

## SetFlag()

void SetFlag | ( | int | flag | ) |

inline protected

Sets the bitwise `flag`

Referenced by Set().

## UnsetFlag()

void UnsetFlag | ( | int | flag | ) |

inline protected

Unsets the bitwise `flag`

## SetIdx()

void SetIdx | ( | int | idx | ) |

inline

Set the internal bond index.

Warning
  This will not update the index in the parent OBMol. Intended mainly for internal use. Use with care.

Referenced by OBMol::DeleteBond(), OBMol::NewBond(), and Set().

## SetId()

void SetId | ( | unsigned long | id | ) |

inline

Referenced by OBMol::AddBond(), OBMol::NewBond(), and OBMol::operator+=().

## SetBondOrder()

void SetBondOrder | ( | int | order | ) |

Set the bond order to `order` (i.e., 1 = single, 2 = double, 5 = aromatic).

Referenced by OpenBabel::alternate(), OBChemTsfm::Apply(), OBBondTyper::AssignFunctionalGroupBonds(), OBBuilder::Build(), OBBuilder::Connect(), OBMol::ConvertDativeBonds(), OBMol::ConvertZeroBonds(), OBMol::MakeDativeBonds(), and Set().

## SetBegin()

void SetBegin | ( | OBAtom * | begin | ) |

inline

Set the beginning atom of this bond to `begin`. Does not update `begin`.

Referenced by OBBuilder::Connect(), and Set().

## SetEnd()

void SetEnd | ( | OBAtom * | end | ) |

inline

Set the ending atom of this bond to `end`. Does not update `end`.

Referenced by OBBuilder::Connect(), and Set().

## SetParent()

void SetParent | ( | OBMol * | ptr | ) |

inline

Set the parent molecule to `ptr`. Does not update parent.

Referenced by OBMol::AddBond(), and OBMol::NewBond().

## SetLength() [1/2]

void SetLength | ( | OBAtom * | fixed,
|  | double | length )

Change the bond length to `length`, while keeping `fixed` stationary.

Referenced by OBAtom::HtoMethyl(), and SetLength().

## SetLength() [2/2]

void SetLength | ( | double | length | ) |

Change the bond length to `length`, moving both atoms halfway

Since
  version 2.2

## Set()

void Set | ( | int | idx,
|  | OBAtom * | begin,
|  | OBAtom * | end,
|  | int | order,
|  | int | flags )

Set the main bond information (i.e., when creating a bond).

Mark the main information for a bond

Parameters

  idx | The unique bond index for this bond (inside an OBMol)
  begin | The 'beginning' atom for the bond
  end | The 'end' atom for the bond
  order | The bond order (i.e., 1 = single, 2 = double... 5 = aromatic)
  flags | Any initial property flags

Referenced by OBMol::AddBond().

## SetAromatic()

void SetAromatic | ( | bool | value = true | ) |

inline

Mark that this bond is aromatic. Does not update atoms or validate.

## SetWedge()

void SetWedge | ( | bool | value = true | ) |

inline

Mark that this bond has 2D "wedge" notation (i.e., goes in a positive Z direction from the beginning to end atoms)

## SetHash()

void SetHash | ( | bool | value = true | ) |

inline

Mark that this bond has 2D "hash" notation (i.e., goes in a negative Z direction from the beginning to end atoms)

## SetWedgeOrHash()

void SetWedgeOrHash | ( | bool | value = true | ) |

inline

Set the WedgeOrHash flag on a bond (??)

## SetInRing()

void SetInRing | ( | bool | value = true | ) |

inline

Mark that this bond is in a ring. Primarily for internal use.

Referenced by OpenBabel::FindRings().

## SetClosure()

void SetClosure | ( | bool | value = true | ) |

inline

Mark that this bond indicates a ring closure when walking the molecule.

Warning
  This is for internal use only. All closure bonds are marked automatically by lazy evaluation when requesting OBBond::IsClosure()

Referenced by OpenBabel::FindRings().

## GetIdx()

unsigned int GetIdx | ( |  | ) | const

inline

Returns
  The unique bond index in a molecule.

Referenced by OpenBabel::atomRingToBondRing(), OBMol::DeleteBond(), OpenBabel::FindRings(), OBResidue::GetBonds(), and OBRotorList::IsFixedBond().

## GetId()

unsigned long GetId | ( |  | ) | const

inline

Referenced by OBBuilder::CorrectStereoBonds(), OBMol::DeleteBond(), and OBDepict::DrawMolecule().

## GetBondOrder()

unsigned int GetBondOrder | ( |  | ) | const

inline

Returns
  The bond order for the bond

Referenced by OBMol::AddBond(), OBChemTsfm::Apply(), OBResidueData::AssignBonds(), OBBuilder::Build(), OBMol::ConvertDativeBonds(), OBAtom::CountBondsOfOrder(), OBSmartsMatcher::EvalBondExpr(), OBAtom::HasBondOfOrder(), OBAtom::HasNonSingleBond(), OBAtom::HighestBondOrder(), IsAmide(), OBAtom::IsAmideNitrogen(), IsCarbonyl(), IsEster(), OpenBabel::isFerroceneBond(), IsPrimaryAmide(), IsSecondaryAmide(), IsTertiaryAmide(), OBMol::MakeDativeBonds(), OBQueryBond::Matches(), OBMol::operator+=(), and OBBuilder::Swap().

## GetFlags()

unsigned int GetFlags | ( |  | ) | const

inline

Returns
  The set of property flags defined for this bond.

Referenced by OBMol::AddBond(), and OBMol::operator+=().

## GetBeginAtomIdx()

unsigned int GetBeginAtomIdx | ( |  | ) | const

inline

Returns
  The atom index for the end atom in this bond (from OBAtom::GetIdx()

Referenced by OBMol::AddBond(), OBRingSearch::AddRingFromClosure(), OpenBabel::alternate(), OBRotorRules::GetRotorIncrements(), OBRing::IsMember(), OBMol::operator+=(), OBRotorList::SetEvalAtoms(), and OBConformerSearch::Setup().

## GetEndAtomIdx()

unsigned int GetEndAtomIdx | ( |  | ) | const

inline

Returns
  The atom index for the end atom in this bond (from OBAtom::GetIdx()

Referenced by OBMol::AddBond(), OBRingSearch::AddRingFromClosure(), OpenBabel::alternate(), OBRotorRules::GetRotorIncrements(), OBRing::IsMember(), OBMol::operator+=(), OBRotorList::SetEvalAtoms(), and OBConformerSearch::Setup().

## GetBeginAtom() [1/2]

OBAtom * GetBeginAtom | ( |  | ) |

inline

Returns
  The "beginning" atom for this bond

Referenced by OBRingSearch::AddRingFromClosure(), OBChemTsfm::Apply(), OBGastChrg::AssignPartialCharges(), OBMol::ConvertZeroBonds(), OBMol::DeleteBond(), OBMol::FindTorsions(), GetEquibLength(), GetLength(), OBBuilder::GetNewBondVector(), OBRotorRules::GetRotorIncrements(), OBAtom::IsConnected(), OpenBabel::isFerroceneBond(), OBRotorList::IsFixedBond(), OpenBabel::OBBondGetSmallestRingSize(), OBRotorList::RemoveSymVals(), and SetLength().

## GetBeginAtom() [2/2]

const OBAtom * GetBeginAtom | ( |  | ) | const

inline

## GetEndAtom() [1/2]

OBAtom * GetEndAtom | ( |  | ) |

inline

Returns
  The "end" atom for this bond

Referenced by OBRingSearch::AddRingFromClosure(), OBChemTsfm::Apply(), OBGastChrg::AssignPartialCharges(), OBMol::ConvertZeroBonds(), OBMol::DeleteBond(), OBMol::FindTorsions(), GetEquibLength(), GetLength(), OBRotorRules::GetRotorIncrements(), OBAtom::IsConnected(), OpenBabel::isFerroceneBond(), OBRotorList::IsFixedBond(), OpenBabel::OBBondGetSmallestRingSize(), OBRotorList::RemoveSymVals(), and SetLength().

## GetEndAtom() [2/2]

const OBAtom * GetEndAtom | ( |  | ) | const

inline

## GetNbrAtom()

OBAtom * GetNbrAtom | ( | OBAtom * | ptr | ) |

inline

Returns
  The neighboring atom to `ptr` (i.e., the end if `ptr` is the start)

Warning
  If `ptr` is not part of the bond, the beginning atom will always be returned

Referenced by OBMol::ConnectTheDots(), OBMol::ConvertDativeBonds(), OBAtom::CountFreeOxygens(), OBAtom::CountFreeSulfurs(), OpenBabel::FindRings(), OBAtom::GetBond(), OBResidue::GetBonds(), OpenBabel::GetDFFVector(), OBMol::GetGTDVector(), OBAtom::GetHeteroDegree(), OBAtom::GetHvyDegree(), OBBuilder::GetNewBondVector(), OBAtom::IsAmideNitrogen(), OBAtom::IsCarboxylOxygen(), OBAtom::IsHbondDonorH(), OBAtom::IsNitroOxygen(), OBAtom::IsNonPolarHydrogen(), OBAtom::IsOneFour(), OBAtom::IsOneThree(), OBAtom::IsPhosphateOxygen(), OBAtom::IsPolarHydrogen(), OBAtom::IsSulfateOxygen(), OpenBabel::IsSulfoneOxygen(), OBMol::MakeDativeBonds(), and SetLength().

## GetParent()

OBMol * GetParent | ( |  | ) |

inline

Returns
  The enclosing OBMol for this bond, or NULL if none is defined.

Referenced by IsClosure(), and OpenBabel::OBBondGetSmallestRingSize().

## GetEquibLength()

double GetEquibLength | ( |  | ) | const

Returns
  The expected "equilibrium" length based on the covalent radii and bond order Length is given in Angstroms

## GetLength()

double GetLength | ( |  | ) | const

Returns
  The current length of this bond in Angstroms

Referenced by OBMol::ConnectTheDots(), OBBuilder::CorrectStereoAtoms(), and SetLength().

## GetNbrAtomIdx()

unsigned int GetNbrAtomIdx | ( | OBAtom * | ptr | ) |

inline

Returns
  The index to the neighboring atom of `ptr` (i.e., the end if `ptr` is the start)

Warning
  If `ptr` is not part of the bond, the beginning atom index will always be returned

Referenced by OBMol::ContigFragList(), OBMol::FindLargestFragment(), OpenBabel::GetDFFVector(), and OBMol::GetGTDVector().

## FindSmallestRing()

OBRing * FindSmallestRing | ( |  | ) | const

Find the smallest ring containing this bond (returns a NULL pointer if none exists).

Referenced by IsRotor().

## IsAromatic()

bool IsAromatic | ( |  | ) | const

Returns
  Is the bond aromatic? (Note that the two atoms of the bond may be aromatic, but not the bond)

Referenced by OBBuilder::Build(), OBSmartsMatcher::EvalBondExpr(), GetEquibLength(), and OBQueryBond::Matches().

## IsInRing()

bool IsInRing | ( |  | ) | const

Returns
  Is the bond part of a ring?

Referenced by OBAtom::CountRingBonds(), OBSmartsMatcher::EvalBondExpr(), OpenBabel::OBBondGetSmallestRingSize(), and OBBuilder::Swap().

## IsRotor()

bool IsRotor | ( | bool | includeRingBonds = false | ) |

Returns
  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 if includeRingsBonds is false. If true, rotors in rings with more than 3 atoms may be included. No other bond typing is attempted. For more detailed rotor detection, check the OBRotorList and OBRotorRules classes

## IsPeriodic()

bool IsPeriodic | ( |  | ) | const

Returns
  Is the bond an amide link (i.e., between a carbonyl C and a N)? No distinction is made between primary, secondary, and tertiary amides.

Referenced by GetLength().

## IsAmide()

bool IsAmide | ( |  | ) |

Returns
  Is the bond within a periodic unit cell?

## IsPrimaryAmide()

bool IsPrimaryAmide | ( |  | ) |

Returns
  Is the bond a primary amide (i.e., between carbonyl C and a NH2)? In versions prior to 2.3, this function incorrectly identified secondary amides.

## IsSecondaryAmide()

bool IsSecondaryAmide | ( |  | ) |

Returns
  Is the bond a secondary amide (i.e., between a carbonyl C and a NH1)? In versions prior to 2.3, this function incorrectly identified tertiary amides.

## IsTertiaryAmide()

bool IsTertiaryAmide | ( |  | ) |

Returns
  Is the bond a teriary amide (i.e., between a carbonyl C and a NH0)?

Since
  version 2.3.

## IsEster()

bool IsEster | ( |  | ) |

Returns
  Is the bond an ester link (i.e., between a carbonyl C and an O)?

Referenced by OBAtom::IsHbondAcceptor().

## IsCarbonyl()

bool IsCarbonyl | ( |  | ) |

Returns
  Is the bond a carbonyl C=O?

Referenced by IsAmide(), IsEster(), IsPrimaryAmide(), IsSecondaryAmide(), and IsTertiaryAmide().

## IsClosure()

bool IsClosure | ( |  | ) |

Returns
  Does this bond "close" a ring when walking the molecular graph?

Referenced by OpenBabel::DetermineFRJ(), OBMol::FindLSSR(), and OBMol::FindSSSR().

## IsWedge()

bool IsWedge | ( |  | ) |

inline

Returns
  Whether this bond is a "wedge" in 2D representations (i.e., goes in a positive Z direction from the beginning to end atoms)

Referenced by OBBuilder::GetNewBondVector().

## IsHash()

bool IsHash | ( |  | ) |

inline

Returns
  Whether this bond is a "hash" in 2D representations (i.e., goes in a negative Z direction from the beginning to end atoms)

Referenced by OBBuilder::GetNewBondVector().

## IsWedgeOrHash()

bool IsWedgeOrHash | ( |  | ) | const

inline

Returns
  True if this bond is either a wedge or hash.

Note
  : This is a separate bond type

Since
  version 2.3

## IsCisOrTrans()

bool IsCisOrTrans | ( |  | ) | const

inline

Returns
  True if this bond is either a cis or trans.

Since
  version 2.3

## IsDoubleBondGeometry()

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

## Clear()

bool Clear | ( | void |  | ) |

virtual inherited

Clear any and all data associated with this object.

This method can be called by OBConversion::Read() before reading data. Derived classes should be sure to call OBBase::Clear() to remove inherited generic data.

Returns
  Whether the call was successful.

Since
  version 2.1.

Reimplemented in OBAtom, OBMol, OBReaction, and OBResidue.

Referenced by CastAndClear(), OBAtom::Clear(), OBMol::Clear(), and OBResidue::Clear().

## DoTransformations()

virtual OBBase * DoTransformations | ( | const std::map< std::string, std::string > * | ,
|  | OBConversion * | )

inline virtual inherited

Perform a set of transformations specified by the user

Typically these are program options to filter or modify an object For example, see OBMol::DoTransformations() and OBMol::ClassDescription() Base type does nothing

Reimplemented in OBMol.

## ClassDescription()

const char * ClassDescription | ( |  | ) |

inline static inherited

Returns
  A list of descriptions of command-line options for DoTransformations()

## CastAndClear()

template<class T>

T * CastAndClear | ( | bool | clear = true | ) |

inline inherited

By default clears the object. Called from ReadMolecule of most format classes.

## GetTitle()

virtual const char * GetTitle | ( | bool | replaceNewlines = true | ) | const

inline virtual inherited

Base type does nothing Made virtual around r3535 to simplify code which passes around OBBase*.

Reimplemented in OBMol.

Referenced by OBMoleculeFormat::DoOutputOptions().

## SetTitle()

virtual void SetTitle | ( | const char * |  | ) |

inline virtual inherited

Reimplemented in OBMol.

Referenced by OBMoleculeFormat::DoOutputOptions().

## HasData() [1/3]

bool HasData | ( | const std::string & | s | ) |

inherited

Returns
  whether the generic attribute/value pair exists

Referenced by OBMol::AddAtom(), OBDepict::DrawMolecule(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), HasData(), OBDescriptor::MatchPairData(), OBMol::NewAtom(), OBMoleculeFormat::ReadChemObjectImpl(), and OBMol::SetEnergies().

## HasData() [2/3]

bool HasData | ( | const char * | s | ) |

inherited

Returns
  whether the generic attribute/value pair exists

## HasData() [3/3]

bool HasData | ( | const unsigned int | type | ) |

inherited

Returns
  whether the generic attribute/value pair exists, for a given OBGenericDataType

## DeleteData() [1/4]

void DeleteData | ( | unsigned int | type | ) |

inherited

Delete any data matching the given OBGenericDataType.

Referenced by OBMol::AddAtom(), OBMol::BeginModify(), OpenBabel::CanonicalLabels(), OBDescriptor::DeleteProperties(), OpenBabel::DeleteStereoOnAtom(), OBMol::EndModify(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::NewAtom(), and OBMol::RenumberAtoms().

## DeleteData() [2/4]

void DeleteData | ( | OBGenericData * | gd | ) |

inherited

Delete the given generic data from this object.

## DeleteData() [3/4]

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

inherited

Delete all of the given generic data from this object.

## DeleteData() [4/4]

bool DeleteData | ( | const std::string & | s | ) |

inherited

Deletes the generic data with the specified attribute, returning false if not found.

## SetData()

void SetData | ( | OBGenericData * | d | ) |

inline inherited

Adds a data object; does nothing if d==NULL.

Referenced by OBMol::AddBond(), OBGastChrg::AssignPartialCharges(), OBMol::CopySubstructure(), OBMol::DoTransformations(), OBAtom::Duplicate(), AliasData::Expand(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::operator+=(), OBMol::operator=(), OBDescriptor::PredictAndSave(), OBMol::SetEnergies(), and OBMol::SetFormula().

## CloneData()

void CloneData | ( | OBGenericData * | d | ) |

inherited

Adds a copy of a data object; does nothing if d == NULL

Since
  version 2.2

Referenced by OBMol::AddBond().

## DataSize()

size_t DataSize | ( |  | ) | const

inline inherited

Returns
  the number of OBGenericData items attached to this molecule.

## GetData() [1/5]

OBGenericData * GetData | ( | const unsigned int | type | ) |

inherited

Returns
  the first matching data for a given type from OBGenericDataType or NULL if nothing matches

Referenced by OBDepict::DrawMolecule(), OpenBabel::extract_thermochemistry(), OBDescriptor::FilterCompare(), OBAtom::GetAngle(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBAtom::GetDistance(), OBBond::GetLength(), OBForceField::GetPartialCharges(), OBDescriptor::GetValues(), OpenBabel::IsSuppressibleHydrogen(), OBMoleculeFormat::MakeCombinedMolecule(), OBMolAngleIter::OBMolAngleIter(), OBMolAngleIter::OBMolAngleIter(), OBMolTorsionIter::OBMolTorsionIter(), OBMolTorsionIter::OBMolTorsionIter(), and OBDescriptor::PredictAndSave().

## GetData() [2/5]

OBGenericData * GetData | ( | const std::string & | s | ) |

inherited

Returns
  any data matching the given attribute name or NULL if nothing matches
  the value given an attribute name

## GetData() [3/5]

OBGenericData * GetData | ( | const char * | s | ) |

inherited

Returns
  any data matching the given attribute name or NULL if nothing matches
  the value given an attribute name

## GetData() [4/5]

std::vector< OBGenericData * > & GetData | ( |  | ) |

inline inherited

Returns
  all data, suitable for iterating

Referenced by OBMol::BeginModify(), OBMol::ConnectTheDots(), OBMol::CopySubstructure(), OBMol::DoTransformations(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBMol::GetFormula(), OBMol::GetLSSR(), OBMol::GetSSSR(), OBMol::GetTorsion(), OBMol::SetEnergies(), and OBMol::SetFormula().

## GetData() [5/5]

std::vector< OBGenericData * > GetData | ( | DataOrigin | source | ) |

inherited

Returns
  all data with a specific origin, suitable for iterating

## GetAllData()

std::vector< OBGenericData * > GetAllData | ( | const unsigned int | type | ) |

inherited

Returns
  the all matching data for a given type from OBGenericDataType or an empty vector if nothing matches

Since
  version 2.2

Referenced by OpenBabel::CanonicalLabels(), OBMol::CopySubstructure(), OBBuilder::CorrectStereoAtoms(), OBBuilder::CorrectStereoBonds(), OpenBabel::DeleteStereoOnAtom(), and OBMol::operator+=().

## BeginData()

OBDataIterator BeginData | ( |  | ) |

inline inherited

Returns
  An iterator pointing to the beginning of the data

Referenced by OBMol::AddAtom(), OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::NewAtom(), and OBMol::operator=().

## EndData()

OBDataIterator EndData | ( |  | ) |

inline inherited

Returns
  An iterator pointing to the end of the data

Referenced by OBMol::AddAtom(), OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), OBMol::NewAtom(), and OBMol::operator=().

## Member Data Documentation

## _idx

unsigned int _idx

protected

Unique edge index used by GetIdx() and SetIdx().

Referenced by GetIdx(), OBBond(), and SetIdx().

## _parent

OBMol* _parent

protected

The molecule which contains me (if any).

Referenced by GetParent(), IsDoubleBondGeometry(), OBBond(), and SetParent().

## _bgn

OBAtom* _bgn

protected

I connect one node.

Referenced by GetBeginAtom(), GetBeginAtom(), GetBeginAtomIdx(), GetNbrAtom(), GetNbrAtomIdx(), IsAmide(), IsCarbonyl(), IsDoubleBondGeometry(), IsEster(), IsPrimaryAmide(), IsRotor(), IsSecondaryAmide(), IsTertiaryAmide(), OBBond(), and SetBegin().

## _end

OBAtom* _end

protected

to another node

Referenced by GetEndAtom(), GetEndAtom(), GetEndAtomIdx(), GetNbrAtom(), GetNbrAtomIdx(), IsAmide(), IsCarbonyl(), IsDoubleBondGeometry(), IsEster(), IsPrimaryAmide(), IsRotor(), IsSecondaryAmide(), IsTertiaryAmide(), OBBond(), and SetEnd().

## _order

char _order

protected

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

Referenced by GetBondOrder(), GetEquibLength(), IsRotor(), OBBond(), and SetBondOrder().

## _flags

unsigned short int _flags

protected

Any flags for this bond.

Referenced by GetFlags(), HasFlag(), OBBond(), SetFlag(), and UnsetFlag().

## _id

unsigned long _id

protected

unique id

Referenced by GetId(), and SetId().

## Visit

bool Visit

Whether this bond has been visited by a graph algorithm.

Deprecated
  Use OBBitVec objects instead to be fully thread-safe.

## _vdata

std::vector<OBGenericData*> _vdata

protected inherited

Custom data.

Referenced by BeginData(), Clear(), CloneData(), DataSize(), DeleteData(), DeleteData(), DeleteData(), DeleteData(), OBAtom::Duplicate(), EndData(), GetAllData(), GetData(), GetData(), GetData(), GetData(), GetData(), HasData(), HasData(), OBBond::OBBond(), OBMol::OBMol(), OBMol::OBMol(), OBResidue::OBResidue(), SetData(), and ~OBBase().

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

- bond.h
- bond.cpp