RDKit: RDKit::RxnOps Namespace Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Enumerations | Functions
RDKit::RxnOps Namespace Reference

## Enumerations
enum | SanitizeRxnFlags { SANITIZE_NONE = 0x0 , SANITIZE_RGROUP_NAMES = 0x1 , SANITIZE_ATOM_MAPS = 0x2 , SANITIZE_ADJUST_REACTANTS = 0x4 , SANITIZE_MERGEHS = 0x8 , SANITIZE_ADJUST_PRODUCTS = 0x10 , SANITIZE_ALL = 0xFFFFFFFF }

## Functions
RDKIT_CHEMREACTIONS_EXPORT void | fixRGroups (ChemicalReaction &rxn)
RDKIT_CHEMREACTIONS_EXPORT void | fixAtomMaps (ChemicalReaction &rxn)
RDKIT_CHEMREACTIONS_EXPORT void | adjustTemplates (const MOL_SPTR_VECT &templates, const MolOps::AdjustQueryParameters &params)
| Adjusts the reactant templates to properly match reagents.
RDKIT_CHEMREACTIONS_EXPORT void | fixHs (ChemicalReaction &rxn)
| merge query Hs if appropriate
const MolOps::AdjustQueryParameters | DefaultRxnAdjustParams ()
const MolOps::AdjustQueryParameters | ChemDrawRxnAdjustParams ()
const MolOps::AdjustQueryParameters | MatchOnlyAtRgroupsAdjustParams ()
RDKIT_CHEMREACTIONS_EXPORT void | sanitizeRxn (ChemicalReaction &rxn, unsigned int &operationsThatFailed, unsigned int sanitizeOps=SANITIZE_ALL, const MolOps::AdjustQueryParameters &params=DefaultRxnAdjustParams())
| carries out a collection of tasks for cleaning up a reaction and ensuring that it makes "chemical sense" in the context of RDKit reacitons
RDKIT_CHEMREACTIONS_EXPORT void | sanitizeRxn (ChemicalReaction &rxn, const MolOps::AdjustQueryParameters &params=DefaultRxnAdjustParams())
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
RDKIT_CHEMREACTIONS_EXPORT void | sanitizeRxnAsMols (ChemicalReaction &rxn, unsigned int sanitizeOps=MolOps::SanitizeFlags::SANITIZE_ALL)

## Enumeration Type Documentation

## ◆ SanitizeRxnFlags

enum RDKit::RxnOps::SanitizeRxnFlags

Enumerator
SANITIZE_NONE |
SANITIZE_RGROUP_NAMES |
SANITIZE_ATOM_MAPS |
SANITIZE_ADJUST_REACTANTS |
SANITIZE_MERGEHS |
SANITIZE_ADJUST_PRODUCTS |
SANITIZE_ALL |

Definition at line 115 of file SanitizeRxn.h.

## Function Documentation

## ◆ adjustTemplates()

RDKIT_CHEMREACTIONS_EXPORT void RDKit::RxnOps::adjustTemplates | ( | const MOL_SPTR_VECT & | templates,
|  | const MolOps::AdjustQueryParameters & | params )

Adjusts the reactant templates to properly match reagents.

References adjustTemplates(), and RDKIT_CHEMREACTIONS_EXPORT.

Referenced by adjustTemplates().

## ◆ ChemDrawRxnAdjustParams()

const MolOps::AdjustQueryParameters RDKit::RxnOps::ChemDrawRxnAdjustParams | ( |  | ) |
| inline

Definition at line 90 of file SanitizeRxn.h.

References RDKit::MolOps::ADJUST_IGNOREDUMMIES, RDKit::MolOps::ADJUST_IGNORENONE, RDKit::MolOps::AdjustQueryParameters::adjustDegree, RDKit::MolOps::AdjustQueryParameters::adjustDegreeFlags, RDKit::MolOps::AdjustQueryParameters::adjustRingCount, RDKit::MolOps::AdjustQueryParameters::adjustRingCountFlags, RDKit::MolOps::AdjustQueryParameters::aromatizeIfPossible, BOOST_LOG, ChemDrawRxnAdjustParams(), RDKit::MolOps::AdjustQueryParameters::makeDummiesQueries, and rdWarningLog.

Referenced by ChemDrawRxnAdjustParams().

## ◆ DefaultRxnAdjustParams()

const MolOps::AdjustQueryParameters RDKit::RxnOps::DefaultRxnAdjustParams | ( |  | ) |
| inline

Definition at line 76 of file SanitizeRxn.h.

References RDKit::MolOps::ADJUST_IGNOREALL, RDKit::MolOps::AdjustQueryParameters::adjustDegree, RDKit::MolOps::AdjustQueryParameters::adjustDegreeFlags, RDKit::MolOps::AdjustQueryParameters::adjustRingCount, RDKit::MolOps::AdjustQueryParameters::adjustRingCountFlags, RDKit::MolOps::AdjustQueryParameters::aromatizeIfPossible, DefaultRxnAdjustParams(), and RDKit::MolOps::AdjustQueryParameters::makeDummiesQueries.

