RDKit: RDKit::MolStandardize::TautomerEnumerator Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Public Member Functions | List of all members
RDKit::MolStandardize::TautomerEnumerator Class Reference

`#include <Tautomer.h>`

## Public Member Functions
| TautomerEnumerator (TautomerCatalog *tautCat)
| TautomerEnumerator (const CleanupParameters &params=CleanupParameters())
| TautomerEnumerator (const TautomerEnumerator &other)
TautomerEnumerator & | operator= (const TautomerEnumerator &other)
void | setMaxTautomers (unsigned int maxTautomers)
unsigned int | getMaxTautomers ()
void | setMaxTransforms (unsigned int maxTransforms)
unsigned int | getMaxTransforms ()
void | setRemoveSp3Stereo (bool removeSp3Stereo)
bool | getRemoveSp3Stereo ()
void | setRemoveBondStereo (bool removeBondStereo)
bool | getRemoveBondStereo ()
void | setRemoveIsotopicHs (bool removeIsotopicHs)
bool | getRemoveIsotopicHs ()
void | setReassignStereo (bool reassignStereo)
bool | getReassignStereo ()
void | setCallback (TautomerEnumeratorCallback *callback)
TautomerEnumeratorCallback * | getCallback () const
TautomerEnumeratorResult | enumerate (const ROMol &mol) const
| returns a `TautomerEnumeratorResult` structure for the input molecule
std::vector< ROMOL_SPTR > | enumerate (const ROMol &mol, boost::dynamic_bitset<> *modifiedAtoms, boost::dynamic_bitset<> *modifiedBonds=nullptr) const
ROMol * | pickCanonical (const TautomerEnumeratorResult &tautRes, boost::function< int(const ROMol &mol)> scoreFunc=TautomerScoringFunctions::scoreTautomer) const
| returns the canonical tautomer from a `TautomerEnumeratorResult`
template<class Iterable, typename std::enable_if< !std::is_same< Iterable, TautomerEnumeratorResult >::value, int >::type = 0>
ROMol * | pickCanonical (const Iterable &tautomers, boost::function< int(const ROMol &mol)> scoreFunc=TautomerScoringFunctions::scoreTautomer) const
ROMol * | canonicalize (const ROMol &mol, boost::function< int(const ROMol &mol)> scoreFunc=TautomerScoringFunctions::scoreTautomer) const
| returns the canonical tautomer for a molecule
void | canonicalizeInPlace (RWMol &mol, boost::function< int(const ROMol &mol)> scoreFunc=TautomerScoringFunctions::scoreTautomer) const

## Detailed Description

Definition at line 241 of file MolStandardize/Tautomer.h.

## Constructor & Destructor Documentation

## ◆ TautomerEnumerator() [1/3]

RDKit::MolStandardize::TautomerEnumerator::TautomerEnumerator | ( | TautomerCatalog * | tautCat | ) |
| inline

Definition at line 243 of file MolStandardize/Tautomer.h.

Referenced by operator=(), and TautomerEnumerator().

## ◆ TautomerEnumerator() [2/3]

RDKit::MolStandardize::TautomerEnumerator::TautomerEnumerator | ( | const CleanupParameters & | params = CleanupParameters() | ) |

## ◆ TautomerEnumerator() [3/3]

RDKit::MolStandardize::TautomerEnumerator::TautomerEnumerator | ( | const TautomerEnumerator & | other | ) |
| inline

Definition at line 252 of file MolStandardize/Tautomer.h.

References TautomerEnumerator().

## Member Function Documentation

## ◆ canonicalize()

ROMol * RDKit::MolStandardize::TautomerEnumerator::canonicalize | ( | const ROMol & | mol,
|  | boost::function< int(const ROMol &mol)> | scoreFunc = TautomerScoringFunctions::scoreTautomer ) const

returns the canonical tautomer for a molecule

Note that the canonical tautomer is very likely not the most stable tautomer for any given conditions. The default scoring rules are designed to produce "reasonable" tautomers, but the primary concern is that the results are canonical: you always get the same canonical tautomer for a molecule regardless of what the input tautomer or atom ordering were.

The default scoring scheme is inspired by the publication: M. Sitzmann et al., “Tautomerism in Large Databases.”, JCAMD 24:521 (2010) https://doi.org/10.1007/s10822-010-9346-4

