Float SphereDistanceToSingletonScore::evaluate_index( Model *m, ParticleIndex pi, DerivativeAccumulator *da) const { Float v = internal::evaluate_distance_pair_score( XYZR(m, pi), StaticD(pt_), da, f_.get(), boost::lambda::_1 - XYZR(m, pi).get_radius()); IMP_LOG_VERBOSE("SphereDistanceTo from " << XYZR(m, pi) << " to " << pt_ << " scored " << v << std::endl); return v; }
void XYZRMovedSingletonContainer::do_reset_all() { IMP_OBJECT_LOG; backup_.clear(); moved_.clear(); // backup_.resize(get_singleton_container()->get_number_of_particles()); IMP_CONTAINER_FOREACH(SingletonContainer, get_singleton_container(), { backup_.push_back(XYZR(get_model(), _1).get_sphere()); });
display::Geometries RigidBodyHierarchyGeometry::get_components() const { display::Geometries ret; algebra::Sphere3D s = h_->get_sphere(node_); IMP_NEW(display::SphereGeometry, sg, (s)); std::ostringstream oss; oss << h_->get_name() << " " << layer_; sg->set_name(oss.str()); if (h_->get_is_leaf(node_)) { for (unsigned int i = 0; i < h_->get_number_of_particles(node_); ++i) { ret.push_back( new XYZRGeometry(XYZR(h_->get_model(), h_->get_particle(node_, i)))); } } else { for (unsigned int i = 0; i < h_->get_number_of_children(node_); ++i) { ret.push_back(new RigidBodyHierarchyGeometry(h_, h_->get_child(node_, i), layer_ + 1)); } } return ret; }