OBStereoBase Class Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes
OBStereoBase Class Reference
Stereochemistry

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

Inheritance diagram for OBStereoBase:
[legend]

List of all members.

## Public Member Functions
| OBStereoBase (OBMol *mol)
virtual | ~OBStereoBase ()
virtual OBGenericData * | Clone (OBBase *) const
void | SetAttribute (const std::string &v)
void | SetOrigin (const DataOrigin s)
virtual const std::string & | GetAttribute () const
unsigned int | GetDataType () const
virtual const std::string & | GetValue () const
virtual DataOrigin | GetOrigin () const
Geniric (for all OBStereo::Type) stereochemistry
OBMol * | GetMolecule () const
virtual OBStereo::Type | GetType () const =0
void | SetSpecified (bool specified)
bool | IsSpecified () const
## Protected Attributes
std::string | _attr
unsigned int | _type
DataOrigin | _source

## Detailed Description

Base class for all stereochemistry classes.

All stereochemistry classes are derived from OBStereoBase. This class inherits from OBGenericData which allows the objects to be stored in the molecule. The attribute (OBGenericData::GetAttribute) is set to "StereoData" and the data type is OBGenericDataType::StereoData. The pure virtual OBStereoBase::GetType function must be implemented by derived classes to return a type defined in OBStereo::Type.

Use the OBStereoFacade for easy access to the derived classes.

OBStereoBase keeps track of the OBMol object. This must always be a valid (not 0 or deleted) pointer and can only be set using the constructor. Subclasses can use this to get more information on bonding for example. Finally, OBStereoBase also keeps track of the specified flag. By default, this is always set to true.

See also:
  OBStereo OBStereoFacade

Since:
  version 2.3

## Constructor & Destructor Documentation

OBStereoBase | ( | OBMol * | mol | ) | `[inline]`

Constructor. By default, the stereochemistry is specified. Use SetSpecified(false) for unspecified/unknown stereochemistry.

Parameters:

  mol | The molecule.

virtual ~OBStereoBase | ( |  | ) | `[inline, virtual]`

Destructor.

## Member Function Documentation

OBMol* GetMolecule | ( |  | ) | const`[inline]`

Get the molecule. This can be used by subclasses when more information is needed (e.g. OBCisTransStereo::GetCisRef, ...).

virtual OBStereo::Type GetType | ( |  | ) | const`[pure virtual]`

Reimplemented by subclasses to return the type defined in OBStereo::Type.

Implemented in OBCisTransStereo, OBTetrahedralStereo, and OBSquarePlanarStereo.

void SetSpecified | ( | bool | specified | ) | `[inline]`

Set whether the stereochemistry is specified. Comparing a specified OBStereoBase derived class (or it's Config struct) with an unspecified one, always returns true.

bool IsSpecified | ( |  | ) | const`[inline]`

Returns:
  True if the stereochemistry is specified.

virtual OBGenericData* Clone | ( | OBBase * |  | ) | const`[inline, virtual, inherited]`

Reimplemented in OBMatrixData, OBVectorData, OBRotationData, OBElectronicTransitionData, OBOrbitalData, OBDOSData, OBVibrationData, OBSerialNums, OBChiralData, OBAngleData, OBTorsionData, OBSymmetryData, OBConformerData, OBUnitCell, OBCisTransStereo, OBRingData, OBTetrahedralStereo, OBVirtualBond, OBSquarePlanarStereo, OBSetData, OBNasaThermoData, OBPairData, OBExternalBondData, OBRotamerList, AliasData, OBCommentData, OBAtomClassData, and OBRateData.

Referenced by OBBase::CloneData(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), and OBMol::operator=().

void SetAttribute | ( | const std::string & | v | ) | `[inline, inherited]`

Set the attribute (key), which can be used to retrieve this data.

Referenced by OBGastChrg::AssignPartialCharges(), OBMol::DoTransformations(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBForceField::GetAtomTypes(), OBMol::GetFormula(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

void SetOrigin | ( | const DataOrigin | s | ) | `[inline, inherited]`

Set the origin of this data, which can be used to filter the data.

Referenced by OBGastChrg::AssignPartialCharges(), OpenBabel::CalcSignedVolume(), OBMol::DoTransformations(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(), OBMol::GetLSSR(), OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

virtual const std::string& GetAttribute | ( |  | ) | const`[inline, virtual, inherited]`

Returns:
  The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

unsigned int GetDataType | ( |  | ) | const`[inline, inherited]`

Returns:
  the data type for this object as defined in OBGenericDataType

virtual const std::string& GetValue | ( |  | ) | const`[inline, virtual, inherited]`

Base class returns a default value (the attribute type) but should never be called.

Reimplemented in OBPairData, and OBCommentData.

Referenced by OBDepict::DrawMolecule(), OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().

virtual DataOrigin GetOrigin | ( |  | ) | const`[inline, virtual, inherited]`

## Member Data Documentation

std::string _attr`[protected, inherited]`

attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type`[protected, inherited]`

attribute type -- declared for each subclass

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

DataOrigin _source`[protected, inherited]`

source of data for accounting

Referenced by OBConformerData::operator=(), OBSymmetryData::operator=(), OBTorsionData::operator=(), OBAngleData::operator=(), and OBChiralData::operator=().

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

- stereo.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines