IMP
2.3.0
The Integrative Modeling Platform
IMP Mainpage
Modules
Applications
Related Pages
Groups
Classes
Files
Examples
Indexes
File List
File Members
RelativePositionMover.h
Go to the documentation of this file.
1
/**
2
* \file IMP/em2d/RelativePositionMover.h
3
* \brief Mover for Rigid Bodies moving respect to each other
4
*
5
* Copyright 2007-2014 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
IMPEM2D_BEGIN_NAMESPACE
19
20
/*! Class for the movement of rigid bodies respect to each other. The class
21
is initiated with the rigid body that is going to move (let's call it A).
22
Afterwards, one of more rigid bodies can be added as references.
23
Each reference rigid
24
body needs to specify the set of the internal (relative) transformations
25
that A can have respect to it.
26
*/
27
typedef
std::vector<algebra::Transformation3Ds>
Transformation3DsList
;
28
29
/** Move a nested rigid body. */
30
class
IMPEM2DEXPORT
RelativePositionMover
:
public
core::RigidBodyMover
{
31
32
protected
:
33
core::RigidBody
rbA_;
34
core::RigidBodies
reference_rbs_;
35
Transformation3DsList
transformations_map_;
36
algebra::Transformation3D
last_transformation_;
37
Float
max_translation_;
38
Float
max_angle_;
39
Float
probabily_of_random_move_;
40
41
public
:
42
RelativePositionMover
(
core::RigidBody
d,
Float
max_translation,
43
Float
max_rotation);
44
45
/*! Adds a reference RigidBody and the set of internal transformations.
46
The internal transformations are used for positioning the rigid body
47
that this Mover is moving
48
\param[in] d Reference rigid body
49
\param[in] transforms The internal transformations
50
*/
51
void
add_internal_transformations(
core::RigidBody
d,
52
algebra::Transformation3Ds
transforms);
53
54
/*!
55
\param[in] p Probability of a random move instead of a relative one.
56
default is 0.
57
*/
58
void
set_random_move_probability
(
Float
p) { probabily_of_random_move_ = p; }
59
60
protected
:
61
virtual
core::MonteCarloMoverResult
do_propose
()
IMP_OVERRIDE
;
62
virtual
void
do_reject()
IMP_OVERRIDE
;
63
IMP_OBJECT_METHODS
(
RelativePositionMover
);
64
};
65
66
IMPEM2D_END_NAMESPACE
67
68
#endif
/* IMPEM2D_RELATIVE_POSITION_MOVER_H */
IMP::algebra::Transformation3D
Simple 3D transformation class.
Definition:
Transformation3D.h:30
IMP::em2d::RelativePositionMover
Definition:
RelativePositionMover.h:30
IMP::core::RigidBodyMover::do_propose
virtual MonteCarloMoverResult do_propose()
Implement propose_move()
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
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
Transformation3D.h
Simple 3D transformation class.
IMP::em2d::RelativePositionMover::set_random_move_probability
void set_random_move_probability(Float p)
Definition:
RelativePositionMover.h:58
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
types.h:20
IMP::core::RigidBody
A decorator for a rigid body.
Definition:
rigid_bodies.h:75
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:75
IMP::em2d::Transformation3DsList
std::vector< algebra::Transformation3Ds > Transformation3DsList
Definition:
RelativePositionMover.h:27