IMP
2.1.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
symmetry/RigidBodyMover.h
Go to the documentation of this file.
1
/**
2
* \file symmetry/RigidBodyMover.h
3
* \brief A mover that keeps a rigid body in a box
4
*
5
* Copyright 2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPSYMMETRY_RIGID_BODY_MOVER_H
10
#define IMPSYMMETRY_RIGID_BODY_MOVER_H
11
12
#include "symmetry_config.h"
13
#include <
IMP/core/MonteCarlo.h
>
14
#include <
IMP/core/MonteCarloMover.h
>
15
#include <
IMP/algebra/Vector3D.h
>
16
#include <
IMP/algebra/Transformation3D.h
>
17
#include <
IMP/SingletonContainer.h
>
18
#include <
IMP/core/rigid_bodies.h
>
19
20
IMPSYMMETRY_BEGIN_NAMESPACE
21
22
//! Move a rigid body and keep it in the primitive cell of a periodic lattice
23
class
IMPSYMMETRYEXPORT
RigidBodyMover
:
public
core::MonteCarloMover
24
{
25
public
:
26
/** The rigid body is rotated and translated to move
27
\param[in] d is the master rigid body decorator
28
\param[in] ps are the slave particles
29
\param[in] max_tr is the maximum translation during a step
30
\param[in] max_ang is the maximum rotation angle in radians
31
\param[in] ctrs is a list of all cell centers
32
\param[in] trs is the list of transformations from primitive to all cells
33
*/
34
RigidBodyMover
(
core::RigidBody
d,
kernel::Particles
ps,
Float
max_tr,
Float
max_ang,
35
algebra::Vector3Ds
ctrs,
algebra::Transformation3Ds
trs);
36
37
protected
:
38
virtual
kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE;
39
virtual
core::MonteCarloMoverResult
do_propose
() IMP_OVERRIDE;
40
virtual
void
do_reject
() IMP_OVERRIDE;
41
IMP_OBJECT_METHODS
(
RigidBodyMover
);
42
private
:
43
core::RigidBody
d_;
44
kernel::Particles
ps_;
45
Float
max_tr_;
46
Float
max_ang_;
47
algebra::Vector3Ds
ctrs_;
48
algebra::Transformation3Ds
trs_;
49
kernel::Particles
ps_norb_;
50
std::vector<core::RigidBody> rbs_;
51
algebra::Transformation3D
oldtr_;
52
algebra::Vector3Ds
oldcoords_;
53
algebra::Transformation3Ds
oldtrs_;
54
55
kernel::Particles
get_particles
(
kernel::Particles
ps);
56
std::vector<core::RigidBody> get_rigid_bodies(
kernel::Particles
ps);
57
};
58
59
IMPSYMMETRY_END_NAMESPACE
60
61
#endif
/* IMPSYMMETRY_RIGID_BODY_MOVER_H */
IMP::algebra::Transformation3D
Simple 3D transformation class.
Definition:
Transformation3D.h:30
IMP::symmetry::RigidBodyMover
Move a rigid body and keep it in the primitive cell of a periodic lattice.
Definition:
symmetry/RigidBodyMover.h:23
SingletonContainer.h
Import IMP/kernel/SingletonContainer.h in the namespace.
MonteCarlo.h
Simple Monte Carlo optimizer.
IMP::kernel::get_particles
ParticlesTemp get_particles(kernel::Model *m, const ParticleIndexes &ps)
IMP::core::MonteCarloMover::do_reject
virtual void do_reject()=0
Implement reset_proposed_move()
IMP::core::MonteCarloMoverResult
Definition:
MonteCarloMover.h:29
IMP::base::Vector< base::Pointer< Particle > >
IMP::core::MonteCarloMover
A base class for classes which perturb particles.
Definition:
MonteCarloMover.h:41
rigid_bodies.h
functionality for defining rigid bodies
MonteCarloMover.h
The base class for movers for MC optimization.
IMP::core::MonteCarloMover::do_propose
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
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::kernel::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
base/types.h:20
Vector3D.h
Simple 3D vector class.
IMP::core::RigidBody
A decorator for a rigid body.
Definition:
rigid_bodies.h:75