home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.20.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
isd
version 2.20.0
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-2022 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/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
LognormalRestraint
:
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
LognormalRestraint
(
Particle
*x,
Particle
*mu,
46
Particle
*sigma);
47
LognormalRestraint
(
double
x,
Particle
*mu,
Particle
*sigma);
48
LognormalRestraint
(
Particle
*x,
double
mu,
Particle
*sigma);
49
LognormalRestraint
(
Particle
*x,
Particle
*mu,
double
sigma);
50
LognormalRestraint
(
double
x,
double
mu,
Particle
*sigma);
51
LognormalRestraint
(
Particle
*x,
double
mu,
double
sigma);
52
LognormalRestraint
(
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 override
;
61
virtual
IMP::ModelObjectsTemp
do_get_inputs
()
const override
;
62
IMP_OBJECT_METHODS
(
LognormalRestraint
);
63
};
64
65
IMPISD_END_NAMESPACE
66
67
#endif
/* IMPISD_LOGNORMAL_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::Restraint::unprotected_evaluate
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
IMP::Vector
A more IMP-like version of the std::vector.
Definition:
Vector.h:42
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:143
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:43
IMP::isd::LognormalRestraint
Normal probability distribution as a restraint.
Definition:
LognormalRestraint.h:21
Restraint.h
Abstract base class for all restraints.
IMP::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
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:56