IMP logo
IMP Reference Guide  develop.63b38c487d,2024/12/21
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-2022 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.h>
17 #include <IMP/PairContainer.h>
18 #include <IMP/isd/Scale.h>
19 
20 IMPISD_BEGIN_NAMESPACE
21 
22 //! Ambiguous NOE distance restraint between a number of pairs of particles.
23 class IMPISDEXPORT AmbiguousNOERestraint : public Restraint {
25  ParticleIndex sigma_;
26  ParticleIndex gamma_;
27  double Vexp_;
28  double chi_;
29  void set_chi(double chi) { chi_ = chi; }
30 
31  friend class cereal::access;
32 
33  template<class Archive> void serialize(Archive &ar) {
34  ar(cereal::base_class<Restraint>(this),
35  pc_, sigma_, gamma_, Vexp_, chi_);
36  }
37 
39 
40  public:
41  //! Create the restraint.
44  double Iexp);
45 
47 
48  /* call for probability */
49  double get_probability() const { return exp(-unprotected_evaluate(nullptr)); }
50 
51  double get_chi() const { return chi_; }
52 
54  const override;
55  virtual IMP::ModelObjectsTemp do_get_inputs() const override;
57 };
58 
59 IMPISD_END_NAMESPACE
60 
61 #endif /* IMPISD_AMBIGUOUS_NOE_RESTRAINT_H */
A shared container for Pairs.
Definition: PairContainer.h:39
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Take Decorator, Particle or ParticleIndex.
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
A decorator for scale parameters particles.
Ambiguous NOE distance restraint between a number of pairs of particles.
A more IMP-like version of the std::vector.
Definition: Vector.h:50
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:86
A container for Pairs.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Definition: object_macros.h:95
Define SingletonScore.
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:56