00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef IMPMODELLER_MULTIPLE_BINORMAL_RESTRAINT_H
00010 #define IMPMODELLER_MULTIPLE_BINORMAL_RESTRAINT_H
00011
00012 #include "modeller_config.h"
00013
00014 #include <IMP/Restraint.h>
00015 #include <IMP/Particle.h>
00016
00017 IMPMODELLER_BEGIN_NAMESPACE
00018
00019 class BinormalTerm;
00020
00021
00022
00023
00024
00025
00026
00027
00028 class IMPMODELLEREXPORT MultipleBinormalRestraint : public Restraint
00029 {
00030 std::vector<BinormalTerm> terms_;
00031 ParticleQuad q1_, q2_;
00032 public:
00033
00034
00035
00036
00037
00038
00039 MultipleBinormalRestraint(const ParticleQuad &q1, const ParticleQuad &q2);
00040
00041
00042 void add_term(const BinormalTerm &term) {
00043 terms_.push_back(term);
00044 }
00045
00046 IMP_RESTRAINT(MultipleBinormalRestraint);
00047 };
00048
00049
00050 class BinormalTerm
00051 {
00052 double correlation_, weight_;
00053 std::pair<double, double> means_, stdevs_;
00054
00055 double evaluate(const double dihedral[2], double &sin1, double &sin2,
00056 double &cos1, double &cos2, double &rho) const;
00057 public:
00058 friend class MultipleBinormalRestraint;
00059
00060 void set_correlation(double correlation) { correlation_ = correlation; }
00061 void set_weight(double weight) { weight_ = weight; }
00062 void set_means(std::pair<double, double> means) { means_ = means; }
00063 void set_standard_deviations(std::pair<double, double> stdevs) {
00064 stdevs_ = stdevs;
00065 }
00066 };
00067
00068 IMPMODELLER_END_NAMESPACE
00069
00070 #endif