IMP logo
IMP Reference Guide  2.20.1
The Integrative Modeling Platform
CysteineCrossLinkData.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/CysteineCrossLinkData.h \brief Normal distribution of Function
3  *
4  * Copyright 2007-2022 IMP Inventors. All rights reserved.
5  */
6 
7 #ifndef IMPISD_CYSTEINE_CROSS_LINK_DATA_H
8 #define IMPISD_CYSTEINE_CROSS_LINK_DATA_H
9 
10 #include <IMP/isd/isd_config.h>
11 #include <IMP/macros.h>
12 #include <IMP/Model.h>
13 #include <IMP/constants.h>
14 #include <cmath>
15 #include <cereal/access.hpp>
16 #include <cereal/types/vector.hpp>
17 
18 IMPISD_BEGIN_NAMESPACE
19 
20 //! CysteineCrossLinkData
21 /**
22  */
23 
24 class IMPISDEXPORT CysteineCrossLinkData : public Object {
25  Floats omega0_grid_; // the typical uncertainty, it goes in the prior
26  Floats fmod_grid_;
27  double fexp_;
28  int prior_type_;
29  Floats omega_grid_;
30  std::vector<Floats> grid_;
31 
32  friend class cereal::access;
33 
34  template<class Archive> void serialize(Archive &ar) {
35  ar(cereal::base_class<Object>(this), omega0_grid_, fmod_grid_, fexp_,
36  prior_type_, omega_grid_, grid_);
37  }
38 
39  double get_element(double fexp, double fmod, double omega) const;
40  double get_omega_prior(double omega, double omega0) const;
41 
42  public:
43  CysteineCrossLinkData(double fexp, Floats fmod_grid, Floats omega_grid,
44  Floats omega0_grid, int prior_type = 3);
45  CysteineCrossLinkData() : Object("") {}
46 
47  int get_closest(std::vector<double> const& vec, double value) const;
48  Floats get_omegas(Floats fmods, double omega0) const;
49  Floats get_nonmarginal_elements(double fexp, Floats fmods,
50  double omega) const;
51  Floats get_marginal_elements(Floats fmods, double omega0) const;
52 
53  double get_omega(double fmod, double omega0) const;
54  double get_standard_deviation(double fmod, double omega0) const;
55  double get_nonmarginal_element(double fexp, double fmod, double omega) const;
56  double get_marginal_element(double fmod, double omega0) const;
57 
59 };
60 
61 IMPISD_END_NAMESPACE
62 
63 #endif /* IMPISD_CYSTEINE_CROSS_LINK_DATA_H */
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.
Various general useful macros for IMP.
Common base class for heavy weight IMP objects.
Definition: Object.h:111
Object(std::string name)
Construct an object with the given name.