33 #ifndef _RD_FILTER_CATALOG_PARAMS_
34 #define _RD_FILTER_CATALOG_PARAMS_
49 PAINS = PAINS_A | PAINS_B | PAINS_C,
55 ALL = PAINS | BRENK | NIH | ZINC
59 setTypeStr(
"Filter Catalog Parameters");
63 setTypeStr(
"Filter Catalog Parameters");
68 :
RDCatalog::CatalogParams(other), d_catalogs(other.d_catalogs) {}
81 virtual bool addCatalog(FilterCatalogs catalogs);
85 const std::vector<FilterCatalogs> &
getCatalogs()
const {
return d_catalogs; }
90 virtual void toStream(std::ostream &ss)
const;
92 virtual std::string Serialize()
const;
94 virtual void initFromStream(std::istream &ss);
96 virtual void initFromString(
const std::string &text);
99 std::vector<FilterCatalogs> d_catalogs;
101 #ifdef RDK_USE_BOOST_SERIALIZATION
102 friend class boost::serialization::access;
103 template <
class Archive>
104 void serialize(Archive &ar,
const unsigned int version) {
115 typedef boost::shared_ptr<FilterCatalogEntry>
SENTRY;
126 setCatalogParams(&temp_params);
130 setCatalogParams(¶ms);
134 :
FCatalog(rhs), d_entries(rhs.d_entries) {}
140 virtual std::string Serialize()
const;
152 bool updateFPLength =
true);
163 virtual unsigned int addEntry(SENTRY entry,
bool updateFPLength =
true);
174 bool removeEntry(
unsigned int idx);
175 bool removeEntry(CONST_SENTRY entry);
185 CONST_SENTRY getEntry(
unsigned int idx)
const;
191 unsigned int getIdxForEntry(CONST_SENTRY entry)
const;
196 return static_cast<unsigned int>(d_entries.size());
212 bool hasMatch(
const ROMol &mol)
const;
219 CONST_SENTRY getFirstMatch(
const ROMol &mol)
const;
226 const std::vector<CONST_SENTRY> getMatches(
const ROMol &mol)
const;
233 const std::vector<FilterMatch> getFilterMatches(
const ROMol &mol)
const;
237 std::vector<SENTRY> d_entries;
254 std::vector<std::vector<boost::shared_ptr<const FilterCatalogEntry>>>
RunFilterCatalog(
255 const FilterCatalog &filterCatalog,
256 const std::vector<std::string> &smiles,