home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.8.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
include
IMP
core
version 2.8.0
DirectionMover.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/DirectionMover.h
3
* \brief A mover that transforms a Direction.
4
*
5
* Copyright 2007-2017 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPCORE_DIRECTION_MOVER_H
10
#define IMPCORE_DIRECTION_MOVER_H
11
12
#include <IMP/core/core_config.h>
13
#include <
IMP/core/direction.h
>
14
#include <
IMP/core/MonteCarlo.h
>
15
#include <
IMP/core/MonteCarloMover.h
>
16
#include <
IMP/Particle.h
>
17
#include <
IMP/Object.h
>
18
#include <
IMP/Model.h
>
19
20
21
IMPCORE_BEGIN_NAMESPACE
22
23
//! Modify a direction.
24
/** The Direction is transformed via rotation and/or reflection
25
26
\see Direction
27
\see MonteCarlo
28
*/
29
class
IMPCOREEXPORT
DirectionMover
:
public
MonteCarloMover
{
30
private
:
31
algebra::Vector3D
last_direction_;
32
Float
max_angle_;
33
Float
reflect_prob_;
34
ParticleIndex
pi_;
35
36
void
initialize(
ParticleIndex
pi,
double
max_rotation,
37
double
reflect_probability);
38
39
public
:
40
DirectionMover
(
Model
*m,
ParticleIndex
pi,
Float
max_rotation,
41
Float
reflect_probability);
42
43
DirectionMover
(
Direction
d,
Float
max_rotation,
44
Float
reflect_probability);
45
46
//! Set the maximum rotation in radians.
47
void
set_maximum_rotation(
Float
mr);
48
49
//! Set the frequency of reflection moves.
50
void
set_reflect_probability(
Float
rp);
51
52
//! Get the maximum rotation.
53
Float
get_maximum_rotation
()
const
{
return
max_angle_; }
54
55
//! Get the frequency of reflection moves.
56
Float
get_reflect_probability
()
const
{
return
reflect_prob_; }
57
58
//! Get the surface being moved.
59
Direction
get_direction
()
const
{
return
Direction
(get_model(), pi_); }
60
61
protected
:
62
virtual
ModelObjectsTemp
do_get_inputs
() const
IMP_OVERRIDE
;
63
virtual
MonteCarloMoverResult
do_propose()
IMP_OVERRIDE
;
64
virtual
void
do_reject() IMP_OVERRIDE;
65
IMP_OBJECT_METHODS
(
DirectionMover
);
66
};
67
68
IMPCORE_END_NAMESPACE
69
70
#endif
/* IMPCORE_DIRECTION_MOVER_H */
IMP::core::DirectionMover::get_direction
Direction get_direction() const
Get the surface being moved.
Definition:
DirectionMover.h:59
MonteCarlo.h
Simple Monte Carlo optimizer.
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::core::Direction
A decorator for a particle that represents a direction in 3D.
Definition:
direction.h:23
Model.h
Storage of a model, its restraints, constraints and particles.
IMP::Index< ParticleIndexTag >
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::DirectionMover
Modify a direction.
Definition:
DirectionMover.h:29
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:72
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.
direction.h
Decorators for directions and the angle between them.
IMP::core::DirectionMover::get_maximum_rotation
Float get_maximum_rotation() const
Get the maximum rotation.
Definition:
DirectionMover.h:53
Particle.h
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
Object.h
A shared base class to help in debugging and things.
IMP::core::DirectionMover::get_reflect_probability
Float get_reflect_probability() const
Get the frequency of reflection moves.
Definition:
DirectionMover.h:56
IMP::algebra::Vector3D
VectorD< 3 > Vector3D
Definition:
VectorD.h:395
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
types.h:20
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