9 #ifndef IMPCORE_MULTIPLE_BINORMAL_RESTRAINT_H
10 #define IMPCORE_MULTIPLE_BINORMAL_RESTRAINT_H
12 #include <IMP/core/core_config.h>
16 #include <cereal/access.hpp>
18 IMPCORE_BEGIN_NAMESPACE
32 std::vector<BinormalTerm> terms_;
57 double correlation_, weight_;
58 std::pair<double, double> means_, stdevs_;
60 friend class cereal::access;
62 template<
class Archive>
void serialize(Archive &ar) {
63 ar(correlation_, weight_, means_.first, means_.second, stdevs_.first,
67 double evaluate(
const double dihedral[2],
double &sin1,
double &sin2,
68 double &cos1,
double &cos2,
double &rho)
const;
72 : correlation_(-1), weight_(-1), means_(-1, -1), stdevs_(-1, -1) {}
75 void set_correlation(
double correlation) { correlation_ = correlation; }
76 void set_weight(
double weight) { weight_ = weight; }
77 void set_means(
FloatPair means) { means_ = means; }
78 void set_standard_deviations(
FloatPair stdevs) { stdevs_ = stdevs; }
80 out <<
"correlation: " << correlation_ <<
"; weight: " << weight_
81 <<
"; means: " << means_.first <<
", " << means_.second
82 <<
"; standard deviations: " << stdevs_.first <<
", " << stdevs_.second;
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
std::pair< double, double > FloatPair
A generic pair of floats.
void add_term(const BinormalTerm &term)
Add a single BinormalTerm to the restraint.
A single binormal term in a MultipleBinormalRestraint.
A more IMP-like version of the std::vector.
Class for storing model, its restraints, constraints, and particles.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Modeller-style multiple binormal (phi/psi) restraint.
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Abstract base class for all restraints.
virtual ModelObjectsTemp do_get_inputs() const =0
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.