IMP  2.0.1
The Integrative Modeling Platform
vonMisesKappaJeffreysRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/vonMisesKappaJeffreysRestraint.h
3  * \brief Jeffreys 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_JEFFREYS_RESTRAINT_H
10 #define IMPISD_VON_MISES_KAPPA_JEFFREYS_RESTRAINT_H
11 
12 #include <IMP/isd/isd_config.h>
13 #include <IMP/SingletonScore.h>
14 #include "ISDRestraint.h"
15 #include <IMP/restraint_macros.h>
16 
17 IMPISD_BEGIN_NAMESPACE
18 
19 //! Jeffreys prior for the \f$\kappa\f$ concentration parameter of a von Mises
20 //! distribution.
21 //! \f[p(\kappa) = \sqrt{\frac{I_1(\kappa)}{I_0(\kappa)}
22 // \left[
23 // \kappa
24 // -\frac{I_1(\kappa)}{I_0(\kappa)}
25 // -kappa\left(\frac{I_1(\kappa)}{I_0(\kappa)}\right)^2
26 // \right]}\f]
27 //!
28 
29 class IMPISDEXPORT vonMisesKappaJeffreysRestraint : public ISDRestraint
30 {
31  Pointer<Particle> kappa_;
32  double old_kappaval;
33  double I0_,I1_;
34 
35 public:
36  //! Create the restraint.
38 
39  /** This macro declares the basic needed methods: evaluate and show
40  */
42 
43 virtual double get_probability() const;
44 
45 private:
46 
47 void update_bessel(double kappaval); // update memoized bessel values
48 
49 };
50 
51 IMPISD_END_NAMESPACE
52 
53 #endif /* IMPISD_VON_MISES_KAPPA_JEFFREYS_RESTRAINT_H */