IMP  2.2.1
The Integrative Modeling Platform
FretRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/FretRestraint.h
3  * \brief FRET_R restraint
4  * to use in vivo FRET data [Muller et al. Mol Biol Cell 16, 3341, 2005]
5  *
6  * Copyright 2007-2014 IMP Inventors. All rights reserved.
7  *
8  */
9 
10 #ifndef IMPISD_FRET_RESTRAINT_H
11 #define IMPISD_FRET_RESTRAINT_H
12 #include <IMP/isd/Scale.h>
13 #include "isd_config.h"
14 #include <IMP/kernel/Restraint.h>
15 #include <IMP/isd/FretData.h>
16 
17 IMPISD_BEGIN_NAMESPACE
18 /** A restraint for using in-vivo ensemble FRET data,
19  see Muller et al. Mol Biol Cell 16, 3341, 2005 for more info.
20  */
21 
22 class IMPISDEXPORT FretRestraint : public kernel::Restraint {
26  algebra::Vector3D GMMterd_;
27  algebra::Vector3Ds GMMctrd_;
29  algebra::Vector3D GMMtera_;
30  algebra::Vector3Ds GMMctra_;
38  double fexp_;
39  double multi_d_;
40  int constr_type_;
41  Floats GMMsig_;
42  Floats GMMw_;
43  unsigned Na_;
44  mutable Floats power6_;
45  std::vector<std::vector<unsigned> > states_;
46 
47  double get_sumFi(double Pbleach) const;
48  std::vector<unsigned> get_indices(unsigned index, int dimension) const;
49 
50  public:
51  //! Create the restraint.
52  /** kernel::Restraints should store the particles they are to act on,
53  preferably in a Singleton or PairContainer as appropriate.
54  */
55 
59  kernel::Particle *Pbl, double fexp, double m_d = 1.0,
60  double m_a = 1.0);
61 
63  kernel::Particle *sumFi, kernel::Particle *sigma0,
64  kernel::Particle *Pbl, double fexp);
65 
67  algebra::Vector3Ds GMMctrd, Floats GMMwd, Floats GMMsigd,
68  kernel::Particle *pra, algebra::Vector3D GMMtera,
69  algebra::Vector3Ds GMMctra, Floats GMMwa, Floats GMMsiga,
71  kernel::Particle *sigma0, kernel::Particle *Pbl, FretData *data,
72  double fexp);
73 
74  // get sumFi
75  double get_sumFi() const;
76 
77  // get average sigma
78  double get_average_sigma(double fmod) const;
79 
80  // lognormal standard error (according to Wikipedia)
81  double get_standard_error() const;
82 
83  // get model fret_r (for the two constructors, i.e. type 0 and 1)
84  double get_model_fretr() const;
85 
86  // get probability
87  double get_probability() const;
88 
89  // get experimental value
90  double get_experimental_value() const {
91  return fexp_;
92  };
93 
94  // set experimental value
95  void set_experimental_value(double fexp);
96 
97  /** This macro declares the basic needed methods: evaluate and show
98  */
99  virtual double unprotected_evaluate(IMP::kernel::DerivativeAccumulator *accum)
100  const IMP_OVERRIDE;
101  virtual IMP::kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
103 
104  private:
105  double get_model_fretr_type_0() const;
106  double get_model_fretr_type_1() const;
107  algebra::Vector3Ds get_current_centers(kernel::Particle *p,
108  const algebra::Vector3Ds &ctrs) const;
109 
110  algebra::Vector3D get_current_center(kernel::Particle *p,
111  const algebra::Vector3D &ctr) const;
112 };
113 
114 IMPISD_END_NAMESPACE
115 
116 #endif /* IMPISD_FRET_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:147
A decorator for scale parameters particles.
A smart pointer to a reference counted object.
Definition: base/Pointer.h:87
Abstract base class for all restraints.
A restraint is a term in an IMP ScoringFunction.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
VectorD< 3 > Vector3D
Definition: VectorD.h:395
virtual ModelObjectsTemp do_get_inputs() const =0
Auxiliary class for FRET_R restraint.
Definition: FretData.h:22
Auxiliary class useful for FRET_R restraint.