RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
Loading...
Searching...
No Matches
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
#include <
GraphMol/Chirality.h
>
16
17
namespace
RDKit
{
18
//! deprecated, please use MolOps::assignChiralTypesFromBondDirs instead
19
RDKIT_FILEPARSERS_EXPORT
void
DetectAtomStereoChemistry
(
RWMol
&mol,
20
const
Conformer
*conf);
21
//! deprecated, please use MolOps::detectBondStereoChemistry instead
22
RDKIT_FILEPARSERS_EXPORT
void
DetectBondStereoChemistry
(
ROMol
&mol,
23
const
Conformer
*conf);
24
25
//! \deprecated use Chirality::wedgeMolBonds instead
26
RDKIT_FILEPARSERS_EXPORT
void
WedgeMolBonds
(
ROMol
&mol,
const
Conformer
*conf);
27
//! \deprecated use Chirality::wedgeBond instead
28
RDKIT_FILEPARSERS_EXPORT
void
WedgeBond
(
Bond
*bond,
unsigned
int
fromAtomIdx,
29
const
Conformer
*conf);
30
31
struct
RDKIT_FILEPARSERS_EXPORT
StereoBondThresholds
{
32
const
static
unsigned
DBL_BOND_NO_STEREO
=
33
1000;
//!< neighboring double bond without stereo info
34
const
static
unsigned
DBL_BOND_SPECIFIED_STEREO
=
35
10000;
//!< neighboring double bond with stereo specified
36
const
static
unsigned
CHIRAL_ATOM
=
37
100000;
//!< atom with specified chirality
38
const
static
unsigned
DIRECTION_SET
=
39
1000000;
//!< single bond with the direction already set
40
};
41
//! set wavy bonds around double bonds with STEREOANY stereo
42
/*!
43
\param mol molecule to be modified
44
\param clearDoubleBondFlags when this is true flags for unknown double bond
45
stereo will also be removed.
46
\param addWhenImpossible if nonzero a neighboring single bond will be made
47
wavy even if it connects to a chiral center or double bond with specified
48
stereo. one example of this would be the middle double bond in
49
C/C=C/C=C/C=C/C (if that's set to STEREOANY after constructing the molecule)
50
Otherwise, no wavy bond will be set
51
*/
52
RDKIT_FILEPARSERS_EXPORT
void
addWavyBondsForStereoAny
(
53
ROMol
&mol,
bool
clearDoubleBondFlags =
true
,
54
unsigned
addWhenImpossible =
StereoBondThresholds::DBL_BOND_NO_STEREO
);
55
56
//! \deprecated, please use MolOps::clearSingleBondDirFlags instead
57
RDKIT_FILEPARSERS_EXPORT
void
ClearSingleBondDirFlags
(
ROMol
&mol);
58
//! \deprecated use Chirality::detail::determineBondWedgeState instead
59
RDKIT_FILEPARSERS_EXPORT
Bond::BondDir
DetermineBondWedgeState
(
60
const
Bond
*bond,
unsigned
int
fromAtomIdx,
const
Conformer
*conf);
61
//! \deprecated use Chirality::detail::determineBondWedgeState instead
62
RDKIT_FILEPARSERS_EXPORT
Bond::BondDir
DetermineBondWedgeState
(
63
const
Bond
*bond,
64
const
std::map<
int
, std::unique_ptr<RDKit::Chirality::WedgeInfoBase>>
65
&wedgeBonds,
66
const
Conformer
*conf);
67
68
//! \deprecated use Chirality::reapplyMolBlockWedging instead
69
RDKIT_FILEPARSERS_EXPORT
void
reapplyMolBlockWedging
(
ROMol
&mol);
70
//! \deprecated use Chirality::clearMolBlockWedgingInfo instead
71
RDKIT_FILEPARSERS_EXPORT
void
clearMolBlockWedgingInfo
(
ROMol
&mol);
72
//! \deprecated use Chirality::invertMolBlockWedgingInfo instead
73
RDKIT_FILEPARSERS_EXPORT
void
invertMolBlockWedgingInfo
(
ROMol
&mol);
74
75
//! Set double bonds with unspecified stereo to STEREOANY and add wavy bonds
76
//! to
77
/// potential stereocenters with unspecified chirality
78
RDKIT_FILEPARSERS_EXPORT
void
markUnspecifiedStereoAsUnknown
(
ROMol
&mol,
79
int
confId = -1);
80
81
//! generate enhanced stereo groups based on the status of the chiral flag
82
/// property
83
/*
84
\param mol: molecule to be modified
85
\param zeroFlagGroupType: how to handle non-grouped stereo centers when the
86
chiral flag is set to zero
87
88
If the chiral flag is set to a value of 1 then all specified tetrahedral
89
chiral centers which are not already in StereoGroups will be added to an
90
ABS StereoGroup.
91
92
If the chiral flag is set to a value of 0 then all specified tetrahedral
93
chiral centers will be added to a StereoGroup of the type zeroFlagGroupType
94
95
If there is no chiral flag set (i.e. the property is not present), the
96
molecule will not be modified.
97
98
*/
99
RDKIT_FILEPARSERS_EXPORT
void
translateChiralFlagToStereoGroups
(
100
ROMol
&mol,
101
StereoGroupType
zeroFlagGroupType =
StereoGroupType::STEREO_AND
);
102
103
}
// namespace RDKit
104
#endif
Chirality.h
RDKitBase.h
pulls in the core RDKit functionality
RDKit::Bond
class for representing a bond
Definition
Bond.h:48
RDKit::Bond::BondDir
BondDir
the bond's direction (for chirality)
Definition
Bond.h:84
RDKit::Conformer
The class for representing 2D or 3D conformation of a molecule.
Definition
Conformer.h:46
RDKit::ROMol
Definition
ROMol.h:344
RDKit::RWMol
RWMol is a molecule class that is intended to be edited.
Definition
RWMol.h:32
export.h
RDKIT_FILEPARSERS_EXPORT
#define RDKIT_FILEPARSERS_EXPORT
Definition
export.h:221
RDKit
Std stuff.
Definition
Abbreviations.h:19
RDKit::markUnspecifiedStereoAsUnknown
RDKIT_FILEPARSERS_EXPORT void markUnspecifiedStereoAsUnknown(ROMol &mol, int confId=-1)
RDKit::translateChiralFlagToStereoGroups
RDKIT_FILEPARSERS_EXPORT void translateChiralFlagToStereoGroups(ROMol &mol, StereoGroupType zeroFlagGroupType=StereoGroupType::STEREO_AND)
RDKit::invertMolBlockWedgingInfo
RDKIT_FILEPARSERS_EXPORT void invertMolBlockWedgingInfo(ROMol &mol)
RDKit::StereoGroupType
StereoGroupType
Definition
StereoGroup.h:31
RDKit::StereoGroupType::STEREO_AND
@ STEREO_AND
Definition
StereoGroup.h:34
RDKit::DetectBondStereoChemistry
RDKIT_FILEPARSERS_EXPORT void DetectBondStereoChemistry(ROMol &mol, const Conformer *conf)
deprecated, please use MolOps::detectBondStereoChemistry instead
RDKit::clearMolBlockWedgingInfo
RDKIT_FILEPARSERS_EXPORT void clearMolBlockWedgingInfo(ROMol &mol)
RDKit::WedgeMolBonds
RDKIT_FILEPARSERS_EXPORT void WedgeMolBonds(ROMol &mol, const Conformer *conf)
RDKit::DetermineBondWedgeState
RDKIT_FILEPARSERS_EXPORT Bond::BondDir DetermineBondWedgeState(const Bond *bond, unsigned int fromAtomIdx, const Conformer *conf)
RDKit::ClearSingleBondDirFlags
RDKIT_FILEPARSERS_EXPORT void ClearSingleBondDirFlags(ROMol &mol)
RDKit::reapplyMolBlockWedging
RDKIT_FILEPARSERS_EXPORT void reapplyMolBlockWedging(ROMol &mol)
RDKit::WedgeBond
RDKIT_FILEPARSERS_EXPORT void WedgeBond(Bond *bond, unsigned int fromAtomIdx, const Conformer *conf)
RDKit::DetectAtomStereoChemistry
RDKIT_FILEPARSERS_EXPORT void DetectAtomStereoChemistry(RWMol &mol, const Conformer *conf)
deprecated, please use MolOps::assignChiralTypesFromBondDirs instead
RDKit::addWavyBondsForStereoAny
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
RDKit::StereoBondThresholds
Definition
MolFileStereochem.h:31
RDKit::StereoBondThresholds::DBL_BOND_NO_STEREO
static const unsigned DBL_BOND_NO_STEREO
neighboring double bond without stereo info
Definition
MolFileStereochem.h:32
RDKit::StereoBondThresholds::DIRECTION_SET
static const unsigned DIRECTION_SET
single bond with the direction already set
Definition
MolFileStereochem.h:38
RDKit::StereoBondThresholds::CHIRAL_ATOM
static const unsigned CHIRAL_ATOM
atom with specified chirality
Definition
MolFileStereochem.h:36
RDKit::StereoBondThresholds::DBL_BOND_SPECIFIED_STEREO
static const unsigned DBL_BOND_SPECIFIED_STEREO
neighboring double bond with stereo specified
Definition
MolFileStereochem.h:34
GraphMol
FileParsers
MolFileStereochem.h
Generated on
for RDKit by
1.17.0