RDKit: RDKit::Chirality Namespace Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions | Variables
RDKit::Chirality Namespace Reference

## Namespaces
namespace | detail

## Classes
struct | BondWedgingParameters
struct | StereoInfo
class | WedgeInfoAtropisomer
class | WedgeInfoBase
class | WedgeInfoChiral

## Enumerations
enum class | StereoType { Unspecified , Atom_Tetrahedral , Atom_SquarePlanar , Atom_TrigonalBipyramidal , Atom_Octahedral , Bond_Double , Bond_Cumulene_Even , Bond_Atropisomer }
enum class | StereoDescriptor { None , Tet_CW , Tet_CCW , Bond_Cis , Bond_Trans , Bond_AtropCW , Bond_AtropCCW }
enum class | StereoSpecified { Unspecified , Specified , Unknown }
enum class | WedgeInfoType { WedgeInfoTypeChiral , WedgeInfoTypeAtropisomer }

## Functions
RDKIT_GRAPHMOL_EXPORT void | setAllowNontetrahedralChirality (bool val)
RDKIT_GRAPHMOL_EXPORT bool | getAllowNontetrahedralChirality ()
RDKIT_GRAPHMOL_EXPORT void | setUseLegacyStereoPerception (bool val)
RDKIT_GRAPHMOL_EXPORT bool | getUseLegacyStereoPerception ()
RDKIT_GRAPHMOL_EXPORT void | removeNonExplicit3DChirality (ROMol &mol)
RDKIT_GRAPHMOL_EXPORT std::vector< StereoInfo > | findPotentialStereo (ROMol &mol, bool cleanIt, bool flagPossible=true)
| identifies potential stereoatoms and stereobonds in a molecule
RDKIT_GRAPHMOL_EXPORT std::vector< StereoInfo > | findPotentialStereo (const ROMol &mol)
| overload
RDKIT_GRAPHMOL_EXPORT void | cleanupStereoGroups (ROMol &mol)
| removes atoms without specified chirality from stereo groups
RDKIT_GRAPHMOL_EXPORT void | assignLegacyCIPLabels (ROMol &mol, bool flagPossibleStereoCenters=false)
| calls the approximate legacy code for assigning CIP labels
RDKIT_GRAPHMOL_EXPORT INT_VECT | findStereoAtoms (const Bond *bond)
RDKIT_GRAPHMOL_EXPORT std::ostream & | operator<< (std::ostream &oss, const StereoSpecified &s)
RDKIT_GRAPHMOL_EXPORT std::ostream & | operator<< (std::ostream &oss, const StereoType &s)
RDKIT_GRAPHMOL_EXPORT std::map< int, std::unique_ptr< Chirality::WedgeInfoBase > > | pickBondsToWedge (const ROMol &mol, const BondWedgingParameters *params=nullptr)
RDKIT_GRAPHMOL_EXPORT std::map< int, std::unique_ptr< Chirality::WedgeInfoBase > > | pickBondsToWedge (const ROMol &mol, const BondWedgingParameters *params, const Conformer *conf)
RDKIT_GRAPHMOL_EXPORT void | wedgeMolBonds (ROMol &mol, const Conformer *conf=nullptr, const BondWedgingParameters *params=nullptr)
RDKIT_GRAPHMOL_EXPORT void | wedgeBond (Bond *bond, unsigned int fromAtomIdx, const Conformer *conf)
RDKIT_GRAPHMOL_EXPORT bool | shouldBeACrossedBond (const Bond *bond)
| Returns true for double bonds which should be shown as a crossed bonds.
RDKIT_GRAPHMOL_EXPORT void | reapplyMolBlockWedging (ROMol &mol, bool allBondTypes=true, bool verify=false)
| Clears existing bond wedging and forces use of atom wedging from MolBlock.
RDKIT_GRAPHMOL_EXPORT void | clearMolBlockWedgingInfo (ROMol &mol)
| Remove MolBlock bond wedging information from molecule.
RDKIT_GRAPHMOL_EXPORT void | invertMolBlockWedgingInfo (ROMol &mol)
| Invert bond wedging information read from a mol block (if present).
RDKIT_GRAPHMOL_EXPORT void | GetMolFileBondStereoInfo (const Bond *bond, const std::map< int, std::unique_ptr< RDKit::Chirality::WedgeInfoBase > > &wedgeBonds, const Conformer *conf, int &dirCode, bool &reverse)
| gets stereo info for a bond
RDKIT_GRAPHMOL_EXPORT void | GetMolFileBondStereoInfo (const Bond *bond, const std::map< int, std::unique_ptr< RDKit::Chirality::WedgeInfoBase > > &wedgeBonds, const Conformer *conf, Bond::BondDir &dir, bool &reverse)
RDKIT_GRAPHMOL_EXPORT void | addStereoAnnotations (ROMol &mol, std::string absLabel="abs ({cip})", std::string orLabel="or{id}", std::string andLabel="and{id}", std::string cipLabel="({cip})", std::string bondLabel="({cip})")
| add R/S, relative stereo, and E/Z annotations to atoms and bonds
RDKIT_GRAPHMOL_EXPORT void | simplifyEnhancedStereo (ROMol &mol, bool removeAffectedStereoGroups=true)
RDKIT_GRAPHMOL_EXPORT std::vector< std::pair< unsigned int, unsigned int > > | findMesoCenters (const ROMol &mol, bool includeIsotopes=true, bool includeAtomMaps=false)
| returns the meso centers in a molecule (if any)
Non-tetrahedral stereochemistry
RDKIT_GRAPHMOL_EXPORT bool | hasNonTetrahedralStereo (const Atom *center)
RDKIT_GRAPHMOL_EXPORT Bond * | getChiralAcrossBond (const Atom *center, const Bond *qry)
RDKIT_GRAPHMOL_EXPORT Bond * | getChiralAcrossBond (const Atom *center, const Atom *qry)
RDKIT_GRAPHMOL_EXPORT Atom * | getChiralAcrossAtom (const Atom *center, const Bond *qry)
RDKIT_GRAPHMOL_EXPORT Atom * | getChiralAcrossAtom (const Atom *center, const Atom *qry)
RDKIT_GRAPHMOL_EXPORT Bond * | getTrigonalBipyramidalAxialBond (const Atom *center, int which=0)
RDKIT_GRAPHMOL_EXPORT Atom * | getTrigonalBipyramidalAxialAtom (const Atom *center, int which=0)
RDKIT_GRAPHMOL_EXPORT int | isTrigonalBipyramidalAxialBond (const Atom *center, const Bond *qry)
RDKIT_GRAPHMOL_EXPORT int | isTrigonalBipyramidalAxialAtom (const Atom *center, const Atom *qry)
RDKIT_GRAPHMOL_EXPORT double | getIdealAngleBetweenLigands (const Atom *center, const Atom *lig1, const Atom *lig2)
RDKIT_GRAPHMOL_EXPORT unsigned int | getMaxNbors (const Atom::ChiralType tag)
RDKIT_GRAPHMOL_EXPORT unsigned int | getChiralPermutation (const Atom *center, const INT_LIST &probe, bool inverse=false)

