RDKit
Open-source cheminformatics and machine learning.
RDKit::FilterCatalog Class Reference

#include <FilterCatalog.h>

Inheritance diagram for RDKit::FilterCatalog:
RDCatalog::Catalog< entryType, paramType >

Public Types

typedef boost::shared_ptr< FilterCatalogEntrySENTRY
 
typedef boost::shared_ptr< const entryType_tCONST_SENTRY
 
- Public Types inherited from RDCatalog::Catalog< entryType, paramType >
typedef entryType entryType_t
 
typedef paramType paramType_t
 

Public Member Functions

 FilterCatalog ()
 
 FilterCatalog (FilterCatalogParams::FilterCatalogs catalogs)
 
 FilterCatalog (const FilterCatalogParams &params)
 
 FilterCatalog (const FilterCatalog &rhs)
 
 FilterCatalog (const std::string &binStr)
 
 ~FilterCatalog ()
 
virtual std::string Serialize () const
 return a serialized form of the Catalog as an std::string More...
 
virtual unsigned int addEntry (FilterCatalogEntry *entry, bool updateFPLength=true)
 
virtual unsigned int addEntry (SENTRY entry, bool updateFPLength=true)
 
bool removeEntry (unsigned int idx)
 
bool removeEntry (CONST_SENTRY entry)
 
virtual const FilterCatalogEntrygetEntryWithIdx (unsigned int idx) const
 
CONST_SENTRY getEntry (unsigned int idx) const
 
unsigned int getIdxForEntry (const FilterCatalogEntry *entry) const
 returns the idx of the given entry, UINT_MAX if not found. More...
 
unsigned int getIdxForEntry (CONST_SENTRY entry) const
 
virtual unsigned int getNumEntries () const
 returns the number of entries in the catalog More...
 
virtual void setCatalogParams (const FilterCatalogParams *params)
 Reset the current catalog to match the specified FilterCatalogParameters. More...
 
bool hasMatch (const ROMol &mol) const
 Returns true if the molecule matches any entry in the catalog. More...
 
CONST_SENTRY getFirstMatch (const ROMol &mol) const
 Returns the first match against the catalog. More...
 
const std::vector< CONST_SENTRYgetMatches (const ROMol &mol) const
 Returns all entry matches to the molecule. More...
 
const std::vector< FilterMatchgetFilterMatches (const ROMol &mol) const
 Returns all FilterMatches for the molecule. More...
 
- Public Member Functions inherited from RDCatalog::Catalog< entryType, paramType >
 Catalog ()
 
virtual ~Catalog ()
 
virtual unsigned int addEntry (entryType *entry, bool updateFPLength=true)=0
 adds an entry to the catalog More...
 
unsigned int getFPLength () const
 returns the length of our fingerprint More...
 
void setFPLength (unsigned int val)
 sets our fingerprint length More...
 
virtual void setCatalogParams (const paramType *params)
 sets our parameters by copying the params argument More...
 
const paramType * getCatalogParams () const
 returns a pointer to our parameters More...
 

Additional Inherited Members

- Protected Attributes inherited from RDCatalog::Catalog< entryType, paramType >
unsigned int d_fpLength
 the length of our fingerprint More...
 
paramType * dp_cParams
 our params object More...
 

Detailed Description

Definition at line 112 of file FilterCatalog.h.

Member Typedef Documentation

◆ CONST_SENTRY

typedef boost::shared_ptr<const entryType_t> RDKit::FilterCatalog::CONST_SENTRY

Definition at line 119 of file FilterCatalog.h.

◆ SENTRY

Definition at line 115 of file FilterCatalog.h.

Constructor & Destructor Documentation

◆ FilterCatalog() [1/5]

RDKit::FilterCatalog::FilterCatalog ( )
inline

Definition at line 121 of file FilterCatalog.h.

◆ FilterCatalog() [2/5]

RDKit::FilterCatalog::FilterCatalog ( FilterCatalogParams::FilterCatalogs  catalogs)
inline

Definition at line 123 of file FilterCatalog.h.

◆ FilterCatalog() [3/5]

