OEBondBase¶

class OEBondBase : public OESystem::OEBase


The OEBondBase class is the abstract interface for representing bonds within OpenEye’s Toolkits. An OEBondBase object is created by calling the OEMolBase.NewBond method on the parent molecule.

The following methods are publicly inherited from OEBase:

The following classes derive from this class:

operator=¶

OEBondBase &operator=(const OEBondBase &b)


Clear¶

void Clear()=0


GetBgn¶

OEAtomBase *GetBgn() const =0


Returns the ‘begin’ (or ‘source’) atom of a bond. The begin atom of a bond is defined either when the bond is created with OEMolBase.NewBond, or possibly by a call to the OEBondBase.SetBgn method. If the begin atom was specified as the NULL pointer, (OEAtomBase*)0, when the bond was created, this method may return a NULL pointer.

GetBgnIdx¶

unsigned int GetBgnIdx() const


Returns the atom index of the ‘begin’ (or ‘source’) atom of a bond. This method is equivalent to OEBondBase.GetBgn()-> GetIdx.

GetEnd¶

OEAtomBase *GetEnd() const =0


Returns the ‘end’ (or ‘destination’) atom of a bond. The end atom of a bond is defined either when the bond is created with OEMolBase.NewBond, or possibly by a call to the OEBondBase.SetEnd method. If the begin atom was specified as the NULL pointer, (OEAtomBase*)0, when the bond was created, this method may return a NULL pointer.

GetEndIdx¶

unsigned int GetEndIdx() const


Returns the atom index of the ‘end’ (or ‘destination’) atom of a bond. This method is equivalent to OEBondBase.GetEnd()-> GetIdx.

GetIdx¶

unsigned int GetIdx() const =0


Returns the bond index of a bond. This value is assigned when a bond is created. The bond index is unique for the bonds of a given molecule, and is stable (not reused) for the lifetime of that OEMolBase. These values may not be assigned sequentially, and may contain gaps. Bond indices are guaranteed to be less than OEMolBase.GetMaxBondIdx. Bond indices are typically only used for efficiently storing data in arrays (or vectors) externally to the OEMolBase. The arrays can be conveniently indexed via OEBondBase.GetIdx. For iterating across the bonds of a molecule, use OEMolBase.GetBonds and for keeping track of a particular bond use its OEBondBase*.

GetIntType¶

int GetIntType() const =0


Returns the ‘integer bond type’ property of a bond. The default value is zero. The ‘integer bond type’ property may be set using the OEBondBase.SetIntType method.

GetNbr¶

OEAtomBase *GetNbr(const OEAtomBase * nbr) const =0


Returns the atom across the bond from the specified atom. If the ‘nbr’ argument represents the begin atom of the bond, i.e. OEBondBase.GetBgn, this method returns the end atom, i.e. OEBondBase.GetEnd, and if the ‘nbr’ argument is the end atom, this method returns the begin atom (OEBondBase.GetBgn). If passed an atom other than the begin or end atoms, this method returns a NULL pointer, (OEAtomBase*)0. This method is often used for traversing the atoms of a molecule.

GetOrder¶

unsigned int GetOrder() const =0


Returns the ‘bond order’ property of a bond. The ‘bond order’ property is one, for single bonds, two for double bonds, three for triple bonds and four for quadruple bonds. The default value is specified when a bond is created using OEMolBase.NewBond. The ‘bond order’ property of a bond may be set using the OEBondBase.SetOrder method.

GetParent¶

OEMolBase *GetParent() const =0


Returns the parent molecule of a bond. All OEBondBases are created as a component of an OEMolBase, this method can be used to determine the molecule of which a bond is part. The ‘parent molecule’ property of a bond cannot be assigned, as its determined at the point the bond is created.

GetStereo¶

unsigned int GetStereo(const std::vector<OEAtomBase *> &neighs, unsigned int stereoclass) const


Returns the stereochemistry annotation of the bond.

