![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
High-level driver for shape-based virtual screening of molecular databases. More...
#include <ScreeningProcessor.hpp>
Public Types | |
| typedef std::shared_ptr< ScreeningProcessor > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated ScreeningProcessor instances. More... | |
| typedef boost::indirect_iterator< MolecularGraphList::const_iterator, const Chem::MolecularGraph > | ConstMolecularGraphIterator |
| A constant iterator over the query molecules. More... | |
| typedef std::function< void(const Chem::MolecularGraph &, const Chem::MolecularGraph &, const AlignmentResult &)> | HitCallbackFunction |
| Type of the callback invoked for each alignment hit (arguments: query, hit, alignment result). More... | |
Public Member Functions | |
| ScreeningProcessor () | |
Constructs an empty ScreeningProcessor instance. More... | |
| ScreeningProcessor (const Chem::MolecularGraph &query) | |
Constructs a ScreeningProcessor instance with query as the single query molecule. More... | |
| ScreeningProcessor (const ScreeningProcessor &proc)=delete | |
| ~ScreeningProcessor () | |
| Destructor. More... | |
| ScreeningProcessor & | operator= (const ScreeningProcessor &proc)=delete |
| void | setHitCallback (const HitCallbackFunction &func) |
| Sets the callback that is invoked for every alignment hit produced by process(). More... | |
| const HitCallbackFunction & | getHitCallback () const |
| Returns the currently configured hit callback. More... | |
| const ScreeningSettings & | getSettings () const |
| Returns the current screening settings. More... | |
| ScreeningSettings & | getSettings () |
| Returns the current screening settings (mutable). More... | |
| void | clearQuerySet () |
| Removes all query molecules. More... | |
| void | addQuery (const Chem::MolecularGraph &molgraph) |
| Adds molgraph to the query set. More... | |
| std::size_t | getQuerySetSize () const |
| Returns the number of query molecules. More... | |
| const Chem::MolecularGraph & | getQuery (std::size_t idx) const |
| Returns the query molecule at index idx. More... | |
| ConstMolecularGraphIterator | getQuerySetBegin () const |
| Returns a constant iterator pointing to the first query molecule. More... | |
| ConstMolecularGraphIterator | getQuerySetEnd () const |
| Returns a constant iterator pointing one past the last query molecule. More... | |
| bool | process (const Chem::MolecularGraph &molgraph) |
| Processes the database molecule molgraph, aligning it against all query molecules. More... | |
High-level driver for shape-based virtual screening of molecular databases.
The processor maintains a set of query molecules and aligns each incoming database molecule against all of them, reporting alignment hits through a user-supplied callback. The behaviour (similarity score type, shape generation, alignment options, etc.) is configured via the embedded Shape::ScreeningSettings instance.
| typedef std::shared_ptr<ScreeningProcessor> CDPL::Shape::ScreeningProcessor::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated ScreeningProcessor instances.
| typedef boost::indirect_iterator<MolecularGraphList::const_iterator, const Chem::MolecularGraph> CDPL::Shape::ScreeningProcessor::ConstMolecularGraphIterator |
A constant iterator over the query molecules.
| typedef std::function<void(const Chem::MolecularGraph&, const Chem::MolecularGraph&, const AlignmentResult&)> CDPL::Shape::ScreeningProcessor::HitCallbackFunction |
Type of the callback invoked for each alignment hit (arguments: query, hit, alignment result).
| CDPL::Shape::ScreeningProcessor::ScreeningProcessor | ( | ) |
Constructs an empty ScreeningProcessor instance.
| CDPL::Shape::ScreeningProcessor::ScreeningProcessor | ( | const Chem::MolecularGraph & | query | ) |
Constructs a ScreeningProcessor instance with query as the single query molecule.
| query | The query molecule. |
|
delete |
| CDPL::Shape::ScreeningProcessor::~ScreeningProcessor | ( | ) |
Destructor.
|
delete |
| void CDPL::Shape::ScreeningProcessor::setHitCallback | ( | const HitCallbackFunction & | func | ) |
Sets the callback that is invoked for every alignment hit produced by process().
| func | The hit-callback function. |
| const HitCallbackFunction& CDPL::Shape::ScreeningProcessor::getHitCallback | ( | ) | const |
Returns the currently configured hit callback.
const reference to the hit-callback function. | const ScreeningSettings& CDPL::Shape::ScreeningProcessor::getSettings | ( | ) | const |
Returns the current screening settings.
const reference to the screening settings. | ScreeningSettings& CDPL::Shape::ScreeningProcessor::getSettings | ( | ) |
Returns the current screening settings (mutable).
| void CDPL::Shape::ScreeningProcessor::clearQuerySet | ( | ) |
Removes all query molecules.
| void CDPL::Shape::ScreeningProcessor::addQuery | ( | const Chem::MolecularGraph & | molgraph | ) |
Adds molgraph to the query set.
| molgraph | The query molecule. |
| std::size_t CDPL::Shape::ScreeningProcessor::getQuerySetSize | ( | ) | const |
Returns the number of query molecules.
| const Chem::MolecularGraph& CDPL::Shape::ScreeningProcessor::getQuery | ( | std::size_t | idx | ) | const |
Returns the query molecule at index idx.
| idx | The zero-based index of the query molecule. |
const reference to the query molecule. | Base::IndexError | if the number of query molecules is zero or idx is not in the range [0, getQuerySetSize() - 1]. |
| ConstMolecularGraphIterator CDPL::Shape::ScreeningProcessor::getQuerySetBegin | ( | ) | const |
Returns a constant iterator pointing to the first query molecule.
| ConstMolecularGraphIterator CDPL::Shape::ScreeningProcessor::getQuerySetEnd | ( | ) | const |
Returns a constant iterator pointing one past the last query molecule.
| bool CDPL::Shape::ScreeningProcessor::process | ( | const Chem::MolecularGraph & | molgraph | ) |
Processes the database molecule molgraph, aligning it against all query molecules.
| molgraph | The database molecule. |
true if at least one alignment hit was produced for molgraph, and false otherwise.