RDKit::FilterCatalog::FilterCatalog ( const FilterCatalogParams params)
inline

Definition at line 129 of file FilterCatalog.h.

◆ FilterCatalog() [4/5]

RDKit::FilterCatalog::FilterCatalog ( const FilterCatalog rhs)
inline

Definition at line 133 of file FilterCatalog.h.

◆ FilterCatalog() [5/5]

RDKit::FilterCatalog::FilterCatalog ( const std::string &  binStr)

◆ ~FilterCatalog()

RDKit::FilterCatalog::~FilterCatalog ( )

Member Function Documentation

◆ addEntry() [1/2]

virtual unsigned int RDKit::FilterCatalog::addEntry ( FilterCatalogEntry entry,
bool  updateFPLength = true 
)
virtual

Adds a new FilterCatalogEntry to the catalog The catalog owns the entry

Parameters
entryThe FilterCatalogEntry to add.
updateFPLengthunused in the FilterCatalog object.

◆ addEntry() [2/2]

virtual unsigned int RDKit::FilterCatalog::addEntry ( SENTRY  entry,
bool  updateFPLength = true 
)
virtual

Adds a new FilterCatalogEntry to the catalog The catalog owns the entry

Parameters
entryThe shared_ptr of the FilterCatalogEntry to add.
updateFPLengthunused in the FilterCatalog object.

◆ getEntry()

CONST_SENTRY RDKit::FilterCatalog::getEntry ( unsigned int  idx) const

returns a particular FilterCatalogEntry in the Catalog memory safe version of getEntryWithIdx

◆ getEntryWithIdx()

virtual const FilterCatalogEntry* RDKit::FilterCatalog::getEntryWithIdx ( unsigned int  idx) const
virtual

returns a particular FilterCatalogEntry in the Catalog required by Catalog.h API

Implements RDCatalog::Catalog< entryType, paramType >.

◆ getFilterMatches()

const std::vector<FilterMatch> RDKit::FilterCatalog::getFilterMatches ( const ROMol mol) const

Returns all FilterMatches for the molecule.

◆ getFirstMatch()

CONST_SENTRY RDKit::FilterCatalog::getFirstMatch ( const ROMol mol) const

Returns the first match against the catalog.

◆ getIdxForEntry() [1/2]

unsigned int RDKit::FilterCatalog::getIdxForEntry ( const FilterCatalogEntry entry) const

returns the idx of the given entry, UINT_MAX if not found.

◆ getIdxForEntry() [2/2]

unsigned int RDKit::FilterCatalog::getIdxForEntry ( CONST_SENTRY  entry) const

◆ getMatches()

const std::vector<CONST_SENTRY> RDKit::FilterCatalog::getMatches ( const ROMol mol) const

Returns all entry matches to the molecule.

◆ getNumEntries()

virtual unsigned int RDKit::FilterCatalog::getNumEntries ( ) const
inlinevirtual

returns the number of entries in the catalog

Implements RDCatalog::Catalog< entryType, paramType >.

Definition at line 195 of file FilterCatalog.h.

◆ hasMatch()

bool RDKit::FilterCatalog::hasMatch ( const ROMol mol) const

Returns true if the molecule matches any entry in the catalog.

◆ removeEntry() [1/2]

bool RDKit::FilterCatalog::removeEntry ( CONST_SENTRY  entry)

◆ removeEntry() [2/2]

bool RDKit::FilterCatalog::removeEntry ( unsigned int  idx)

Removes a FilterCatalogEntry from the catalog.

Parameters
idxThe FilterCatalogEntry index for the entry to remove. n.b. removing an entry may change the indicies of other entries. To safely remove entries, remove entries with the highest idx first.

◆ Serialize()

virtual std::string RDKit::FilterCatalog::Serialize ( ) const
virtual

return a serialized form of the Catalog as an std::string

Implements RDCatalog::Catalog< entryType, paramType >.

◆ setCatalogParams()

virtual void RDKit::FilterCatalog::setCatalogParams ( const FilterCatalogParams params)
virtual

Reset the current catalog to match the specified FilterCatalogParameters.


The documentation for this class was generated from the following file: