Chemical Data Processing Library C++ API - Version 1.1.1
Pharm/ScreeningProcessor.hpp
Go to the documentation of this file.
1 /*
2  * ScreeningProcessor.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_SCREENINGPROCESSOR_HPP
30 #define CDPL_PHARM_SCREENINGPROCESSOR_HPP
31 
32 #include <memory>
33 #include <cstddef>
34 #include <functional>
35 
36 #include "CDPL/Pharm/APIPrefix.hpp"
37 #include "CDPL/Math/Matrix.hpp"
38 
39 
40 namespace CDPL
41 {
42 
43  namespace Chem
44  {
45 
46  class Molecule;
47  }
48 
49  namespace Pharm
50  {
51 
52  class FeatureContainer;
53  class ScreeningDBAccessor;
54  class ScreeningProcessorImpl;
55 
60  {
61 
62  public:
64  {
65 
68  ALL_MATCHING_CONFS
69  };
70 
72  {
73 
74  public:
75  SearchHit(const ScreeningProcessor& hit_prov, const FeatureContainer& qry_pharm,
76  const FeatureContainer& hit_pharm, const Chem::Molecule& mol,
77  const Math::Matrix4D& xform, std::size_t pharm_idx,
78  std::size_t mol_idx, std::size_t conf_idx);
79 
81 
83 
85 
87 
89 
90  std::size_t getHitPharmacophoreIndex() const;
91 
92  std::size_t getHitMoleculeIndex() const;
93 
94  std::size_t getHitConformationIndex() const;
95 
96  private:
97  const ScreeningProcessor* provider;
98  const FeatureContainer* qryPharm;
99  const FeatureContainer* hitPharm;
100  const Chem::Molecule* molecule;
101  const Math::Matrix4D* almntTransform;
102  std::size_t pharmIndex;
103  std::size_t molIndex;
104  std::size_t confIndex;
105  };
106 
107  typedef std::shared_ptr<ScreeningProcessor> SharedPointer;
108 
109  typedef std::function<bool(const SearchHit&, double)> HitCallbackFunction;
110  typedef std::function<double(const SearchHit&)> ScoringFunction;
111  typedef std::function<bool(std::size_t, std::size_t)> ProgressCallbackFunction;
112 
119 
124 
126 
128 
130 
132 
133  void setMaxNumOmittedFeatures(std::size_t max_num);
134 
135  std::size_t getMaxNumOmittedFeatures() const;
136 
137  void checkXVolumeClashes(bool check);
138 
139  bool xVolumeClashesChecked() const;
140 
141  void seekBestAlignments(bool seek_best);
142 
143  bool bestAlignmentsSeeked() const;
144 
146 
148 
150 
152 
154 
156 
157  std::size_t searchDB(const FeatureContainer& query, std::size_t mol_start_idx = 0, std::size_t mol_end_idx = 0);
158 
159  private:
160  typedef std::unique_ptr<ScreeningProcessorImpl> ImplementationPointer;
161 
163 
164  ScreeningProcessor& operator=(const ScreeningProcessor& proc);
165 
166  ImplementationPointer impl;
167  };
168  } // namespace Pharm
169 } // namespace CDPL
170 
171 #endif // CDPL_PHARM_SCREENINGPROCESSOR_HPP
APIPrefix.hpp
Definition of the preprocessor macro CDPL_PHARM_API.
CDPL::Pharm::ScreeningProcessor::SearchHit::getHitMolecule
const Chem::Molecule & getHitMolecule() const
CDPL::Pharm::ScreeningProcessor::SearchHit::getHitPharmacophoreIndex
std::size_t getHitPharmacophoreIndex() const
CDPL_PHARM_API
#define CDPL_PHARM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Pharm::ScreeningProcessor::seekBestAlignments
void seekBestAlignments(bool seek_best)
CDPL::Pharm::ScreeningProcessor::~ScreeningProcessor
~ScreeningProcessor()
CDPL::Pharm::ScreeningProcessor::setProgressCallback
void setProgressCallback(const ProgressCallbackFunction &func)
CMatrix< double, 4, 4 >
CDPL::Pharm::ScreeningProcessor::FIRST_MATCHING_CONF
@ FIRST_MATCHING_CONF
Definition: Pharm/ScreeningProcessor.hpp:66
CDPL::Pharm::ScreeningProcessor::getMaxNumOmittedFeatures
std::size_t getMaxNumOmittedFeatures() const
CDPL::Pharm::ScreeningProcessor::SearchHit::getHitPharmacophore
const FeatureContainer & getHitPharmacophore() const
CDPL::Pharm::ScreeningProcessor::getScoringFunction
const ScoringFunction & getScoringFunction() const
CDPL::Pharm::ScreeningProcessor::searchDB
std::size_t searchDB(const FeatureContainer &query, std::size_t mol_start_idx=0, std::size_t mol_end_idx=0)
CDPL::Pharm::ScreeningProcessor::SearchHit::getHitAlignmentTransform
const Math::Matrix4D & getHitAlignmentTransform() const
CDPL::Pharm::ScreeningProcessor::SearchHit::getHitConformationIndex
std::size_t getHitConformationIndex() const
CDPL::Pharm::ScreeningProcessor::HitCallbackFunction
std::function< bool(const SearchHit &, double)> HitCallbackFunction
Definition: Pharm/ScreeningProcessor.hpp:109
CDPL::Pharm::ScreeningProcessor::checkXVolumeClashes
void checkXVolumeClashes(bool check)
CDPL::Pharm::ScreeningProcessor::ProgressCallbackFunction
std::function< bool(std::size_t, std::size_t)> ProgressCallbackFunction
Definition: Pharm/ScreeningProcessor.hpp:111
CDPL::Pharm::ScreeningProcessor::getProgressCallback
const ProgressCallbackFunction & getProgressCallback() const
bool
CDPL::Pharm::ScreeningProcessor::setHitCallback
void setHitCallback(const HitCallbackFunction &func)
CDPL::Pharm::ScreeningProcessor::ScoringFunction
std::function< double(const SearchHit &)> ScoringFunction
Definition: Pharm/ScreeningProcessor.hpp:110
CDPL::Pharm::FeatureContainer
FeatureContainer.
Definition: FeatureContainer.hpp:53
CDPL::Chem::Molecule
Molecule.
Definition: Molecule.hpp:49
double
CDPL::Pharm::ScreeningProcessor::HitReportMode
HitReportMode
Definition: Pharm/ScreeningProcessor.hpp:64
CDPL::Pharm::ScreeningProcessor::SharedPointer
std::shared_ptr< ScreeningProcessor > SharedPointer
Definition: Pharm/ScreeningProcessor.hpp:107
CDPL::Pharm::ScreeningProcessor::bestAlignmentsSeeked
bool bestAlignmentsSeeked() const
CDPL::Pharm::ScreeningProcessor::BEST_MATCHING_CONF
@ BEST_MATCHING_CONF
Definition: Pharm/ScreeningProcessor.hpp:67
CDPL::Pharm::ScreeningProcessor
ScreeningProcessor.
Definition: Pharm/ScreeningProcessor.hpp:60
CDPL::Pharm::ScreeningProcessor::ScreeningProcessor
ScreeningProcessor(ScreeningDBAccessor &db_acc)
Constructs the ScreeningProcessor instance for the given screening database accessor db_acc.
CDPL::Pharm::ScreeningProcessor::SearchHit
Definition: Pharm/ScreeningProcessor.hpp:72
CDPL::Pharm::ScreeningProcessor::setDBAccessor
void setDBAccessor(ScreeningDBAccessor &db_acc)
CDPL::Pharm::ScreeningProcessor::setScoringFunction
void setScoringFunction(const ScoringFunction &func)
CDPL::Pharm::ScreeningProcessor::SearchHit::SearchHit
SearchHit(const ScreeningProcessor &hit_prov, const FeatureContainer &qry_pharm, const FeatureContainer &hit_pharm, const Chem::Molecule &mol, const Math::Matrix4D &xform, std::size_t pharm_idx, std::size_t mol_idx, std::size_t conf_idx)
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Pharm::ScreeningProcessor::setHitReportMode
void setHitReportMode(HitReportMode mode)
CDPL::Pharm::ScreeningProcessor::xVolumeClashesChecked
bool xVolumeClashesChecked() const
CDPL::Pharm::ScreeningProcessor::SearchHit::getHitProvider
const ScreeningProcessor & getHitProvider() const
CDPL::Pharm::ScreeningProcessor::getHitCallback
const HitCallbackFunction & getHitCallback() const
CDPL::Pharm::ScreeningProcessor::getDBAccessor
ScreeningDBAccessor & getDBAccessor() const
Matrix.hpp
Definition of matrix data types.
CDPL::Pharm::ScreeningProcessor::SearchHit::getHitMoleculeIndex
std::size_t getHitMoleculeIndex() const
CDPL::Pharm::ScreeningProcessor::getHitReportMode
HitReportMode getHitReportMode() const
CDPL::Pharm::ScreeningDBAccessor
A class for accessing the data stored in pharmacophore screening databases.
Definition: ScreeningDBAccessor.hpp:58
CDPL::Pharm::ScreeningProcessor::setMaxNumOmittedFeatures
void setMaxNumOmittedFeatures(std::size_t max_num)
CDPL::Pharm::ScreeningProcessor::SearchHit::getQueryPharmacophore
const FeatureContainer & getQueryPharmacophore() const