IMP
2.1.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
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-2013 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
#include <
IMP/restraint_macros.h
>
16
17
IMPISD_BEGIN_NAMESPACE
18
19
//! Conjugate prior for the concentration parameter of a von Mises distribution.
20
/** \f[ p(\kappa|c,R_0) = \frac{\exp(\kappa R_0)}{I_0(\kappa)^c} \f]
21
\f$0 < R_0 \le c\f$
22
where \f$kappa\f$ is the concentration parameter.
23
Default values: \f$R_0=1\f$ and \f$c=10\f$
24
*/
25
class
IMPISDEXPORT
vonMisesKappaConjugateRestraint
:
public
kernel::Restraint
26
{
27
base::Pointer<kernel::Particle>
kappa_;
28
double
old_kappaval;
29
bool
bessel_init_;
30
double
I0_,I1_;
31
double
c_,R0_;
32
33
public
:
34
//! Create the restraint.
35
vonMisesKappaConjugateRestraint
(
kernel::Model
*m,
kernel::Particle
*kappa,
36
double
c=10.0,
double
R0=0.0);
37
38
/** This macro declares the basic needed methods: evaluate and show
39
*/
40
virtual
double
41
unprotected_evaluate(
IMP::kernel::DerivativeAccumulator
*accum)
42
const IMP_OVERRIDE;
43
virtual IMP::kernel::
ModelObjectsTemp
do_get_inputs() const IMP_OVERRIDE;
44
IMP_OBJECT_METHODS
(
vonMisesKappaConjugateRestraint
);
45
46
virtual
double
get_probability() const;
47
48
private:
49
50
void
update_bessel(
double
kappaval);
// update memoized bessel value
51
double
get_kappa() const;
52
53
};
54
55
IMPISD_END_NAMESPACE
56
57
#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::kernel::ModelObjectsTemp
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
Definition:
kernel/base_types.h:82
IMP::base::Pointer
A smart pointer to a reference counted object.
Definition:
base/Pointer.h:87
restraint_macros.h
Import IMP/kernel/restraint_macros.h in the namespace.
IMP::isd::vonMisesKappaConjugateRestraint
Conjugate prior for the concentration parameter of a von Mises distribution.
Definition:
vonMisesKappaConjugateRestraint.h:25
Restraint.h
Abstract base class for all restraints.
IMP::kernel::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
kernel/declare_Restraint.h:52
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/declare_Particle.h:34
SingletonScore.h
Import IMP/kernel/SingletonScore.h in the namespace.
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/declare_Model.h:72