home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.14.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
isd
version 2.14.0
UniformPrior.h
Go to the documentation of this file.
1
/**
2
* \file IMP/isd/UniformPrior.h
3
* \brief A restraint on a scale parameter.
4
*
5
* Copyright 2007-2020 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPISD_UNIFORM_PRIOR_H
10
#define IMPISD_UNIFORM_PRIOR_H
11
12
#include "isd_config.h"
13
#include <
IMP/SingletonScore.h
>
14
#include <
IMP/Restraint.h
>
15
16
IMPISD_BEGIN_NAMESPACE
17
18
//! Uniform distribution with harmonic boundaries
19
20
class
IMPISDEXPORT
UniformPrior
:
public
Restraint
21
{
22
Pointer<Particle>
p_;
23
Float
upperb_;
24
Float
lowerb_;
25
Float
k_;
26
27
public
:
28
//! Create the restraint.
29
UniformPrior
(
IMP::Model
* m,
Particle
*p,
Float
k,
30
Float
upperb,
Float
lowerb, std::string name=
"UniformPrior%1%"
);
31
32
virtual
double
33
unprotected_evaluate(
IMP::DerivativeAccumulator
*accum)
34
const
IMP_OVERRIDE
;
35
virtual
IMP::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE
;
36
IMP_OBJECT_METHODS
(
UniformPrior
);
37
38
/* call for probability */
39
virtual
double
get_probability()
const
40
{
41
return
exp(-unprotected_evaluate(
nullptr
));
42
}
43
44
//! \return Information for writing to RMF files
45
RestraintInfo
*
get_static_info
() const
IMP_OVERRIDE
;
46
47
//! \return Information for writing to RMF files
48
RestraintInfo
*get_dynamic_info() const
IMP_OVERRIDE
;
49
50
};
51
52
IMPISD_END_NAMESPACE
53
54
#endif
/* IMPISD_UNIFORM_PRIOR_H */
IMP::Restraint::get_static_info
virtual RestraintInfo * get_static_info() const
Definition:
Restraint.h:117
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:39
IMP::isd::UniformPrior
Uniform distribution with harmonic boundaries.
Definition:
UniformPrior.h:20
IMP::Pointer
A smart pointer to a reference counted object.
Definition:
Pointer.h:87
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:72
SingletonScore.h
Define SingletonScore.
IMP::RestraintInfo
Report key:value information on restraints.
Definition:
RestraintInfo.h:35
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
types.h:20
IMP::Particle
Class to handle individual particles of a Model object.
Definition:
Particle.h:41
Restraint.h
Abstract base class for all restraints.
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:25
IMP::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
Restraint.h:54