Chemical Data Processing Library C++ API - Version 1.2.0
Shape/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_SHAPE_SCREENINGPROCESSOR_HPP
30 #define CDPL_SHAPE_SCREENINGPROCESSOR_HPP
31 
32 #include <cstddef>
33 #include <vector>
34 #include <memory>
35 #include <functional>
36 
37 #include <boost/iterator/indirect_iterator.hpp>
38 
39 #include "CDPL/Shape/APIPrefix.hpp"
44 
45 
46 namespace CDPL
47 {
48 
49  namespace Chem
50  {
51 
52  class MolecularGraph;
53  }
54 
55  namespace Shape
56  {
57 
58  class AlignmentResult;
59 
61  {
62 
63  typedef std::vector<const Chem::MolecularGraph*> MolecularGraphList;
64 
65  public:
66  typedef std::shared_ptr<ScreeningProcessor> SharedPointer;
67  typedef boost::indirect_iterator<MolecularGraphList::const_iterator, const Chem::MolecularGraph> ConstMolecularGraphIterator;
68  typedef std::function<void(const Chem::MolecularGraph&, const Chem::MolecularGraph&, const AlignmentResult&)> HitCallbackFunction;
69 
71 
73 
74  ScreeningProcessor(const ScreeningProcessor& proc) = delete;
75 
77 
79 
81 
83 
85 
87 
88  void clearQuerySet();
89 
90  void addQuery(const Chem::MolecularGraph& molgraph);
91 
92  std::size_t getQuerySetSize() const;
93 
94  const Chem::MolecularGraph& getQuery(std::size_t idx) const;
95 
97 
99 
100  bool process(const Chem::MolecularGraph& molgraph);
101 
102  private:
103  void init();
104  void applyShapeGenSettings(bool query);
105  void applyAlignmentSettings();
106  void resetQuery();
107 
108  ScreeningSettings settings;
110  bool allCarbon;
112  FastGaussianShapeAlignment alignment;
113  GaussianShapeGenerator shapeGen;
114  MolecularGraphList queryList;
115  HitCallbackFunction hitCallback;
116  };
117  } // namespace Shape
118 } // namespace CDPL
119 
120 #endif // CDPL_SHAPE_SCREENINGPROCESSOR_HPP
Definition of the class CDPL::Pharm::DefaultPharmacophoreGenerator.
Definition of the class CDPL::Shape::FastGaussianShapeAlignment.
Definition of the class CDPL::Shape::GaussianShapeGenerator.
Definition of the class CDPL::Shape::ScreeningSettings.
Definition of the preprocessor macro CDPL_SHAPE_API.
#define CDPL_SHAPE_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
MolecularGraph.
Definition: MolecularGraph.hpp:52
DefaultPharmacophoreGenerator.
Definition: DefaultPharmacophoreGenerator.hpp:48
Definition: AlignmentResult.hpp:45
Definition: FastGaussianShapeAlignment.hpp:60
Definition: GaussianShapeGenerator.hpp:54
Definition: Shape/ScreeningProcessor.hpp:61
void addQuery(const Chem::MolecularGraph &molgraph)
const HitCallbackFunction & getHitCallback() const
std::function< void(const Chem::MolecularGraph &, const Chem::MolecularGraph &, const AlignmentResult &)> HitCallbackFunction
Definition: Shape/ScreeningProcessor.hpp:68
const Chem::MolecularGraph & getQuery(std::size_t idx) const
std::size_t getQuerySetSize() const
ConstMolecularGraphIterator getQuerySetEnd() const
bool process(const Chem::MolecularGraph &molgraph)
ScreeningProcessor(const Chem::MolecularGraph &query)
std::shared_ptr< ScreeningProcessor > SharedPointer
Definition: Shape/ScreeningProcessor.hpp:66
ScreeningSettings & getSettings()
ConstMolecularGraphIterator getQuerySetBegin() const
const ScreeningSettings & getSettings() const
boost::indirect_iterator< MolecularGraphList::const_iterator, const Chem::MolecularGraph > ConstMolecularGraphIterator
Definition: Shape/ScreeningProcessor.hpp:67
ScreeningProcessor(const ScreeningProcessor &proc)=delete
void setHitCallback(const HitCallbackFunction &func)
ScreeningProcessor & operator=(const ScreeningProcessor &proc)=delete
Definition: ScreeningSettings.hpp:48
ColorFeatureType
Definition: ScreeningSettings.hpp:65
The namespace of the Chemical Data Processing Library.