IMP  2.1.0
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 <IMP/kernel/Restraint.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 
30 {
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  */
41  virtual double
42  unprotected_evaluate(IMP::kernel::DerivativeAccumulator *accum)
43  const IMP_OVERRIDE;
44  virtual IMP::kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
46 
47 virtual double get_probability() const;
48 
49 private:
50 
51 void update_bessel(double kappaval); // update memoized bessel values
52 
53 };
54 
55 IMPISD_END_NAMESPACE
56 
57 #endif /* IMPISD_VON_MISES_KAPPA_JEFFREYS_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
A smart pointer to a reference counted object.
Definition: base/Pointer.h:87
Import IMP/kernel/restraint_macros.h in the namespace.
Abstract base class for all restraints.
A restraint is a term in an IMP ScoringFunction.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
Import IMP/kernel/SingletonScore.h in the namespace.
Class for storing model, its restraints, constraints, and particles.