33#ifndef RDKIT_ENUMERATE_H
34#define RDKIT_ENUMERATE_H
61 int reagentMaxMatchCount{INT_MAX};
62 bool sanePartialProducts{
false};
66 : reagentMaxMatchCount(rhs.reagentMaxMatchCount),
67 sanePartialProducts(rhs.sanePartialProducts) {}
134 std::vector<MOL_SPTR_VECT>
next()
override;
140#ifdef RDK_USE_BOOST_SERIALIZATION
141 friend class boost::serialization::access;
142 template <
class Archive>
143 void save(Archive &ar,
const unsigned int )
const {
144 ar &boost::serialization::base_object<EnumerateLibraryBase>(*
this);
145 size_t sz = m_bbs.size();
149 for (
size_t i = 0; i < m_bbs.size(); ++i) {
150 sz = m_bbs[i].size();
152 for (
size_t j = 0; j < m_bbs[i].size(); ++j) {
153 MolPickler::pickleMol(*m_bbs[i][j], pickle);
158 template <
class Archive>
159 void load(Archive &ar,
const unsigned int ) {
160 ar &boost::serialization::base_object<EnumerateLibraryBase>(*
this);
167 for (
size_t i = 0; i < m_bbs.size(); ++i) {
171 for (
size_t j = 0; j < m_bbs[i].size(); ++j) {
173 RWMol *mol =
new RWMol();
174 MolPickler::molFromPickle(pickle, *mol);
175 m_bbs[i][j].reset(mol);
180 BOOST_SERIALIZATION_SPLIT_MEMBER();
This is a class for storing and applying general chemical reactions.
This is a class for running reactions on sets of reagents.
const EnumerationTypes::BBS & getReagents() const
Return the reagents used in the library.
EnumerateLibrary(const std::string &s)
EnumerateLibrary(const EnumerateLibrary &rhs)
std::vector< MOL_SPTR_VECT > next() override
Get the next product set.
void toStream(std::ostream &ss) const override
serializes (pickles) to a stream
void initFromStream(std::istream &ss) override
initializes from a stream pickle
EnumerateLibrary(const ChemicalReaction &rxn, const EnumerationTypes::BBS &reagents, const EnumerationParams ¶ms=EnumerationParams())
EnumerateLibrary(const ChemicalReaction &rxn, const EnumerationTypes::BBS &reagents, const EnumerationStrategyBase &enumerator, const EnumerationParams ¶ms=EnumerationParams())
#define RDKIT_CHEMREACTIONS_EXPORT
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
std::vector< MOL_SPTR_VECT > BBS
bool rdvalue_is(const RDValue_cast_t)
RDKIT_CHEMREACTIONS_EXPORT EnumerationTypes::BBS removeNonmatchingReagents(const ChemicalReaction &rxn, EnumerationTypes::BBS bbs, const EnumerationParams ¶ms=EnumerationParams())
RDKIT_CHEMREACTIONS_EXPORT bool EnumerateLibraryCanSerialize()
EnumerationParams(const EnumerationParams &rhs)