IMP  2.1.0
The Integrative Modeling Platform
FretRestraint.h
Go to the documentation of this file.
1 /**
2  * \file 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-2013 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
23 {
27  algebra::Vector3D GMMterd_;
28  algebra::Vector3Ds GMMctrd_;
30  algebra::Vector3D GMMtera_;
31  algebra::Vector3Ds GMMctra_;
39  double fexp_;
40  double multi_d_;
41  int constr_type_;
42  Floats GMMsig_;
43  Floats GMMw_;
44  unsigned Na_;
45  mutable Floats power6_;
46  std::vector< std::vector<unsigned> > states_;
47 
48  double get_sumFi(double Pbleach) const;
49  std::vector<unsigned> get_indices(unsigned index, int dimension) const;
50 
51 public:
52 
53  //! Create the restraint.
54  /** kernel::Restraints should store the particles they are to act on,
55  preferably in a Singleton or PairContainer as appropriate.
56  */
57 
60  sigma0, kernel::Particle *Pbl, double fexp, double m_d=1.0, double
61  m_a=1.0);
62 
64  *sumFi, kernel::Particle* sigma0, kernel::Particle *Pbl, double fexp);
65 
67  algebra::Vector3Ds GMMctrd, Floats GMMwd, Floats GMMsigd,
69  GMMctra, Floats GMMwa, Floats GMMsiga, kernel::Particle *kda,
71  *Pbl, FretData *data, double fexp);
72 
73  // get sumFi
74  double get_sumFi() const;
75 
76  // get average sigma
77  double get_average_sigma(double fmod) const;
78 
79  // lognormal standard error (according to Wikipedia)
80  double get_standard_error() const;
81 
82  // get model fret_r (for the two constructors, i.e. type 0 and 1)
83  double get_model_fretr() const;
84 
85  // get probability
86  double get_probability() const;
87 
88  // get experimental value
89  double get_experimental_value() const {return fexp_;};
90 
91  // set experimental value
92  void set_experimental_value(double fexp);
93 
94  /** This macro declares the basic needed methods: evaluate and show
95  */
96  virtual double
97  unprotected_evaluate(IMP::kernel::DerivativeAccumulator *accum)
98  const IMP_OVERRIDE;
99  virtual IMP::kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
101 
102 private:
103  double get_model_fretr_type_0() const;
104  double get_model_fretr_type_1() const;
105  algebra::Vector3Ds get_current_centers(kernel::Particle *p, const
106  algebra::Vector3Ds& ctrs) const;
107 
108  algebra::Vector3D get_current_center(kernel::Particle *p, const
109  algebra::Vector3D& ctr) const;
110 };
111 
112 IMPISD_END_NAMESPACE
113 
114 #endif /* IMPISD_FRET_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:146
A decorator for scale parameters particles.
A smart pointer to a reference counted object.
Definition: base/Pointer.h:87
base::Vector< VectorD< 3 > > Vector3Ds
Definition: VectorD.h:589
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:587
Auxiliary class for FRET_R restraint.
Definition: FretData.h:22
Auxiliary class useful for FRET_R restraint.