RDKit::RGroupDecompData Struct Reference

`#include <RGroupDecompData.h>`

## Classes

class | UsedLabels

## Public Member Functions

| RGroupDecompData (const RWMol &inputCore, RGroupDecompositionParameters inputParams)
| RGroupDecompData (const std::vector< ROMOL_SPTR > &inputCores, RGroupDecompositionParameters inputParams)
void | prepareCores ()
void | setRlabel (Atom *atom, int rlabel)
double | scoreFromPrunedData (const std::vector< size_t > &permutation, bool reset=true)
void | prune ()
std::vector< RGroupMatch > | GetCurrentBestPermutation () const
void | addCoreUserLabels (const RWMol &core, std::set< int > &userLabels)
void | addAtoms (RWMol &mol, const std::vector< std::pair< Atom *, Atom * >> &atomsToAdd)
void | relabelCore (RWMol &core, std::map< int, int > &mappings, UsedLabels &used_labels, const std::set< int > &indexLabels, const std::map< int, std::vector< int >> &extraAtomRLabels)
void | relabelRGroup (RGroupData &rgroup, const std::map< int, int > &mappings)
void | relabel ()
double | score (const std::vector< size_t > &permutation, FingerprintVarianceScoreData *fingerprintVarianceScoreData=nullptr) const
RGroupDecompositionProcessResult | process (bool pruneMatches, bool finalize=false)

## Public Attributes

std::map< int, RCore > | cores
std::map< std::string, int > | newCores
int | newCoreLabel = EMPTY_CORE_LABEL
size_t | permutationProduct = 1
size_t | previousMatchSize = 0
bool | prunePermutations = true
RGroupDecompositionParameters | params
std::vector< std::vector< RGroupMatch > > | matches
std::set< int > | labels
std::vector< size_t > | permutation
unsigned int | pruneLength = 0U
FingerprintVarianceScoreData | prunedFingerprintVarianceScoreData
std::map< int, std::vector< int > > | userLabels
std::vector< int > | processedRlabels
std::map< int, int > | finalRlabelMapping
RGroupScorer | rGroupScorer

## Detailed Description

Definition at line 25 of file RGroupDecompData.h.

## Constructor & Destructor Documentation

## RGroupDecompData() [1/2]

RDKit::RGroupDecompData::RGroupDecompData | ( | const RWMol & | inputCore,
|  | RGroupDecompositionParameters | inputParams
| ) |  |

inline

Definition at line 53 of file RGroupDecompData.h.

References cores, and prepareCores().

## RGroupDecompData() [2/2]

RDKit::RGroupDecompData::RGroupDecompData | ( | const std::vector< ROMOL_SPTR > & | inputCores,
|  | RGroupDecompositionParameters | inputParams
| ) |  |

inline

Definition at line 60 of file RGroupDecompData.h.

References cores, and prepareCores().

## Member Function Documentation

## addAtoms()

void RDKit::RGroupDecompData::addAtoms | ( | RWMol & | mol,
|  | const std::vector< std::pair< Atom *, Atom * >> & | atomsToAdd
| ) |  |

inline

Definition at line 244 of file RGroupDecompData.h.

References RDKit::RWMol::addAtom(), RDKit::RWMol::addBond(), RDKit::ROMol::getNumConformers(), RDKit::MolOps::setTerminalAtomCoords(), and RDKit::Bond::SINGLE.

Referenced by relabelCore(), and relabelRGroup().

## addCoreUserLabels()

void RDKit::RGroupDecompData::addCoreUserLabels | ( | const RWMol & | core,
|  | std::set< int > & | userLabels
| ) |  |

inline

Definition at line 235 of file RGroupDecompData.h.

References RDKit::getRlabels(), and userLabels.

Referenced by relabel().

## GetCurrentBestPermutation()

std::vector<RGroupMatch> RDKit::RGroupDecompData::GetCurrentBestPermutation | ( |  | ) | const

inline

Definition at line 151 of file RGroupDecompData.h.

References cores, RDKit::getRlabels(), labels, matches, params, permutation, RDKit::RGroupDecompositionParameters::removeAllHydrogenRGroups, and RDKit::RGroupDecompositionParameters::removeAllHydrogenRGroupsAndLabels.

Referenced by relabel().

## prepareCores()

void RDKit::RGroupDecompData::prepareCores | ( |  | ) |

inline

Definition at line 69 of file RGroupDecompData.h.

References CHECK_INVARIANT, cores, params, and RDKit::RGroupDecompositionParameters::prepareCore().

Referenced by RGroupDecompData().

## process()

RGroupDecompositionProcessResult RDKit::RGroupDecompData::process | ( | bool | pruneMatches,
|  | bool | finalize = `false`
| ) |  |

inline

Definition at line 530 of file RGroupDecompData.h.

