Loading...
Searching...
No Matches
OBStereoFacade Class Reference
Stereochemistry

`#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 ()
std::vector< OBTetrahedralStereo * > | GetAllTetrahedralStereo ()
bool | HasTetrahedralStereo (unsigned long atomId)
OBTetrahedralStereo * | GetTetrahedralStereo (unsigned long atomId)
Cis/Trans stereochemistry
unsigned int | NumCisTransStereo ()
std::vector< OBCisTransStereo * > | GetAllCisTransStereo ()
bool | HasCisTransStereo (unsigned long bondId)
OBCisTransStereo * | GetCisTransStereo (unsigned long bondId)
SquarePlanar stereochemistry
unsigned int | NumSquarePlanarStereo ()
std::vector< OBSquarePlanarStereo * > | GetAllSquarePlanarStereo ()
bool | HasSquarePlanarStereo (unsigned long atomId)
OBSquarePlanarStereo * | GetSquarePlanarStereo (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

  mol | The molecule.
  perceive | If 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.

## GetAllTetrahedralStereo()

std::vector< OBTetrahedralStereo * > GetAllTetrahedralStereo | ( |  | ) |

Get all the OBTetrahedralStereo objects.

## 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(), OBBuilder::GetNewBondVector(), 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(), and OBSmartsMatcher::match().

## NumCisTransStereo()

unsigned int NumCisTransStereo | ( |  | ) |

Get the number of cis/trans stereocenters.

## GetAllCisTransStereo()

std::vector< OBCisTransStereo * > GetAllCisTransStereo | ( |  | ) |

Get all the OBCisTransStereo objects.

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

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

## NumSquarePlanarStereo()

unsigned int NumSquarePlanarStereo | ( |  | ) |

Get the number of square-planar stereocenters.

## GetAllSquarePlanarStereo()

std::vector< OBSquarePlanarStereo * > GetAllSquarePlanarStereo | ( |  | ) |

Get all the OBSquarePlanarStereo objects.

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

Referenced by OBBuilder::GetNewBondVector().

## 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()

template<int StereoType>

bool HasStereo | ( | unsigned long | id | ) |

## GetStereo()

template<typename T>

T * GetStereo | ( | unsigned long | id | ) |

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

- stereo.h