Chemical Data Processing Library C++ API - Version 1.2.0
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 
65 
70 
72 
73  void open(const std::string& name);
74 
75  void close();
76 
77  const std::string& getDatabaseName() const;
78 
79  std::size_t getNumMolecules() const;
80 
81  std::size_t getNumPharmacophores() const;
82 
83  std::size_t getNumPharmacophores(std::size_t mol_idx) const;
84 
85  void getMolecule(std::size_t mol_idx, Chem::Molecule& mol, bool overwrite = true) const;
86 
87  void getPharmacophore(std::size_t pharm_idx, Pharmacophore& pharm, bool overwrite = true) const;
88 
89  void getPharmacophore(std::size_t mol_idx, std::size_t mol_conf_idx, Pharmacophore& pharm, bool overwrite = true) const;
90 
91  std::size_t getMoleculeIndex(std::size_t pharm_idx) const;
92 
93  std::size_t getConformationIndex(std::size_t pharm_idx) const;
94 
95  const FeatureTypeHistogram& getFeatureCounts(std::size_t pharm_idx) const;
96 
97  const FeatureTypeHistogram& getFeatureCounts(std::size_t mol_idx, std::size_t mol_conf_idx) const;
98 
99  private:
100  typedef std::unique_ptr<PSDScreeningDBAccessorImpl> ImplementationPointer;
101 
102  ImplementationPointer impl;
103  };
104  } // namespace Pharm
105 } // namespace CDPL
106 
107 #endif // CDPL_PHARM_PSDSCREENINGDBACCESSOR_HPP
Definition of the preprocessor macro CDPL_PHARM_API.
#define CDPL_PHARM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the class CDPL::Pharm::ScreeningDBAccessor.
Molecule.
Definition: Molecule.hpp:49
A data type for the storage of feature type histograms of pharmacophores.
Definition: FeatureTypeHistogram.hpp:50
A class for accessing pharmacophore screening databases in the built-in optimized format.
Definition: PSDScreeningDBAccessor.hpp:50
void getPharmacophore(std::size_t mol_idx, std::size_t mol_conf_idx, Pharmacophore &pharm, bool overwrite=true) const
void open(const std::string &name)
std::size_t getConformationIndex(std::size_t pharm_idx) const
void getMolecule(std::size_t mol_idx, Chem::Molecule &mol, bool overwrite=true) const
std::shared_ptr< PSDScreeningDBAccessor > SharedPointer
Definition: PSDScreeningDBAccessor.hpp:53
std::size_t getNumPharmacophores(std::size_t mol_idx) const
void getPharmacophore(std::size_t pharm_idx, Pharmacophore &pharm, bool overwrite=true) const
PSDScreeningDBAccessor(const std::string &name)
Constructs a ScreeningDBAccessor instance that will read data from the database-file specified by nam...
std::size_t getNumPharmacophores() const
std::size_t getNumMolecules() const
const FeatureTypeHistogram & getFeatureCounts(std::size_t pharm_idx) const
const std::string & getDatabaseName() const
const FeatureTypeHistogram & getFeatureCounts(std::size_t mol_idx, std::size_t mol_conf_idx) const
PSDScreeningDBAccessor(const PSDScreeningDBAccessor &)=delete
std::size_t getMoleculeIndex(std::size_t pharm_idx) const
PSDScreeningDBAccessor & operator=(const PSDScreeningDBAccessor &)=delete
Pharmacophore.
Definition: Pharmacophore.hpp:48
A class for accessing the data stored in pharmacophore screening databases.
Definition: ScreeningDBAccessor.hpp:58
The namespace of the Chemical Data Processing Library.