IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
GaussianRestraint.h
Go to the documentation of this file.
1/**
2 * \file IMP/isd/GaussianRestraint.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_GAUSSIAN_RESTRAINT_H
11#define IMPISD_GAUSSIAN_RESTRAINT_H
12
13#include <IMP/isd/isd_config.h>
14#include <IMP/isd/FNormal.h>
15#include <IMP/Particle.h>
16#include <IMP/Restraint.h>
17
18IMPISD_BEGIN_NAMESPACE
19
20//! Normal probability distribution as a restraint
21class IMPISDEXPORT GaussianRestraint : public Restraint {
22 private:
25 double x_;
27 double mu_;
28 Pointer<Particle> psigma_;
29 double sigma_;
30 bool isx_, ismu_, issigma_; // true if it's a particle
31 double chi_;
32
33 private:
34 void set_chi(double chi) { chi_ = chi; }
35 void check_particles();
36 void create_normal();
37
38 public:
39 //! Gaussian restraint
40 /** The restraint is a 3-particle restraint, linking together the mean,
41 * observed value and variance, which can all be either Nuisances or doubles.
42 * If F is the identity function, this is a gaussian (e.g. harmonic)
43 * restraint.
44 */
46 Particle *sigma);
47 GaussianRestraint(double x, Particle *mu, Particle *sigma);
48 GaussianRestraint(Particle *x, double mu, Particle *sigma);
49 GaussianRestraint(Particle *x, Particle *mu, double sigma);
50 GaussianRestraint(double x, double mu, Particle *sigma);
51 GaussianRestraint(Particle *x, double mu, double sigma);
52 GaussianRestraint(double x, Particle *mu, double sigma);
53
54 /* call for probability */
55 double get_probability() const { return exp(-unprotected_evaluate(nullptr)); }
56
57 double get_chi() const { return chi_; }
58
60 const override;
61 virtual IMP::ModelObjectsTemp do_get_inputs() const override;
63};
64
65IMPISD_END_NAMESPACE
66
67#endif /* IMPISD_GAUSSIAN_RESTRAINT_H */
Normal distribution of Function.
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Abstract base class for all restraints.
Class for adding derivatives from restraints to the model.
Class to handle individual particles of a Model object.
Definition Particle.h:45
Restraint(Model *m, std::string name)
Create a restraint and register it with the model.
virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
virtual IMP::ModelObjectsTemp do_get_inputs() const override
GaussianRestraint(Particle *x, Particle *mu, Particle *sigma)
Gaussian restraint.
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A smart pointer to a ref-counted Object that is a class member.
Definition Pointer.h:144
A smart pointer to a reference counted object.
Definition Pointer.h:88