/
AmbiguousNOERestraint.h
61 lines (47 loc) · 1.65 KB
/
AmbiguousNOERestraint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
* \file IMP/isd/AmbiguousNOERestraint.h
* \brief A lognormal restraint that uses the ISPA model to model NOE-derived
* distance fit.
*
* Copyright 2007-2022 IMP Inventors. All rights reserved.
*
*/
#ifndef IMPISD_AMBIGUOUS_NOE_RESTRAINT_H
#define IMPISD_AMBIGUOUS_NOE_RESTRAINT_H
#include <IMP/isd/isd_config.h>
#include <IMP/SingletonScore.h>
#include <IMP/core/XYZ.h>
#include <IMP/Restraint.h>
#include <IMP/PairContainer.h>
#include <IMP/isd/Scale.h>
IMPISD_BEGIN_NAMESPACE
//! Ambiguous NOE distance restraint between a number of pairs of particles.
class IMPISDEXPORT AmbiguousNOERestraint : public Restraint {
Pointer<PairContainer> pc_;
ParticleIndex sigma_;
ParticleIndex gamma_;
double Vexp_;
double chi_;
void set_chi(double chi) { chi_ = chi; }
friend class cereal::access;
template<class Archive> void serialize(Archive &ar) {
ar(cereal::base_class<Restraint>(this),
pc_, sigma_, gamma_, Vexp_, chi_);
}
IMP_OBJECT_SERIALIZE_DECL(AmbiguousNOERestraint);
public:
//! Create the restraint.
AmbiguousNOERestraint(Model *m, PairContainer *pc,
ParticleIndexAdaptor sigma, ParticleIndexAdaptor gamma,
double Iexp);
AmbiguousNOERestraint() {}
/* call for probability */
double get_probability() const { return exp(-unprotected_evaluate(nullptr)); }
double get_chi() const { return chi_; }
virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum)
const override;
virtual IMP::ModelObjectsTemp do_get_inputs() const override;
IMP_OBJECT_METHODS(AmbiguousNOERestraint);
};
IMPISD_END_NAMESPACE
#endif /* IMPISD_AMBIGUOUS_NOE_RESTRAINT_H */