00001
00002
00003
00004
00005
00006
00007 #ifndef IMPSAXS_SOLVENT_ACCESSIBLE_SURFACE_H
00008 #define IMPSAXS_SOLVENT_ACCESSIBLE_SURFACE_H
00009
00010 #include "saxs_config.h"
00011 #include <IMP/core/XYZR.h>
00012
00013 IMPSAXS_BEGIN_NAMESPACE
00014
00015
00016
00017
00018
00019
00020
00021 class IMPSAXSEXPORT SolventAccessibleSurface {
00022 public:
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 IMP::Floats get_solvent_accessibility(const core::XYZRs& points,
00033 float probe_radius = 1.8,
00034 float density = 5.0);
00035 private:
00036 bool is_intersecting(const algebra::Vector3D& sphere_center1,
00037 const algebra::Vector3D& sphere_center2,
00038 const float radius1, const float radius2) {
00039 float squared_radius_sum = (radius1+radius2)*(radius1+radius2);
00040 float squared_dist =
00041 algebra::get_squared_distance(sphere_center1, sphere_center2);
00042 if(fabs(squared_radius_sum - squared_dist) < 0.0001)
00043 return false;
00044 if(squared_radius_sum > squared_dist)
00045 return true;
00046 return false;
00047 }
00048
00049 algebra::Vector3Ds create_sphere_dots(float radius, float density);
00050
00051 };
00052
00053 IMPSAXS_END_NAMESPACE
00054
00055 #endif