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
RelativePositionMover.h
Go to the documentation of this file.
1
/**
2
* \file em2d/RelativePositionMover.h
3
* \brief Mover for Rigid Bodies moving respect to each other
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPEM2D_RELATIVE_POSITION_MOVER_H
10
#define IMPEM2D_RELATIVE_POSITION_MOVER_H
11
12
#include <IMP/em2d/em2d_config.h>
13
#include "
IMP/core/RigidBodyMover.h
"
14
#include "
IMP/core/rigid_bodies.h
"
15
#include "
IMP/algebra/Transformation3D.h
"
16
#include <vector>
17
18
19
20
IMPEM2D_BEGIN_NAMESPACE
21
22
23
/*! Class for the movement of rigid bodies respect to each other. The class
24
is initiated with the rigid body that is going to move (let's call it A).
25
Afterwards, one of more rigid bodies can be added as references.
26
Each reference rigid
27
body needs to specify the set of the internal (relative) transformations
28
that A can have respect to it.
29
*/
30
typedef
std::vector<algebra::Transformation3Ds >
Transformation3DsList
;
31
32
/** Move a nested rigid body. */
33
class
IMPEM2DEXPORT
RelativePositionMover
:
public
core::RigidBodyMover
{
34
35
protected
:
36
core::RigidBody
rbA_;
37
core::RigidBodies
reference_rbs_;
38
Transformation3DsList
transformations_map_;
39
algebra::Transformation3D
last_transformation_;
40
Float
max_translation_;
41
Float
max_angle_;
42
Float
probabily_of_random_move_;
43
44
public
:
45
RelativePositionMover
(
core::RigidBody
d,
Float
max_translation,
46
Float
max_rotation);
47
48
/*! Adds a reference RigidBody and the set of internal transformations.
49
The internal transformations are used for positioning the rigid body
50
that this Mover is moving
51
\param[in] d Reference rigid body
52
\param[in] transforms The internal transformations
53
*/
54
void
add_internal_transformations(
core::RigidBody
d,
55
algebra::Transformation3Ds
transforms);
56
57
/*!
58
\param[in] p Probability of a random move instead of a relative one.
59
default is 0.
60
*/
61
void
set_random_move_probability
(
Float
p) {
62
probabily_of_random_move_ = p;
63
}
64
65
protected
:
66
virtual
core::MonteCarloMoverResult
do_propose
() IMP_OVERRIDE;
67
virtual
void
do_reject() IMP_OVERRIDE;
68
IMP_OBJECT_METHODS
(
RelativePositionMover
);
69
};
70
71
72
73
IMPEM2D_END_NAMESPACE
74
75
#endif
/* IMPEM2D_RELATIVE_POSITION_MOVER_H */
IMP::algebra::Transformation3D
Simple 3D transformation class.
Definition:
Transformation3D.h:30
IMP::em2d::RelativePositionMover
Definition:
RelativePositionMover.h:33
IMP::core::RigidBodyMover::do_propose
virtual MonteCarloMoverResult do_propose()
Implement propose_move()
IMP::core::RigidBodyMover
Modify the transformation of a rigid body.
Definition:
core/RigidBodyMover.h:26
IMP::core::MonteCarloMoverResult
Definition:
MonteCarloMover.h:29
IMP::base::Vector< RigidBody >
RigidBodyMover.h
A mover that transform a rigid body.
rigid_bodies.h
functionality for defining rigid bodies
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
Transformation3D.h
Simple 3D transformation class.
IMP::em2d::Transformation3DsList
std::vector< algebra::Transformation3Ds > Transformation3DsList
Definition:
RelativePositionMover.h:30
IMP::em2d::RelativePositionMover::set_random_move_probability
void set_random_move_probability(Float p)
Definition:
RelativePositionMover.h:61
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
base/types.h:20
IMP::core::RigidBody
A decorator for a rigid body.
Definition:
rigid_bodies.h:75