BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
numericalSAS.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_STRUCTURE_NUMERICALSAS_H
6 #define BALL_STRUCTURE_NUMERICALSAS_H
7 
8 #ifndef BALL_COMMON_H
9 # include <BALL/common.h>
10 #endif
11 
12 #ifndef BALL_DATATYPE_OPTIONS_H
13 # include <BALL/DATATYPE/options.h>
14 #endif
15 
16 #ifndef BALL_MATHS_SURFACE_H
17 # include <BALL/MATHS/surface.h>
18 #endif
19 
20 #ifndef BALL_MATHS_VECTOR3_H
21 # include <BALL/MATHS/vector3.h>
22 #endif
23 
24 namespace BALL
25 {
26  class Atom;
27  class AtomContainer;
28  template <typename Key, typename T>
29  class HashMap;
30  class TriangulatedSphere;
31 
45  {
46  public:
50 
54  {
58  static const String COMPUTE_AREA;
59 
63  static const String COMPUTE_VOLUME;
64 
72  static const String COMPUTE_SURFACE;
73 
83 
92 
98  static const String NUMBER_OF_POINTS;
99 
102  static const String PROBE_RADIUS;
103  };
104 
108  {
112  static const bool COMPUTE_AREA;
113 
117  static const bool COMPUTE_VOLUME;
118 
122  static const bool COMPUTE_SURFACE;
123 
128  static const bool COMPUTE_SURFACE_PER_ATOM;
129 
133  static const bool COMPUTE_SURFACE_MAP;
134 
140  static const Size NUMBER_OF_POINTS;
141 
145  static const float PROBE_RADIUS;
146  };
148 
149 
152 
154 
155 
157  NumericalSAS();
158 
161  NumericalSAS(const Options& options);
162 
165  virtual ~NumericalSAS();
167 
170 
171  void operator() (const AtomContainer& fragment);
172 
179  float getTotalArea() const {return total_area_;}
180 
187  HashMap<const Atom*, float>& getAtomAreas() {return atom_areas_;}
188 
195  const HashMap<const Atom*, float>& getAtomAreas() const {return atom_areas_;}
196 
203  float getTotalVolume() const {return total_volume_;}
204 
211  HashMap<const Atom*, float>& getAtomVolumes() {return atom_volumes_;}
212 
219  const HashMap<const Atom*, float>& getAtomVolumes() const {return atom_volumes_;}
220 
227  Surface& getSurface() {return surface_;}
228 
235  const Surface& getSurface() const {return surface_;}
236 
244 
251  const HashMap<const Atom*, Surface>& getSurfacePerAtom() const {return atom_surfaces_;}
252 
259  std::vector< std::pair<Vector3, Surface> >& getSurfaceMap() {return atom_surface_map_;}
260 
267  const std::vector< std::pair<Vector3, Surface> >& getSurfaceMap() const {return atom_surface_map_;}
268 
270 
274 
275  protected:
277  void setDefaultOptions_();
278 
282  Size computeSphereTesselation_(TriangulatedSphere& result, int num_points);
283 
286 
289 
291  float total_area_;
292 
295 
298 
301 
304 
306  std::vector< std::pair<Vector3, Surface> > atom_surface_map_;
307  };
308 
310 } // namespace BALL
311 
312 #endif // BALL_STRUCTURE_NUMERICALSAS_H