References RDKit::RGroupScorer::breakTies(), RDKit::checkForTimeout(), RDKit::RGroupScorer::clearTieStore(), RDKit::Exhaustive, RDKit::FingerprintVariance, RDKit::GA, RDKit::RGroupDecompositionParameters::gaNumberRuns, RDKit::RGroupScorer::getBestPermutation(), RDKit::RGroupScorer::getBestScore(), labels, matches, RDKit::RGroupDecompositionParameters::matchingStrategy, RDKit::RGroupGa::numberPermutations(), params, permutation, previousMatchSize, prune(), RDKit::RGroupScorer::pushTieToStore(), relabel(), rGroupScorer, RDKit::RGroupGa::run(), RDKit::RGroupGa::runBatch(), score(), scoreFromPrunedData(), RDKit::RGroupDecompositionParameters::scoreMethod, RDKit::RGroupScorer::setBestPermutation(), RDKit::RGroupScorer::startProcessing(), RDKit::RGroupScorer::tieStoreSize(), and RDKit::RGroupDecompositionParameters::timeout.

## prune()

void RDKit::RGroupDecompData::prune | ( |  | ) |

inline

Definition at line 132 of file RGroupDecompData.h.

References RDKit::FingerprintVariance, RDKit::GA, matches, RDKit::RGroupDecompositionParameters::matchingStrategy, params, permutation, PRECONDITION, scoreFromPrunedData(), and RDKit::RGroupDecompositionParameters::scoreMethod.

Referenced by process().

## relabel()

void RDKit::RGroupDecompData::relabel | ( |  | ) |

inline

Definition at line 437 of file RGroupDecompData.h.

References RDKit::RGroupDecompData::UsedLabels::add(), addCoreUserLabels(), CHECK_INVARIANT, cores, finalRlabelMapping, GetCurrentBestPermutation(), RDKit::RGroupDecompositionParameters::onlyMatchAtRGroups, params, relabelCore(), relabelRGroup(), and userLabels.

Referenced by process().

## relabelCore()

void RDKit::RGroupDecompData::relabelCore | ( | RWMol & | core,
|  | std::map< int, int > & | mappings,
|  | UsedLabels & | used_labels,
|  | const std::set< int > & | indexLabels,
|  | const std::map< int, std::vector< int >> & | extraAtomRLabels
| ) |  |

inline

Definition at line 256 of file RGroupDecompData.h.

References RDKit::RGroupDecompData::UsedLabels::add(), addAtoms(), CHECK_INVARIANT, RDKit::Atom::getAtomicNum(), RDKit::Atom::getDegree(), RDKit::getRlabels(), RDKit::isAnyAtomWithMultipleNeighborsOrNotUserRLabel(), RDKit::RGroupDecompData::UsedLabels::next(), RDKit::RLABEL, RDKit::RLABEL_TYPE, setRlabel(), and RDKit::ROMol::updatePropertyCache().

Referenced by relabel().

## relabelRGroup()

void RDKit::RGroupDecompData::relabelRGroup | ( | RGroupData & | rgroup,
|  | const std::map< int, int > & | mappings
| ) |  |

inline

Definition at line 355 of file RGroupDecompData.h.

References addAtoms(), RDKit::ROMol::beginAtoms(), CHECK_INVARIANT, RDKit::RDProps::clearProp(), RDKit::RGroupData::combinedMol, RDKit::done, RDKit::ROMol::endAtoms(), RDKit::Atom::getAtomicNum(), RDKit::RDProps::getProp(), RDKit::RDProps::hasProp(), RDKit::RGroupData::labelled, RDKit::MolToSmiles(), params, PRECONDITION, RDKit::MolOps::removeHs(), RDKit::RGroupDecompositionParameters::removeHydrogensPostMatch, RDKit::RLABEL_CORE_INDEX, RDKit::Atom::setAtomicNum(), RDKit::Atom::setIsotope(), RDKit::Atom::setNoImplicit(), RDKit::RDProps::setProp(), setRlabel(), RDKit::SIDECHAIN_RLABELS, and RDKit::ROMol::updatePropertyCache().

Referenced by relabel().

## score()

double RDKit::RGroupDecompData::score | ( | const std::vector< size_t > & | permutation,
|  | FingerprintVarianceScoreData * | fingerprintVarianceScoreData = `nullptr`
| ) |  | const

inline

Definition at line 513 of file RGroupDecompData.h.

References RDKit::FingerprintVariance, RDKit::fingerprintVarianceScore(), labels, RDKit::Match, matches, RDKit::RGroupScorer::matchScore(), params, permutation, rGroupScorer, and RDKit::RGroupDecompositionParameters::scoreMethod.

Referenced by process(), and scoreFromPrunedData().

## scoreFromPrunedData()

