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

Pharm::ScreeningDBAccessor implementation that reads pharmacophore screening databases stored in the built-in optimized PSD format. More...

#include <PSDScreeningDBAccessor.hpp>

+ Inheritance diagram for CDPL::Pharm::PSDScreeningDBAccessor:

Public Types

typedef std::shared_ptr< PSDScreeningDBAccessorSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated PSDScreeningDBAccessor instances. More...
 
- Public Types inherited from CDPL::Pharm::ScreeningDBAccessor
typedef std::shared_ptr< ScreeningDBAccessorSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated ScreeningDBAccessor instances. More...
 

Public Member Functions

 PSDScreeningDBAccessor ()
 Constructs a PSDScreeningDBAccessor instance without an associated database. More...
 
 PSDScreeningDBAccessor (const std::string &name)
 Constructs a PSDScreeningDBAccessor instance that will read data from the database-file specified by name. More...
 
 PSDScreeningDBAccessor (const PSDScreeningDBAccessor &)=delete
 
 ~PSDScreeningDBAccessor ()
 Destructor. More...
 
PSDScreeningDBAccessoroperator= (const PSDScreeningDBAccessor &)=delete
 
void open (const std::string &name)
 Opens the database-file specified by name. More...
 
void close ()
 Closes the currently associated database-file (if any). More...
 
const std::string & getDatabaseName () const
 Returns the name of the currently associated database-file. More...
 
std::size_t getNumMolecules () const
 Returns the total number of molecules stored in the database. More...
 
std::size_t getNumPharmacophores () const
 Returns the total number of pharmacophores stored in the database. More...
 
std::size_t getNumPharmacophores (std::size_t mol_idx) const
 Returns the number of pharmacophores (conformers) stored for the molecule at index mol_idx. More...
 
void getMolecule (std::size_t mol_idx, Chem::Molecule &mol, bool overwrite=true) const
 Retrieves the molecule at index mol_idx and stores it in mol. More...
 
void getPharmacophore (std::size_t pharm_idx, Pharmacophore &pharm, bool overwrite=true) const
 Retrieves the pharmacophore at index pharm_idx and stores it in pharm. More...
 
void getPharmacophore (std::size_t mol_idx, std::size_t mol_conf_idx, Pharmacophore &pharm, bool overwrite=true) const
 Retrieves the pharmacophore for the given (molecule, conformer) pair and stores it in pharm. More...
 
std::size_t getMoleculeIndex (std::size_t pharm_idx) const
 Returns the molecule index of the pharmacophore at index pharm_idx. More...
 
std::size_t getConformationIndex (std::size_t pharm_idx) const
 Returns the conformer index (within its owning molecule) of the pharmacophore at index pharm_idx. More...
 
const FeatureTypeHistogramgetFeatureCounts (std::size_t pharm_idx) const
 Returns the per-feature-type counts of the pharmacophore at index pharm_idx. More...
 
const FeatureTypeHistogramgetFeatureCounts (std::size_t mol_idx, std::size_t mol_conf_idx) const
 Returns the per-feature-type counts of the pharmacophore for the given (molecule, conformer) pair. More...
 
- Public Member Functions inherited from CDPL::Pharm::ScreeningDBAccessor
virtual ~ScreeningDBAccessor ()
 Virtual destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CDPL::Pharm::ScreeningDBAccessor
ScreeningDBAccessoroperator= (const ScreeningDBAccessor &)
 

Detailed Description

Pharm::ScreeningDBAccessor implementation that reads pharmacophore screening databases stored in the built-in optimized PSD format.

Member Typedef Documentation

◆ SharedPointer

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

Constructor & Destructor Documentation

◆ PSDScreeningDBAccessor() [1/3]

CDPL::Pharm::PSDScreeningDBAccessor::PSDScreeningDBAccessor ( )

Constructs a PSDScreeningDBAccessor instance without an associated database.

◆ PSDScreeningDBAccessor() [2/3]

CDPL::Pharm::PSDScreeningDBAccessor::PSDScreeningDBAccessor ( const std::string &  name)

Constructs a PSDScreeningDBAccessor instance that will read data from the database-file specified by name.

Parameters
nameThe name of the database-file.

◆ PSDScreeningDBAccessor() [3/3]

CDPL::Pharm::PSDScreeningDBAccessor::PSDScreeningDBAccessor ( const PSDScreeningDBAccessor )
delete

◆ ~PSDScreeningDBAccessor()

CDPL::Pharm::PSDScreeningDBAccessor::~PSDScreeningDBAccessor ( )

Destructor.

