IMP  2.1.1
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/kernel/Restraint.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 kernel::Restraint
25 {
30  double Vexp_;
31  double chi_;
32  void set_chi(double chi) { chi_ = chi; }
33 
34 public:
35  //! Create the restraint.
36  /** kernel::Restraints should store the particles they are to act on,
37  preferably in a Singleton or PairContainer as appropriate.
38  */
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  virtual double
53  unprotected_evaluate(IMP::kernel::DerivativeAccumulator *accum)
54  const IMP_OVERRIDE;
55  virtual IMP::kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
57 
58 };
59 
60 IMPISD_END_NAMESPACE
61 
62 #endif /* IMPISD_NOE_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
A smart pointer to a reference counted object.
Definition: base/Pointer.h:87
Import IMP/kernel/restraint_macros.h in the namespace.
Simple xyz decorator.
Import IMP/kernel/PairContainer.h in the namespace.
Abstract base class for all restraints.
Apply an NOE distance restraint between two particles.
Definition: NOERestraint.h:24
Import IMP/kernel/PairScore.h in the namespace.
A restraint is a term in an IMP ScoringFunction.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
Import IMP/kernel/SingletonScore.h in the namespace.
virtual ModelObjectsTemp do_get_inputs() const =0
Class for storing model, its restraints, constraints, and particles.