Loading...
Searching...
No Matches
OBStereoBase Class Referenceabstract
Stereochemistry

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

Inheritance diagram for OBStereoBase:
[legend]

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

## Protected Attributes

std::string | _attr
unsigned int | _type
DataOrigin | _source

## Geniric (for all OBStereo::Type) stereochemistry

OBMol * | GetMolecule () const
virtual OBStereo::Type | GetType () const =0
void | SetSpecified (bool specified)
bool | IsSpecified () const

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

OBStereoBase | ( | OBMol * | mol | ) |

inline

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

Parameters

  mol | The molecule.

## ~OBStereoBase()

virtual ~OBStereoBase | ( |  | ) |

inline virtual

Destructor.

## Member Function Documentation

## GetMolecule()

OBMol * GetMolecule | ( |  | ) | const

inline

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

## GetType()

virtual OBStereo::Type GetType | ( |  | ) | const

pure virtual

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

Implemented in OBCisTransStereo, OBSquarePlanarStereo, and OBTetrahedralStereo.

Referenced by OBMol::CopySubstructure().

## SetSpecified()

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.

## IsSpecified()

bool IsSpecified | ( |  | ) | const

inline

Returns
  True if the stereochemistry is specified.

## Clone()

virtual OBGenericData * Clone | ( | OBBase * |  | ) | const

inline virtual inherited

Reimplemented in AliasData, OBAngleData, OBCisTransStereo, OBCommentData, OBConformerData, OBDOSData, OBElectronicTransitionData, OBExternalBondData, OBMatrixData, OBNasaThermoData, OBOrbitalData, OBPairData, OBPairTemplate< ValueT >, OBPairTemplate< bool >, OBPairTemplate< double >, OBPairTemplate< int >, OBRateData, OBRingData, OBRotamerList, OBRotationData, OBSerialNums, OBSetData, OBSquarePlanarStereo, OBSymmetryData, OBTetrahedralStereo, OBTorsionData, OBUnitCell, OBVectorData, OBVibrationData, and OBVirtualBond.

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

## SetAttribute()

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(), AliasData::Expand(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBForceField::GetAtomTypes(), OBMol::GetFormula(), OBMol::GetLSSR(), OBForceField::GetPartialCharges(), OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

## SetOrigin()

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(), OBMol::DoTransformations(), OBMol::FindAngles(), OBMol::FindLSSR(), OBMol::FindSSSR(), OBMol::FindTorsions(), OBMol::GetFormula(), OBMol::GetLSSR(), OBMol::GetSSSR(), OBDescriptor::PredictAndSave(), and OBMol::SetFormula().

## GetAttribute()

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

## GetDataType()

unsigned int GetDataType | ( |  | ) | const

inline inherited

Returns
  the data type for this object as defined in OBGenericDataType

## GetValue()

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 OBCommentData, and OBPairData.

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

## GetOrigin()

virtual DataOrigin GetOrigin | ( |  | ) | const

inline virtual inherited

## Member Data Documentation

## _attr

std::string _attr

protected inherited

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

Referenced by OBRotamerList::Clone(), GetAttribute(), GetValue(), OBGenericData(), OBNasaThermoData::OBNasaThermoData(), OBRotamerList::OBRotamerList(), OBSymmetryData::OBSymmetryData(), and SetAttribute().

## _type

unsigned int _type

protected inherited

attribute type – declared for each subclass

Referenced by OBRotamerList::Clone(), GetDataType(), OBGenericData(), OBNasaThermoData::OBNasaThermoData(), OBRotamerList::OBRotamerList(), and OBSymmetryData::OBSymmetryData().

## _source

DataOrigin _source

protected inherited

source of data for accounting

Referenced by GetOrigin(), OBGenericData(), OBSymmetryData::OBSymmetryData(), OBAngleData::operator=(), OBConformerData::operator=(), OBSymmetryData::operator=(), OBTorsionData::operator=(), and SetOrigin().

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

- stereo.h