32 #ifndef _RD_FILTER_CATALOG_PARAMS_
33 #define _RD_FILTER_CATALOG_PARAMS_
66 :
RDCatalog::CatalogParams(other), d_catalogs(other.d_catalogs) {}
83 const std::vector<FilterCatalogs> &
getCatalogs()
const {
return d_catalogs; }
88 virtual void toStream(std::ostream &ss)
const;
97 std::vector<FilterCatalogs> d_catalogs;
99 #ifdef RDK_USE_BOOST_SERIALIZATION
100 friend class boost::serialization::access;
101 template <
class Archive>
102 void serialize(Archive &ar,
const unsigned int version) {
113 typedef boost::shared_ptr<FilterCatalogEntry>
SENTRY;
115 #if BOOST_VERSION / 100000 >= 1 && (BOOST_VERSION / 100 % 1000) > 44
116 #define BOOST_PYTHON_SUPPORT_SHARED_CONST
119 #ifdef BOOST_PYTHON_SUPPORT_SHARED_CONST
122 typedef boost::shared_ptr<const entryType_t>
CONST_SENTRY;
130 : FCatalog(), d_entries() {
139 : FCatalog(rhs), d_entries(rhs.d_entries) {}
157 bool updateFPLength =
true);
168 virtual unsigned int addEntry(SENTRY entry,
bool updateFPLength =
true);
190 CONST_SENTRY
getEntry(
unsigned int idx)
const;
233 std::vector<SENTRY> d_entries;
void setTypeStr(const std::string &typeStr)
sets our type string
virtual unsigned int addEntry(FilterCatalogEntry *entry, bool updateFPLength=true)
boost::shared_ptr< entryType_t > CONST_SENTRY
virtual unsigned int getNumEntries() const
returns the number of entries in the catalog
bool removeEntry(unsigned int idx)
const std::vector< CONST_SENTRY > getMatches(const ROMol &mol) const
Returns all matches to the molecule.
const std::vector< FilterCatalogs > & getCatalogs() const
Returns the existing list of FilterCatalogs to be used.
virtual void initFromString(const std::string &text)
initializes from a string pickle
CONST_SENTRY getEntry(unsigned int idx) const
virtual std::string Serialize() const
return a serialized form of the Catalog as an std::string
FilterCatalog(const FilterCatalog &rhs)
ROMol is a molecule class that is intended to have a fixed topology.
RDCatalog::Catalog< FilterCatalogEntry, FilterCatalogParams > FCatalog
virtual void fillCatalog(FilterCatalog &catalog)
Fill a catalog with the appropriate entries.
virtual bool addCatalog(FilterCatalogs catalogs)
Adds an existing FilterCatalog specification to be used in the.
abstract base class for a catalog object
virtual void setCatalogParams(FilterCatalogParams *params)
Reset the current catalog to match the specified FilterCatalogParameters.
FilterCatalogParams(const FilterCatalogParams &other)
Includes a bunch of functionality for handling Atom and Bond queries.
virtual void toStream(std::ostream &ss) const
serializes (pickles) to a stream
#define RDUNUSED_PARAM(x)
FilterCatalog(const FilterCatalogParams ¶ms)
CONST_SENTRY getFirstMatch(const ROMol &mol) const
Returns the first match against the catalog.
boost::shared_ptr< FilterCatalogEntry > SENTRY
virtual const FilterCatalogEntry * getEntryWithIdx(unsigned int idx) const
virtual std::string Serialize() const
returns a string with a serialized (pickled) representation
unsigned int getIdxForEntry(const FilterCatalogEntry *entry) const
returns the idx of the given entry, UINT_MAX if not found.
bool hasMatch(const ROMol &mol) const
Returns true if the molecule matches any entry in the catalog.
bool FilterCatalogCanSerialize()
virtual void initFromStream(std::istream &ss)
initializes from a stream pickle
abstract base class for the container used to create a catalog
FilterCatalogParams(FilterCatalogs catalogs)
FilterCatalog(FilterCatalogParams::FilterCatalogs catalogs)
virtual ~FilterCatalogParams()