Member Function Documentation

◆ operator=()

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

◆ open()

void CDPL::Pharm::PSDScreeningDBAccessor::open ( const std::string &  name)
virtual

Opens the database-file specified by name.

Parameters
nameThe name of the database-file.

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ close()

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

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

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getDatabaseName()

const std::string& CDPL::Pharm::PSDScreeningDBAccessor::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::ScreeningDBAccessor.

◆ getNumMolecules()

std::size_t CDPL::Pharm::PSDScreeningDBAccessor::getNumMolecules ( ) const
virtual

Returns the total number of molecules stored in the database.

Returns
The molecule count.

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getNumPharmacophores() [1/2]

std::size_t CDPL::Pharm::PSDScreeningDBAccessor::getNumPharmacophores ( ) const
virtual

Returns the total number of pharmacophores stored in the database.

Returns
The pharmacophore count (the sum of getNumPharmacophores(mol_idx) over all molecules).

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getNumPharmacophores() [2/2]

std::size_t CDPL::Pharm::PSDScreeningDBAccessor::getNumPharmacophores ( std::size_t  mol_idx) const
virtual

Returns the number of pharmacophores (conformers) stored for the molecule at index mol_idx.

Parameters
mol_idxThe zero-based molecule index.
Returns
The per-molecule pharmacophore count.

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getMolecule()

void CDPL::Pharm::PSDScreeningDBAccessor::getMolecule ( std::size_t  mol_idx,
Chem::Molecule mol,
bool  overwrite = true 
) const
virtual

Retrieves the molecule at index mol_idx and stores it in mol.

Parameters
mol_idxThe zero-based molecule index.
molThe output molecule.
overwriteIf true, the output molecule is cleared before the database molecule is copied into it.

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getPharmacophore() [1/2]

void CDPL::Pharm::PSDScreeningDBAccessor::getPharmacophore ( std::size_t  pharm_idx,
Pharmacophore pharm,
bool  overwrite = true 
) const
virtual

Retrieves the pharmacophore at index pharm_idx and stores it in pharm.

Parameters
pharm_idxThe zero-based pharmacophore index.
pharmThe output pharmacophore.
overwriteIf true, the output pharmacophore is cleared before the database pharmacophore is copied into it.

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getPharmacophore() [2/2]

void CDPL::Pharm::PSDScreeningDBAccessor::getPharmacophore ( std::size_t  mol_idx,
std::size_t  mol_conf_idx,
Pharmacophore pharm,
bool  overwrite = true 
) const
virtual

Retrieves the pharmacophore for the given (molecule, conformer) pair and stores it in pharm.

Parameters
mol_idxThe zero-based molecule index.
mol_conf_idxThe zero-based conformer index within the molecule.
pharmThe output pharmacophore.
overwriteIf true, the output pharmacophore is cleared before the database pharmacophore is copied into it.

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getMoleculeIndex()

std::size_t CDPL::Pharm::PSDScreeningDBAccessor::getMoleculeIndex ( std::size_t  pharm_idx) const
virtual

Returns the molecule index of the pharmacophore at index pharm_idx.

Parameters
pharm_idxThe zero-based pharmacophore index.
Returns
The owning molecule index.

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getConformationIndex()

std::size_t CDPL::Pharm::PSDScreeningDBAccessor::getConformationIndex ( std::size_t  pharm_idx) const
virtual

Returns the conformer index (within its owning molecule) of the pharmacophore at index pharm_idx.

Parameters
pharm_idxThe zero-based pharmacophore index.
Returns
The conformer index.

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getFeatureCounts() [1/2]

const FeatureTypeHistogram& CDPL::Pharm::PSDScreeningDBAccessor::getFeatureCounts ( std::size_t  pharm_idx) const
virtual

Returns the per-feature-type counts of the pharmacophore at index pharm_idx.

Parameters
pharm_idxThe zero-based pharmacophore index.
Returns
A const reference to the feature-type histogram.

Implements CDPL::Pharm::ScreeningDBAccessor.

◆ getFeatureCounts() [2/2]

const FeatureTypeHistogram& CDPL::Pharm::PSDScreeningDBAccessor::getFeatureCounts ( std::size_t  mol_idx,
std::size_t  mol_conf_idx 
) const
virtual

Returns the per-feature-type counts of the pharmacophore for the given (molecule, conformer) pair.

Parameters
mol_idxThe zero-based molecule index.
mol_conf_idxThe zero-based conformer index within the molecule.
Returns
A const reference to the feature-type histogram.

Implements CDPL::Pharm::ScreeningDBAccessor.


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