![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Abstract base class for creators that build optimized pharmacophore screening databases. More...
#include <ScreeningDBCreator.hpp>
Inheritance diagram for CDPL::Pharm::ScreeningDBCreator:Public Types | |
| enum | Mode { CREATE , UPDATE , APPEND } |
| Specifies how an existing database file is treated by open(). More... | |
| typedef std::shared_ptr< ScreeningDBCreator > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated ScreeningDBCreator instances. More... | |
| typedef std::function< bool(double)> | ProgressCallbackFunction |
Type of the progress-reporting callback (argument: fraction in [0, 1], return: true to continue, false to abort). More... | |
Public Member Functions | |
| virtual | ~ScreeningDBCreator () |
| Virtual destructor. More... | |
| virtual void | open (const std::string &name, Mode mode=CREATE, bool allow_dup_entries=true)=0 |
| Opens the database identified by name in the specified mode. More... | |
| virtual void | close ()=0 |
| Closes the currently open database. More... | |
| virtual Mode | getMode () const =0 |
| Returns the mode in which the currently open database was opened. More... | |
| virtual bool | allowDuplicateEntries () const =0 |
| Tells whether duplicate molecule entries are allowed. More... | |
| virtual bool | process (const Chem::MolecularGraph &molgraph)=0 |
| Processes molgraph and adds it (or its derived pharmacophores) to the database. More... | |
| virtual bool | merge (const ScreeningDBAccessor &db_acc, const ProgressCallbackFunction &func)=0 |
| Merges the contents of db_acc into the currently open database. More... | |
| virtual const std::string & | getDatabaseName () const =0 |
| Returns the name of the currently open database. More... | |
| virtual std::size_t | getNumProcessed () const =0 |
| Returns the number of molecules processed since the database was opened. More... | |
| virtual std::size_t | getNumRejected () const =0 |
| Returns the number of molecules that were rejected (e.g. as duplicates) since the database was opened. More... | |
| virtual std::size_t | getNumDeleted () const =0 |
| Returns the number of entries that were deleted since the database was opened. More... | |
| virtual std::size_t | getNumInserted () const =0 |
| Returns the number of entries that were inserted since the database was opened. More... | |
Protected Member Functions | |
| ScreeningDBCreator & | operator= (const ScreeningDBCreator &) |
Abstract base class for creators that build optimized pharmacophore screening databases.
| typedef std::shared_ptr<ScreeningDBCreator> CDPL::Pharm::ScreeningDBCreator::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated ScreeningDBCreator instances.
| typedef std::function<bool(double)> CDPL::Pharm::ScreeningDBCreator::ProgressCallbackFunction |
Type of the progress-reporting callback (argument: fraction in [0, 1], return: true to continue, false to abort).
Specifies how an existing database file is treated by open().
| Enumerator | |
|---|---|
| CREATE | Create a new database (replacing any existing file). |
| UPDATE | Update an existing database in place. |
| APPEND | Append to an existing database. |
|
inlinevirtual |
Virtual destructor.
|
pure virtual |
Opens the database identified by name in the specified mode.
| name | The database name (path, URI, etc., interpreted by the concrete subclass). |
| mode | The open mode (see Mode). |
| allow_dup_entries | If true, duplicate molecule entries are allowed; if false, duplicates are rejected. |
Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Closes the currently open database.
Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Returns the mode in which the currently open database was opened.
Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Tells whether duplicate molecule entries are allowed.
true if duplicates are allowed, and false otherwise. Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Processes molgraph and adds it (or its derived pharmacophores) to the database.
| molgraph | The molecular graph to process. |
true if at least one entry was inserted, and false otherwise (e.g. when duplicates are rejected). Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Merges the contents of db_acc into the currently open database.
| db_acc | The source database accessor. |
| func | An optional progress-reporting callback (called repeatedly with a fraction in [0, 1]). |
true if the merge completed successfully, and false if it was aborted by the callback. Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Returns the name of the currently open database.
const reference to the database name. Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Returns the number of molecules processed since the database was opened.
Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Returns the number of molecules that were rejected (e.g. as duplicates) since the database was opened.
Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Returns the number of entries that were deleted since the database was opened.
Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
pure virtual |
Returns the number of entries that were inserted since the database was opened.
Implemented in CDPL::Pharm::PSDScreeningDBCreator.
|
inlineprotected |