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
symmetry/BallMover.h
Go to the documentation of this file.
1
/**
2
* \file symmetry/BallMover.h
3
* \brief A mover that keeps a particle in a box
4
*
5
* Copyright 2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPSYMMETRY_BALL_MOVER_H
10
#define IMPSYMMETRY_BALL_MOVER_H
11
12
#include "symmetry_config.h"
13
#include <
IMP/core/MonteCarlo.h
>
14
#include <
IMP/core/MonteCarloMover.h
>
15
#include <IMP/algebra.h>
16
17
IMPSYMMETRY_BEGIN_NAMESPACE
18
19
//! Move a particle and keep it in the primitive cell of a periodic lattice
20
class
IMPSYMMETRYEXPORT
BallMover
:
public
core::MonteCarloMover
21
{
22
public
:
23
/** The particle is moved within a primitive cell of a periodic lattice
24
\param[in] p is the master particle
25
\param[in] ps are the slave particles
26
\param[in] max_tr is the maximum translation during a step
27
\param[in] ctrs is a list of all cell centers
28
\param[in] trs is the list of transformations from primitive to all cells
29
*/
30
BallMover
(
kernel::Particle
*p,
kernel::Particles
ps,
Float
max_tr,
31
algebra::Vector3Ds
ctrs,
algebra::Transformation3Ds
trs);
32
33
34
protected
:
35
virtual
kernel::ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE;
36
virtual
core::MonteCarloMoverResult
do_propose
() IMP_OVERRIDE;
37
virtual
void
do_reject
() IMP_OVERRIDE;
38
IMP_OBJECT_METHODS
(
BallMover
);
39
private
:
40
//! Master particle
41
IMP::base::PointerMember<kernel::Particle>
p_;
42
//! List of slave particles
43
kernel::Particles
ps_;
44
//! Maximum translation
45
Float
max_tr_;
46
//! List of centers of all (including primitive) cells
47
algebra::Vector3Ds
ctrs_;
48
//! List of transformations from primitive to all (including primitive) cells
49
algebra::Transformation3Ds
trs_;
50
// master particle old coordinates
51
algebra::Vector3D
oldcoord_;
52
// slave particles old coordinates
53
algebra::Vector3Ds
oldcoords_;
54
};
55
56
IMPSYMMETRY_END_NAMESPACE
57
58
#endif
/* IMPSYMMETRY_BALL_MOVER_H */
MonteCarlo.h
Simple Monte Carlo optimizer.
IMP::base::PointerMember
A smart pointer to a ref-counted Object that is a class memeber.
Definition:
base/Pointer.h:146
IMP::symmetry::BallMover
Move a particle and keep it in the primitive cell of a periodic lattice.
Definition:
symmetry/BallMover.h:20
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::algebra::VectorD< 3 >
IMP::core::MonteCarloMover
A base class for classes which perturb particles.
Definition:
MonteCarloMover.h:41
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
IMP::kernel::Particle
Class to handle individual model particles.
Definition:
kernel/declare_Particle.h:34
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