Chemical Data Processing Library C++ API - Version 1.1.1
ScreeningDBAccessor.hpp
Go to the documentation of this file.
1 /*
2  * ScreeningDBAccessor.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_SCREENINGDBACCESSOR_HPP
30 #define CDPL_PHARM_SCREENINGDBACCESSOR_HPP
31 
32 #include <string>
33 #include <cstddef>
34 #include <memory>
35 
36 #include "CDPL/Pharm/APIPrefix.hpp"
37 
38 
39 namespace CDPL
40 {
41 
42  namespace Chem
43  {
44 
45  class Molecule;
46  }
47 
48  namespace Pharm
49  {
50 
51  class Pharmacophore;
52  class FeatureTypeHistogram;
53 
58  {
59 
60  public:
61  typedef std::shared_ptr<ScreeningDBAccessor> SharedPointer;
62 
66  virtual ~ScreeningDBAccessor() {}
67 
68  virtual void open(const std::string& name) = 0;
69 
70  virtual void close() = 0;
71 
72  virtual const std::string& getDatabaseName() const = 0;
73 
74  virtual std::size_t getNumMolecules() const = 0;
75 
76  virtual std::size_t getNumPharmacophores() const = 0;
77 
78  virtual std::size_t getNumPharmacophores(std::size_t mol_idx) const = 0;
79 
80  virtual void getMolecule(std::size_t mol_idx, Chem::Molecule& mol, bool overwrite = true) const = 0;
81 
82  virtual void getPharmacophore(std::size_t pharm_idx, Pharmacophore& pharm, bool overwrite = true) const = 0;
83 
84  virtual void getPharmacophore(std::size_t mol_idx, std::size_t mol_conf_idx, Pharmacophore& pharm, bool overwrite = true) const = 0;
85 
86  virtual std::size_t getMoleculeIndex(std::size_t pharm_idx) const = 0;
87 
88  virtual std::size_t getConformationIndex(std::size_t pharm_idx) const = 0;
89 
90  virtual const FeatureTypeHistogram& getFeatureCounts(std::size_t pharm_idx) const = 0;
91 
92  virtual const FeatureTypeHistogram& getFeatureCounts(std::size_t mol_idx, std::size_t mol_conf_idx) const = 0;
93 
94  protected:
96  {
97  return *this;
98  }
99  };
100  } // namespace Pharm
101 } // namespace CDPL
102 
103 #endif // CDPL_PHARM_SCREENINGDBACCESSOR_HPP
APIPrefix.hpp
Definition of the preprocessor macro CDPL_PHARM_API.
CDPL_PHARM_API
#define CDPL_PHARM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Pharm::ScreeningDBAccessor::getMolecule
virtual void getMolecule(std::size_t mol_idx, Chem::Molecule &mol, bool overwrite=true) const =0
CDPL::Pharm::ScreeningDBAccessor::getNumPharmacophores
virtual std::size_t getNumPharmacophores() const =0
CDPL::Pharm::ScreeningDBAccessor::~ScreeningDBAccessor
virtual ~ScreeningDBAccessor()
Virtual destructor.
Definition: ScreeningDBAccessor.hpp:66
CDPL::Pharm::FeatureTypeHistogram
A data type for the storage of feature type histograms of pharmacophores.
Definition: FeatureTypeHistogram.hpp:50
CDPL::Pharm::ScreeningDBAccessor::getFeatureCounts
virtual const FeatureTypeHistogram & getFeatureCounts(std::size_t mol_idx, std::size_t mol_conf_idx) const =0
CDPL::Pharm::ScreeningDBAccessor::operator=
ScreeningDBAccessor & operator=(const ScreeningDBAccessor &)
Definition: ScreeningDBAccessor.hpp:95
CDPL::Pharm::ScreeningDBAccessor::getPharmacophore
virtual void getPharmacophore(std::size_t mol_idx, std::size_t mol_conf_idx, Pharmacophore &pharm, bool overwrite=true) const =0
CDPL::Pharm::ScreeningDBAccessor::getFeatureCounts
virtual const FeatureTypeHistogram & getFeatureCounts(std::size_t pharm_idx) const =0
CDPL::Pharm::ScreeningDBAccessor::getMoleculeIndex
virtual std::size_t getMoleculeIndex(std::size_t pharm_idx) const =0
CDPL::Chem::Molecule
Molecule.
Definition: Molecule.hpp:49
CDPL::Pharm::ScreeningDBAccessor::getPharmacophore
virtual void getPharmacophore(std::size_t pharm_idx, Pharmacophore &pharm, bool overwrite=true) const =0
CDPL::Pharm::Pharmacophore
Pharmacophore.
Definition: Pharmacophore.hpp:48
CDPL::Pharm::ScreeningDBAccessor::getDatabaseName
virtual const std::string & getDatabaseName() const =0
CDPL::Pharm::ScreeningDBAccessor::close
virtual void close()=0
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Pharm::ScreeningDBAccessor::SharedPointer
std::shared_ptr< ScreeningDBAccessor > SharedPointer
Definition: ScreeningDBAccessor.hpp:61
CDPL::Pharm::ScreeningDBAccessor::open
virtual void open(const std::string &name)=0
CDPL::Pharm::ScreeningDBAccessor::getNumMolecules
virtual std::size_t getNumMolecules() const =0
CDPL::Pharm::ScreeningDBAccessor
A class for accessing the data stored in pharmacophore screening databases.
Definition: ScreeningDBAccessor.hpp:58
CDPL::Pharm::ScreeningDBAccessor::getConformationIndex
virtual std::size_t getConformationIndex(std::size_t pharm_idx) const =0
CDPL::Pharm::ScreeningDBAccessor::getNumPharmacophores
virtual std::size_t getNumPharmacophores(std::size_t mol_idx) const =0