BALL  1.4.1
surfaceProcessor.h
Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 
00005 #ifndef BALL_STRUCTURE_SURFACE_PROCESSOR_H
00006 #define BALL_STRUCTURE_SURFACE_PROCESSOR_H
00007 
00008 #ifndef BALL_COMMON_EXCEPTION_H
00009 # include <BALL/COMMON/exception.h>
00010 #endif
00011 #ifndef BALL_STRUCTURE_REDUCEDSURFACE_H
00012 # include <BALL/STRUCTURE/reducedSurface.h>
00013 #endif
00014 #ifndef BALL_STRUCTURE_SOLVENTEXCLUDEDSURFACE_H
00015 # include <BALL/STRUCTURE/solventExcludedSurface.h>
00016 #endif
00017 #ifndef BALL_STRUCTURE_TRIANGULATEDSES_H
00018 # include <BALL/STRUCTURE/triangulatedSES.h>
00019 #endif
00020 #ifndef BALL_STRUCTURE_SOLVENTACCESSIBLESURFACE_H
00021 # include <BALL/STRUCTURE/solventAccessibleSurface.h>
00022 #endif
00023 #ifndef BALL_STRUCTURE_TRIANGULATEDSAS_H
00024 # include <BALL/STRUCTURE/triangulatedSAS.h>
00025 #endif
00026 #ifndef BALL_STRUCTURE_TRIANGULATEDSURFACE_H
00027 # include <BALL/STRUCTURE/triangulatedSurface.h>
00028 #endif
00029 #ifndef BALL_MATHS_SURFACE_H
00030 # include <BALL/MATHS/surface.h>
00031 #endif
00032 #ifndef BALL_CONCEPT_PROCESSOR_H
00033 # include <BALL/CONCEPT/processor.h>
00034 #endif
00035 #ifndef BALL_KERNEL_ATOM_H
00036 # include <BALL/KERNEL/atom.h>
00037 #endif
00038 #ifndef BALL_KERNEL_PTE_H
00039 # include <BALL/KERNEL/PTE.h>
00040 #endif
00041 
00042 namespace BALL
00043 {
00044 
00048   class BALL_EXPORT SurfaceProcessor
00049     : public UnaryProcessor<Atom>
00050   {
00051     public:
00052 
00056 
00057     enum SurfaceType
00058     {
00059       SOLVENT_EXCLUDED_SURFACE,
00060       SOLVENT_ACCESSIBLE_SURFACE
00061     };
00063 
00067 
00069     SurfaceProcessor();
00070 
00072 
00076 
00078     virtual bool start();
00079 
00081     virtual bool finish();
00082 
00084     virtual Processor::Result operator () (Atom&  atom);
00086 
00089 
00091     const Surface& getSurface() const { return surface_; }
00092 
00094     Surface& getSurface() { return surface_; }
00095 
00101     void setProbeRadius(double radius) throw(Exception::OutOfRange){
00102       if(radius <= 0.0) {
00103         throw Exception::OutOfRange(__FILE__, __LINE__);
00104       }
00105 
00106       probe_radius_ = radius;
00107     }
00108 
00110     double getProbeRadius() const { return probe_radius_; }
00111 
00113     void setDensity(double density) { density_ = density; }
00114 
00116     double getDensity() const { return density_; }
00117 
00119     std::vector<TSphere3<double> >& getSpheres() { return spheres_; }
00120 
00124     void setType(SurfaceType type) { surface_type_ = type; }
00125 
00127     SurfaceType getType() const  { return surface_type_; }
00129 
00130     protected:
00131 
00133     double                          radius_offset_;
00134 
00136     double                          vdw_factor_;
00137 
00138     //_
00139     SurfaceType                     surface_type_;
00140 
00141     //_
00142     Surface                         surface_;
00143 
00144     //_
00145     std::vector<TSphere3<double> >  spheres_;
00146 
00147     //_
00148     double                          density_;
00149 
00150     //_
00151     double                          probe_radius_;
00152   };
00153 
00154 }
00155 
00156 #endif //  BALL_STRUCTURE_SURFACE_PROCESSOR_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines