Open Babel  3.0
Public Member Functions | List of all members
OBStereoFacade Class Reference

#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)
 
OBTetrahedralStereoGetTetrahedralStereo (unsigned long atomId)
 
Cis/Trans stereochemistry
unsigned int NumCisTransStereo ()
 
bool HasCisTransStereo (unsigned long bondId)
 
OBCisTransStereoGetCisTransStereo (unsigned long bondId)
 
SquarePlanar stereochemistry
unsigned int NumSquarePlanarStereo ()
 
bool HasSquarePlanarStereo (unsigned long atomId)
 
OBSquarePlanarStereoGetSquarePlanarStereo (unsigned long atomId)
 

Detailed Description

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.

See also
OBStereo OBStereoBase
Since
version 2.3

Constructor & Destructor Documentation

◆ OBStereoFacade()

OBStereoFacade ( OBMol mol,
bool  perceive = true 
)
inline

Constructor with mol and perceive parameter.

Parameters
molThe molecule.
perceiveIf true, PerceiveStereo will be called if the OBMol::HasChiralityPerceived() flag is not set. (default is true)

Member Function Documentation

◆ NumTetrahedralStereo()

unsigned int NumTetrahedralStereo ( )

Get the number of tetrahedral stereocenters.

◆ HasTetrahedralStereo()

bool HasTetrahedralStereo ( unsigned long  atomId)

Check if atom with id is a tetrahedral center.

Returns
True if the atom with id has tetrahedral stereochemistry.

Referenced by OpenBabel::CanonicalLabels(), OpenBabel::findMetalloceneBonds(), and OBAtom::IsChiral().

◆ GetTetrahedralStereo()

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(), OpenBabel::findMetalloceneBonds(), and OBSmartsMatcher::match().

◆ NumCisTransStereo()

unsigned int NumCisTransStereo ( )

Get the number of cis/trans stereocenters.

◆ HasCisTransStereo()

bool HasCisTransStereo ( unsigned long  bondId)

Check if bond with id is a stereogenic cis/trans double bond.

Returns
True if the bond with id has cis/trans stereochemistry.

Referenced by OpenBabel::CanonicalLabels(), OBDepict::DrawMolecule(), OpenBabel::findMetalloceneBonds(), and OpenBabel::intToStr().

◆ GetCisTransStereo()

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(), OBDepict::DrawMolecule(), OpenBabel::findMetalloceneBonds(), and OpenBabel::intToStr().

◆ NumSquarePlanarStereo()

unsigned int NumSquarePlanarStereo ( )

Get the number of square-planar stereocenters.

◆ HasSquarePlanarStereo()

bool HasSquarePlanarStereo ( unsigned long  atomId)

Check if atom with id is a stereogenic square-planar atom.

Returns
True if the atom with id has square-planar stereochemistry.

◆ GetSquarePlanarStereo()

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.

◆ HasStereo()

bool HasStereo ( unsigned long  id)

◆ GetStereo()

T* GetStereo ( unsigned long  id)

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