IMP
2.3.1
The Integrative Modeling Platform
IMP Mainpage
Modules
Applications
Related Pages
Groups
Classes
Files
Examples
Indexes
File List
File Members
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-2014 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/kernel/Restraint.h
>
15
16
IMPISD_BEGIN_NAMESPACE
17
18
//! Uniform distribution with harmonic boundaries
19
20
class
IMPISDEXPORT
UniformPrior
:
public
kernel::Restraint
21
{
22
base::Pointer<Particle>
p_;
23
Float
upperb_;
24
Float
lowerb_;
25
Float
k_;
26
27
public
:
28
//! Create the restraint.
29
UniformPrior
(
IMP::kernel::Model
* m,
Particle
*p,
Float
k,
30
Float
upperb,
Float
lowerb, std::string name=
"UniformPrior%1%"
);
31
32
/** This macro declares the basic needed methods: evaluate and show
33
*/
34
virtual
double
35
unprotected_evaluate(
IMP::kernel::DerivativeAccumulator
*accum)
36
const
IMP_OVERRIDE
;
37
virtual
IMP::kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE
;
38
IMP_OBJECT_METHODS
(
UniformPrior
);
39
40
/* call for probability */
41
virtual
double
get_probability()
const
42
{
43
return
exp(-unprotected_evaluate(
nullptr
));
44
}
45
46
};
47
48
IMPISD_END_NAMESPACE
49
50
#endif
/* IMPISD_UNIFORM_PRIOR_H */
IMP::kernel::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
kernel/DerivativeAccumulator.h:25
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::base::Pointer
A smart pointer to a reference counted object.
Definition:
Pointer.h:87
IMP::base::Vector
Definition:
Vector.h:37
IMP::isd::UniformPrior
Uniform distribution with harmonic boundaries.
Definition:
UniformPrior.h:20
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::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/Particle.h:37
SingletonScore.h
Import IMP/kernel/SingletonScore.h in the namespace.
IMP::kernel::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
types.h:20
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:75
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/Model.h:73