RDKit
Open-source cheminformatics and machine learning.
MolFileStereochem.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2023 Greg Landrum and other RDKit contributors
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 #include <RDGeneral/export.h>
11 #ifndef RD_MOL_FILE_STEREOCHEM_H
12 #define RD_MOL_FILE_STEREOCHEM_H
13 
14 #include <GraphMol/RDKitBase.h>
15 
16 namespace RDKit {
17 //! deprecated, please use MolOps::assignChiralTypesFromBondDirs instead
19  const Conformer *conf);
20 //! deprecated, please use MolOps::detectBondStereoChemistry instead
22  const Conformer *conf);
23 
24 //! \deprecated use Chirality::wedgeMolBonds instead
26 //! \deprecated use Chirality::wedgeBond instead
27 RDKIT_FILEPARSERS_EXPORT void WedgeBond(Bond *bond, unsigned int fromAtomIdx,
28  const Conformer *conf);
30  const static unsigned DBL_BOND_NO_STEREO =
31  1000; //!< neighboring double bond without stereo info
32  const static unsigned DBL_BOND_SPECIFIED_STEREO =
33  10000; //!< neighboring double bond with stereo specified
34  const static unsigned CHIRAL_ATOM =
35  100000; //!< atom with specified chirality
36  const static unsigned DIRECTION_SET =
37  1000000; //!< single bond with the direction already set
38 };
39 //! set wavy bonds around double bonds with STEREOANY stereo
40 /*!
41  \param mol molecule to be modified
42  \param clearDoubleBondFlags when this is true flags for unknown double bond
43  stereo will also be removed.
44  \param addWhenImpossible if nonzero a neighboring single bond will be made wavy
45  even if it connects to a chiral center or double bond with specified stereo.
46  one example of this would be the middle double bond in C/C=C/C=C/C=C/C (if
47  that's set to STEREOANY after constructing the molecule) Otherwise, no wavy
48  bond will be set
49 */
51  ROMol &mol, bool clearDoubleBondFlags = true,
52  unsigned addWhenImpossible = StereoBondThresholds::DBL_BOND_NO_STEREO);
53 
54 //! \deprecated use Chirality::pickBondsToWedge instead
56 //! \deprecated, please use MolOps::clearSingleBondDirFlags instead
58 //! \deprecated use Chirality::detail::determineBondWedgeState instead
60  const Bond *bond, unsigned int fromAtomIdx, const Conformer *conf);
61 //! \deprecated use Chirality::detail::determineBondWedgeState instead
63  const Bond *bond, const INT_MAP_INT &wedgeBonds, const Conformer *conf);
64 //! Clears existing bond wedging and forces use of atom wedging from MolBlock.
65 /*!
66  \param mol: molecule to have its wedges altered
67  */
69 //! Remove MolBlock bond wedging information from molecule.
70 /*!
71  \param mol: molecule to modify
72  */
74 //! Invert bond wedging information read from a mol block (if present).
75 /*!
76  \param mol: molecule to modify
77  */
79 
80 //! Set double bonds with unspecified stereo to STEREOANY and add wavy bonds to
81 /// potential stereocenters with unspecified chirality
83  int confId = -1);
84 
85 //! generate enhanced stereo groups based on the status of the chiral flag
86 /// property
87 /*
88  \param mol: molecule to be modified
89  \param zeroFlagGroupType: how to handle non-grouped stereo centers when the
90  chiral flag is set to zero
91 
92  If the chiral flag is set to a value of 1 then all specified tetrahedral
93  chiral centers which are not already in StereoGroups will be added to an
94  ABS StereoGroup.
95 
96  If the chiral flag is set to a value of 0 then all specified tetrahedral
97  chiral centers will be added to a StereoGroup of the type zeroFlagGroupType
98 
99  If there is no chiral flag set (i.e. the property is not present), the
100  molecule will not be modified.
101 
102 */
104  ROMol &mol,
105  StereoGroupType zeroFlagGroupType = StereoGroupType::STEREO_AND);
106 
107 } // namespace RDKit
108 #endif
pulls in the core RDKit functionality
class for representing a bond
Definition: Bond.h:47
BondDir
the bond's direction (for chirality)
Definition: Bond.h:83
The class for representing 2D or 3D conformation of a molecule.
Definition: Conformer.h:45
RWMol is a molecule class that is intended to be edited.
Definition: RWMol.h:32
#define RDKIT_FILEPARSERS_EXPORT
Definition: export.h:161
Std stuff.
Definition: Abbreviations.h:19
RDKIT_FILEPARSERS_EXPORT void markUnspecifiedStereoAsUnknown(ROMol &mol, int confId=-1)
RDKIT_FILEPARSERS_EXPORT void translateChiralFlagToStereoGroups(ROMol &mol, StereoGroupType zeroFlagGroupType=StereoGroupType::STEREO_AND)
RDKIT_FILEPARSERS_EXPORT void invertMolBlockWedgingInfo(ROMol &mol)
Invert bond wedging information read from a mol block (if present).
RDKIT_FILEPARSERS_EXPORT INT_MAP_INT pickBondsToWedge(const ROMol &mol)
StereoGroupType
Definition: StereoGroup.h:29
RDKIT_FILEPARSERS_EXPORT void DetectBondStereoChemistry(ROMol &mol, const Conformer *conf)
deprecated, please use MolOps::detectBondStereoChemistry instead
std::map< int, int > INT_MAP_INT
Definition: types.h:317
RDKIT_FILEPARSERS_EXPORT void clearMolBlockWedgingInfo(ROMol &mol)
Remove MolBlock bond wedging information from molecule.
RDKIT_FILEPARSERS_EXPORT void WedgeMolBonds(ROMol &mol, const Conformer *conf)
RDKIT_FILEPARSERS_EXPORT Bond::BondDir DetermineBondWedgeState(const Bond *bond, unsigned int fromAtomIdx, const Conformer *conf)
RDKIT_FILEPARSERS_EXPORT void ClearSingleBondDirFlags(ROMol &mol)
RDKIT_FILEPARSERS_EXPORT void reapplyMolBlockWedging(ROMol &mol)
Clears existing bond wedging and forces use of atom wedging from MolBlock.
RDKIT_FILEPARSERS_EXPORT void WedgeBond(Bond *bond, unsigned int fromAtomIdx, const Conformer *conf)
RDKIT_FILEPARSERS_EXPORT void DetectAtomStereoChemistry(RWMol &mol, const Conformer *conf)
deprecated, please use MolOps::assignChiralTypesFromBondDirs instead
RDKIT_FILEPARSERS_EXPORT void addWavyBondsForStereoAny(ROMol &mol, bool clearDoubleBondFlags=true, unsigned addWhenImpossible=StereoBondThresholds::DBL_BOND_NO_STEREO)
set wavy bonds around double bonds with STEREOANY stereo
static const unsigned DBL_BOND_NO_STEREO
neighboring double bond without stereo info