10#ifndef IMPSCORE_FUNCTOR_HARMONIC_UPPER_BOUND_H
11#define IMPSCORE_FUNCTOR_HARMONIC_UPPER_BOUND_H
13#include <IMP/score_functor/score_functor_config.h>
16#include <cereal/access.hpp>
18IMPSCOREFUNCTOR_BEGIN_NAMESPACE
24class HarmonicUpperBound :
public Score {
27 friend class cereal::access;
28 template<
class Archive>
void serialize(Archive &ar) {
32 HarmonicUpperBound(
double k) : k_(k) {}
33 HarmonicUpperBound() {}
35 double get_k()
const {
return k_; }
37 template <
unsigned int D>
38 double get_score(
Model *,
40 double distance)
const {
44 return .5 * k_ * algebra::get_squared(distance);
46 template <
unsigned int D>
49 double distance)
const {
57IMPSCOREFUNCTOR_END_NAMESPACE
A Score on the distance between a pair of particles.
Functions to deal with very common math operations.
A class to store a fixed array of same-typed values.
Class for storing model, its restraints, constraints, and particles.
std::pair< double, double > DerivativePair
A pair representing a function value with its first derivative.