double RDKit::RGroupDecompData::scoreFromPrunedData | ( | const std::vector< size_t > & | permutation,
|  | bool | reset = `true`
| ) |  |

inline

Definition at line 96 of file RGroupDecompData.h.

References RDKit::FingerprintVarianceScoreData::addVarianceData(), RDKit::FingerprintVarianceScoreData::clear(), RDKit::FingerprintVariance, RDKit::FingerprintVarianceScoreData::fingerprintVarianceGroupScore(), RDKit::fingerprintVarianceScore(), labels, matches, params, permutation, PRECONDITION, prunedFingerprintVarianceScoreData, pruneLength, RDKit::FingerprintVarianceScoreData::removeVarianceData(), score(), and RDKit::RGroupDecompositionParameters::scoreMethod.

Referenced by process(), and prune().

## setRlabel()

void RDKit::RGroupDecompData::setRlabel | ( | Atom * | atom,
|  | int | rlabel
| ) |  |

inline

Definition at line 79 of file RGroupDecompData.h.

References RDKit::AtomMap, RDKit::common_properties::dummyLabel, RDKit::Isotope, RDKit::MDLRGroup, params, PRECONDITION, RDKit::RGroupDecompositionParameters::rgroupLabelling, RDKit::Atom::setAtomMapNum(), RDKit::setAtomRLabel(), RDKit::Atom::setIsotope(), RDKit::RDProps::setProp(), and RDKit::CIPLabeler::to_string().

Referenced by relabelCore(), and relabelRGroup().

## Member Data Documentation

## cores

std::map<int, RCore> RDKit::RGroupDecompData::cores

Definition at line 27 of file RGroupDecompData.h.

Referenced by GetCurrentBestPermutation(), prepareCores(), relabel(), and RGroupDecompData().

## finalRlabelMapping

std::map<int, int> RDKit::RGroupDecompData::finalRlabelMapping

Definition at line 50 of file RGroupDecompData.h.

Referenced by relabel().

## labels

std::set<int> RDKit::RGroupDecompData::labels

Definition at line 42 of file RGroupDecompData.h.

Referenced by GetCurrentBestPermutation(), process(), score(), and scoreFromPrunedData().

## matches

std::vector<std::vector<RGroupMatch> > RDKit::RGroupDecompData::matches

Definition at line 41 of file RGroupDecompData.h.

Referenced by GetCurrentBestPermutation(), process(), prune(), score(), and scoreFromPrunedData().

## newCoreLabel

int RDKit::RGroupDecompData::newCoreLabel = EMPTY_CORE_LABEL

Definition at line 29 of file RGroupDecompData.h.

## newCores

std::map<std::string, int> RDKit::RGroupDecompData::newCores

Definition at line 28 of file RGroupDecompData.h.

## params

RGroupDecompositionParameters RDKit::RGroupDecompData::params

Definition at line 39 of file RGroupDecompData.h.

Referenced by GetCurrentBestPermutation(), prepareCores(), process(), prune(), relabel(), relabelRGroup(), score(), scoreFromPrunedData(), and setRlabel().

## permutation

std::vector<size_t> RDKit::RGroupDecompData::permutation

Definition at line 43 of file RGroupDecompData.h.

Referenced by GetCurrentBestPermutation(), process(), prune(), score(), and scoreFromPrunedData().

## permutationProduct

size_t RDKit::RGroupDecompData::permutationProduct = 1

Definition at line 32 of file RGroupDecompData.h.

## previousMatchSize

size_t RDKit::RGroupDecompData::previousMatchSize = 0

Definition at line 35 of file RGroupDecompData.h.

Referenced by process().

## processedRlabels

std::vector<int> RDKit::RGroupDecompData::processedRlabels

Definition at line 48 of file RGroupDecompData.h.

## prunedFingerprintVarianceScoreData

FingerprintVarianceScoreData RDKit::RGroupDecompData::prunedFingerprintVarianceScoreData

Definition at line 45 of file RGroupDecompData.h.

Referenced by scoreFromPrunedData().

## pruneLength

unsigned int RDKit::RGroupDecompData::pruneLength = 0U

Definition at line 44 of file RGroupDecompData.h.

Referenced by scoreFromPrunedData().

## prunePermutations

bool RDKit::RGroupDecompData::prunePermutations = true

Definition at line 38 of file RGroupDecompData.h.

## rGroupScorer

RGroupScorer RDKit::RGroupDecompData::rGroupScorer

mutable

Definition at line 51 of file RGroupDecompData.h.

Referenced by process(), and score().

## userLabels

std::map<int, std::vector<int> > RDKit::RGroupDecompData::userLabels

Definition at line 46 of file RGroupDecompData.h.

Referenced by addCoreUserLabels(), and relabel().

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

- RGroupDecompData.h