Chemical Data Processing Library C++ API - Version 1.1.1
PSDScreeningDBAccessor.hpp
Go to the documentation of this file.
1 /*
2  * PSDScreeningDBAccessor.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_PHARM_PSDSCREENINGDBACCESSOR_HPP
30 #define CDPL_PHARM_PSDSCREENINGDBACCESSOR_HPP
31 
32 #include <memory>
33 
34 #include "CDPL/Pharm/APIPrefix.hpp"
36 
37 
38 namespace CDPL
39 {
40 
41  namespace Pharm
42  {
43 
44  class PSDScreeningDBAccessorImpl;
45 
50  {
51 
52  public:
53  typedef std::shared_ptr<PSDScreeningDBAccessor> SharedPointer;
54 
56 
62  PSDScreeningDBAccessor(const std::string& name);
63 
68 
69  void open(const std::string& name);
70 
71  void close();
72 
73  const std::string& getDatabaseName() const;
74 
75  std::size_t getNumMolecules() const;
76 
77  std::size_t getNumPharmacophores() const;
78 
79  std::size_t getNumPharmacophores(std::size_t mol_idx) const;
80 
81  void getMolecule(std::size_t mol_idx, Chem::Molecule& mol, bool overwrite = true) const;
82 
83  void getPharmacophore(std::size_t pharm_idx, Pharmacophore& pharm, bool overwrite = true) const;
84 
85  void getPharmacophore(std::size_t mol_idx, std::size_t mol_conf_idx, Pharmacophore& pharm, bool overwrite = true) const;
86 
87  std::size_t getMoleculeIndex(std::size_t pharm_idx) const;
88 
89  std::size_t getConformationIndex(std::size_t pharm_idx) const;
90 
91  const FeatureTypeHistogram& getFeatureCounts(std::size_t pharm_idx) const;
92 
93  const FeatureTypeHistogram& getFeatureCounts(std::size_t mol_idx, std::size_t mol_conf_idx) const;
94 
95  private:
96  typedef std::unique_ptr<PSDScreeningDBAccessorImpl> ImplementationPointer;
97 
99 
101 
102  ImplementationPointer impl;
103  };
104  } // namespace Pharm
105 } // namespace CDPL
106 
107 #endif // CDPL_PHARM_PSDSCREENINGDBACCESSOR_HPP
APIPrefix.hpp
Definition of the preprocessor macro CDPL_PHARM_API.
CDPL::Pharm::PSDScreeningDBAccessor::~PSDScreeningDBAccessor
~PSDScreeningDBAccessor()
Destructor.
CDPL_PHARM_API
#define CDPL_PHARM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Pharm::PSDScreeningDBAccessor::getMoleculeIndex
std::size_t getMoleculeIndex(std::size_t pharm_idx) const
CDPL::Pharm::PSDScreeningDBAccessor::close
void close()
CDPL::Pharm::FeatureTypeHistogram
A data type for the storage of feature type histograms of pharmacophores.
Definition: FeatureTypeHistogram.hpp:50
CDPL::Pharm::PSDScreeningDBAccessor::getNumPharmacophores
std::size_t getNumPharmacophores() const
CDPL::Pharm::PSDScreeningDBAccessor::getNumPharmacophores
std::size_t getNumPharmacophores(std::size_t mol_idx) const
CDPL::Pharm::PSDScreeningDBAccessor::open
void open(const std::string &name)
CDPL::Pharm::PSDScreeningDBAccessor::getConformationIndex
std::size_t getConformationIndex(std::size_t pharm_idx) const
CDPL::Pharm::PSDScreeningDBAccessor::getPharmacophore
void getPharmacophore(std::size_t pharm_idx, Pharmacophore &pharm, bool overwrite=true) const
CDPL::Pharm::PSDScreeningDBAccessor::PSDScreeningDBAccessor
PSDScreeningDBAccessor(const std::string &name)
Constructs a ScreeningDBAccessor instance that will read data from the database-file specified by nam...
CDPL::Pharm::PSDScreeningDBAccessor::getDatabaseName
const std::string & getDatabaseName() const
CDPL::Chem::Molecule
Molecule.
Definition: Molecule.hpp:49
CDPL::Pharm::PSDScreeningDBAccessor
A class for accessing pharmacophore screening databases in the built-in optimized format.
Definition: PSDScreeningDBAccessor.hpp:50
CDPL::Pharm::PSDScreeningDBAccessor::getFeatureCounts
const FeatureTypeHistogram & getFeatureCounts(std::size_t mol_idx, std::size_t mol_conf_idx) const
CDPL::Pharm::PSDScreeningDBAccessor::getMolecule
void getMolecule(std::size_t mol_idx, Chem::Molecule &mol, bool overwrite=true) const
CDPL::Pharm::Pharmacophore
Pharmacophore.
Definition: Pharmacophore.hpp:48
CDPL::Pharm::PSDScreeningDBAccessor::getFeatureCounts
const FeatureTypeHistogram & getFeatureCounts(std::size_t pharm_idx) const
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Pharm::PSDScreeningDBAccessor::PSDScreeningDBAccessor
PSDScreeningDBAccessor()
CDPL::Pharm::PSDScreeningDBAccessor::SharedPointer
std::shared_ptr< PSDScreeningDBAccessor > SharedPointer
Definition: PSDScreeningDBAccessor.hpp:53
ScreeningDBAccessor.hpp
Definition of the class CDPL::Pharm::ScreeningDBAccessor.
CDPL::Pharm::PSDScreeningDBAccessor::getPharmacophore
void getPharmacophore(std::size_t mol_idx, std::size_t mol_conf_idx, Pharmacophore &pharm, bool overwrite=true) const
CDPL::Pharm::PSDScreeningDBAccessor::getNumMolecules
std::size_t getNumMolecules() const
CDPL::Pharm::ScreeningDBAccessor
A class for accessing the data stored in pharmacophore screening databases.
Definition: ScreeningDBAccessor.hpp:58