IMP
2.2.1
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-2014 IMP Inventors. All rights reserved.
7
*
8
*/
9
10
#ifndef IMPISD_LOGNORMAL_RESTRAINT_H
11
#define IMPISD_LOGNORMAL_RESTRAINT_H
12
13
#include <IMP/isd/isd_config.h>
14
#include <
IMP/kernel/Particle.h
>
15
#include <
IMP/kernel/Restraint.h
>
16
17
IMPISD_BEGIN_NAMESPACE
18
19
//! Normal probability distribution as a restraint
20
class
IMPISDEXPORT
LognormalRestraint
:
public
kernel::Restraint
{
21
private
:
22
base::Pointer<kernel::Particle>
px_;
23
double
x_;
24
base::Pointer<kernel::Particle>
pmu_;
25
double
mu_;
26
base::Pointer<kernel::Particle>
psigma_;
27
double
sigma_;
28
bool
isx_, ismu_, issigma_;
// true if it's a particle
29
double
chi_;
30
31
private
:
32
void
set_chi(
double
chi) { chi_ = chi; }
33
void
check_particles();
34
35
public
:
36
//! Gaussian restraint
37
/** The restraint is a 3-particle restraint, linking together the mean,
38
* observed value and variance, which can all be either Nuisances or doubles.
39
* If F is the identity function, this is a gaussian (e.g. harmonic)
40
* restraint.
41
*/
42
LognormalRestraint
(
kernel::Particle
*x,
kernel::Particle
*mu,
43
kernel::Particle
*sigma);
44
LognormalRestraint
(
double
x,
kernel::Particle
*mu,
kernel::Particle
*sigma);
45
LognormalRestraint
(
kernel::Particle
*x,
double
mu,
kernel::Particle
*sigma);
46
LognormalRestraint
(
kernel::Particle
*x,
kernel::Particle
*mu,
double
sigma);
47
LognormalRestraint
(
double
x,
double
mu,
kernel::Particle
*sigma);
48
LognormalRestraint
(
kernel::Particle
*x,
double
mu,
double
sigma);
49
LognormalRestraint
(
double
x,
kernel::Particle
*mu,
double
sigma);
50
51
/* call for probability */
52
double
get_probability()
const
{
return
exp(-unprotected_evaluate(
nullptr
)); }
53
54
double
get_chi()
const
{
return
chi_; }
55
56
virtual
double
unprotected_evaluate(
IMP::kernel::DerivativeAccumulator
*accum)
57
const
IMP_OVERRIDE;
58
virtual
IMP::kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE;
59
IMP_OBJECT_METHODS
(
LognormalRestraint
);
60
};
61
62
IMPISD_END_NAMESPACE
63
64
#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.h
Abstract base class for all restraints.
IMP::kernel::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
kernel/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/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:20