References RDKit::MolStandardize::TautomerScoringFunctions::scoreTautomer().

## ◆ canonicalizeInPlace()

void RDKit::MolStandardize::TautomerEnumerator::canonicalizeInPlace | ( | RWMol & | mol,
|  | boost::function< int(const ROMol &mol)> | scoreFunc = TautomerScoringFunctions::scoreTautomer ) const

References RDKit::MolStandardize::TautomerScoringFunctions::scoreTautomer().

## ◆ enumerate() [1/2]

TautomerEnumeratorResult RDKit::MolStandardize::TautomerEnumerator::enumerate | ( | const ROMol & | mol | ) | const

returns a `TautomerEnumeratorResult` structure for the input molecule

The enumeration rules are inspired by the publication: M. Sitzmann et al., “Tautomerism in Large Databases.”, JCAMD 24:521 (2010) https://doi.org/10.1007/s10822-010-9346-4

Parameters

  mol | the molecule to be enumerated

Note: the definitions used here are that the atoms modified during tautomerization are the atoms at the beginning and end of each tautomer transform (the H "donor" and H "acceptor" in the transform) and the bonds modified during transformation are any bonds whose order is changed during the tautomer transform (these are the bonds between the "donor" and the "acceptor")

## ◆ enumerate() [2/2]

std::vector< ROMOL_SPTR > RDKit::MolStandardize::TautomerEnumerator::enumerate | ( | const ROMol & | mol,
|  | boost::dynamic_bitset<> * | modifiedAtoms,
|  | boost::dynamic_bitset<> * | modifiedBonds = nullptr ) const

Deprecated, please use the form returning a `TautomerEnumeratorResult` instead

## ◆ getCallback()

TautomerEnumeratorCallback * RDKit::MolStandardize::TautomerEnumerator::getCallback | ( |  | ) | const
| inline

Returns
  pointer to an instance of a class derived from TautomerEnumeratorCallback. DO NOT delete the instance as ownership of the pointer is transferred to the TautomerEnumerator

Definition at line 353 of file MolStandardize/Tautomer.h.

## ◆ getMaxTautomers()

unsigned int RDKit::MolStandardize::TautomerEnumerator::getMaxTautomers | ( |  | ) |
| inline

Returns
  maximum number of tautomers to be generated

Definition at line 280 of file MolStandardize/Tautomer.h.

## ◆ getMaxTransforms()

unsigned int RDKit::MolStandardize::TautomerEnumerator::getMaxTransforms | ( |  | ) |
| inline

Returns
  maximum number of transformations to be applied

Definition at line 290 of file MolStandardize/Tautomer.h.

## ◆ getReassignStereo()

bool RDKit::MolStandardize::TautomerEnumerator::getReassignStereo | ( |  | ) |
| inline

Returns
  whether assignStereochemistry will be called on each tautomer generated by the enumerate() method

Definition at line 339 of file MolStandardize/Tautomer.h.

## ◆ getRemoveBondStereo()

bool RDKit::MolStandardize::TautomerEnumerator::getRemoveBondStereo | ( |  | ) |
| inline

Returns
  whether stereochemistry information will be removed from double bonds involved in tautomerism

Definition at line 318 of file MolStandardize/Tautomer.h.

## ◆ getRemoveIsotopicHs()

bool RDKit::MolStandardize::TautomerEnumerator::getRemoveIsotopicHs | ( |  | ) |
| inline

Returns
  whether isotpoic Hs will be removed from centers involved in tautomerism

Definition at line 328 of file MolStandardize/Tautomer.h.

## ◆ getRemoveSp3Stereo()

bool RDKit::MolStandardize::TautomerEnumerator::getRemoveSp3Stereo | ( |  | ) |
| inline

Returns
  whether stereochemistry information will be removed from sp3 atoms involved in tautomerism

Definition at line 304 of file MolStandardize/Tautomer.h.

## ◆ operator=()

TautomerEnumerator & RDKit::MolStandardize::TautomerEnumerator::operator= | ( | const TautomerEnumerator & | other | ) |
| inline

Definition at line 261 of file MolStandardize/Tautomer.h.

References TautomerEnumerator().

## ◆ pickCanonical() [1/2]

template<class Iterable, typename std::enable_if< !std::is_same< Iterable, TautomerEnumeratorResult >::value, int >::type = 0>

