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
27 if (!XYZ::get_is_setup(m, pi)) {
34 if (!XYZ::get_is_setup(m, pi)) {
55 FloatKey radius_key = get_default_radius_key()) {
56 return m->get_has_attribute(radius_key, pi);
68 set_radius(s.get_radius());
72 return IMP::internal::xyzr_keys[3];
75 get_particle()->add_to_derivative(get_decorator_traits(), v, d);
77 FloatKey get_traits() {
return get_decorator_traits(); }
Class for adding derivatives from restraints to the model.
double get_distance(CustomXYZR a, CustomXYZR b)
Compute the distance between a pair of particles.
A decorator for a particle with x,y,z coordinates and a radius.
static FloatKey get_radius_key()
Particle * get_particle() const
const algebra::Sphere3D get_sphere_d_geometry(CustomXYZR d)
static XYZ setup_particle(kernel::Model *m, ParticleIndex pi)
#define IMP_DECORATOR_WITH_TRAITS_METHODS(Name, Parent, TraitsType,traits_name, default_traits)
#define IMP_DECORATOR_TRAITS_SETUP_1(Name, FirstArgumentType,first_argument_name)
void set_sphere(const algebra::Sphere3D &s)
Set the attributes from a sphere.
double get_distance(const Plane3D &pln, const Vector3D &p)
Return the distance between a plane and a point in 3D.
void set_coordinates(const algebra::Vector3D &v)
set all coordinates from a vector
static bool get_is_setup(kernel::Model *m, kernel::ParticleIndex pi, FloatKey radius_key=get_default_radius_key())
Check if the particle has the required attributes.
algebra::Sphere3D get_sphere() const
Return a sphere object.
#define IMP_DECORATOR_TRAITS_SETUP_0(Name)
A decorator for a particle with x,y,z coordinates.
const algebra::Vector3D & get_coordinates() const
Convert it to a vector.
void set_sphere_d_geometry(CustomXYZR d, const algebra::Sphere3D &v)
double Float
Basic floating-point value (could be float, double...)
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
static FloatKey get_default_radius_key()
Get the default radius key.
Decorator for a sphere-like particle.
#define IMP_DECORATOR_GET_SET(name, AttributeKey, Type, ReturnType)
Define methods for getting and setting a particular simple field.
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
Class for storing model, its restraints, constraints, and particles.