Open Babel: OBCisTransStereo Class Reference

# OBCisTransStereo Class Reference

Class for handling and storing cis/trans stereochemistry. More...

`#include <cistrans.h>`

## Detailed Description

Class for handling and storing cis/trans stereochemistry.

The OBCisTransStereo class is used to represent cis/trans stereochemistry. Like all OBTetraPlanarStereo subclasses, it uses the OBStereo::Shape parameters to set/get the OBStereo::Ref values in the Config struct. However, since the orientation of the double bond matters, all methods in the "query methods" section check the bonding by actually checking the atoms in the molecule provided through OBStereoBase's constructor. If OBMol::GetAtomById(id) returns 0 for a single id, it will be considered a deleted or implicit hydrogen if the valences confirm this.

The use of OBStereo::Shape is illustarted in the image below.

     //
     // 3       6        3       6
     //  \     /         |       |
     //   0===1      =   | 0   1 |
     //  /     \         |       |
     // 4       5        4-------5
     //
     OBCisTransStereo ct;
     ct.SetCenters(0, 1);
     ct.SetRefs(OBStereo::MakeRefs(3, 4, 5, 6), OBStereo::ShapeU);

     ct.IsTrans(3, 5); // true
     ct.IsTrans(3, 4); // false
     ct.IsTrans(3, 6); // false

     ct.IsCis(3, 6); // true
     ct.IsCis(3, 4); // false
     ct.IsCis(3, 5); // false

Since:
  version 2.3

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

- cistrans.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines