IMP  2.1.1
The Integrative Modeling Platform
FretData.h
Go to the documentation of this file.
1 /**
2  * \file isd/FretData.h \brief Auxiliary class useful for FRET_R restraint
3  *
4  * Copyright 2007-2013 IMP Inventors. All rights reserved.
5  */
6 
7 #ifndef IMPISD_FRET_DATA_H
8 #define IMPISD_FRET_DATA_H
9 
10 #include "isd_config.h"
11 #include <IMP/macros.h>
12 #include <IMP/kernel/Model.h>
13 #include <IMP/constants.h>
14 #include <math.h>
15 
16 IMPISD_BEGIN_NAMESPACE
17 
18 //! Auxiliary class for FRET_R restraint
19 /**
20  */
21 
22 class IMPISDEXPORT FretData : public base::Object
23 {
24  Floats d_term_;
25  Floats d_center_;
26  Floats s_grid_;
27  std::vector<unsigned> nbin_;
28  unsigned dimension_;
29  Floats grid_;
30  Floats norm_;
31 
32  unsigned get_index(unsigned indices[3]) const;
33  void init_grids
34  (const Floats& d_grid_int, Float R0, Float Rmin, Float Rmax, bool do_limit);
35 
36  public:
37 
38  FretData(Floats d_term, Floats d_center, Floats d_int,
39  Floats s_grid, Float R0, Float Rmin, Float Rmax, bool do_limit=true);
40 
41  int get_closest(std::vector<double> const& vec, double value) const;
42 
43  Float get_probability(Float distn, Float dist, Float sigma) const;
44 
45  Float get_kernel(Float dist, Float R0) const;
46 
47  FloatPair get_marginal_element
48  (Float d_term, Float d_center, Float sigma) const;
49 
51 
52 };
53 
54 IMPISD_END_NAMESPACE
55 
56 #endif /* IMPISD_FRET_DATA_H */
Ints get_index(const kernel::ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Import IMP/kernel/constants.h in the namespace.
std::pair< double, double > FloatPair
A generic pair of floats.
Definition: base/types.h:27
Import IMP/kernel/macros.h in the namespace.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Storage of a model, its restraints, constraints and particles.
Common base class for heavy weight IMP objects.
double Float
Basic floating-point value (could be float, double...)
Definition: base/types.h:20
Auxiliary class for FRET_R restraint.
Definition: FretData.h:22