IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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
20IMPISD_BEGIN_NAMESPACE
21
22//! Ambiguous NOE distance restraint between a number of pairs of particles.
23class 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
59IMPISD_END_NAMESPACE
60
61#endif /* IMPISD_AMBIGUOUS_NOE_RESTRAINT_H */
A container for Pairs.
Abstract base class for all restraints.
A decorator for scale parameters particles.
Define SingletonScore.
Simple XYZ decorator.
Class for adding derivatives from restraints to the model.
A shared container for Pairs.
Take Decorator, Particle or ParticleIndex.
Restraint(Model *m, std::string name)
Create a restraint and register it with the model.
virtual IMP::ModelObjectsTemp do_get_inputs() const override
virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
AmbiguousNOERestraint(Model *m, PairContainer *pc, ParticleIndexAdaptor sigma, ParticleIndexAdaptor gamma, double Iexp)
Create the restraint.
Index< ParticleIndexTag > ParticleIndex
Definition base_types.h:196
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A smart pointer to a reference counted object.
Definition Pointer.h:88