![]() |
RDKit
Open-source cheminformatics and machine learning.
|
This is a class for fully randomly sampling reagents. More...
#include <RandomSample.h>
Public Member Functions | |
RandomSampleStrategy () | |
virtual void | initializeStrategy (const ChemicalReaction &, const EnumerationTypes::BBS &) |
virtual const char * | type () const |
virtual const EnumerationTypes::RGROUPS & | next () |
The current permutation {r1, r2, ...}. More... | |
virtual boost::uint64_t | getPermutationIdx () const |
Returns how many permutations have been processed by this strategy. More... | |
virtual | operator bool () const |
EnumerationStrategyBase * | copy () const |
copy the enumeration strategy complete with current state More... | |
void | initialize (const ChemicalReaction &reaction, const EnumerationTypes::BBS &building_blocks) |
![]() | |
EnumerationStrategyBase () | |
virtual | ~EnumerationStrategyBase () |
void | initialize (const ChemicalReaction &reaction, const EnumerationTypes::BBS &building_blocks) |
const EnumerationTypes::RGROUPS & | getPosition () const |
The current position in the enumeration. More... | |
boost::uint64_t | getNumPermutations () const |
bool | skip (boost::uint64_t skipCount) |
Additional Inherited Members | |
![]() | |
static const boost::uint64_t | EnumerationOverflow |
![]() | |
void | internalInitialize (const EnumerationTypes::RGROUPS &rgroups) |
![]() | |
EnumerationTypes::RGROUPS | m_permutation |
EnumerationTypes::RGROUPS | m_permutationSizes |
boost::uint64_t | m_numPermutations {} |
This is a class for fully randomly sampling reagents.
basic usage:
std::vector<MOL_SPTR_VECT> bbs; bbs.push_back( bbs_for_reactants_1 ); bbs.push_back( bbs_for_reactants_2 ); RandomSampleStrategy rgroups; rgroups.initialize(rxn, bbs); for(size_t i=0; i<num_samples && rgroups; ++i) { MOL_SPTR_VECT rvect = getReactantsFromRGroups(bbs, rgroups.next()); std::vector<MOL_SPTR_VECT> lprops = rxn.RunReactants(rvect); ... }
See EnumerationStrategyBase for more details and usage.
Definition at line 65 of file RandomSample.h.
|
inline |
Definition at line 72 of file RandomSample.h.
|
inlinevirtual |
copy the enumeration strategy complete with current state
Implements RDKit::EnumerationStrategyBase.
Definition at line 114 of file RandomSample.h.
|
inlinevirtual |
Returns how many permutations have been processed by this strategy.
Implements RDKit::EnumerationStrategyBase.
Definition at line 108 of file RandomSample.h.
|
inline |
Initialize the enumerator based on the reaction and the supplied building blocks This is the standard API point. This calls the derived class's initializeStrategy method which must be implemented
Definition at line 142 of file EnumerationStrategyBase.h.
|
inlinevirtual |
Implements RDKit::EnumerationStrategyBase.
Definition at line 84 of file RandomSample.h.
|
inlinevirtual |
The current permutation {r1, r2, ...}.
Implements RDKit::EnumerationStrategyBase.
Definition at line 98 of file RandomSample.h.
|
inlinevirtual |
returns true if there are more permutations left random enumerators may always return true...
Implements RDKit::EnumerationStrategyBase.
Definition at line 112 of file RandomSample.h.
|
inlinevirtual |
Reimplemented from RDKit::EnumerationStrategyBase.
Definition at line 95 of file RandomSample.h.