10 #ifndef IMPPMI_COMPOSITE_RESTRAINT_H
11 #define IMPPMI_COMPOSITE_RESTRAINT_H
12 #include "pmi_config.h"
18 IMPPMI_BEGIN_NAMESPACE
36 typedef boost::unordered_map<CacheKey, double> Cache;
37 typedef boost::unordered_map<CacheKeyPot, double> CachePot;
46 int exparg_grid_size_;
48 inline double calc_prob (
double dist)
const{
49 double argvalue=(dist-coffd_)/l_;
53 double maxarg=std::max(argvalue,argmin_);
55 double minarg=std::min(maxarg,argmax_);
56 unsigned k =
static_cast<unsigned>( std::floor(minarg*invdx_)+exparg_grid_size_);
61 prob=(1.0-plateau_)/(1.0+std::exp(-argvalue));
71 double get_probability_per_particle_excluding(
unsigned int ipart,
72 Ints excluded_ps, Cache& cache, CachePot& cachepot)
const;
80 double coffd,
double l,
bool tabprob,
double plateau,
81 std::string name=
"CompositeRestraint%1%");
86 unsigned int get_number_of_elements()
const {
return pis_.size();}
98 virtual double get_probability()
const
100 return exp(-unprotected_evaluate(
nullptr));
Class for adding derivatives from restraints to the model.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Various general useful macros for IMP.
A restraint is a term in an IMP ScoringFunction.
A restraint for ambiguous cross-linking MS data and multiple state approach.
Classes to handle individual model particles. (Note that implementation of inline functions in in int...
virtual ModelObjectsTemp do_get_inputs() const =0
Import IMP/kernel/Restraint.h in the namespace.
int Int
Basic integer value.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for storing model, its restraints, constraints, and particles.