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;
47 template <
unsigned int D>
49 double distance)
const {
51 return P::get_score(m, pp, distance) - k_attr_ * attr_range_;
54 return k_attr_ * (distance - attr_range_);
57 template <
unsigned int D>
62 return DerivativePair(dp.first - k_attr_ * attr_range_, dp.second);
64 return DerivativePair(k_attr_ * (distance - attr_range_), k_attr_);
67 template <
unsigned int D>
68 double get_maximum_range(
Model *,
72 template <
unsigned int D>
74 double squared_distance)
const {
75 return squared_distance > algebra::get_squared(attr_range_);
79 out <<
"LinearInteraction attr-range " << attr_range_
80 <<
" attr-k " << k_attr_
81 <<
" rep-k " << P::get_k() );
90 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 an 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.
Various general useful macros for IMP.