Loading...
Searching...
No Matches
RDKit::MolStandardize::TautomerScoringFunctions Namespace Reference

## Classes

struct | SubstructTerm

## Functions

RDKIT_MOLSTANDARDIZE_EXPORT const std::vector< SubstructTerm > & | getDefaultTautomerScoreSubstructs ()
RDKIT_MOLSTANDARDIZE_EXPORT int | scoreRings (const ROMol &mol)
RDKIT_MOLSTANDARDIZE_EXPORT int | scoreSubstructs (const ROMol &mol, const std::vector< SubstructTerm > &terms=getDefaultTautomerScoreSubstructs())
| scoreSubstructs scores the molecule based on the substructure definitions
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< size_t > | getRelevantSubstructTermIndices (const ROMol &mol, const std::vector< SubstructTerm > &terms=getDefaultTautomerScoreSubstructs())
RDKIT_MOLSTANDARDIZE_EXPORT int | scoreSubstructsFiltered (const ROMol &mol, const std::vector< SubstructTerm > &terms, const std::vector< size_t > &relevantIndices)
RDKIT_MOLSTANDARDIZE_EXPORT int | scoreHeteroHs (const ROMol &mol)
int | scoreTautomer (const ROMol &mol)
boost::function< int(const ROMol &)> | makeOptimizedScorer (const ROMol &mol)

## Variables

const std::string | tautomerScoringVersion = "1.0.0"

## Function Documentation

## getDefaultTautomerScoreSubstructs()

RDKIT_MOLSTANDARDIZE_EXPORT const std::vector< SubstructTerm > & RDKit::MolStandardize::TautomerScoringFunctions::getDefaultTautomerScoreSubstructs | ( |  | ) |

getDefaultTautomerSubstructs returns the SubstructTerms used in scoring tautomer forms. See SubstructTerm for details.

Referenced by makeOptimizedScorer().

## getRelevantSubstructTermIndices()

RDKIT_MOLSTANDARDIZE_EXPORT std::vector< size_t > RDKit::MolStandardize::TautomerScoringFunctions::getRelevantSubstructTermIndices | ( | const ROMol & | mol,
|  | const std::vector< SubstructTerm > & | terms = getDefaultTautomerScoreSubstructs() )

Determine which SubstructTerms are potentially relevant for a molecule. This pre-filters terms in two stages:

1. Element check: skip terms requiring elements not in the molecule
2. Connectivity check: skip terms whose bond-order-agnostic pattern doesn't match (since tautomerization doesn't create/destroy bonds) Returns indices into the terms vector for relevant terms.

References RDKIT_MOLSTANDARDIZE_EXPORT.

Referenced by makeOptimizedScorer().

## makeOptimizedScorer()

boost::function< int(const ROMol &)> RDKit::MolStandardize::TautomerScoringFunctions::makeOptimizedScorer | ( | const ROMol & | mol | ) |

inline

Create an optimized scoring function for tautomers of a specific molecule. This pre-filters SubstructTerms based on elements and connectivity present in the input molecule, avoiding unnecessary substructure searches for patterns that can never match any tautomer of this molecule. The returned function captures the filtered term indices and can be passed to pickCanonical or canonicalize.

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

References getDefaultTautomerScoreSubstructs(), getRelevantSubstructTermIndices(), scoreHeteroHs(), scoreRings(), and scoreSubstructsFiltered().

## scoreHeteroHs()

RDKIT_MOLSTANDARDIZE_EXPORT int RDKit::MolStandardize::TautomerScoringFunctions::scoreHeteroHs | ( | const ROMol & | mol | ) |

scoreHeteroHs score the molecules hydrogens This gives a negative penalty to hydrogens attached to S,P, Se and Te

Parameters

  mol | Molecule to score

Returns
  integer score for the molecule hetero hydrogens

References RDKIT_MOLSTANDARDIZE_EXPORT.

Referenced by makeOptimizedScorer(), and scoreTautomer().

## scoreRings()

RDKIT_MOLSTANDARDIZE_EXPORT int RDKit::MolStandardize::TautomerScoringFunctions::scoreRings | ( | const ROMol & | mol | ) |

Score the rings of the current tautomer Aromatic rings score 100, all carbon aromatic rings score 250

Parameters

  mol | Molcule to score

Returns
  integer score for the molecule's rings

References RDKIT_MOLSTANDARDIZE_EXPORT.

Referenced by makeOptimizedScorer(), and scoreTautomer().

## scoreSubstructs()

RDKIT_MOLSTANDARDIZE_EXPORT int RDKit::MolStandardize::TautomerScoringFunctions::scoreSubstructs | ( | const ROMol & | mol,
|  | const std::vector< SubstructTerm > & | terms = getDefaultTautomerScoreSubstructs() )

scoreSubstructs scores the molecule based on the substructure definitions

Parameters

  mol | Molecule to score
  terms | Substruct Terms used for scoring this particular tautomer form

Returns
  integer score for the molecule's substructure terms

References RDKIT_MOLSTANDARDIZE_EXPORT.

Referenced by scoreTautomer().

## scoreSubstructsFiltered()

RDKIT_MOLSTANDARDIZE_EXPORT int RDKit::MolStandardize::TautomerScoringFunctions::scoreSubstructsFiltered | ( | const ROMol & | mol,
|  | const std::vector< SubstructTerm > & | terms,
|  | const std::vector< size_t > & | relevantIndices )

Score substructures using only the terms at the specified indices. Uses specialized matchers for simple patterns (C=O, N=O, P=O, methyl, etc.) and falls back to VF2 for complex patterns. Use with getRelevantSubstructTermIndices for efficient scoring of many tautomers from the same parent molecule.

References RDKIT_MOLSTANDARDIZE_EXPORT.

Referenced by makeOptimizedScorer().

## scoreTautomer()

int RDKit::MolStandardize::TautomerScoringFunctions::scoreTautomer | ( | const ROMol & | mol | ) |

inline

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

References scoreHeteroHs(), scoreRings(), and scoreSubstructs().

Referenced by RDKit::MolStandardize::TautomerEnumerator::pickCanonical(), and RDKit::MolStandardize::TautomerEnumerator::pickCanonical().

## Variable Documentation

## tautomerScoringVersion

const std::string RDKit::MolStandardize::TautomerScoringFunctions::tautomerScoringVersion = "1.0.0"

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