9 #ifndef IMPCORE_XYZ_R_H
10 #define IMPCORE_XYZ_R_H
19 IMPCORE_BEGIN_NAMESPACE
37 if (!XYZ::particle_is_instance(p)) {
40 p->add_attribute(get_radius_key(), 0,
false);
52 p->add_attribute(get_radius_key(), radius,
false);
64 p->add_attribute(get_radius_key(), s.get_radius(),
false);
74 m->
add_attribute(get_radius_key(), pi, s.get_radius(),
false);
80 return p->has_attribute(get_radius_key());
82 double get_radius()
const {
83 return get_sphere().get_radius();
85 void set_radius(
double r)
const {
86 get_model()->get_sphere(get_particle_index())[3]=r;
92 return get_model()->get_sphere(get_particle_index());
97 get_model()->get_sphere(get_particle_index())=s;
101 return IMP::internal::xyzr_keys[3];
103 void add_to_radius_derivative(
double v,
105 get_particle()->add_to_derivative(get_radius_key(), v, d);
198 IMP_PARTICLE_GEOMETRY(XYZDerivative,
core::XYZ, {
200 d.get_coordinates()+d.get_derivatives());
213 IMP_PARTICLE_PAIR_GEOMETRY(EdgePair,
core::XYZ, {
216 d1.get_coordinates())));
219 IMPCORE_END_NAMESPACE
224 IMPKERNEL_BEGIN_NAMESPACE
240 IMPKERNEL_END_NAMESPACE