home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.15.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
isd
version 2.15.0
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-2021 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
18
IMPISD_BEGIN_NAMESPACE
19
20
//! Normal probability distribution as a restraint
21
class
IMPISDEXPORT
GaussianRestraint
:
public
Restraint
{
22
private
:
23
PointerMember<FNormal>
normal_;
24
Pointer<Particle>
px_;
25
double
x_;
26
Pointer<Particle>
pmu_;
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
*/
45
GaussianRestraint
(
Particle
*x,
Particle
*mu,
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
59
virtual
double
unprotected_evaluate(
IMP::DerivativeAccumulator
*accum)
60
const
IMP_OVERRIDE
;
61
virtual
IMP::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE
;
62
IMP_OBJECT_METHODS
(
GaussianRestraint
);
63
};
64
65
IMPISD_END_NAMESPACE
66
67
#endif
/* IMPISD_GAUSSIAN_RESTRAINT_H */
FNormal.h
Normal distribution of Function.
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::Vector
A more IMP-like version of the std::vector.
Definition:
Vector.h:40
IMP::Pointer
A smart pointer to a reference counted object.
Definition:
Pointer.h:87
IMP::PointerMember
A smart pointer to a ref-counted Object that is a class member.
Definition:
Pointer.h:146
Particle.h
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
IMP::Particle
Class to handle individual particles of a Model object.
Definition:
Particle.h:41
Restraint.h
Abstract base class for all restraints.
IMP::isd::GaussianRestraint
Normal probability distribution as a restraint.
Definition:
GaussianRestraint.h:21
IMP::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:78
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:24
IMP::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
Restraint.h:54