33 #ifndef _RD_FILTER_CATALOG_PARAMS_ 34 #define _RD_FILTER_CATALOG_PARAMS_ 48 PAINS = PAINS_A | PAINS_B | PAINS_C,
54 ALL = PAINS | BRENK | NIH | ZINC
58 setTypeStr(
"Filter Catalog Parameters");
62 setTypeStr(
"Filter Catalog Parameters");
67 :
RDCatalog::CatalogParams(other), d_catalogs(other.d_catalogs) {}
84 const std::vector<FilterCatalogs> &
getCatalogs()
const {
return d_catalogs; }
89 virtual void toStream(std::ostream &ss)
const;
91 virtual std::string Serialize()
const;
93 virtual void initFromStream(std::istream &ss);
95 virtual void initFromString(
const std::string &text);
98 std::vector<FilterCatalogs> d_catalogs;
100 #ifdef RDK_USE_BOOST_SERIALIZATION 101 friend class boost::serialization::access;
102 template <
class Archive>
103 void serialize(Archive &ar,
const unsigned int version) {
114 typedef boost::shared_ptr<FilterCatalogEntry>
SENTRY;
116 #if BOOST_VERSION / 100000 >= 1 && (BOOST_VERSION / 100 % 1000) > 44 117 #define BOOST_PYTHON_SUPPORT_SHARED_CONST 120 #ifdef BOOST_PYTHON_SUPPORT_SHARED_CONST 123 typedef boost::shared_ptr<const entryType_t>
CONST_SENTRY;
131 : FCatalog(), d_entries() {
140 : FCatalog(rhs), d_entries(rhs.d_entries) {}
146 virtual std::string Serialize()
const;
158 bool updateFPLength =
true);
169 virtual unsigned int addEntry(SENTRY entry,
bool updateFPLength =
true);
180 bool removeEntry(
unsigned int idx);
181 bool removeEntry(CONST_SENTRY entry);
191 CONST_SENTRY getEntry(
unsigned int idx)
const;
197 unsigned int getIdxForEntry(CONST_SENTRY entry)
const;
201 virtual unsigned int getNumEntries()
const {
return static_cast<unsigned int>(d_entries.size()); }
216 bool hasMatch(
const ROMol &mol)
const;
223 CONST_SENTRY getFirstMatch(
const ROMol &mol)
const;
230 const std::vector<CONST_SENTRY> getMatches(
const ROMol &mol)
const;
237 const std::vector<FilterMatch> getFilterMatches(
const ROMol &mol)
const;
241 std::vector<SENTRY> d_entries;
RDKIT_FILTERCATALOG_EXPORT bool FilterCatalogCanSerialize()
boost::shared_ptr< entryType_t > CONST_SENTRY
const std::vector< FilterCatalogs > & getCatalogs() const
Returns the existing list of FilterCatalogs to be used.
FilterCatalog(const FilterCatalog &rhs)
RDCatalog::Catalog< FilterCatalogEntry, FilterCatalogParams > FCatalog
abstract base class for a catalog object
FilterCatalogParams(const FilterCatalogParams &other)
#define RDKIT_FILTERCATALOG_EXPORT
#define RDUNUSED_PARAM(x)
FilterCatalog(const FilterCatalogParams ¶ms)
boost::shared_ptr< FilterCatalogEntry > SENTRY
RDKIT_RDGENERAL_EXPORT std::ostream & toStream(std::ostream &)
virtual unsigned int getNumEntries() const
returns the number of entries in the catalog
abstract base class for the container used to create a catalog
FilterCatalogParams(FilterCatalogs catalogs)
FilterCatalog(FilterCatalogParams::FilterCatalogs catalogs)
virtual ~FilterCatalogParams()