neighs
A vector of adjacent atoms of the bond.
stereoclass
OEChem TK currently only supports the cis/trans bond stereochemistry class. The only valid stereoclass value is OEBondStereo_CisTrans.

This method returns the value OEBondStereo_Undefined if the stereo chemistry for the given stereochemistry class is unspecified, if the stereo chemistry class is invalid or if the vector of adjacent atoms is invalid.

For a specified cis/trans stereo center, it returns either OEBondStereo_Cis or OEBondStereo_Trans.

The stereochemistry annotation of a bond may be set using the OEBondBase.SetStereo method.

GetType¶

const char *GetType() const =0


Returns the ‘bond type name’ property of a bond. This value is typically used when reading and writing molecular formats. For example, in Sybyl mol2 file, the bond type name am means that the bond should be treated as an amide bond. The default value is the empty string. The ‘bond type name’ property may be set using the OEBondBase.SetType method.

HasStereoSpecified¶

bool HasStereoSpecified(unsigned int v=OEBondStereo::All) const


Determines whether the given bond has specified stereochemistry. The optional argument specifies the class of stereochemistry to check for. The default value, OEBondStereo_All, checks whether any class of stereochemistry is specified for the current bond.

If a bond has unspecified stereochemistry, and this method returns false, the molecule is assumed to represent either a racemic mixture or an undetermined isomer of this compound. If this method returns true, this bond has an explicit stereochemistry which may be retrieved using the OEBondBase.GetStereo method.

This method initially returns false for a newly created bond. The stereochemistry of a bond may be set by calling the OEBondBase.SetStereo method with the appropriate stereochemistry class, c, and any value other than OEBondStereo_Undefined. The bond stereochemistry may subsequently be cleared by calling the same method, with the appropriate stereochemistry class, but specifying the value OEBondStereo_Undefined.

IsAromatic¶

bool IsAromatic() const =0


Returns the ‘aromatic’ property of a bond. The default value is false. The ‘aromatic’ property of a bond can be set using the OEBondBase.SetAromatic method. The ‘aromatic’ property of bonds and atoms in a molecule are typically set by calling either the OEAssignAromaticFlags function, or the OEClearAromaticFlags function.

IsChiral¶

bool IsChiral() const


Determines whether the current bond is a stereogenic center. If this method returns true, the bond is a chiral bond and the cis and trans forms of this bond represent two distinct isomers. If this method returns false, this bond is not a chiral stereocenter.

Note

This chiral bond property is independent of the stereo bond property that records whether a particular cis or trans configuration is specified at a particular bond.

IsDataType¶

bool IsDataType(const void *) const


IsDeleted¶

bool IsDeleted() const =0


IsInRing¶

bool IsInRing() const =0


Returns the ‘in ring’ property of a bond. The default value is false. The ‘in ring’ property of a bond may be set using the OEBondBase.SetInRing method. The ‘in ring’ properties of bonds and atoms are typically set by calling the OEFindRingAtomsAndBonds function.

To determine whether a bond is a member of a specific ring/cycle size, use the OEBondIsInRingSize function.

IsRotor¶

bool IsRotor() const


Determines whether a bond is freely rotatable

Note

Since the ‘rotatable’ property is depends on the ‘in ring’ property. The OEFindRingAtomsAndBonds function must be called before accessing the rotatable bond property via OEBondBase.IsRotor.

SetAromatic¶

bool SetAromatic(bool)=0


Sets the ‘aromatic’ property of a bond. This value is false by default. The ‘aromatic’ property of a bond may be retrieved using the OEBondBase.IsAromatic method. This method is normally only used by the OEClearAromaticFlags function and OEAssignAromaticFlags function.

SetBgn¶

bool SetBgn(OEAtomBase *)=0