## Variables
constexpr unsigned int | minRingSizeForDoubleBondStereo = 8
| double bond stereo will be ignored/removed for rings smaller than this:
constexpr auto | nonTetrahedralStereoEnvVar = "RDK_ENABLE_NONTETRAHEDRAL_STEREO"
constexpr auto | useLegacyStereoEnvVar = "RDK_USE_LEGACY_STEREO_PERCEPTION"
constexpr bool | nonTetrahedralStereoDefaultVal
| whether or not nontetrahedral stereo is perceived by default
constexpr bool | useLegacyStereoDefaultVal
RDKIT_GRAPHMOL_EXPORT bool | useLegacyStereoPerception

## Enumeration Type Documentation

## ◆ StereoDescriptor

enum class RDKit::Chirality::StereoDescriptor
| strong

Enumerator
None |
Tet_CW |
Tet_CCW |
Bond_Cis |
Bond_Trans |
Bond_AtropCW |
Bond_AtropCCW |

Definition at line 101 of file Chirality.h.

## ◆ StereoSpecified

enum class RDKit::Chirality::StereoSpecified
| strong

Enumerator
Unspecified |
Specified |
Unknown |

Definition at line 111 of file Chirality.h.

## ◆ StereoType

enum class RDKit::Chirality::StereoType
| strong

Enumerator
Unspecified |
Atom_Tetrahedral |
Atom_SquarePlanar |
Atom_TrigonalBipyramidal |
Atom_Octahedral |
Bond_Double |
Bond_Cumulene_Even |
Bond_Atropisomer |

Definition at line 90 of file Chirality.h.

## ◆ WedgeInfoType

enum class RDKit::Chirality::WedgeInfoType
| strong

Enumerator
WedgeInfoTypeChiral |
WedgeInfoTypeAtropisomer |

Definition at line 240 of file Chirality.h.

## Function Documentation

