Open Babel: OBStereoFacade Class Reference

Public Member Functions

# OBStereoFacade Class Reference
[Stereochemistry]

Facade to simplify retrieval of OBStereoBase derived objects. More...

`#include <openbabel/stereo/stereo.h>`

List of all members.

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

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

unsigned int NumTetrahedralStereo | ( | ) |

Get the number of tetrahedral stereocenters.

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

Returns:
  True if the bond with `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.

Returns:
  True if the atom with `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 ) |

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

- stereo.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines