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; }
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) {}
152 bool updateFPLength =
true);
196 return static_cast<unsigned int>(d_entries.size());
237 std::vector<SENTRY> d_entries;
256 const std::vector<std::string> &smiles,
#define RDUNUSED_PARAM(x)
abstract base class for the container used to create a catalog
abstract base class for a catalog object
virtual std::string Serialize() const
returns a string with a serialized (pickled) representation
virtual void toStream(std::ostream &ss) const
serializes (pickles) to a stream
virtual void initFromStream(std::istream &ss)
initializes from a stream pickle
const std::vector< FilterCatalogs > & getCatalogs() const
Returns the existing list of FilterCatalogs to be used.
FilterCatalogParams(const FilterCatalogParams &other)
virtual void initFromString(const std::string &text)
initializes from a string pickle
virtual ~FilterCatalogParams()
virtual void fillCatalog(FilterCatalog &catalog) const
Fill a catalog with the appropriate entries.
virtual bool addCatalog(FilterCatalogs catalogs)
Adds an existing FilterCatalog specification to be used in the.
FilterCatalogParams(FilterCatalogs catalogs)
FilterCatalog(FilterCatalogParams::FilterCatalogs catalogs)
bool removeEntry(CONST_SENTRY entry)
virtual const FilterCatalogEntry * getEntryWithIdx(unsigned int idx) const
virtual unsigned int getNumEntries() const
returns the number of entries in the catalog
virtual void setCatalogParams(const FilterCatalogParams *params)
Reset the current catalog to match the specified FilterCatalogParameters.
boost::shared_ptr< const entryType_t > CONST_SENTRY
CONST_SENTRY getEntry(unsigned int idx) const
FilterCatalog(const FilterCatalogParams ¶ms)
virtual std::string Serialize() const
return a serialized form of the Catalog as an std::string
unsigned int getIdxForEntry(const FilterCatalogEntry *entry) const
returns the idx of the given entry, UINT_MAX if not found.
bool removeEntry(unsigned int idx)
virtual unsigned int addEntry(FilterCatalogEntry *entry, bool updateFPLength=true)
unsigned int getIdxForEntry(CONST_SENTRY entry) const
const std::vector< FilterMatch > getFilterMatches(const ROMol &mol) const
Returns all FilterMatches for the molecule.
FilterCatalog(const FilterCatalog &rhs)
bool hasMatch(const ROMol &mol) const
Returns true if the molecule matches any entry in the catalog.
const std::vector< CONST_SENTRY > getMatches(const ROMol &mol) const
Returns all entry matches to the molecule.
virtual unsigned int addEntry(SENTRY entry, bool updateFPLength=true)
FilterCatalog(const std::string &binStr)
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
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()