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 double probe_radius = 1.8,
35 double density = 5.0);
40 const double radius1,
const double radius2) {
41 double 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,
double density);
55 boost::unordered_map<double, 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<double, int> radii2type_;
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.
An exception for an invalid value being passed to IMP.
Decorator for a sphere-like particle.