home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
isd
version 20261205.develop.7482b7c7af
GammaPrior.h
Go to the documentation of this file.
1
/**
2
* \file IMP/isd/GammaPrior.h
3
* \brief A restraint on a scale parameter.
4
*
5
* Copyright 2007-2022 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPISD_GAMMA_PRIOR_H
10
#define IMPISD_GAMMA_PRIOR_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
//! Uniform distribution with harmonic boundaries
19
20
class
IMPISDEXPORT
GammaPrior
:
public
Restraint
21
{
22
Pointer<Particle>
p_;
23
Float
theta_;
24
Float
k_;
25
26
public
:
27
//! Create the restraint.
28
GammaPrior
(
IMP::Model
* m,
Particle
*p,
Float
k,
29
Float
theta, std::string name=
"GammaPrior%1%"
);
30
31
virtual
double
32
unprotected_evaluate
(
IMP::DerivativeAccumulator
*accum)
33
const override
;
34
virtual
double
evaluate_at(
Float
val)
const
;
35
virtual
IMP::ModelObjectsTemp
do_get_inputs
()
const override
;
36
IMP_OBJECT_METHODS
(
GammaPrior
);
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_GAMMA_PRIOR_H */
Restraint.h
Abstract base class for all restraints.
SingletonScore.h
Define SingletonScore.
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition
DerivativeAccumulator.h:25
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition
Model.h:111
IMP::Particle
Class to handle individual particles of a Model object.
Definition
Particle.h:45
IMP::Restraint::Restraint
Restraint(Model *m, std::string name)
Create a restraint and register it with the model.
IMP::isd::GammaPrior::GammaPrior
GammaPrior(IMP::Model *m, Particle *p, Float k, Float theta, std::string name="GammaPrior%1%")
Create the restraint.
IMP::isd::GammaPrior::unprotected_evaluate
virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
IMP::isd::GammaPrior::do_get_inputs
virtual IMP::ModelObjectsTemp do_get_inputs() const override
IMP::Float
double Float
Basic floating-point value (could be float, double...).
Definition
types.h:19
IMP::ModelObjectsTemp
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition
base_types.h:122
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition
object_macros.h:25
IMP::Pointer
A smart pointer to a reference counted object.
Definition
Pointer.h:88