Facade to simplify retrieval of OBStereoBase derived objects. More...
#include <openbabel/stereo/stereo.h>
Public Member Functions | |
OBStereoFacade (OBMol *mol, bool perceive=true) | |
template<int StereoType> | |
bool | HasStereo (unsigned long id) |
template<typename T > | |
T * | GetStereo (unsigned long id) |
Tetrahedral stereochemistry | |
unsigned int | NumTetrahedralStereo () |
bool | HasTetrahedralStereo (unsigned long atomId) |
OBTetrahedralStereo * | GetTetrahedralStereo (unsigned long atomId) |
Cis/Trans stereochemistry | |
unsigned int | NumCisTransStereo () |
bool | HasCisTransStereo (unsigned long bondId) |
OBCisTransStereo * | GetCisTransStereo (unsigned long bondId) |
SquarePlanar stereochemistry | |
unsigned int | NumSquarePlanarStereo () |
bool | HasSquarePlanarStereo (unsigned long atomId) |
OBSquarePlanarStereo * | GetSquarePlanarStereo (unsigned long atomId) |
Facade to simplify retrieval of OBStereoBase derived objects.
The OBStereoFacade helps with retrieving OBStereoBase derived objects (i.e. OBTetrahedralStereo, OBCisTransStereo, ...) from an OBMol. This is done by iterating over all OBGenericData objects with data type OBGenericDataType::StereoData and checking the OBStereo::Type using OBStereoBase::GetType.
OBStereoFacade | ( | OBMol * | mol, |
bool | perceive = true |
||
) | [inline] |
Constructor with mol
and perceive
parameter.
mol | The molecule. |
perceive | If true, PerceiveStereo will be called if the OBMol::HasChiralityPerceived() flag is not set. (default is true) |
unsigned int NumTetrahedralStereo | ( | ) |
Get the number of tetrahedral stereocenters.
bool HasTetrahedralStereo | ( | unsigned long | atomId ) |
Check if atom with id
is a tetrahedral center.
id
has tetrahedral stereochemistry. Referenced by OBMol::AddHydrogens(), OpenBabel::CanonicalLabels(), and OBAtom::IsChiral().
OBTetrahedralStereo* GetTetrahedralStereo | ( | unsigned long | atomId ) |
Get the OBTetrahedralStereo object with atomId
as center. This function returns 0 if there is no OBTetrahedralStereo object found with the specified center.
Referenced by OpenBabel::CanonicalLabels(), and OBSmartsMatcher::match().
unsigned int NumCisTransStereo | ( | ) |
Get the number of cis/trans stereocenters.
bool HasCisTransStereo | ( | unsigned long | bondId ) |
Check if bond with id
is a stereogenic cis/trans double bond.
id
has cis/trans stereochemistry. Referenced by OpenBabel::CanonicalLabels().
OBCisTransStereo* GetCisTransStereo | ( | unsigned long | bondId ) |
Get the OBTetrahedralStereo object with bondId
as double bond. This function returns 0 if there is no OBCisTransStereo object found with the specified bond.
Referenced by OpenBabel::CanonicalLabels().
unsigned int NumSquarePlanarStereo | ( | ) |
Get the number of square-planar stereocenters.
bool HasSquarePlanarStereo | ( | unsigned long | atomId ) |
Check if atom with id
is a stereogenic square-planar atom.
id
has square-planar stereochemistry. OBSquarePlanarStereo* GetSquarePlanarStereo | ( | unsigned long | atomId ) |
Get the OBSquarePlanarStereo object with atomId
as center. This function returns 0 if there is no OBSquarePlanarStereo object found with the specified center.
bool HasStereo | ( | unsigned long | id ) |
T* GetStereo | ( | unsigned long | id ) |