10 #ifndef IMPSCORE_FUNCTOR_HARMONIC_LOWER_BOUND_H
11 #define IMPSCORE_FUNCTOR_HARMONIC_LOWER_BOUND_H
13 #include <IMP/score_functor/score_functor_config.h>
16 #include <cereal/access.hpp>
18 IMPSCOREFUNCTOR_BEGIN_NAMESPACE
27 friend class cereal::access;
28 template<
class Archive>
void serialize(Archive &ar) {
36 double get_k()
const {
return k_; }
38 template <
unsigned int D>
39 double get_score(
Model *,
41 double distance)
const {
42 if (distance > 0)
return 0;
43 return .5 * k_ * algebra::get_squared(distance);
45 template <
unsigned int D>
48 double distance)
const {
52 template <
unsigned int D>
53 double get_maximum_range(
57 template <
unsigned int D>
58 bool get_is_trivially_zero(
Model *,
60 double squared_distance)
const {
61 return squared_distance > 0;
65 IMPSCOREFUNCTOR_END_NAMESPACE
A class to store a fixed array of same-typed values.
Class for storing model, its restraints, constraints, and particles.
Functions to deal with very common math operations.
A Score on the distance between a pair of particles.
std::pair< double, double > DerivativePair
A pair representing a function value with its first derivative.
A functor for computing a distance based score for D particles.