IMP logo
IMP Reference Guide  2.17.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-2022 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/Restraint.h>
17 #include <IMP/PairContainer.h>
18 #include <IMP/PairScore.h>
19 
20 IMPISD_BEGIN_NAMESPACE
21 
22 //! Apply an NOE distance restraint between two particles.
23 class IMPISDEXPORT NOERestraint : public Restraint {
26  Pointer<Particle> sigma_;
27  Pointer<Particle> gamma_;
28  double Vexp_;
29  double chi_;
30  void set_chi(double chi) { chi_ = chi; }
31 
32  public:
33  //! Create the restraint.
34  /** Restraints should store the particles they are to act on,
35  preferably in a Singleton or PairContainer as appropriate.
36  */
37  NOERestraint(Model *m, Particle *p0, Particle *p1, Particle *sigma,
38  Particle *gamma, double Iexp);
39 
40  /* call for probability */
41  double get_probability() const { return exp(-unprotected_evaluate(nullptr)); }
42 
43  double get_chi() const { return chi_; }
44 
46  const override;
47  virtual IMP::ModelObjectsTemp do_get_inputs() const override;
49 };
50 
51 IMPISD_END_NAMESPACE
52 
53 #endif /* IMPISD_NOE_RESTRAINT_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
A more IMP-like version of the std::vector.
Definition: Vector.h:40
Simple XYZ decorator.
A smart pointer to a reference counted object.
Definition: Pointer.h:87
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:73
A container for Pairs.
Apply an NOE distance restraint between two particles.
Definition: NOERestraint.h:23
Define PairScore.
Define SingletonScore.
Class to handle individual particles of a Model object.
Definition: Particle.h:41
Abstract base class for all restraints.
virtual ModelObjectsTemp do_get_inputs() const =0
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:53