11 #include <IMP/core/core_config.h>
19 IMPCORE_BEGIN_NAMESPACE
31 static void do_setup_particle(
44 static FloatKey get_coordinate_key(
unsigned int i) {
46 return IMP::internal::xyzr_keys[i];
76 get_particle()->add_to_derivative(get_coordinate_key(i), v, d);
87 return get_particle()->get_is_optimized(get_coordinate_key(0)) &&
88 get_particle()->get_is_optimized(get_coordinate_key(1)) &&
93 get_particle()->set_is_optimized(get_coordinate_key(0), tf);
94 get_particle()->set_is_optimized(get_coordinate_key(1), tf);
95 get_particle()->set_is_optimized(get_coordinate_key(2), tf);
119 return m->get_has_attribute(get_coordinate_key(2), pi);
137 IMPCORE_END_NAMESPACE
142 IMPKERNEL_BEGIN_NAMESPACE
161 IMPKERNEL_END_NAMESPACE
162 IMPBASE_BEGIN_NAMESPACE
181 IMPBASE_END_NAMESPACE
185 IMPCORE_BEGIN_NAMESPACE
200 IMPCOREEXPORT
double get_dihedral(XYZ a, XYZ b, XYZ c, XYZ d);
210 IMPCORE_END_NAMESPACE
Import IMP/kernel/Decorator.h in the namespace.
void add_to_derivatives(const algebra::Vector3D &v, DerivativeAccumulator &d)
Add something to the derivative of the coordinates.
ParticleIndex get_particle_index() const
Class for adding derivatives from restraints to the model.
Particle * get_particle() const
double get_dihedral(XYZ a, XYZ b, XYZ c, XYZ d)
Compute the dihedral angle (in radians) between the four particles.
#define IMP_DECORATOR_METHODS(Name, Parent)
void set_vector_geometry(base::Pointer< kernel::Particle > d, const algebra::Vector3D &v)
Model * get_model() const
Returns the Model containing the particle.
A smart pointer to a reference counted object.
bool get_coordinates_are_optimized() const
Get whether the coordinates are optimized.
void set_coordinate(unsigned int i, Float v)
set the ith coordinate
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Float get_derivative(int i) const
Get the ith coordinate derivative.
void set_coordinates(const algebra::Vector3D &v)
set all coordinates from a vector
void transform(XYZ a, const algebra::Transformation3D &tr)
Apply a transformation to the particle.
double get_distance(XYZ a, XYZ b)
Compute the distance between a pair of particles.
#define IMP_DECORATOR_SETUP_0(Name)
Import IMP/kernel/decorator_macros.h in the namespace.
A decorator for a particle with x,y,z coordinates.
Float get_coordinate(int i) const
Get the ith coordinate.
const algebra::Vector3D & get_coordinates() const
Convert it to a vector.
Class to handle individual model particles.
algebra::Vector3D get_vector_to(const XYZ &b) const
Get the vector from this particle to another.
void set_coordinates_are_optimized(bool tf) const
Set whether the coordinates are optimized.
algebra::Vector3D get_derivatives() const
Get the vector of derivatives.
double Float
Basic floating-point value (could be float, double...)
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
void add_to_derivative(int i, Float v, DerivativeAccumulator &d)
Add something to the derivative of the ith coordinate.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#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.