8 #ifndef IMPCORE_DISTANCE_TO_SINGLETON_SCORE_H
9 #define IMPCORE_DISTANCE_TO_SINGLETON_SCORE_H
11 #include <IMP/core/core_config.h>
13 #include "internal/evaluate_distance_pair_score.h"
20 #include <boost/lambda/lambda.hpp>
22 IMPCORE_BEGIN_NAMESPACE
40 Float get_coordinate(
unsigned int i) {
return v_[i]; }
43 IMP_WARN(
"DistanceTo dropped deriv of " << v << std::endl);
60 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
70 double v = internal::evaluate_distance_pair_score(
71 XYZ(m, pi), StaticD(pt_), da, f_.get(), boost::lambda::_1);
73 <<
" scored " << v << std::endl);
99 Float get_coordinate(
unsigned int i) {
return v_[i]; }
119 IMPCORE_END_NAMESPACE
GenericDistanceToSingletonScore< UnaryFunction > DistanceToSingletonScore
virtual kernel::ModelObjectsTemp do_get_inputs(kernel::Model *m, const kernel::ParticleIndexes &pis) const
Class for adding derivatives from restraints to the model.
A nullptr-initialized pointer to an IMP Object.
#define IMP_WARN(expr)
Write a warning to a log.
Import IMP/kernel/UnaryFunction.h in the namespace.
IMP::kernel::UnaryFunction UnaryFunction
ParticlesTemp get_particles(kernel::Model *m, const ParticleIndexes &ps)
#define IMP_UNUSED(variable)
Import IMP/kernel/singleton_macros.h in the namespace.
Abstract single variable functor class for score functions.
virtual kernel::ModelObjectsTemp do_get_inputs(kernel::Model *m, const kernel::ParticleIndexes &pis) const
virtual double evaluate_index(kernel::Model *m, kernel::ParticleIndex p, DerivativeAccumulator *da) const
Compute the score and the derivative if needed.
Apply a function to the distance to a fixed point.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Import IMP/kernel/SingletonScore.h in the namespace.
double Float
Basic floating-point value (could be float, double...)
Apply a function to the distance to a fixed point.
#define IMP_LOG_VERBOSE(expr)
#define IMP_SINGLETON_SCORE_METHODS(Name)
Class for storing model, its restraints, constraints, and particles.
Import IMP/kernel/generic.h in the namespace.