33#ifndef _RD_FILTER_CATALOG_PARAMS_
34#define _RD_FILTER_CATALOG_PARAMS_
49 PAINS = PAINS_A | PAINS_B | PAINS_C,
55 CHEMBL_Glaxo = (1u << 7),
56 CHEMBL_Dundee = (1u << 8),
57 CHEMBL_BMS = (1u << 9),
58 CHEMBL_SureChEMBL = (1u << 10),
59 CHEMBL_MLSMR = (1u << 11),
60 CHEMBL_Inpharmatica = (1u << 12),
61 CHEMBL_LINT = (1u << 13),
62 CHEMBL = CHEMBL_Glaxo | CHEMBL_Dundee | CHEMBL_BMS | CHEMBL_SureChEMBL |
63 CHEMBL_MLSMR | CHEMBL_Inpharmatica | CHEMBL_LINT,
65 ALL = PAINS | BRENK | NIH | ZINC | CHEMBL
69 setTypeStr(
"Filter Catalog Parameters");
73 setTypeStr(
"Filter Catalog Parameters");
78 :
RDCatalog::CatalogParams(other), d_catalogs(other.d_catalogs) {}
95 const std::vector<FilterCatalogs> &
getCatalogs()
const {
return d_catalogs; }
109 std::vector<FilterCatalogs> d_catalogs;
111#ifdef RDK_USE_BOOST_SERIALIZATION
112 friend class boost::serialization::access;
113 template <
class Archive>
114 void serialize(Archive &ar,
const unsigned int version) {
125 typedef boost::shared_ptr<FilterCatalogEntry>
SENTRY;
136 setCatalogParams(&temp_params);
140 setCatalogParams(¶ms);
144 :
FCatalog(rhs), d_entries(rhs.d_entries) {}
162 bool updateFPLength =
true)
override;
206 return static_cast<unsigned int>(d_entries.size());
247 std::vector<SENTRY> d_entries;
265std::vector<std::vector<boost::shared_ptr<const FilterCatalogEntry>>>
267 const std::vector<std::string> &smiles,
int numThreads = 1);
#define RDUNUSED_PARAM(x)
abstract base class for the container used to create a catalog
abstract base class for a catalog object
void toStream(std::ostream &ss) const override
serializes (pickles) to a stream
FilterCatalogParams(const FilterCatalogParams &other)
void initFromStream(std::istream &ss) override
initializes from a stream pickle
std::string Serialize() const override
returns a string with a serialized (pickled) representation
virtual void fillCatalog(FilterCatalog &catalog) const
Fill a catalog with the appropriate entries.
void initFromString(const std::string &text) override
initializes from a string pickle
const std::vector< FilterCatalogs > & getCatalogs() const
Returns the existing list of FilterCatalogs to be used.
virtual bool addCatalog(FilterCatalogs catalogs)
FilterCatalogParams(FilterCatalogs catalogs)
~FilterCatalogParams() override
FilterCatalog(FilterCatalogParams::FilterCatalogs catalogs)
const std::vector< CONST_SENTRY > getMatches(const ROMol &mol) const
Returns all entry matches to the molecule.
unsigned int getNumEntries() const override
returns the number of entries in the catalog
bool removeEntry(CONST_SENTRY entry)
unsigned int addEntry(FilterCatalogEntry *entry, bool updateFPLength=true) override
boost::shared_ptr< const entryType_t > CONST_SENTRY
~FilterCatalog() override
CONST_SENTRY getEntry(unsigned int idx) const
FilterCatalog(const FilterCatalogParams ¶ms)
const FilterCatalogEntry * getEntryWithIdx(unsigned int idx) const override
unsigned int getIdxForEntry(const FilterCatalogEntry *entry) const
returns the idx of the given entry, UINT_MAX if not found.
const std::vector< FilterMatch > getFilterMatches(const ROMol &mol) const
Returns all FilterMatches for the molecule.
bool removeEntry(unsigned int idx)
unsigned int getIdxForEntry(CONST_SENTRY entry) const
FilterCatalog(const FilterCatalog &rhs)
bool hasMatch(const ROMol &mol) const
Returns true if the molecule matches any entry in the catalog.
void setCatalogParams(const FilterCatalogParams *params) override
Reset the current catalog to match the specified FilterCatalogParameters.
virtual unsigned int addEntry(SENTRY entry, bool updateFPLength=true)
FilterCatalog(const std::string &binStr)
std::string Serialize() const override
return a serialized form of the Catalog as an std::string
boost::shared_ptr< FilterCatalogEntry > SENTRY
CONST_SENTRY getFirstMatch(const ROMol &mol) const
Returns the first match against the catalog.
#define RDKIT_FILTERCATALOG_EXPORT
RDCatalog::Catalog< FilterCatalogEntry, FilterCatalogParams > FCatalog
bool rdvalue_is(const RDValue_cast_t)
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.
RDKIT_FILTERCATALOG_EXPORT bool FilterCatalogCanSerialize()