IMP
2.4.0
The Integrative Modeling Platform
IMP Mainpage
Modules
Classes
Examples
include
IMP
isd
vonMisesKappaConjugateRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/isd/vonMisesKappaConjugateRestraint.h
3
* \brief Conjugate prior for \f$\kappa\f$ in the von Mises distribution.
4
*
5
* Copyright 2007-2015 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPISD_VON_MISES_KAPPA_CONJUGATE_RESTRAINT_H
10
#define IMPISD_VON_MISES_KAPPA_CONJUGATE_RESTRAINT_H
11
12
#include <IMP/isd/isd_config.h>
13
#include <
IMP/SingletonScore.h
>
14
#include <
IMP/kernel/Restraint.h
>
15
16
IMPISD_BEGIN_NAMESPACE
17
18
//! Conjugate prior for the concentration parameter of a von Mises distribution.
19
/** \f[ p(\kappa|c,R_0) = \frac{\exp(\kappa R_0)}{I_0(\kappa)^c} \f]
20
\f$0 < R_0 \le c\f$
21
where \f$kappa\f$ is the concentration parameter.
22
Default values: \f$R_0=1\f$ and \f$c=10\f$
23
*/
24
class
IMPISDEXPORT
vonMisesKappaConjugateRestraint
:
public
kernel::Restraint
{
25
base::Pointer<kernel::Particle>
kappa_;
26
double
old_kappaval;
27
bool
bessel_init_;
28
double
I0_, I1_;
29
double
c_, R0_;
30
31
public
:
32
//! Create the restraint.
33
vonMisesKappaConjugateRestraint
(
kernel::Model
*m,
kernel::Particle
*kappa,
34
double
c = 10.0,
double
R0 = 0.0);
35
36
/** This macro declares the basic needed methods: evaluate and show
37
*/
38
virtual
double
unprotected_evaluate(
IMP::kernel::DerivativeAccumulator
*accum)
39
const
IMP_OVERRIDE
;
40
virtual
IMP::kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE
;
41
IMP_OBJECT_METHODS
(
vonMisesKappaConjugateRestraint
);
42
43
virtual
double
get_probability()
const
;
44
45
private
:
46
void
update_bessel(
double
kappaval);
// update memoized bessel value
47
double
get_kappa()
const
;
48
};
49
50
IMPISD_END_NAMESPACE
51
52
#endif
/* IMPISD_VON_MISES_KAPPA_CONJUGATE_RESTRAINT_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::vonMisesKappaConjugateRestraint
Conjugate prior for the concentration parameter of a von Mises distribution.
Definition:
vonMisesKappaConjugateRestraint.h:24
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_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