Chemical Data Processing Library C++ API - Version 1.4.0
GaussianShapeGenerator.hpp
Go to the documentation of this file.
1 /*
2  * GaussianShapeGenerator.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_GAUSSIANSHAPEGENERATOR_HPP
30 #define CDPL_SHAPE_GAUSSIANSHAPEGENERATOR_HPP
31 
32 #include <vector>
33 #include <memory>
34 
35 #include "CDPL/Shape/APIPrefix.hpp"
39 
40 
41 namespace CDPL
42 {
43 
44  namespace Chem
45  {
46 
47  class Atom;
48  }
49 
50  namespace Shape
51  {
52 
61  {
62 
63  public:
65  typedef std::shared_ptr<GaussianShapeGenerator> SharedPointer;
66 
71 
76  void generateMoleculeShape(bool generate);
77 
82  bool generateMoleculeShape() const;
83 
88  void generatePharmacophoreShape(bool generate);
89 
95 
100  void multiConformerMode(bool multi_conf);
101 
106  bool multiConformerMode() const;
107 
112  void includeHydrogens(bool include);
113 
118  bool includeHydrogens() const;
119 
124  void setAtomRadius(double radius);
125 
130  double getAtomRadius() const;
131 
136  void setAtomHardness(double hardness);
137 
142  double getAtomHardness();
143 
148  void setFeatureRadius(double radius);
149 
154  double getFeatureRadius() const;
155 
160  void setFeatureHardness(double hardness);
161 
167 
173 
179 
185 
191 
198 
203  const GaussianShapeSet& getShapes() const;
204 
205  private:
206  typedef std::vector<const Chem::Atom*> AtomList;
207 
208  template <typename CoordsFunc>
209  void createShape(const Chem::MolecularGraph& molgraph, const CoordsFunc& coords_func,
210  GaussianShape& shape);
211 
212  template <typename CoordsFunc>
213  void createShape(const CoordsFunc& coords_func, GaussianShape& shape) const;
214 
217  bool genMolShape;
218  bool genPharmShape;
219  bool incHydrogens;
220  bool multiConf;
221  double atomRadius;
222  double atomHardness;
223  double ftrRadius;
224  double ftrHardness;
225  GaussianShapeSet shapes;
227  AtomList shapeAtoms;
228  };
229  } // namespace Shape
230 } // namespace CDPL
231 
232 #endif // CDPL_SHAPE_GAUSSIANSHAPEGENERATOR_HPP
Definition of class CDPL::Pharm::BasicPharmacophore.
Definition of class CDPL::Pharm::DefaultPharmacophoreGenerator.
Definition of class CDPL::Shape::GaussianShapeSet.
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.
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
Concrete Pharm::Pharmacophore implementation that owns its features as Pharm::BasicFeature instances ...
Definition: BasicPharmacophore.hpp:53
Pharmacophore generator pre-configured with the built-in default set of feature generators.
Definition: DefaultPharmacophoreGenerator.hpp:53
Base class for pharmacophore generators that orchestrate per-feature-type Pharm::FeatureGenerator ins...
Definition: PharmacophoreGenerator.hpp:50
Generates Shape::GaussianShape instances from molecular graphs.
Definition: GaussianShapeGenerator.hpp:61
double getAtomRadius() const
Returns the currently configured atom sphere radius.
void setPharmacophoreGenerator(Pharm::PharmacophoreGenerator &gen)
Specifies the pharmacophore generator used when emitting pharmacophore shapes.
bool generateMoleculeShape() const
Tells whether a molecular (atom-based) shape is generated.
void setFeatureHardness(double hardness)
Sets the Gaussian hardness used for all feature spheres.
double getFeatureHardness()
Returns the currently configured feature Gaussian hardness.
const GaussianShapeSet & generate(const Chem::MolecularGraph &molgraph)
Generates the set of Gaussian shapes for molgraph.
std::shared_ptr< GaussianShapeGenerator > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated GaussianShapeGenerator instances.
Definition: GaussianShapeGenerator.hpp:65
void multiConformerMode(bool multi_conf)
Specifies whether to emit one shape per conformer (instead of using the first conformer only).
void includeHydrogens(bool include)
Specifies whether hydrogens are included when generating the molecular shape.
void setFeatureRadius(double radius)
Sets the sphere radius used for all features (negative value: use feature-specific tolerances).
bool generatePharmacophoreShape() const
Tells whether a pharmacophore (feature-based) shape is generated.
double getFeatureRadius() const
Returns the currently configured feature sphere radius.
Pharm::PharmacophoreGenerator & getPharmacophoreGenerator() const
Returns the currently configured pharmacophore generator.
const Pharm::DefaultPharmacophoreGenerator & getDefaultPharmacophoreGenerator() const
Returns the built-in default pharmacophore generator.
const GaussianShapeSet & getShapes() const
Returns the shapes produced by the most recent call to generate().
void generateMoleculeShape(bool generate)
Specifies whether a molecular (atom-based) shape shall be generated.
bool includeHydrogens() const
Tells whether hydrogens are included when generating the molecular shape.
bool multiConformerMode() const
Tells whether the generator runs in multi-conformer mode.
double getAtomHardness()
Returns the currently configured atom Gaussian hardness.
void setAtomHardness(double hardness)
Sets the Gaussian hardness used for all atom spheres.
void generatePharmacophoreShape(bool generate)
Specifies whether a pharmacophore (feature-based) shape shall be generated.
Pharm::DefaultPharmacophoreGenerator & getDefaultPharmacophoreGenerator()
Returns the built-in default pharmacophore generator (mutable).
void setAtomRadius(double radius)
Sets the sphere radius used for all atoms (negative value: use atom-specific Van der Waals radii).
GaussianShapeGenerator()
Constructs the GaussianShapeGenerator instance.
Data structure storing a set of (shared) Gaussian shapes.
Definition: GaussianShapeSet.hpp:52
Data type for the descripton of arbitrary shapes composed of spheres approximated by gaussian functio...
Definition: GaussianShape.hpp:51
The namespace of the Chemical Data Processing Library.