8#ifndef IMPSCORE_FUNCTOR_LINEAR_LOWER_BOUND_H
9#define IMPSCORE_FUNCTOR_LINEAR_LOWER_BOUND_H
11#include <IMP/score_functor/score_functor_config.h>
14IMPSCOREFUNCTOR_BEGIN_NAMESPACE
20class LinearLowerBound :
public Score {
24 LinearLowerBound(
double k) : k_(k) {}
25 LinearLowerBound() : k_(0.0) {}
27 template <
unsigned int D>
28 double get_score(
Model *,
30 double distance)
const {
31 if (distance >= 0)
return 0;
32 return -k_ * distance;
34 template <
unsigned int D>
37 double distance)
const {
41 template <
unsigned int D>
42 double get_maximum_range(
46 template <
unsigned int D>
47 bool get_is_trivially_zero(
Model *,
49 double squared_distance)
const {
50 return squared_distance > 0;
58IMPSCOREFUNCTOR_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.