IMP
2.0.1
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
SlidingPriorRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/isd/SlidingPriorRestraint.h
3
* \brief A restraint on a scale parameter.
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPISD_SLIDING_PRIOR_RESTRAINT_H
10
#define IMPISD_SLIDING_PRIOR_RESTRAINT_H
11
12
#include <IMP/isd/isd_config.h>
13
#include <
IMP/SingletonScore.h
>
14
#include <
IMP/isd/ISDRestraint.h
>
15
#include <
IMP/restraint_macros.h
>
16
17
IMPISD_BEGIN_NAMESPACE
18
19
//! Score a Scale particle with unnormalized probability.
20
/** \f[\frac{1}{\sigma_{q}} \exp\left(+\frac{(q-qmin)^2}{2 \sigma_q^2}\right)
21
\f]
22
where q is between qmin and qmax.
23
*/
24
class
IMPISDEXPORT
SlidingPriorRestraint
:
public
ISDRestraint
25
{
26
Pointer<Particle> p_;
27
double
qmin_, qmax_, sq_;
28
29
public
:
30
//! Create the restraint.
31
SlidingPriorRestraint
(
Particle
*p,
double
qmin,
double
qmax,
double
sq);
32
33
/** This macro declares the basic needed methods: evaluate and show
34
*/
35
IMP_RESTRAINT
(
SlidingPriorRestraint
);
36
37
//! Call for probability
38
virtual
double
get_probability()
const
39
{
40
return
exp(-unprotected_evaluate(
nullptr
));
41
}
42
43
};
44
45
IMPISD_END_NAMESPACE
46
47
#endif
/* IMPISD_SLIDING_PRIOR_RESTRAINT_H */