9 #ifndef IMPMISC_CUSTOM_XYZ_R_H
10 #define IMPMISC_CUSTOM_XYZ_R_H
12 #include <IMP/misc/misc_config.h>
19 IMPMISC_BEGIN_NAMESPACE
32 radius_key, get_default_radius_key());
40 FloatKey radius_key= get_default_radius_key()) {
41 if (!XYZ::particle_is_instance(p)) {
44 p->add_attribute(radius_key, 0,
false);
58 FloatKey radius_key= get_default_radius_key()) {
59 p->add_attribute(radius_key, radius,
false);
71 FloatKey radius_key= get_default_radius_key()) {
73 p->add_attribute(radius_key, s.get_radius(),
false);
79 FloatKey radius_key= get_default_radius_key()) {
80 return p->has_attribute(radius_key);
93 set_radius(s.get_radius());
97 return IMP::internal::xyzr_keys[3];
99 void add_to_radius_derivative(
double v,
101 get_particle()->add_to_derivative(get_radius_key(), v, d);
104 return get_radius_key();
127 IMPMISC_END_NAMESPACE