14#ifndef RD_CHIRALITY_20AUG2008_H
15#define RD_CHIRALITY_20AUG2008_H
18#include <boost/dynamic_bitset.hpp>
119 static const unsigned NOATOM =
120 std::numeric_limits<unsigned>::max();
126 unsigned centeredOn = NOATOM;
128 unsigned permutation = 0;
221 bool wedgeTwoBondsIfPossible =
258 throw std::runtime_error(
259 "BondDir is not stored/used in Chiral type WedgInfos");
285 const std::map<
int, std::unique_ptr<RDKit::Chirality::WedgeInfoBase>>
293 const std::map<
int, std::unique_ptr<RDKit::Chirality::WedgeInfoBase>>
352 const std::map<
int, std::unique_ptr<RDKit::Chirality::WedgeInfoBase>>
358 const std::map<
int, std::unique_ptr<RDKit::Chirality::WedgeInfoBase>>
The class for representing atoms.
class for representing a bond
BondDir
the bond's direction (for chirality)
BondStereo
the nature of the bond's stereochem (for cis/trans)
WedgeInfoType getType() const override
WedgeInfoAtropisomer(int bondId, RDKit::Bond::BondDir dirInit)
Bond::BondDir getDir() const override
WedgeInfoBase(int idxInit)
virtual Bond::BondDir getDir() const =0
virtual WedgeInfoType getType() const =0
Bond::BondDir getDir() const override
WedgeInfoChiral(int atomId)
WedgeInfoType getType() const override
#define RDKIT_GRAPHMOL_EXPORT
RDKIT_GRAPHMOL_EXPORT std::pair< bool, INT_VECT > countChiralNbrs(const ROMol &mol, int noNbrs)
RDKIT_GRAPHMOL_EXPORT int pickBondToWedge(const Atom *atom, const ROMol &mol, const INT_VECT &nChiralNbrs, const std::map< int, std::unique_ptr< RDKit::Chirality::WedgeInfoBase > > &resSoFar, int noNbrs)
RDKIT_GRAPHMOL_EXPORT Bond::BondDir determineBondWedgeState(const Bond *bond, unsigned int fromAtomIdx, const Conformer *conf)
RDKIT_GRAPHMOL_EXPORT void setStereoForBond(ROMol &mol, Bond *bond, Bond::BondStereo stereo)
RDKIT_GRAPHMOL_EXPORT bool getUseLegacyStereoPerception()
RDKIT_GRAPHMOL_EXPORT int isTrigonalBipyramidalAxialAtom(const Atom *center, const Atom *qry)
RDKIT_GRAPHMOL_EXPORT bool getAllowNontetrahedralChirality()
RDKIT_GRAPHMOL_EXPORT void wedgeMolBonds(ROMol &mol, const Conformer *conf=nullptr, const BondWedgingParameters *params=nullptr)
RDKIT_GRAPHMOL_EXPORT Atom * getTrigonalBipyramidalAxialAtom(const Atom *center, int which=0)
RDKIT_GRAPHMOL_EXPORT void invertMolBlockWedgingInfo(ROMol &mol)
Invert bond wedging information read from a mol block (if present).
RDKIT_GRAPHMOL_EXPORT void setUseLegacyStereoPerception(bool val)
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)
RDKIT_GRAPHMOL_EXPORT void simplifyEnhancedStereo(ROMol &mol, bool removeAffectedStereoGroups=true)
RDKIT_GRAPHMOL_EXPORT bool shouldBeACrossedBond(const Bond *bond)
Returns true for double bonds which should be shown as a crossed bonds.
constexpr unsigned int minRingSizeForDoubleBondStereo
double bond stereo will be ignored/removed for rings smaller than this:
constexpr bool useLegacyStereoDefaultVal
RDKIT_GRAPHMOL_EXPORT void reapplyMolBlockWedging(ROMol &mol, bool allBondTypes=true)
Clears existing bond wedging and forces use of atom wedging from MolBlock.
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 Atom * getChiralAcrossAtom(const Atom *center, const Bond *qry)
RDKIT_GRAPHMOL_EXPORT void setAllowNontetrahedralChirality(bool val)
RDKIT_GRAPHMOL_EXPORT Bond * getTrigonalBipyramidalAxialBond(const Atom *center, int which=0)
constexpr auto nonTetrahedralStereoEnvVar
RDKIT_GRAPHMOL_EXPORT void removeNonExplicit3DChirality(ROMol &mol)
constexpr auto useLegacyStereoEnvVar
RDKIT_GRAPHMOL_EXPORT bool useLegacyStereoPerception
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &oss, const StereoSpecified &s)
RDKIT_GRAPHMOL_EXPORT void wedgeBond(Bond *bond, unsigned int fromAtomIdx, const Conformer *conf)
RDKIT_GRAPHMOL_EXPORT std::map< int, std::unique_ptr< Chirality::WedgeInfoBase > > pickBondsToWedge(const ROMol &mol, const BondWedgingParameters *params=nullptr)
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 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 unsigned int getChiralPermutation(const Atom *center, const INT_LIST &probe)
RDKIT_GRAPHMOL_EXPORT bool hasNonTetrahedralStereo(const Atom *center)
RDKIT_GRAPHMOL_EXPORT int isTrigonalBipyramidalAxialBond(const Atom *center, const Bond *qry)
@ Atom_TrigonalBipyramidal
RDKIT_GRAPHMOL_EXPORT double getIdealAngleBetweenLigands(const Atom *center, const Atom *lig1, const Atom *lig2)
RDKIT_GRAPHMOL_EXPORT void cleanupStereoGroups(ROMol &mol)
removes atoms without specified chirality from stereo groups
RDKIT_GRAPHMOL_EXPORT Bond * getChiralAcrossBond(const Atom *center, const Bond *qry)
constexpr bool nonTetrahedralStereoDefaultVal
whether or not nontetrahedral stereo is perceived by default
RDKIT_GRAPHMOL_EXPORT void clearMolBlockWedgingInfo(ROMol &mol)
Remove MolBlock bond wedging information from molecule.
RDKIT_GRAPHMOL_EXPORT INT_VECT findStereoAtoms(const Bond *bond)
RDKIT_GRAPHMOL_EXPORT void assignLegacyCIPLabels(ROMol &mol, bool flagPossibleStereoCenters=false)
calls the approximate legacy code for assigning CIP labels
@ WedgeInfoTypeAtropisomer
std::list< int > INT_LIST
std::vector< int > INT_VECT
bool rdvalue_is(const RDValue_cast_t)
std::vector< UINT > UINT_VECT
static const unsigned NOATOM
std::vector< unsigned > controllingAtoms
StereoSpecified specified
StereoDescriptor descriptor
bool operator!=(const StereoInfo &other) const
bool operator==(const StereoInfo &other) const