Referenced by DefaultRxnAdjustParams(), sanitizeRxn(), and sanitizeRxn().

## ◆ fixAtomMaps()

RDKIT_CHEMREACTIONS_EXPORT void RDKit::RxnOps::fixAtomMaps | ( | ChemicalReaction & | rxn | ) |

If atom maps are not defined on rgroups, attempt to deduce them from the RGroup labels, or add new ones if possible.

References fixAtomMaps(), and RDKIT_CHEMREACTIONS_EXPORT.

Referenced by fixAtomMaps().

## ◆ fixHs()

RDKIT_CHEMREACTIONS_EXPORT void RDKit::RxnOps::fixHs | ( | ChemicalReaction & | rxn | ) |

merge query Hs if appropriate

References fixHs(), and RDKIT_CHEMREACTIONS_EXPORT.

Referenced by fixHs().

## ◆ fixRGroups()

RDKIT_CHEMREACTIONS_EXPORT void RDKit::RxnOps::fixRGroups | ( | ChemicalReaction & | rxn | ) |

Any dummy atom with a map but no RGroup label, should be an RGroup in RDKit's view of a reaction. See if these atoms can be salvaged into RGroups.

References fixRGroups(), and RDKIT_CHEMREACTIONS_EXPORT.

Referenced by fixRGroups().

## ◆ MatchOnlyAtRgroupsAdjustParams()

const MolOps::AdjustQueryParameters RDKit::RxnOps::MatchOnlyAtRgroupsAdjustParams | ( |  | ) |
| inline

Definition at line 104 of file SanitizeRxn.h.

References RDKit::MolOps::ADJUST_IGNOREDUMMIES, RDKit::MolOps::ADJUST_IGNORENONE, RDKit::MolOps::AdjustQueryParameters::adjustDegree, RDKit::MolOps::AdjustQueryParameters::adjustDegreeFlags, RDKit::MolOps::AdjustQueryParameters::adjustRingCount, RDKit::MolOps::AdjustQueryParameters::adjustRingCountFlags, RDKit::MolOps::AdjustQueryParameters::aromatizeIfPossible, RDKit::MolOps::AdjustQueryParameters::makeDummiesQueries, and MatchOnlyAtRgroupsAdjustParams().

Referenced by MatchOnlyAtRgroupsAdjustParams().

## ◆ sanitizeRxn() [1/2]

RDKIT_CHEMREACTIONS_EXPORT void RDKit::RxnOps::sanitizeRxn | ( | ChemicalReaction & | rxn,
|  | const MolOps::AdjustQueryParameters & | params = DefaultRxnAdjustParams() )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References DefaultRxnAdjustParams(), RDKIT_CHEMREACTIONS_EXPORT, and sanitizeRxn().

## ◆ sanitizeRxn() [2/2]

RDKIT_CHEMREACTIONS_EXPORT void RDKit::RxnOps::sanitizeRxn | ( | ChemicalReaction & | rxn,
|  | unsigned int & | operationsThatFailed,
|  | unsigned int | sanitizeOps = SANITIZE_ALL,
|  | const MolOps::AdjustQueryParameters & | params = DefaultRxnAdjustParams() )

carries out a collection of tasks for cleaning up a reaction and ensuring that it makes "chemical sense" in the context of RDKit reacitons

This functions calls the following in sequence

1. RxnOps::fixRGroups()
2. RxnOps::fixupAtomMaps()
3. RxnOps::fixupTemplateAromaticity()
4. RxnOps::mergeHs()

Parameters

  rxn | : the ChemicalReaction to be cleaned
  operationThatFailed | : the first (if any) sanitization operation that fails is set here. The values are taken from the `SanitizeFlags` enum. On success, the value is `SanitizeFlags::SANITIZE_NONE`
  sanitizeOps | : the bits here are used to set which sanitization operations are carried out. The elements of the `SanitizeFlags` enum define the operations.

Notes:

- This attempts to fix known issues with certain reaction drawers. HOWEVER, if any flag is returned in operationsPerformed, the reaction may still be suspect to its validity.
- Aromaticity can be tricky when starting with Kekule structures that have query features, aromaticity works well for non-query rings, however certain structures (substitutions on Kekule rings that should really be aromatic) may not have enough information.

References DefaultRxnAdjustParams(), RDKIT_CHEMREACTIONS_EXPORT, SANITIZE_ALL, and sanitizeRxn().

Referenced by sanitizeRxn(), and sanitizeRxn().

## ◆ sanitizeRxnAsMols()

RDKIT_CHEMREACTIONS_EXPORT void RDKit::RxnOps::sanitizeRxnAsMols | ( | ChemicalReaction & | rxn,
|  | unsigned int | sanitizeOps = MolOps::SanitizeFlags::SANITIZE_ALL )

Does the usual molecular sanitization on each reactant, agent, and product of the reaction

References RDKIT_CHEMREACTIONS_EXPORT, and sanitizeRxnAsMols().

Referenced by sanitizeRxnAsMols().