home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.10.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
spb
version 2.10.0
spb/Em2DRestraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/spb/EM2DRestraint.h
3
* \brief A restraint for using EM2D cross-corr in a Bayesian way
4
*
5
* Copyright 2007-2018 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPSPB_EM2D_RESTRAINT_H
10
#define IMPSPB_EM2D_RESTRAINT_H
11
#include <
IMP/Pointer.h
>
12
#include <
IMP/em2d/Image.h
>
13
#include <
IMP/em2d/RegistrationResult.h
>
14
#include <
IMP/em2d/project.h
>
15
#include <
IMP/isd/Scale.h
>
16
#include <
IMP/spb/ISDRestraint.h
>
17
#include "spb_config.h"
18
19
IMPSPB_BEGIN_NAMESPACE
20
/** A restraint for using EM2D cross-corr in a Bayesian way
21
\include EM2DRestraint.cpp
22
*/
23
24
class
IMPSPBEXPORT
EM2DRestraint
:
public
spb::ISDRestraint
{
25
Particles
ps_;
26
IMP::PointerMember<Particle>
sigma_;
27
int
constr_type_;
28
IMP::PointerMember<em2d::Image>
image_;
29
Float
rows_;
30
Float
cols_;
31
em2d::ProjectingOptions
options_;
32
em2d::RegistrationResults
reg_res_;
33
Floats
fmod_grid_;
34
Floats
grid_;
35
36
void
read_image(std::string ifile,
Float
px_size,
Float
res);
37
double
get_truncated_normalization(
double
mean,
double
sigma)
const
;
38
double
get_normal_pdf(
double
mean,
double
sigma,
double
x)
const
;
39
void
init_grid(
const
Floats
& sigma_grid);
40
int
get_closest(std::vector<double>
const
& vec,
double
value)
const
;
41
42
public
:
43
//! EM2D cross correlation is used to score models in a Bayesian way.
44
45
EM2DRestraint
(
Particles
ps,
Particle
* sigma, std::string ifile,
Float
px_size,
46
Float
res);
47
48
EM2DRestraint
(
Particles
ps,
Floats
sigma_grid,
Floats
fmod_grid,
49
std::string ifile,
Float
px_size,
Float
res);
50
51
// set particles
52
void
set_particles(
Particles
ps);
53
54
// get cross correlation
55
double
get_cross_correlation()
const
;
56
57
// get marginalized likelihood
58
double
get_marginal_element(
double
fmod)
const
;
59
60
// get likelihood
61
double
get_element(
double
fmod,
double
sigma)
const
;
62
63
// get probability
64
double
get_probability()
const
;
65
66
/** This macro declares the basic needed methods: evaluate and show
67
*/
68
// IMP_RESTRAINT(EM2DRestraint);
69
//
70
/** This macro declares the basic needed methods: evaluate and show
71
* */
72
// IMP_RESTRAINT( UniformBoundedRestraint);
73
74
virtual
double
unprotected_evaluate(
IMP::DerivativeAccumulator
* accum)
const
75
IMP_OVERRIDE
;
76
IMP::ModelObjectsTemp
do_get_inputs
()
const
;
77
78
IMP_OBJECT_METHODS
(
EM2DRestraint
);
79
};
80
81
IMPSPB_END_NAMESPACE
82
83
#endif
/* IMPSPB_EM2D_RESTRAINT_H */
project.h
Generation of projections from models or density maps Copyright 2007-2018 IMP Inventors. All rights reserved.
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
Scale.h
A decorator for scale parameters particles.
IMP::em2d::ProjectingOptions
Parameters given as options to the get_projections() functions.
Definition:
project.h:59
IMP::Vector< Pointer< Particle > >
Image.h
IMP images for Electron Microscopy using openCV matrices Copyright 2007-2018 IMP Inventors. All rights reserved.
IMP::PointerMember
A smart pointer to a ref-counted Object that is a class member.
Definition:
Pointer.h:146
ISDRestraint.h
A lognormal restraint that uses the ISPA model to model NOE-derived distance fit. ...
Pointer.h
A nullptr-initialized pointer to an IMP Object.
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
types.h:20
IMP::Particle
Class to handle individual particles of a Model object.
Definition:
Particle.h:41
IMP::spb::EM2DRestraint
Definition:
spb/Em2DRestraint.h:24
IMP::spb::ISDRestraint
Apply an NOE distance restraint between two particles.
Definition:
spb/ISDRestraint.h:30
RegistrationResult.h
Registration results class Copyright 2007-2018 IMP Inventors. All rights reserved.
IMP::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:80
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:25