Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | List of all members
CDPL::Pharm::PSDScreeningDBCreator Class Reference

Pharm::ScreeningDBCreator implementation that builds optimized pharmacophore screening databases in the built-in PSD format. More...

#include <PSDScreeningDBCreator.hpp>

+ Inheritance diagram for CDPL::Pharm::PSDScreeningDBCreator:

Public Types

typedef std::shared_ptr< PSDScreeningDBCreatorSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated PSDScreeningDBCreator instances. More...
 
- Public Types inherited from CDPL::Pharm::ScreeningDBCreator
enum  Mode {
  CREATE ,
  UPDATE ,
  APPEND
}
 Specifies how an existing database file is treated by open(). More...
 
typedef std::shared_ptr< ScreeningDBCreatorSharedPointer
 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

 PSDScreeningDBCreator ()
 Constructs a PSDScreeningDBCreator instance without an associated database. More...
 
 PSDScreeningDBCreator (const std::string &name, Mode mode=CREATE, bool allow_dup_entries=true)
 Constructs a PSDScreeningDBCreator instance that will write data to the database-file specified by name in the given insert mode. More...
 
 PSDScreeningDBCreator (const PSDScreeningDBCreator &)=delete
 
 ~PSDScreeningDBCreator ()
 Destructor. More...
 
PSDScreeningDBCreatoroperator= (const PSDScreeningDBCreator &)=delete
 
void open (const std::string &name, Mode mode=CREATE, bool allow_dup_entries=true)
 Opens the database-file specified by name in the given insert mode. More...
 
void close ()
 Closes the currently associated database-file (if any). More...
 
Mode getMode () const
 Returns the currently configured insert mode. More...
 
bool allowDuplicateEntries () const
 Tells whether duplicate database entries are currently allowed. More...
 
bool process (const Chem::MolecularGraph &molgraph)
 Processes molgraph and inserts the resulting molecule (with derived conformer pharmacophores) into the database. More...
 
bool merge (const ScreeningDBAccessor &db_acc, const ProgressCallbackFunction &func)
 Merges all molecule/pharmacophore records of db_acc into the currently open database. More...
 
const std::string & getDatabaseName () const
 Returns the name of the currently associated database-file. More...
 
std::size_t getNumProcessed () const
 Returns the total number of input molecules processed since the database was opened. More...
 
std::size_t getNumRejected () const
 Returns the number of processed molecules that were rejected (e.g. as duplicates). More...
 
std::size_t getNumDeleted () const
 Returns the number of pre-existing database entries that were deleted (under Mode::UPDATE/CREATE). More...
 
std::size_t getNumInserted () const
 Returns the number of new database entries that were inserted. More...
 
- Public Member Functions inherited from CDPL::Pharm::ScreeningDBCreator
virtual ~ScreeningDBCreator ()
 Virtual destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CDPL::Pharm::ScreeningDBCreator
ScreeningDBCreatoroperator= (const ScreeningDBCreator &)
 

Detailed Description

Pharm::ScreeningDBCreator implementation that builds optimized pharmacophore screening databases in the built-in PSD format.

Member Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated PSDScreeningDBCreator instances.

Constructor & Destructor Documentation

◆ PSDScreeningDBCreator() [1/3]

CDPL::Pharm::PSDScreeningDBCreator::PSDScreeningDBCreator ( )

Constructs a PSDScreeningDBCreator instance without an associated database.

◆ PSDScreeningDBCreator() [2/3]

CDPL::Pharm::PSDScreeningDBCreator::PSDScreeningDBCreator ( const std::string &  name,
Mode  mode = CREATE,
bool  allow_dup_entries = true 
)

Constructs a PSDScreeningDBCreator instance that will write data to the database-file specified by name in the given insert mode.

Parameters
nameThe name of the database-file.
modeSpecifies whether to (re)create the database or to update/append to existing records.
allow_dup_entriesSpecifies whether input molecules that are duplicates of already stored molecules should be discarded.

◆ PSDScreeningDBCreator() [3/3]

CDPL::Pharm::PSDScreeningDBCreator::PSDScreeningDBCreator ( const PSDScreeningDBCreator )
delete

