00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: surfaceProcessor.h,v 1.40 2005/12/23 17:02:05 amoll Exp $ 00005 // 00006 00007 #ifndef BALL_STRUCTURE_SURFACE_PROCESSOR_H 00008 #define BALL_STRUCTURE_SURFACE_PROCESSOR_H 00009 00010 #ifndef BALL_COMMON_EXCEPTION_H 00011 # include <BALL/COMMON/exception.h> 00012 #endif 00013 #ifndef BALL_STRUCTURE_REDUCEDSURFACE_H 00014 # include <BALL/STRUCTURE/reducedSurface.h> 00015 #endif 00016 #ifndef BALL_STRUCTURE_SOLVENTEXCLUDEDSURFACE_H 00017 # include <BALL/STRUCTURE/solventExcludedSurface.h> 00018 #endif 00019 #ifndef BALL_STRUCTURE_TRIANGULATEDSES_H 00020 # include <BALL/STRUCTURE/triangulatedSES.h> 00021 #endif 00022 #ifndef BALL_STRUCTURE_SOLVENTACCESSIBLESURFACE_H 00023 # include <BALL/STRUCTURE/solventAccessibleSurface.h> 00024 #endif 00025 #ifndef BALL_STRUCTURE_TRIANGULATEDSAS_H 00026 # include <BALL/STRUCTURE/triangulatedSAS.h> 00027 #endif 00028 #ifndef BALL_STRUCTURE_TRIANGULATEDSURFACE_H 00029 # include <BALL/STRUCTURE/triangulatedSurface.h> 00030 #endif 00031 #ifndef BALL_MATHS_SURFACE_H 00032 # include <BALL/MATHS/surface.h> 00033 #endif 00034 #ifndef BALL_CONCEPT_PROCESSOR_H 00035 # include <BALL/CONCEPT/processor.h> 00036 #endif 00037 #ifndef BALL_KERNEL_ATOM_H 00038 # include <BALL/KERNEL/atom.h> 00039 #endif 00040 #ifndef BALL_KERNEL_PTE_H 00041 # include <BALL/KERNEL/PTE.h> 00042 #endif 00043 00044 namespace BALL 00045 { 00046 00050 class BALL_EXPORT SurfaceProcessor 00051 : public UnaryProcessor<Atom> 00052 { 00053 public: 00054 00058 00059 enum SurfaceType 00060 { 00061 SOLVENT_EXCLUDED_SURFACE, 00062 SOLVENT_ACCESSIBLE_SURFACE 00063 }; 00065 00069 00071 SurfaceProcessor(); 00072 00074 00078 00080 virtual bool start(); 00081 00083 virtual bool finish(); 00084 00086 virtual Processor::Result operator () (Atom& atom); 00088 00091 00093 const Surface& getSurface() const { return surface_; } 00094 00096 Surface& getSurface() { return surface_; } 00097 00103 void setProbeRadius(double radius) throw(Exception::OutOfRange){ 00104 if(radius <= 0.0) { 00105 throw Exception::OutOfRange(__FILE__, __LINE__); 00106 } 00107 00108 probe_radius_ = radius; 00109 } 00110 00112 double getProbeRadius() const { return probe_radius_; } 00113 00115 void setDensity(double density) { density_ = density; } 00116 00118 double getDensity() const { return density_; } 00119 00121 std::vector<TSphere3<double> >& getSpheres() { return spheres_; } 00122 00126 void setType(SurfaceType type) { surface_type_ = type; } 00127 00129 SurfaceType getType() const { return surface_type_; } 00131 00132 protected: 00133 00135 double radius_offset_; 00136 00138 double vdw_factor_; 00139 00140 //_ 00141 SurfaceType surface_type_; 00142 00143 //_ 00144 Surface surface_; 00145 00146 //_ 00147 std::vector<TSphere3<double> > spheres_; 00148 00149 //_ 00150 double density_; 00151 00152 //_ 00153 double probe_radius_; 00154 }; 00155 00156 } 00157 00158 #endif // BALL_STRUCTURE_SURFACE_PROCESSOR_H