IMP  2.4.0
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 to use in vivo FRET data.
4  *
5  * Copyright 2007-2015 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPISD_FRET_RESTRAINT_H
10 #define IMPISD_FRET_RESTRAINT_H
11 #include <IMP/isd/Scale.h>
12 #include "isd_config.h"
13 #include <IMP/kernel/Restraint.h>
14 #include <IMP/isd/FretData.h>
15 
16 IMPISD_BEGIN_NAMESPACE
17 /** A restraint for using in-vivo ensemble FRET data.
18  See [Muller et al. Mol Biol Cell
19  16, 3341, 2005](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1165416/)
20  for more info.
21  */
22 
23 class IMPISDEXPORT FretRestraint : public kernel::Restraint {
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  //! Create the restraint.
53  /** kernel::Restraints should store the particles they are to act on,
54  preferably in a Singleton or PairContainer as appropriate.
55  */
56 
60  kernel::Particle *Pbl, double fexp, double m_d = 1.0,
61  double m_a = 1.0);
62 
64  kernel::Particle *sumFi, kernel::Particle *sigma0,
65  kernel::Particle *Pbl, double fexp);
66 
68  algebra::Vector3Ds GMMctrd, Floats GMMwd, Floats GMMsigd,
69  kernel::Particle *pra, algebra::Vector3D GMMtera,
70  algebra::Vector3Ds GMMctra, Floats GMMwa, Floats GMMsiga,
72  kernel::Particle *sigma0, kernel::Particle *Pbl, FretData *data,
73  double fexp);
74 
75  // get sumFi
76  double get_sumFi() const;
77 
78  // get average sigma
79  double get_average_sigma(double fmod) const;
80 
81  // lognormal standard error (according to Wikipedia)
82  double get_standard_error() const;
83 
84  // get model fret_r (for the two constructors, i.e. type 0 and 1)
85  double get_model_fretr() const;
86 
87  // get probability
88  double get_probability() const;
89 
90  // get experimental value
91  double get_experimental_value() const {
92  return fexp_;
93  };
94 
95  // set experimental value
96  void set_experimental_value(double fexp);
97 
98  /** This macro declares the basic needed methods: evaluate and show
99  */
100  virtual double unprotected_evaluate(IMP::kernel::DerivativeAccumulator *accum)
101  const IMP_OVERRIDE;
104 
105  private:
106  double get_model_fretr_type_0() const;
107  double get_model_fretr_type_1() const;
108  algebra::Vector3Ds get_current_centers(kernel::Particle *p,
109  const algebra::Vector3Ds &ctrs) const;
110 
111  algebra::Vector3D get_current_center(kernel::Particle *p,
112  const algebra::Vector3D &ctr) const;
113 };
114 
115 IMPISD_END_NAMESPACE
116 
117 #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 member.
Definition: Pointer.h:147
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A decorator for scale parameters particles.
A smart pointer to a reference counted object.
Definition: Pointer.h:87
Abstract base class for all restraints.
A restraint is a term in an IMP ScoringFunction.
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.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.