home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.20.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
isd
version 2.20.0
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-2022 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/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
*/
23
class
IMPISDEXPORT
vonMisesKappaConjugateRestraint
:
public
Restraint
{
24
Pointer<Particle>
kappa_;
25
double
old_kappaval;
26
bool
bessel_init_;
27
double
I0_, I1_;
28
double
c_, R0_;
29
30
public
:
31
//! Create the restraint.
32
vonMisesKappaConjugateRestraint
(
Model
*m,
Particle
*kappa,
33
double
c = 10.0,
double
R0 = 0.0);
34
35
virtual
double
unprotected_evaluate
(
IMP::DerivativeAccumulator
*accum)
36
const override
;
37
virtual
IMP::ModelObjectsTemp
do_get_inputs
()
const override
;
38
IMP_OBJECT_METHODS
(
vonMisesKappaConjugateRestraint
);
39
40
virtual
double
get_probability()
const
;
41
42
private
:
43
void
update_bessel(
double
kappaval);
// update memoized bessel value
44
double
get_kappa()
const
;
45
};
46
47
IMPISD_END_NAMESPACE
48
49
#endif
/* IMPISD_VON_MISES_KAPPA_CONJUGATE_RESTRAINT_H */
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::Restraint::unprotected_evaluate
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
IMP::Vector
A more IMP-like version of the std::vector.
Definition:
Vector.h:42
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:86
IMP::isd::vonMisesKappaConjugateRestraint
Conjugate prior for the concentration parameter of a von Mises distribution.
Definition:
vonMisesKappaConjugateRestraint.h:23
SingletonScore.h
Define SingletonScore.
IMP::Particle
Class to handle individual particles of a Model object.
Definition:
Particle.h:43
Restraint.h
Abstract base class for all restraints.
IMP::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:24
IMP::Restraint
A restraint is a term in an IMP ScoringFunction.
Definition:
Restraint.h:56