## ◆ addStereoAnnotations()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::addStereoAnnotations | ( | ROMol & | mol,
|  | std::string | absLabel = "abs ({cip})",
|  | std::string | orLabel = "or{id}",
|  | std::string | andLabel = "and{id}",
|  | std::string | cipLabel = "({cip})",
|  | std::string | bondLabel = "({cip})" )

add R/S, relative stereo, and E/Z annotations to atoms and bonds

Parameters

  mol | molecule to modify
  absLabel | label for atoms in an ABS stereo group
  orLabel | label for atoms in an OR stereo group
  andLabel | label for atoms in an AND stereo group
  cipLabel | label for chiral atoms that aren't in a stereo group.
  bondLabel | label for CIP stereochemistry on bonds

If any label is empty, the corresponding annotations will not be added.

The labels can contain the following placeholders: {id} - the stereo group's index {cip} - the atom or bond's CIP stereochemistry

Note that CIP labels will only be added if CIP stereochemistry has been assigned to the molecule.

References RDKIT_GRAPHMOL_EXPORT.

## ◆ assignLegacyCIPLabels()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::assignLegacyCIPLabels | ( | ROMol & | mol,
|  | bool | flagPossibleStereoCenters = false )

calls the approximate legacy code for assigning CIP labels

References RDKIT_GRAPHMOL_EXPORT.

## ◆ cleanupStereoGroups()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::cleanupStereoGroups | ( | ROMol & | mol | ) |

removes atoms without specified chirality from stereo groups

References RDKIT_GRAPHMOL_EXPORT.

## ◆ clearMolBlockWedgingInfo()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::clearMolBlockWedgingInfo | ( | ROMol & | mol | ) |

Remove MolBlock bond wedging information from molecule.

Parameters

  mol | molecule to modify

References RDKIT_GRAPHMOL_EXPORT.

## ◆ findMesoCenters()

RDKIT_GRAPHMOL_EXPORT std::vector< std::pair< unsigned int, unsigned int > > RDKit::Chirality::findMesoCenters | ( | const ROMol & | mol,
|  | bool | includeIsotopes = true,
|  | bool | includeAtomMaps = false )

returns the meso centers in a molecule (if any)

Parameters

  mol | molecule to work with

## ◆ findPotentialStereo() [1/2]

RDKIT_GRAPHMOL_EXPORT std::vector< StereoInfo > RDKit::Chirality::findPotentialStereo | ( | const ROMol & | mol | ) |

overload

References RDKIT_GRAPHMOL_EXPORT.

## ◆ findPotentialStereo() [2/2]

RDKIT_GRAPHMOL_EXPORT std::vector< StereoInfo > RDKit::Chirality::findPotentialStereo | ( | ROMol & | mol,
|  | bool | cleanIt,
|  | bool | flagPossible = true )

identifies potential stereoatoms and stereobonds in a molecule

Note that this function is still somewhat experimental and the API and results may change in a future release.

Parameters

  mol | the molecule to look for stereo in
  cleanIt | remove chirality/stereo specifications from atoms/bonds that cannot be chiral/stereo

References RDKIT_GRAPHMOL_EXPORT.

## ◆ findStereoAtoms()

RDKIT_GRAPHMOL_EXPORT INT_VECT RDKit::Chirality::findStereoAtoms | ( | const Bond * | bond | ) |

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getAllowNontetrahedralChirality()

RDKIT_GRAPHMOL_EXPORT bool RDKit::Chirality::getAllowNontetrahedralChirality | ( |  | ) |
| extern

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getChiralAcrossAtom() [1/2]

RDKIT_GRAPHMOL_EXPORT Atom * RDKit::Chirality::getChiralAcrossAtom | ( | const Atom * | center,
|  | const Atom * | qry )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getChiralAcrossAtom() [2/2]

RDKIT_GRAPHMOL_EXPORT Atom * RDKit::Chirality::getChiralAcrossAtom | ( | const Atom * | center,
|  | const Bond * | qry )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getChiralAcrossBond() [1/2]

RDKIT_GRAPHMOL_EXPORT Bond * RDKit::Chirality::getChiralAcrossBond | ( | const Atom * | center,
|  | const Atom * | qry )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getChiralAcrossBond() [2/2]

RDKIT_GRAPHMOL_EXPORT Bond * RDKit::Chirality::getChiralAcrossBond | ( | const Atom * | center,
|  | const Bond * | qry )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getChiralPermutation()

RDKIT_GRAPHMOL_EXPORT unsigned int RDKit::Chirality::getChiralPermutation | ( | const Atom * | center,
|  | const INT_LIST & | probe,
|  | bool | inverse = false )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getIdealAngleBetweenLigands()

