home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.12.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
isd
version 2.12.0
WeightMover.h
Go to the documentation of this file.
1
/**
2
* \file IMP/isd/WeightMover.h
3
* \brief A mover that perturbs a Weight particle.
4
*
5
* Copyright 2007-2019 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPISD_WEIGHT_MOVER_H
10
#define IMPISD_WEIGHT_MOVER_H
11
12
#include "isd_config.h"
13
#include <
IMP/core/MonteCarloMover.h
>
14
#include <
IMP/algebra/VectorD.h
>
15
#include <
IMP/isd/Weight.h
>
16
17
IMPISD_BEGIN_NAMESPACE
18
19
//! A mover that perturbs a Weight particle.
20
class
IMPISDEXPORT
WeightMover
:
public
core::MonteCarloMover
{
21
public
:
22
/** Mover for weight decorator
23
\param[in] w particle
24
\param[in] radius maximum radius of displacement
25
*/
26
WeightMover
(
Particle
*w,
Float
radius);
27
void
set_radius(
Float
radius) { radius_ = radius; }
28
Float
get_radius() {
return
radius_; }
29
30
protected
:
31
virtual
ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE
;
32
virtual
core::MonteCarloMoverResult
do_propose
()
IMP_OVERRIDE
;
33
virtual
void
do_reject
()
IMP_OVERRIDE
;
34
IMP_OBJECT_METHODS
(
WeightMover
);
35
36
private
:
37
Weight
w_;
38
algebra::VectorKD
oldweights_;
39
Float
radius_;
40
};
41
42
IMPISD_END_NAMESPACE
43
44
#endif
/* IMPISD_WEIGHT_MOVER_H */
IMP::isd::Weight
Add weights to a particle.
Definition:
Weight.h:29
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::core::MonteCarloMover::do_reject
virtual void do_reject()=0
Implement reset_proposed_move()
IMP::core::MonteCarloMoverResult
Return value of the MonteCarloMover::propose() function.
Definition:
MonteCarloMover.h:29
IMP::Vector
A more IMP-like version of the std::vector.
Definition:
Vector.h:39
IMP::core::MonteCarloMover
A base class for classes which perturb particles.
Definition:
MonteCarloMover.h:42
MonteCarloMover.h
The base class for movers for Monte Carlo optimization.
VectorD.h
Simple D vector class.
IMP::core::MonteCarloMover::do_propose
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
IMP::isd::WeightMover
A mover that perturbs a Weight particle.
Definition:
WeightMover.h:20
Weight.h
Add weights constrained to the unit simplex to a particle.
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::algebra::VectorKD
VectorD<-1 > VectorKD
Definition:
VectorD.h:437
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:78