IMP  2.0.0
The Integrative Modeling Platform
NOERestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/NOERestraint.h
3  * \brief A lognormal restraint that uses the ISPA model to model NOE-derived
4  * distance fit.
5  *
6  * Copyright 2007-2013 IMP Inventors. All rights reserved.
7  *
8  */
9 
10 #ifndef IMPISD_NOE_RESTRAINT_H
11 #define IMPISD_NOE_RESTRAINT_H
12 
13 #include <IMP/isd/isd_config.h>
14 #include <IMP/SingletonScore.h>
15 #include <IMP/core/XYZ.h>
16 #include <IMP/isd/ISDRestraint.h>
17 #include <IMP/PairContainer.h>
18 #include <IMP/PairScore.h>
19 #include <IMP/restraint_macros.h>
20 
21 IMPISD_BEGIN_NAMESPACE
22 
23 //! Apply an NOE distance restraint between two particles.
24 class IMPISDEXPORT NOERestraint : public ISDRestraint
25 {
26  Pointer<Particle> p0_;
27  Pointer<Particle> p1_;
28  Pointer<Particle> sigma_;
29  Pointer<Particle> gamma_;
30  double Vexp_;
31  double chi_;
32  void set_chi(double chi) { chi_ = chi; }
33 
34 public:
35  //! Create the restraint.
36  /** Restraints should store the particles they are to act on,
37  preferably in a Singleton or PairContainer as appropriate.
38  */
39  NOERestraint(Particle *p0, Particle *p1, Particle *sigma,
40  Particle *gamma,double Iexp);
41 
42  /* call for probability */
43  double get_probability() const
44  {
45  return exp(-unprotected_evaluate(nullptr));
46  }
47 
48  double get_chi() const
49  {return chi_; }
50 
51 
52  /** This macro declares the basic needed methods: evaluate and show
53  */
55 
56 };
57 
58 IMPISD_END_NAMESPACE
59 
60 #endif /* IMPISD_NOE_RESTRAINT_H */