|
Open Babel
3.0
|
#include <openbabel/stereo/cistrans.h>
Public Member Functions | |
| Config () | |
| Config (unsigned long _begin, unsigned long _end, const OBStereo::Refs &_refs, OBStereo::Shape _shape=OBStereo::ShapeU) | |
| bool | operator== (const Config &other) const |
| bool | operator!= (const Config &other) const |
Public Attributes | |
Data members defining stereochemistry. | |
| unsigned long | begin |
| unsigned long | end |
| OBStereo::Refs | refs |
| OBStereo::Shape | shape |
| bool | specified |
Stereochemical configuration for double-bond cis/trans stereochemistry.
The config struct represents the stereochemistry in a well defined way. For cis/trans stereo bonds, the following data members define the spacial arrengement of the atoms.
begin: The begin atom for the double bond.end: The end atom for the double bond.refs: The 4 atoms connected to the double bond.shape: The shape formed by the refs by connecting them in the same order as they occur in refs.
Only begin and end are specific for OBCisTransStereo::Config. The other data members occur in all OBTetraPlanarStereo derived classes.
|
inline |
Default constructor. Initializes begin and end to OBStereo::NoRef and shape to OBStereo::ShapeU.
|
inline |
Constructor with all parameters.
| _begin | The double bond begin atom id. |
| _end | The double bond end atom id. |
| _refs | The 4 reference ids. |
| _shape | The shape for the 4 reference ids. |
| bool operator== | ( | const Config & | other | ) | const |
Equal to operator. Comparing OBCisTransStereo::Config structs is done using the information stored in the struct's data members (i.e. begin, end, refs and shape).
There are a number of cases resuling in false being returned:
begin and end don't match (is checked using the 2 combinations)refs don't share a single common element)In the simplest case where both refs contain exactly the same elements (OBStereo::ContainsSameRefs()), coould include OBStereo::ImplicitRef), both Config struct are normalized to OBStereo::ShapeU starting with the same element. After this normalization, there are two possible orientations to overlay the shape on the double bond. From the illustration below, it can be seen only refs[2] has to be checked in order to conclude both Config structs have the same stereochemistry.
1 4 1 4 1------4
\ / | | |
C==C | | |
/ \ | | |
2 3 2------3 2------3
1 2 3 4 1 2 3 4
| | | | <- in any case, refs[0] & refs[2] remain unchanged
1 2 3 4 1 4 3 2
When comparing a Config struct with explicit hydrogen(s) to one with implicit hydrogen(s), both refs are also normalized to OBStereo::ShapeU starting with the same common element. This shared element cannot be OBStereo::ImplicitRef. Depending on the position of the OBStereo::ImplicitRef element(s) in the refs, 3 cases are possible:
refs[2] != OBStereo::ImplicitId: (analog to the case above where they contained the same elements ) 1 2 3 4 | | <- refs[0] & refs[2] remain unchanged 1 H 3 H else: 1 2 3 4 | | <- refs[0] & refs[3] remain unchanged 1 H H 4 1 2 3 4 | | <- refs[0] & refs[1] remain unchanged 1 2 H H
In each case, the orientation of the U shape is also defined since there can be only one OBStereo::ImplicitRef for each side of the double bond.
|
inline |
Not equal to operator. This is the inverse of the Equal to operator==.
| unsigned long begin |
| unsigned long end |
| OBStereo::Refs refs |
| OBStereo::Shape shape |
The shape of the 4 reference ids.
Referenced by OBCisTransConfig::Convert().
| bool specified |
True if the stereochemistry is specified. When false, the described special orientation is only accidental (i.e. unspecified).
Referenced by OpenBabel::CanonicalLabels(), OBCisTransConfig::Convert(), OBMol::CopySubstructure(), OBBuilder::CorrectStereoBonds(), OBDepict::DrawMolecule(), OpenBabel::findMetalloceneBonds(), and OpenBabel::intToStr().
1.8.13