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:
67  typedef std::shared_ptr<GaussianShapeGenerator> SharedPointer;
68 
73 
78  void generateMoleculeShape(bool generate);
79 
84  bool generateMoleculeShape() const;
85 
90  void generatePharmacophoreShape(bool generate);
91 
97 
102  void multiConformerMode(bool multi_conf);
103 
108  bool multiConformerMode() const;
109 
114  void includeHydrogens(bool include);
115 
120  bool includeHydrogens() const;
121 
126  void setAtomRadius(double radius);
127 
132  double getAtomRadius() const;
133 
138  void setAtomHardness(double hardness);
139 
144  double getAtomHardness();
145 
150  void setFeatureRadius(double radius);
151 
156  double getFeatureRadius() const;
157 
162  void setFeatureHardness(double hardness);
163 
169 
175 
181 
187 
193 
200 
205  const GaussianShapeSet& getShapes() const;
206 
207  private:
208  typedef std::vector<const Chem::Atom*> AtomList;
209 
210  template <typename CoordsFunc>
211  void createShape(const Chem::MolecularGraph& molgraph, const CoordsFunc& coords_func,
212  GaussianShape& shape);
213 
214  template <typename CoordsFunc>
215  void createShape(const CoordsFunc& coords_func, GaussianShape& shape) const;
216 
219  bool genMolShape;
220  bool genPharmShape;
221  bool incHydrogens;
222  bool multiConf;
223  double atomRadius;
224  double atomHardness;
225  double ftrRadius;
226  double ftrHardness;
227  GaussianShapeSet shapes;
229  AtomList shapeAtoms;
230  };
231  } // namespace Shape
232 } // namespace CDPL
233 
234 #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:67
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.