8 #ifndef IMPCORE_BOUNDING_BOX_3DSINGLETON_SCORE_H
9 #define IMPCORE_BOUNDING_BOX_3DSINGLETON_SCORE_H
11 #include <IMP/core/core_config.h>
18 #include "internal/evaluate_distance_pair_score.h"
19 #include <boost/lambda/lambda.hpp>
21 IMPCORE_BEGIN_NAMESPACE
48 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
54 "The unary function should return "
55 " 0 when passed a value of 0. Not "
66 for (
unsigned int i = 0; i < 3; ++i) {
67 if (bb_.get_corner(0)[i] > d.get_coordinate(i)) {
68 cp[i] = bb_.get_corner(0)[i];
70 }
else if (bb_.get_corner(1)[i] < d.get_coordinate(i)) {
71 cp[i] = bb_.get_corner(1)[i];
74 cp[i] = d.get_coordinate(i);
79 <<
" of " << bb_ << std::endl);
81 double v = internal::compute_distance_pair_score(
82 d.get_coordinates() - cp, f_.get(), &deriv, boost::lambda::_1);
84 d.add_to_derivatives(deriv, *da);
94 IMP_GENERIC_OBJECT(BoundingBox3DSingletonScore, bounding_box_3d_singleton_score,
96 (UnaryFunction *f,
const algebra::BoundingBoxD<3> &bb),
virtual double evaluate_index(Model *m, ParticleIndex p, DerivativeAccumulator *da) const
Compute the score and the derivative if needed.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
#define IMP_OBJECT_LOG
Set the log level to the object's log level.
Single variable function.
Macros for various classes.
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
#define IMP_LOG_VERBOSE(expr)
Score particles based on how far outside a box they are.
A more IMP-like version of the std::vector.
Class for storing model, its restraints, constraints, and particles.
Abstract class for scoring object(s) of type ParticleIndex.
#define IMP_SINGLETON_SCORE_METHODS(Name)
A bounding box in D dimensions.
A decorator for a particle with x,y,z coordinates.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const
Overload this method to specify the inputs.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for adding derivatives from restraints to the model.
Various important functionality for implementing decorators.