IMP
2.1.0
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
LognormalRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/isd/LognormalRestraint.h
3
* \brief A lognormal restraint that uses the ISPA model to model NOE-derived
4
* distance fit.
5
*
6
* Copyright 2007-2013 IMP Inventors. All rights reserved.
7
*
8
*/
9
10
#ifndef IMPISD_LOGNORMAL_RESTRAINT_H
11
#define IMPISD_LOGNORMAL_RESTRAINT_H
12
13
#include <
IMP/restraint_macros.h
>
14
#include <IMP/isd/isd_config.h>
15
#include <
IMP/kernel/Particle.h
>
16
#include <
IMP/kernel/Restraint.h
>
17
18
IMPISD_BEGIN_NAMESPACE
19
20
//! Normal probability distribution as a restraint
21
class
IMPISDEXPORT
LognormalRestraint
:
public
kernel::Restraint
22
{
23
private
:
24
base::Pointer<kernel::Particle>
px_;
25
double
x_;
26
base::Pointer<kernel::Particle>
pmu_;
27
double
mu_;
28
base::Pointer<kernel::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
37
public
:
38
//! Gaussian restraint
39
/** The restraint is a 3-particle restraint, linking together the mean,
40
* observed value and variance, which can all be either Nuisances or doubles.
41
* If F is the identity function, this is a gaussian (e.g. harmonic)
42
* restraint.
43
*/
44
LognormalRestraint
(
kernel::Particle
*x,
kernel::Particle
*mu,
kernel::Particle
45
*sigma);
46
LognormalRestraint
(
double
x,
kernel::Particle
*mu,
kernel::Particle
*sigma);
47
LognormalRestraint
(
kernel::Particle
*x,
double
mu,
kernel::Particle
*sigma);
48
LognormalRestraint
(
kernel::Particle
*x,
kernel::Particle
*mu,
double
sigma);
49
LognormalRestraint
(
double
x,
double
mu,
kernel::Particle
*sigma);
50
LognormalRestraint
(
kernel::Particle
*x,
double
mu,
double
sigma);
51
LognormalRestraint
(
double
x,
kernel::Particle
*mu,
double
sigma);
52
53
/* call for probability */
54
double
get_probability()
const
55
{
56
return
exp(-unprotected_evaluate(
nullptr
));
57
}
58
59
double
get_chi()
const
60
{
return
chi_; }
61
62
63
virtual
double
64
unprotected_evaluate(
IMP::kernel::DerivativeAccumulator
*accum)
65
const
IMP_OVERRIDE;
66
virtual
IMP::kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE;
67
IMP_OBJECT_METHODS
(
LognormalRestraint
);
68
69
};
70
71
IMPISD_END_NAMESPACE
72
73
#endif
/* IMPISD_LOGNORMAL_RESTRAINT_H */
IMP::kernel::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
kernel/DerivativeAccumulator.h:25
IMP::base::Pointer
A smart pointer to a reference counted object.
Definition:
base/Pointer.h:87
IMP::base::Vector
Definition:
base/Vector.h:37
restraint_macros.h
Import IMP/kernel/restraint_macros.h in the namespace.
Restraint.h
Abstract base class for all restraints.
IMP::kernel::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
kernel/declare_Restraint.h:52
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/declare_Particle.h:34
Particle.h
Classes to handle individual model particles.
IMP::kernel::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::isd::LognormalRestraint
Normal probability distribution as a restraint.
Definition:
LognormalRestraint.h:21