RDKIT_GRAPHMOL_EXPORT double RDKit::Chirality::getIdealAngleBetweenLigands | ( | const Atom * | center,
|  | const Atom * | lig1,
|  | const Atom * | lig2 )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getMaxNbors()

RDKIT_GRAPHMOL_EXPORT unsigned int RDKit::Chirality::getMaxNbors | ( | const Atom::ChiralType | tag | ) |

References RDKIT_GRAPHMOL_EXPORT.

## ◆ GetMolFileBondStereoInfo() [1/2]

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::GetMolFileBondStereoInfo | ( | const Bond * | bond,
|  | const std::map< int, std::unique_ptr< RDKit::Chirality::WedgeInfoBase > > & | wedgeBonds,
|  | const Conformer * | conf,
|  | Bond::BondDir & | dir,
|  | bool & | reverse )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ GetMolFileBondStereoInfo() [2/2]

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::GetMolFileBondStereoInfo | ( | const Bond * | bond,
|  | const std::map< int, std::unique_ptr< RDKit::Chirality::WedgeInfoBase > > & | wedgeBonds,
|  | const Conformer * | conf,
|  | int & | dirCode,
|  | bool & | reverse )

gets stereo info for a bond

Parameters

  bond | bond to check
  wedgeBonds | - the list of bonds to have wedges
  conf | - Conformer to use
  dirCode | - receives the dircode for the bond
  reverse | - receives the reverse flag only returned if it was exlicility set witha wiggle bond

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getTrigonalBipyramidalAxialAtom()

RDKIT_GRAPHMOL_EXPORT Atom * RDKit::Chirality::getTrigonalBipyramidalAxialAtom | ( | const Atom * | center,
|  | int | which = 0 )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getTrigonalBipyramidalAxialBond()

RDKIT_GRAPHMOL_EXPORT Bond * RDKit::Chirality::getTrigonalBipyramidalAxialBond | ( | const Atom * | center,
|  | int | which = 0 )

Parameters

  which | if this is -1 then the second axial bond will be returned, otherwise the first

References RDKIT_GRAPHMOL_EXPORT.

## ◆ getUseLegacyStereoPerception()

RDKIT_GRAPHMOL_EXPORT bool RDKit::Chirality::getUseLegacyStereoPerception | ( |  | ) |
| extern

References RDKIT_GRAPHMOL_EXPORT.

## ◆ hasNonTetrahedralStereo()

RDKIT_GRAPHMOL_EXPORT bool RDKit::Chirality::hasNonTetrahedralStereo | ( | const Atom * | center | ) |

References RDKIT_GRAPHMOL_EXPORT.

## ◆ invertMolBlockWedgingInfo()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::invertMolBlockWedgingInfo | ( | ROMol & | mol | ) |

Invert bond wedging information read from a mol block (if present).

Parameters

  mol | molecule to modify

References RDKIT_GRAPHMOL_EXPORT.

## ◆ isTrigonalBipyramidalAxialAtom()

RDKIT_GRAPHMOL_EXPORT int RDKit::Chirality::isTrigonalBipyramidalAxialAtom | ( | const Atom * | center,
|  | const Atom * | qry )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ isTrigonalBipyramidalAxialBond()

RDKIT_GRAPHMOL_EXPORT int RDKit::Chirality::isTrigonalBipyramidalAxialBond | ( | const Atom * | center,
|  | const Bond * | qry )

Returns
  1 if it's the first axial atom, -1 if it's the second

References RDKIT_GRAPHMOL_EXPORT.

## ◆ operator<<() [1/2]

RDKIT_GRAPHMOL_EXPORT std::ostream & RDKit::Chirality::operator<< | ( | std::ostream & | oss,
|  | const StereoSpecified & | s )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ operator<<() [2/2]

RDKIT_GRAPHMOL_EXPORT std::ostream & RDKit::Chirality::operator<< | ( | std::ostream & | oss,
|  | const StereoType & | s )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ pickBondsToWedge() [1/2]

RDKIT_GRAPHMOL_EXPORT std::map< int, std::unique_ptr< Chirality::WedgeInfoBase > > RDKit::Chirality::pickBondsToWedge | ( | const ROMol & | mol,
|  | const BondWedgingParameters * | params,
|  | const Conformer * | conf )

## ◆ pickBondsToWedge() [2/2]

