IMP  2.1.1
The Integrative Modeling Platform
AmbiguousNOERestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/AmbiguousNOERestraint.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_AMBIGUOUS_NOE_RESTRAINT_H
11 #define IMPISD_AMBIGUOUS_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_macros.h>
17 #include <IMP/kernel/Restraint.h>
18 #include <IMP/PairContainer.h>
19 #include <IMP/isd/Scale.h>
20 
21 IMPISD_BEGIN_NAMESPACE
22 
23 //! Ambiguous NOE distance restraint between a number of pairs of particles.
24 class IMPISDEXPORT AmbiguousNOERestraint : public kernel::Restraint
25 {
29  double Vexp_;
30  double chi_;
31  void set_chi(double chi) { chi_ = chi; }
32 public:
33  //! Create the restraint.
34  /** kernel::Restraints should store the particles they are to act on,
35  preferably in a Singleton or PairContainer as appropriate.
36  */
38  kernel::Particle *sigma, kernel::Particle *gamma, double Iexp);
39 
40  /* call for probability */
41  double get_probability() const
42  {
43  return exp(-unprotected_evaluate(nullptr));
44  }
45 
46  double get_chi() const
47  {return chi_; }
48 
49 
50  /** This macro declares the basic needed methods: evaluate and show
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_AMBIGUOUS_NOE_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
A decorator for scale parameters particles.
A shared container for Pairs.
A smart pointer to a reference counted object.
Definition: base/Pointer.h:87
Ambiguous NOE distance restraint between a number of pairs of particles.
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.
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.
Class for storing model, its restraints, constraints, and particles.