RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::Chirality Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  BondWedgingParameters
 
struct  StereoInfo
 

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
}
 
enum class  StereoSpecified { Unspecified , Specified , Unknown }
 

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 std::vector< StereoInfofindPotentialStereo (ROMol &mol, bool cleanIt, bool flagPossible=true)
 identifies potential stereoatoms and stereobonds in a molecule
 
RDKIT_GRAPHMOL_EXPORT std::vector< StereoInfofindPotentialStereo (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 INT_MAP_INT pickBondsToWedge (const ROMol &mol, const BondWedgingParameters *params=nullptr)
 
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 canBeStereoBond (const Bond *bond)
 Returns whether or not a bond is a candidate for bond stereo.
 
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)
 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).
 
Non-tetrahedral stereochemistry
RDKIT_GRAPHMOL_EXPORT bool hasNonTetrahedralStereo (const Atom *center)
 
RDKIT_GRAPHMOL_EXPORT BondgetChiralAcrossBond (const Atom *center, const Bond *qry)
 
RDKIT_GRAPHMOL_EXPORT BondgetChiralAcrossBond (const Atom *center, const Atom *qry)
 
RDKIT_GRAPHMOL_EXPORT AtomgetChiralAcrossAtom (const Atom *center, const Bond *qry)
 
RDKIT_GRAPHMOL_EXPORT AtomgetChiralAcrossAtom (const Atom *center, const Atom *qry)
 
RDKIT_GRAPHMOL_EXPORT BondgetTrigonalBipyramidalAxialBond (const Atom *center, int which=0)
 
RDKIT_GRAPHMOL_EXPORT AtomgetTrigonalBipyramidalAxialAtom (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 getChiralPermutation (const Atom *center, const INT_LIST &probe)
 

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

Enumerator
None 
Tet_CW 
Tet_CCW 
Bond_Cis 
Bond_Trans 

Definition at line 104 of file Chirality.h.

◆ StereoSpecified

Enumerator
Unspecified 
Specified 
Unknown 

Definition at line 106 of file Chirality.h.

◆ StereoType

Enumerator
Unspecified 
Atom_Tetrahedral 
Atom_SquarePlanar 
Atom_TrigonalBipyramidal 
Atom_Octahedral 
Bond_Double 
Bond_Cumulene_Even 
Bond_Atropisomer 

Definition at line 93 of file Chirality.h.

Function Documentation

◆ assignLegacyCIPLabels()

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

calls the approximate legacy code for assigning CIP labels

◆ canBeStereoBond()

RDKIT_GRAPHMOL_EXPORT bool RDKit::Chirality::canBeStereoBond ( const Bond bond)

Returns whether or not a bond is a candidate for bond stereo.

◆ cleanupStereoGroups()

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

removes atoms without specified chirality from stereo groups

◆ clearMolBlockWedgingInfo()

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

Remove MolBlock bond wedging information from molecule.

Parameters
molmolecule to modify

◆ findPotentialStereo() [1/2]

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

overload

◆ 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
molthe molecule to look for stereo in
cleanItremove chirality/stereo specifications from atoms/bonds that cannot be chiral/stereo

◆ findStereoAtoms()

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

◆ getAllowNontetrahedralChirality()

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

◆ getChiralAcrossAtom() [1/2]

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

◆ getChiralAcrossAtom() [2/2]

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

◆ getChiralAcrossBond() [1/2]

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

◆ getChiralAcrossBond() [2/2]

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

◆ getChiralPermutation()

RDKIT_GRAPHMOL_EXPORT unsigned int RDKit::Chirality::getChiralPermutation ( const Atom center,
const INT_LIST probe 
)

◆ getIdealAngleBetweenLigands()

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

◆ getTrigonalBipyramidalAxialAtom()

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

◆ getTrigonalBipyramidalAxialBond()

RDKIT_GRAPHMOL_EXPORT Bond * RDKit::Chirality::getTrigonalBipyramidalAxialBond ( const Atom center,
int  which = 0 
)
Parameters
whichif this is -1 then the second axial bond will be returned, otherwise the first

◆ getUseLegacyStereoPerception()

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

◆ hasNonTetrahedralStereo()

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

◆ invertMolBlockWedgingInfo()

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

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

Parameters
molmolecule to modify

◆ isTrigonalBipyramidalAxialAtom()

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

◆ 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

◆ operator<<() [1/2]

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

◆ operator<<() [2/2]

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

◆ pickBondsToWedge()

RDKIT_GRAPHMOL_EXPORT INT_MAP_INT 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

◆ reapplyMolBlockWedging()

RDKIT_GRAPHMOL_EXPORT void RDKit::Chirality::reapplyMolBlockWedging ( ROMol mol)

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

Parameters
molmolecule to have its wedges altered

◆ setAllowNontetrahedralChirality()

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

◆ setUseLegacyStereoPerception()

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

◆ shouldBeACrossedBond()

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

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

◆ wedgeBond()

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

◆ wedgeMolBonds()

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

Variable Documentation

◆ minRingSizeForDoubleBondStereo

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

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

Definition at line 30 of file Chirality.h.

◆ nonTetrahedralStereoDefaultVal

constexpr bool RDKit::Chirality::nonTetrahedralStereoDefaultVal
constexpr
Initial value:
=
true

whether or not nontetrahedral stereo is perceived by default

Definition at line 34 of file Chirality.h.

◆ nonTetrahedralStereoEnvVar

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

Definition at line 32 of file Chirality.h.

◆ useLegacyStereoDefaultVal

constexpr bool RDKit::Chirality::useLegacyStereoDefaultVal
constexpr
Initial value:
=
true

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

Definition at line 36 of file Chirality.h.

◆ useLegacyStereoEnvVar

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

Definition at line 33 of file Chirality.h.

◆ useLegacyStereoPerception

RDKIT_GRAPHMOL_EXPORT bool RDKit::Chirality::useLegacyStereoPerception
extern

Toggle usage of the legacy stereo perception code

Definition at line 51 of file Chirality.h.