![]() |
RDKit
Open-source cheminformatics and machine learning.
|
Base class for enumerating chemical reactions from collections of. More...
#include <EnumerateBase.h>
Public Member Functions | |
| EnumerateLibraryBase () | |
| default constructor More... | |
| EnumerateLibraryBase (const ChemicalReaction &rxn, EnumerationStrategyBase *enumerator=0) | |
| construct with a chemical reaction and an enumeration strategy More... | |
| EnumerateLibraryBase (const EnumerateLibraryBase &rhs) | |
| Copy constructor. More... | |
| virtual | ~EnumerateLibraryBase () |
| virtual | operator bool () const |
| Are there any enumerations left? More... | |
| void | reset () |
| reset the enumeration to the beginning. More... | |
| const ChemicalReaction & | getReaction () const |
| returns the underlying chemical reaction More... | |
| const EnumerationStrategyBase & | getEnumerator () |
| return the current enumeration strategy More... | |
| virtual std::vector< MOL_SPTR_VECT > | next ()=0 |
| get the next set of products (See run_Reactants) for details More... | |
| virtual std::vector< std::vector< std::string > > | nextSmiles () |
| get the next set of products as smiles More... | |
| const EnumerationTypes::RGROUPS & | getPosition () const |
| Get the current position into the reagent vectors. More... | |
| std::string | getState () const |
| Get the current state of the enumerator. More... | |
| void | setState (const std::string &) |
| Set the current state of the enumerator. More... | |
| void | resetState () |
| Reset the enumerator to the beginning. More... | |
| virtual void | toStream (std::ostream &ss) const =0 |
| serializes (pickles) to a stream More... | |
| virtual std::string | Serialize () const |
| returns a string with a serialized (pickled) representation More... | |
| virtual void | initFromStream (std::istream &ss)=0 |
| initializes from a stream pickle More... | |
| virtual void | initFromString (const std::string &text) |
| initializes from a string pickle More... | |
Protected Attributes | |
| ChemicalReaction | m_rxn |
| boost::shared_ptr< EnumerationStrategyBase > | m_enumerator |
| boost::shared_ptr< EnumerationStrategyBase > | m_initialEnumerator |
Base class for enumerating chemical reactions from collections of.
basic usage:
EnumerateLibraryBase &enumerator;
while (enumerator) {
MOL_SPTR_VECT res = enumerator.next();
// do something with enumeration products here
}
See Reaction.h for more details on how ChemicalReactions are used.
Definition at line 63 of file EnumerateBase.h.
|
inline |
default constructor
Definition at line 71 of file EnumerateBase.h.
|
inline |
construct with a chemical reaction and an enumeration strategy
Definition at line 74 of file EnumerateBase.h.
References RDKit::ChemicalReaction::initReactantMatchers().
|
inline |
Copy constructor.
Definition at line 83 of file EnumerateBase.h.
|
inlinevirtual |
Definition at line 88 of file EnumerateBase.h.
|
inline |
return the current enumeration strategy
Definition at line 107 of file EnumerateBase.h.
References PRECONDITION, and RDLog::toStream().
| const EnumerationTypes::RGROUPS& RDKit::EnumerateLibraryBase::getPosition | ( | ) | const |
Get the current position into the reagent vectors.
|
inline |
returns the underlying chemical reaction
Definition at line 104 of file EnumerateBase.h.
| std::string RDKit::EnumerateLibraryBase::getState | ( | ) | const |
Get the current state of the enumerator.
|
pure virtual |
initializes from a stream pickle
Implemented in RDKit::EnumerateLibrary.
|
inlinevirtual |
initializes from a string pickle
Definition at line 157 of file EnumerateBase.h.
References RDKit::EnumerationStrategyPickler::fromPickle(), RDKit::ChemicalReaction::getNumAgentTemplates(), RDKit::ChemicalReaction::getNumProductTemplates(), RDKit::ChemicalReaction::getNumReactantTemplates(), RDKit::EnumerationStrategyPickler::pickle(), RDKit::ReactionPickler::pickleReaction(), and RDKit::ReactionPickler::reactionFromPickle().
|
pure virtual |
get the next set of products (See run_Reactants) for details
Implemented in RDKit::EnumerateLibrary.
|
virtual |
get the next set of products as smiles
|
inlinevirtual |
Are there any enumerations left?
Definition at line 91 of file EnumerateBase.h.
References PRECONDITION.
|
inline |
reset the enumeration to the beginning.
Definition at line 97 of file EnumerateBase.h.
| void RDKit::EnumerateLibraryBase::resetState | ( | ) |
Reset the enumerator to the beginning.
|
inlinevirtual |
returns a string with a serialized (pickled) representation
Definition at line 147 of file EnumerateBase.h.
References RDLog::toStream().
| void RDKit::EnumerateLibraryBase::setState | ( | const std::string & | ) |
Set the current state of the enumerator.
|
pure virtual |
serializes (pickles) to a stream
Implemented in RDKit::EnumerateLibrary.
|
protected |
Definition at line 66 of file EnumerateBase.h.
|
protected |
Definition at line 67 of file EnumerateBase.h.
|
protected |
Definition at line 65 of file EnumerateBase.h.