Defines the ‘begin’ (or ‘source’) atom of a bond. Normally, the begin atom of a bond is defined when the bond is created with OEMolBase.NewBond. However, it is occasionally useful to defer this decision, by passing the NULL pointer, (OEAtomBase*)0, as the begin atom to OEMolBase.NewBond. The begin atom should then later be specified by calling this method, OEBondBase.SetBgn, to resolve the begin atom before the molecule is used. Note that it is not possible to set/change the begin atom of a bond, once it has been defined. To achieve the same behavior call the OEMolBase.DeleteBond method, followed by OEMolBase.NewBond, to first destroy the original and replace it with a new bond.

SetChiral¶

bool SetChiral(bool)


SetEnd¶

bool SetEnd(OEAtomBase *)=0


Defines the ‘end’ (or ‘destination’) atom of a bond. Normally, the end atom of a bond is defined when the bond is created with OEMolBase.NewBond. However, it is occasionally useful to defer this decision, by passing the NULL pointer, (OEAtomBase*)0, as the end atom to OEMolBase.NewBond. The end atom should then later be specified by calling this method, OEBondBase.SetEnd, to resolve the end atom before the molecule is used. Note that it is not possible to set/change the end atom of a bond, once it has been defined. To achieve the same behavior call the OEMolBase.DeleteBond method, followed by OEMolBase.NewBond, to first destroy the original and replace it with a new bond.

SetInRing¶

bool SetInRing(bool)


Sets the ‘in ring’ property of a bond. This property is usually set by the OEFindRingAtomsAndBonds function. The default value is false. The ‘in ring’ property of a bond can be retrieved using the OEBondBase.IsInRing method.

SetIntType¶

bool SetIntType(int)=0


Sets the ‘integer bond type’ property of a bond. The default value is zero. The ‘integer bond type’ property may be retrieved using the OEBondBase.GetIntType method.

SetOrder¶

bool SetOrder(unsigned int)=0


Sets the ‘bond order’ property of a bond. The ‘bond order’ property is one, for single bonds, two for double bonds, three for triple bonds and four for quadruple bonds. The default value is specified when a bond is created using OEMolBase.NewBond. The ‘bond order’ property of a bond may be retrieved using the OEBondBase.GetOrder method.

SetStereo¶

bool SetStereo(const std::vector<OEAtomBase *> & neighs,
unsigned int stereoclass, unsigned int stereovalue)


Sets the stereochemistry annotation of the bond.

neighs
A vector of neighboring atoms that defines the stereochemistry.
stereoclass
OEChem TK currently only supports the cis/trans bond stereochemistry class. The only valid stereoclass value is OEBondStereo_CisTrans.
stereovalue
This value can be either OEBondStereo_Cis or OEBondStereo_Trans when specifying a cis/trans bond stereo center, or OEBondStereo_Undefined when un-specifying i.e. deleting a bond stereo center.

This method returns true if the bond chirality was correctly set, and false if the stereochemistry class is invalid, the stereochemistry value is invalid for the stereochemistry class, or the vector of adjacent atoms is invalid. The stereo information of a bond may be retrieved using the OEBondBase.GetStereo.

If set successfully, to a value other than OEBondStereo_Undefined, future calls to OEBondBase.HasStereoSpecified with the given stereochemistry class (or OEBondStereo_All) will return true. If successfully set to the value OEBondStereo_Undefined, future calls to OEBondBase.HasStereoSpecified will return false.

SetType¶

bool SetType(const char *)=0
bool SetType(const std::string &)=0


Sets the ‘bond type name’ property of a bond. This value is typically used when reading and writing molecular formats. For example, in Sybyl mol2 file, the bond type name am means that the bond should be treated as an amide bond. The default value is the empty string. The ‘bond type name’ property may be retrieved using the OEBondBase.GetType method.

SwapEnds¶

bool SwapEnds()=0


Swaps the begin and end atoms of a bond. The lists of bonds contained in each of the two atoms are not altered. After calling the OEBondBase.SwapEnds method, the atoms returned by the OEBondBase.GetBgn and OEBondBase.GetEnd methods will be interchanged.

Sweep¶

bool Sweep()=0