9 #ifndef IMPSCORE_FUNCTOR_HARMONIC_H
10 #define IMPSCORE_FUNCTOR_HARMONIC_H
12 #include <IMP/score_functor/score_functor_config.h>
15 #include <cereal/access.hpp>
17 IMPSCOREFUNCTOR_BEGIN_NAMESPACE
25 friend class cereal::access;
26 template<
class Archive>
void serialize(Archive &ar) {
32 template <
unsigned int D>
33 double get_score(
Model *,
35 double distance)
const {
36 return .5 * k_ * algebra::get_squared(distance);
38 template <
unsigned int D>
41 double distance)
const {
44 double get_k() {
return k_; }
45 void set_k(
double k) { k_ = k; }
48 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.