IMP
2.1.0
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
JeffreysRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/isd/JeffreysRestraint.h
3
* \brief A restraint on a scale parameter.
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPISD_JEFFREYS_RESTRAINT_H
10
#define IMPISD_JEFFREYS_RESTRAINT_H
11
12
#include <
IMP/restraint_macros.h
>
13
#include <IMP/isd/isd_config.h>
14
#include <
IMP/SingletonScore.h
>
15
#include <
IMP/kernel/Restraint.h
>
16
17
IMPISD_BEGIN_NAMESPACE
18
19
//! Score a Scale particle with log(scale)
20
//! the probability is 1/scale
21
22
class
IMPISDEXPORT
JeffreysRestraint
:
public
kernel::Restraint
23
{
24
base::Pointer<Particle>
p_;
25
26
public
:
27
//! Create the restraint.
28
JeffreysRestraint
(
Model
*m,
Particle
*p);
29
30
virtual
double
unprotected_evaluate(
31
IMP::kernel::DerivativeAccumulator
*accum)
const
IMP_OVERRIDE;
32
virtual
IMP::kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE;
33
34
IMP_OBJECT_METHODS
(
JeffreysRestraint
);
35
36
37
38
/* call for probability */
39
virtual
double
get_probability()
const
40
{
41
return
exp(-unprotected_evaluate(
nullptr
));
42
}
43
44
};
45
46
IMPISD_END_NAMESPACE
47
48
#endif
/* IMPISD_JEFFREYS_RESTRAINT_H */
IMP::kernel::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
kernel/DerivativeAccumulator.h:25
IMP::base::Pointer
A smart pointer to a reference counted object.
Definition:
base/Pointer.h:87
IMP::base::Vector
Definition:
base/Vector.h:37
restraint_macros.h
Import IMP/kernel/restraint_macros.h in the namespace.
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::isd::JeffreysRestraint
Definition:
JeffreysRestraint.h:22
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::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/declare_Model.h:72