ROMol * RDKit::MolStandardize::TautomerEnumerator::pickCanonical | ( | const Iterable & | tautomers,
|  | boost::function< int(const ROMol &mol)> | scoreFunc = TautomerScoringFunctions::scoreTautomer ) const
| inline

returns the canonical tautomer from an iterable of possible tautomers When Iterable is TautomerEnumeratorResult we use the other non-templated overload for efficiency (TautomerEnumeratorResult already has SMILES so no need to recompute them)

Definition at line 394 of file MolStandardize/Tautomer.h.

References RDKit::MolOps::assignStereochemistry(), RDKit::MolToSmiles(), and RDKit::MolStandardize::TautomerScoringFunctions::scoreTautomer().

## ◆ pickCanonical() [2/2]

ROMol * RDKit::MolStandardize::TautomerEnumerator::pickCanonical | ( | const TautomerEnumeratorResult & | tautRes,
|  | boost::function< int(const ROMol &mol)> | scoreFunc = TautomerScoringFunctions::scoreTautomer ) const

returns the canonical tautomer from a `TautomerEnumeratorResult`

References RDKit::MolStandardize::TautomerScoringFunctions::scoreTautomer().

## ◆ setCallback()

void RDKit::MolStandardize::TautomerEnumerator::setCallback | ( | TautomerEnumeratorCallback * | callback | ) |
| inline

set this to an instance of a class derived from TautomerEnumeratorCallback where operator() is overridden. DO NOT delete the instance as ownership of the pointer is transferred to the TautomerEnumerator

Definition at line 345 of file MolStandardize/Tautomer.h.

## ◆ setMaxTautomers()

void RDKit::MolStandardize::TautomerEnumerator::setMaxTautomers | ( | unsigned int | maxTautomers | ) |
| inline

Parameters

  maxTautomers | maximum number of tautomers to be generated

Definition at line 276 of file MolStandardize/Tautomer.h.

## ◆ setMaxTransforms()

void RDKit::MolStandardize::TautomerEnumerator::setMaxTransforms | ( | unsigned int | maxTransforms | ) |
| inline

Parameters

  maxTransforms | maximum number of transformations to be applied this limit is usually hit earlier than the maxTautomers limit and leads to a more linear scaling of CPU time with increasing number of tautomeric centers (see Sitzmann et al.)

Definition at line 286 of file MolStandardize/Tautomer.h.

## ◆ setReassignStereo()

void RDKit::MolStandardize::TautomerEnumerator::setReassignStereo | ( | bool | reassignStereo | ) |
| inline

Parameters

  reassignStereo; | if set to true, assignStereochemistry will be called on each tautomer generated by the enumerate() method. This defaults to true.

Definition at line 333 of file MolStandardize/Tautomer.h.

## ◆ setRemoveBondStereo()

void RDKit::MolStandardize::TautomerEnumerator::setRemoveBondStereo | ( | bool | removeBondStereo | ) |
| inline

Parameters

  removeBondStereo; | if set to true, stereochemistry information will be removed from double bonds involved in tautomerism. This means that enols will lose their E/Z stereochemistry after going through tautomer enumeration because of the keto-enolic tautomerism. This defaults to true in RDKit and also in the workflow described by Sitzmann et al.

Definition at line 312 of file MolStandardize/Tautomer.h.

## ◆ setRemoveIsotopicHs()

void RDKit::MolStandardize::TautomerEnumerator::setRemoveIsotopicHs | ( | bool | removeIsotopicHs | ) |
| inline

Parameters

  removeIsotopicHs; | if set to true, isotopic Hs will be removed from centers involved in tautomerism.

Definition at line 322 of file MolStandardize/Tautomer.h.

## ◆ setRemoveSp3Stereo()

void RDKit::MolStandardize::TautomerEnumerator::setRemoveSp3Stereo | ( | bool | removeSp3Stereo | ) |
| inline

Parameters

  removeSp3Stereo; | if set to true, stereochemistry information will be removed from sp3 atoms involved in tautomerism. This means that S-aminoacids will lose their stereochemistry after going through tautomer enumeration because of the amido-imidol tautomerism. This defaults to true in RDKit, false in the workflow described by Sitzmann et al.

Definition at line 298 of file MolStandardize/Tautomer.h.

The documentation for this class was generated from the following file:

- MolStandardize/Tautomer.h