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

Abstract base class for accessors that read the data stored in pharmacophore screening databases. More...

#include <ScreeningDBAccessor.hpp>

+ Inheritance diagram for CDPL::Pharm::ScreeningDBAccessor:

Public Types

typedef std::shared_ptr< ScreeningDBAccessorSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated ScreeningDBAccessor instances. More...
 

Public Member Functions

virtual ~ScreeningDBAccessor ()
 Virtual destructor. More...
 
virtual void open (const std::string &name)=0
 Opens the screening database identified by name. More...
 
virtual void close ()=0
 Closes 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 getNumMolecules () const =0
 Returns the total number of molecules stored in the database. More...
 
virtual std::size_t getNumPharmacophores () const =0
 Returns the total number of pharmacophores stored in the database (one per molecule conformer). More...
 
virtual std::size_t getNumPharmacophores (std::size_t mol_idx) const =0
 Returns the number of pharmacophores stored for the molecule at index mol_idx. More...
 
virtual void getMolecule (std::size_t mol_idx, Chem::Molecule &mol, bool overwrite=true) const =0
 Reads the molecule at index mol_idx into mol. More...
 
virtual void getPharmacophore (std::size_t pharm_idx, Pharmacophore &pharm, bool overwrite=true) const =0
 Reads the pharmacophore at index pharm_idx into pharm. More...
 
virtual void getPharmacophore (std::size_t mol_idx, std::size_t mol_conf_idx, Pharmacophore &pharm, bool overwrite=true) const =0
 Reads the pharmacophore corresponding to conformer mol_conf_idx of molecule mol_idx into pharm. More...
 
virtual std::size_t getMoleculeIndex (std::size_t pharm_idx) const =0
 Returns the molecule index of the pharmacophore at index pharm_idx. More...
 
virtual std::size_t getConformationIndex (std::size_t pharm_idx) const =0
 Returns the conformer index within the parent molecule of the pharmacophore at index pharm_idx. More...
 
virtual const FeatureTypeHistogramgetFeatureCounts (std::size_t pharm_idx) const =0
 Returns the cached per Pharm::FeatureType frequency histogram of the pharmacophore at index pharm_idx. More...
 
virtual const FeatureTypeHistogramgetFeatureCounts (std::size_t mol_idx, std::size_t mol_conf_idx) const =0
 Returns the cached per Pharm::FeatureType frequency histogram of conformer mol_conf_idx of molecule mol_idx. More...
 

Protected Member Functions

ScreeningDBAccessoroperator= (const ScreeningDBAccessor &)
 

Detailed Description

Abstract base class for accessors that read the data stored in pharmacophore screening databases.

Member Typedef Documentation

◆ SharedPointer

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

Constructor & Destructor Documentation

◆ ~ScreeningDBAccessor()

virtual CDPL::Pharm::ScreeningDBAccessor::~ScreeningDBAccessor ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ open()

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

Opens the screening database identified by name.

Parameters
nameThe database name (path, URI, etc., interpreted by the concrete subclass).

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ close()

virtual void CDPL::Pharm::ScreeningDBAccessor::close ( )
pure virtual

Closes the currently open database.

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getDatabaseName()

virtual const std::string& CDPL::Pharm::ScreeningDBAccessor::getDatabaseName ( ) const
pure virtual

Returns the name of the currently open database.

Returns
A const reference to the database name.

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getNumMolecules()

virtual std::size_t CDPL::Pharm::ScreeningDBAccessor::getNumMolecules ( ) const
pure virtual

Returns the total number of molecules stored in the database.

Returns
The molecule count.

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getNumPharmacophores() [1/2]

virtual std::size_t CDPL::Pharm::ScreeningDBAccessor::getNumPharmacophores ( ) const
pure virtual

Returns the total number of pharmacophores stored in the database (one per molecule conformer).

Returns
The pharmacophore count.

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getNumPharmacophores() [2/2]

virtual std::size_t CDPL::Pharm::ScreeningDBAccessor::getNumPharmacophores ( std::size_t  mol_idx) const
pure virtual

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

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

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getMolecule()

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

Reads the molecule at index mol_idx into mol.

Parameters
mol_idxThe zero-based molecule index.
molThe output molecule.
overwriteIf true, mol is cleared before reading; if false, the atoms/bonds are appended.

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getPharmacophore() [1/2]

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

Reads the pharmacophore at index pharm_idx into pharm.

Parameters
pharm_idxThe zero-based pharmacophore index (across all molecules).
pharmThe output pharmacophore.
overwriteIf true, pharm is cleared before reading; if false, the features are appended.

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getPharmacophore() [2/2]

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

Reads the pharmacophore corresponding to conformer mol_conf_idx of molecule mol_idx into pharm.

Parameters
mol_idxThe zero-based molecule index.
mol_conf_idxThe zero-based conformer index within the molecule.
pharmThe output pharmacophore.
overwriteIf true, pharm is cleared before reading; if false, the features are appended.

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getMoleculeIndex()

virtual std::size_t CDPL::Pharm::ScreeningDBAccessor::getMoleculeIndex ( std::size_t  pharm_idx) const
pure virtual

Returns the molecule index of the pharmacophore at index pharm_idx.

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

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getConformationIndex()

virtual std::size_t CDPL::Pharm::ScreeningDBAccessor::getConformationIndex ( std::size_t  pharm_idx) const
pure virtual

Returns the conformer index within the parent molecule of the pharmacophore at index pharm_idx.

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

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getFeatureCounts() [1/2]

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

Returns the cached per Pharm::FeatureType frequency histogram of the pharmacophore at index pharm_idx.

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

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ getFeatureCounts() [2/2]

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

Returns the cached per Pharm::FeatureType frequency histogram of conformer mol_conf_idx of molecule mol_idx.

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.

Implemented in CDPL::Pharm::PSDScreeningDBAccessor.

◆ operator=()

ScreeningDBAccessor& CDPL::Pharm::ScreeningDBAccessor::operator= ( const ScreeningDBAccessor )
inlineprotected

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