8 #ifndef IMPNPCTRANSPORT_FUNCTOR_LINEAR_DISTANCE_PAIR_SCORES_TYPEDEFS_H
9 #define IMPNPCTRANSPORT_FUNCTOR_LINEAR_DISTANCE_PAIR_SCORES_TYPEDEFS_H
11 #include "npctransport_config.h"
19 #include <boost/array.hpp>
21 IMPNPCTRANSPORT_BEGIN_NAMESPACE
24 typedef score_functor::SphereDistance<score_functor::LinearLowerBound>
25 LinearSoftSphereScore;
43 attr_range_ = attr_range;
48 template <
unsigned int D>
50 double distance)
const {
52 return P::get_score(m, pp, distance) - k_attr_ * attr_range_;
55 return k_attr_ * (distance - attr_range_);
58 template <
unsigned int D>
63 return DerivativePair(dp.first - k_attr_ * attr_range_, dp.second);
65 return DerivativePair(k_attr_ * (distance - attr_range_), k_attr_);
68 template <
unsigned int D>
69 double get_maximum_range(
Model *,
73 template <
unsigned int D>
75 double squared_distance)
const {
76 return squared_distance > algebra::get_squared(attr_range_);
80 out <<
"LinearInteraction attr-range " << attr_range_
81 <<
" attr-k " << k_attr_
82 <<
" rep-k " << P::get_k() );
91 IMPNPCTRANSPORT_END_NAMESPACE
Various important macros for implementing decorators.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
A Score on the distance between a pair of particles.
A Score on the distance between a pair of particles.
A class to store a fixed array of same-typed values.
A more IMP-like version of the std::vector.
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.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Macros to help with objects that can be printed to a stream.