◆ ~PSDScreeningDBCreator()

CDPL::Pharm::PSDScreeningDBCreator::~PSDScreeningDBCreator ( )

Destructor.

Member Function Documentation

◆ operator=()

PSDScreeningDBCreator& CDPL::Pharm::PSDScreeningDBCreator::operator= ( const PSDScreeningDBCreator )
delete

◆ open()

void CDPL::Pharm::PSDScreeningDBCreator::open ( const std::string &  name,
Mode  mode = CREATE,
bool  allow_dup_entries = true 
)
virtual

Opens the database-file specified by name in the given insert mode.

Parameters
nameThe name of the database-file.
modeSpecifies whether to (re)create the database or to update/append to existing records.
allow_dup_entriesSpecifies whether input molecules that are duplicates of already stored molecules should be discarded.

Implements CDPL::Pharm::ScreeningDBCreator.

◆ close()

void CDPL::Pharm::PSDScreeningDBCreator::close ( )
virtual

Closes the currently associated database-file (if any).

Implements CDPL::Pharm::ScreeningDBCreator.

◆ getMode()

Mode CDPL::Pharm::PSDScreeningDBCreator::getMode ( ) const
virtual

Returns the currently configured insert mode.

Returns
The Pharm::ScreeningDBCreator::Mode value.

Implements CDPL::Pharm::ScreeningDBCreator.

◆ allowDuplicateEntries()

bool CDPL::Pharm::PSDScreeningDBCreator::allowDuplicateEntries ( ) const
virtual

Tells whether duplicate database entries are currently allowed.

Returns
true if duplicates are allowed, and false otherwise.

Implements CDPL::Pharm::ScreeningDBCreator.

◆ process()

bool CDPL::Pharm::PSDScreeningDBCreator::process ( const Chem::MolecularGraph molgraph)
virtual

Processes molgraph and inserts the resulting molecule (with derived conformer pharmacophores) into the database.

Parameters
molgraphThe molecular graph to process.
Returns
true if the molecule was inserted, and false if it was rejected (e.g. as a duplicate).

Implements CDPL::Pharm::ScreeningDBCreator.

◆ merge()

bool CDPL::Pharm::PSDScreeningDBCreator::merge ( const ScreeningDBAccessor db_acc,
const ProgressCallbackFunction func 
)
virtual

Merges all molecule/pharmacophore records of db_acc into the currently open database.

Parameters
db_accThe source database accessor.
funcA progress-reporting callback invoked during the merge.
Returns
true if the merge completed successfully, and false if it was aborted (e.g. by the callback).

Implements CDPL::Pharm::ScreeningDBCreator.

◆ getDatabaseName()

const std::string& CDPL::Pharm::PSDScreeningDBCreator::getDatabaseName ( ) const
virtual

Returns the name of the currently associated database-file.

Returns
A const reference to the database-file name (or an empty string if no database is open).

Implements CDPL::Pharm::ScreeningDBCreator.

◆ getNumProcessed()

std::size_t CDPL::Pharm::PSDScreeningDBCreator::getNumProcessed ( ) const
virtual

Returns the total number of input molecules processed since the database was opened.

Returns
The processed-molecule count.

Implements CDPL::Pharm::ScreeningDBCreator.

◆ getNumRejected()

std::size_t CDPL::Pharm::PSDScreeningDBCreator::getNumRejected ( ) const
virtual

Returns the number of processed molecules that were rejected (e.g. as duplicates).

Returns
The rejected-molecule count.

Implements CDPL::Pharm::ScreeningDBCreator.

◆ getNumDeleted()

std::size_t CDPL::Pharm::PSDScreeningDBCreator::getNumDeleted ( ) const
virtual

Returns the number of pre-existing database entries that were deleted (under Mode::UPDATE/CREATE).

Returns
The deleted-entry count.

Implements CDPL::Pharm::ScreeningDBCreator.

◆ getNumInserted()

std::size_t CDPL::Pharm::PSDScreeningDBCreator::getNumInserted ( ) const
virtual

Returns the number of new database entries that were inserted.

Returns
The inserted-entry count.

Implements CDPL::Pharm::ScreeningDBCreator.


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