8 #ifndef IMPSAXS_SOLVENT_ACCESSIBLE_SURFACE_H
9 #define IMPSAXS_SOLVENT_ACCESSIBLE_SURFACE_H
11 #include <IMP/saxs/saxs_config.h>
14 IMPSAXS_BEGIN_NAMESPACE
34 float probe_radius = 1.8,
40 const float radius1,
const float radius2) {
41 float squared_radius_sum = (radius1 + radius2) * (radius1 + radius2);
44 if (fabs(squared_radius_sum - squared_dist) < 0.0001)
return false;
45 if (squared_radius_sum > squared_dist)
return true;
52 void create_sphere_dots(
const core::XYZRs& ps,
float density);
55 boost::unordered_map<float, int>::const_iterator it = radii2type_.find(r);
56 if (it == radii2type_.end()) {
57 IMP_THROW(
"SolventAccessibleSurface: can't find sphere dots for radius "
61 return sphere_dots_[it->second];
65 boost::unordered_map<float, int> radii2type_;
66 std::vector<algebra::Vector3Ds> sphere_dots_;
double get_squared_distance(const VectorD< D > &v1, const VectorD< D > &v2)
compute the squared distance between two vectors
#define IMP_THROW(message, exception_name)
Throw an exception with a message.
Decorator for a sphere-like particle.