 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
33 #ifndef RDKIT_ENUMERATE_H
34 #define RDKIT_ENUMERATE_H
64 : reagentMaxMatchCount(INT_MAX), sanePartialProducts(false) {}
67 : reagentMaxMatchCount(rhs.reagentMaxMatchCount),
68 sanePartialProducts(rhs.sanePartialProducts) {}
77 const EnumerationParams ¶ms = EnumerationParams());
135 std::vector<MOL_SPTR_VECT> next();
137 void toStream(std::ostream &ss)
const;
138 void initFromStream(std::istream &ss);
141 #ifdef RDK_USE_BOOST_SERIALIZATION
142 friend class boost::serialization::access;
143 template <
class Archive>
144 void save(Archive &ar,
const unsigned int )
const {
145 ar &boost::serialization::base_object<EnumerateLibraryBase>(*
this);
146 size_t sz = m_bbs.size();
150 for (
size_t i = 0; i < m_bbs.size(); ++i) {
151 sz = m_bbs[i].size();
153 for (
size_t j = 0; j < m_bbs[i].size(); ++j) {
159 template <
class Archive>
160 void load(Archive &ar,
const unsigned int ) {
161 ar &boost::serialization::base_object<EnumerateLibraryBase>(*
this);
168 for (
size_t i = 0; i < m_bbs.size(); ++i) {
172 for (
size_t j = 0; j < m_bbs[i].size(); ++j) {
174 RWMol *mol =
new RWMol();
176 m_bbs[i][j].reset(mol);
181 BOOST_SERIALIZATION_SPLIT_MEMBER();
RDKIT_CHEMREACTIONS_EXPORT void pickle(const boost::shared_ptr< EnumerationStrategyBase > &enumerator, std::ostream &ss)
pickles a EnumerationStrategy and adds the results to a stream ss
Base class for enumerating chemical reactions from collections of.
EnumerateLibrary(const std::string &s)
const EnumerationTypes::BBS & getReagents() const
Return the reagents used in the library.
static void molFromPickle(const std::string &pickle, ROMol *mol)
constructs a molecule from a pickle stored in a string
std::vector< MOL_SPTR_VECT > BBS
RDKIT_CHEMREACTIONS_EXPORT EnumerationTypes::BBS removeNonmatchingReagents(const ChemicalReaction &rxn, EnumerationTypes::BBS bbs, const EnumerationParams ¶ms=EnumerationParams())
Helper function, remove reagents that are incompatible.
This is a class for storing and applying general chemical reactions.
RDKIT_CHEMREACTIONS_EXPORT bool EnumerateLibraryCanSerialize()
EnumerationParams(const EnumerationParams &rhs)
static void pickleMol(const ROMol *mol, std::ostream &ss)
pickles a molecule and sends the results to stream ss
This is a class for running reactions on sets of reagents.
#define RDKIT_CHEMREACTIONS_EXPORT
RDKIT_RDGENERAL_EXPORT std::ostream & toStream(std::ostream &)
This is a class for providing enumeration options that control.