RDKIT_GRAPHMOL_EXPORT std::map< int, std::unique_ptr< Chirality::WedgeInfoBase > > RDKit::Chirality::pickBondsToWedge | ( | const ROMol & | mol,
|  | const BondWedgingParameters * | params = nullptr )

picks the bonds which should be wedged returns a map from bond idx -> controlling atom idx

References RDKIT_GRAPHMOL_EXPORT.

## ◆ reapplyMolBlockWedging()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::reapplyMolBlockWedging | ( | ROMol & | mol,
|  | bool | allBondTypes = true,
|  | bool | verify = false )

Clears existing bond wedging and forces use of atom wedging from MolBlock.

Parameters

  mol | molecule to have its wedges altered
  allBondTypes | reapply the wedging also on bonds other than single and aromatic ones
  verify | if true, the function will check that the wedges are only applied in sensible places (i.e. single bonds connected to chiral centers or atropisomeric bonds)

References RDKIT_GRAPHMOL_EXPORT.

## ◆ removeNonExplicit3DChirality()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::removeNonExplicit3DChirality | ( | ROMol & | mol | ) |

References RDKIT_GRAPHMOL_EXPORT, and useLegacyStereoPerception.

## ◆ setAllowNontetrahedralChirality()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::setAllowNontetrahedralChirality | ( | bool | val | ) |
| extern

References RDKIT_GRAPHMOL_EXPORT.

## ◆ setUseLegacyStereoPerception()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::setUseLegacyStereoPerception | ( | bool | val | ) |
| extern

References RDKIT_GRAPHMOL_EXPORT.

## ◆ shouldBeACrossedBond()

RDKIT_GRAPHMOL_EXPORT bool RDKit::Chirality::shouldBeACrossedBond | ( | const Bond * | bond | ) |

Returns true for double bonds which should be shown as a crossed bonds.

References RDKIT_GRAPHMOL_EXPORT.

## ◆ simplifyEnhancedStereo()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::simplifyEnhancedStereo | ( | ROMol & | mol,
|  | bool | removeAffectedStereoGroups = true )

simplifies the stereochemical representation of a molecule where all specified stereocenters are in the same StereoGroup

Parameters

  mol | molecule to modify
  removeAffectedStereoGroups | if set then the affected StereoGroups will be removed

If all specified stereocenters are in the same AND or OR stereogroup, a moleculeNote property will be set on the molecule with the value "AND enantiomer" or "OR enantiomer". CIP labels, if present, are removed.

References RDKIT_GRAPHMOL_EXPORT.

## ◆ wedgeBond()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::wedgeBond | ( | Bond * | bond,
|  | unsigned int | fromAtomIdx,
|  | const Conformer * | conf )

References RDKIT_GRAPHMOL_EXPORT.

## ◆ wedgeMolBonds()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::wedgeMolBonds | ( | ROMol & | mol,
|  | const Conformer * | conf = nullptr,
|  | const BondWedgingParameters * | params = nullptr )

References RDKIT_GRAPHMOL_EXPORT.

## Variable Documentation

## ◆ minRingSizeForDoubleBondStereo

unsigned int RDKit::Chirality::minRingSizeForDoubleBondStereo = 8
| constexpr

double bond stereo will be ignored/removed for rings smaller than this:

Definition at line 31 of file Chirality.h.

## ◆ nonTetrahedralStereoDefaultVal

bool RDKit::Chirality::nonTetrahedralStereoDefaultVal
| constexpr

Initial value:
=
true

whether or not nontetrahedral stereo is perceived by default

Definition at line 35 of file Chirality.h.

## ◆ nonTetrahedralStereoEnvVar

auto RDKit::Chirality::nonTetrahedralStereoEnvVar = "RDK_ENABLE_NONTETRAHEDRAL_STEREO"
| constexpr

Definition at line 33 of file Chirality.h.

## ◆ useLegacyStereoDefaultVal

bool RDKit::Chirality::useLegacyStereoDefaultVal
| constexpr

Initial value:
=
true

whether or not the legacy stereo perception code is used by default

Definition at line 37 of file Chirality.h.

## ◆ useLegacyStereoEnvVar

auto RDKit::Chirality::useLegacyStereoEnvVar = "RDK_USE_LEGACY_STEREO_PERCEPTION"
| constexpr

Definition at line 34 of file Chirality.h.

## ◆ useLegacyStereoPerception

RDKIT_GRAPHMOL_EXPORT bool RDKit::Chirality::useLegacyStereoPerception
| extern

Toggle usage of the legacy stereo perception code

Definition at line 54 of file Chirality.h.

Referenced by removeNonExplicit3DChirality().