IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
FretData.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/FretData.h \brief Auxiliary class useful for FRET_R restraint
3  *
4  * Copyright 2007-2020 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/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 Object {
23  Floats d_term_;
24  Floats d_center_;
25  Floats s_grid_;
26  std::vector<unsigned> nbin_;
27  unsigned dimension_;
28  Floats grid_;
29  Floats norm_;
30 
31  unsigned get_index(unsigned indices[3]) const;
32  void init_grids(const Floats& d_grid_int, Float R0, Float Rmin, Float Rmax,
33  bool do_limit);
34 
35  public:
36  FretData(Floats d_term, Floats d_center, Floats d_int, Floats s_grid,
37  Float R0, Float Rmin, Float Rmax, bool do_limit = true);
38 
39  int get_closest(std::vector<double> const& vec, double value) const;
40 
41  Float get_probability(Float distn, Float dist, Float sigma) const;
42 
43  Float get_kernel(Float dist, Float R0) const;
44 
45  FloatPair get_marginal_element(Float d_term, Float d_center,
46  Float sigma) const;
47 
49 };
50 
51 IMPISD_END_NAMESPACE
52 
53 #endif /* IMPISD_FRET_DATA_H */
Declare an efficient stl-compatible map.
Various useful constants.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Storage of a model, its restraints, constraints and particles.
std::pair< double, double > FloatPair
A generic pair of floats.
Definition: types.h:27
Various general useful macros for IMP.
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Common base class for heavy weight IMP objects.
Definition: Object.h:106
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:20
Auxiliary class for FRET_R restraint.
Definition: FretData.h:22