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) {}
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;
124 : FCatalog(), d_entries() {
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(
256 const std::vector<std::string> &smiles,
RDKIT_FILTERCATALOG_EXPORT bool FilterCatalogCanSerialize()
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
boost::shared_ptr< const entryType_t > CONST_SENTRY
#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
RDKIT_FILTERCATALOG_EXPORT std::vector< std::vector< boost::shared_ptr< const FilterCatalogEntry > > > RunFilterCatalog(const FilterCatalog &filterCatalog, const std::vector< std::string > &smiles, int numThreads=1)
Run a filter catalog on a set of smiles strings.
abstract base class for the container used to create a catalog
FilterCatalogParams(FilterCatalogs catalogs)
FilterCatalog(FilterCatalogParams::FilterCatalogs catalogs)
virtual ~FilterCatalogParams()