home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
symmetry
version 20261205.develop.7482b7c7af
symmetry/BallMover.h
Go to the documentation of this file.
1
/**
2
* \file IMP/symmetry/BallMover.h
3
* \brief A mover that keeps a particle in a box
4
*
5
* Copyright 2007-2022 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPSYMMETRY_BALL_MOVER_H
10
#define IMPSYMMETRY_BALL_MOVER_H
11
12
#include <IMP/symmetry/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
public
:
22
/** The particle is moved within a primitive cell of a periodic lattice
23
\param[in] p is the master particle
24
\param[in] ps are the slave particles
25
\param[in] max_tr is the maximum translation during a step
26
\param[in] ctrs is a list of all cell centers
27
\param[in] trs is the list of transformations from primitive to all cells
28
*/
29
BallMover
(
Particle
*p,
Particles
ps,
Float
max_tr,
30
algebra::Vector3Ds
ctrs,
algebra::Transformation3Ds
trs);
31
32
protected
:
33
virtual
ModelObjectsTemp
do_get_inputs
()
const override
;
34
virtual
core::MonteCarloMoverResult
do_propose
()
override
;
35
virtual
void
do_reject
()
override
;
36
IMP_OBJECT_METHODS
(
BallMover
);
37
38
private
:
39
//! Master particle
40
IMP::PointerMember<Particle>
p_;
41
//! List of slave particles
42
Particles
ps_;
43
//! Maximum translation
44
Float
max_tr_;
45
//! List of centers of all (including primitive) cells
46
algebra::Vector3Ds
ctrs_;
47
//! List of transformations from primitive to all (including primitive) cells
48
algebra::Transformation3Ds
trs_;
49
// master particle old coordinates
50
algebra::Vector3D
oldcoord_;
51
// slave particles old coordinates
52
algebra::Vector3Ds
oldcoords_;
53
};
54
55
IMPSYMMETRY_END_NAMESPACE
56
57
#endif
/* IMPSYMMETRY_BALL_MOVER_H */
MonteCarloMover.h
The base class for movers for Monte Carlo optimization.
MonteCarlo.h
Simple Monte Carlo optimizer.
algebra.h
Include all non-deprecated headers in IMP.algebra.
IMP::Particle
Class to handle individual particles of a Model object.
Definition
Particle.h:45
IMP::core::MonteCarloMover
A base class for classes which perturb particles.
Definition
MonteCarloMover.h:44
IMP::symmetry::BallMover::BallMover
BallMover(Particle *p, Particles ps, Float max_tr, algebra::Vector3Ds ctrs, algebra::Transformation3Ds trs)
IMP::symmetry::BallMover::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const override
IMP::symmetry::BallMover::do_reject
virtual void do_reject() override
Implement reset_proposed_move().
IMP::symmetry::BallMover::do_propose
virtual core::MonteCarloMoverResult do_propose() override
Implement propose_move().
IMP::algebra::Transformation3Ds
IMP::Vector< Transformation3D > Transformation3Ds
Definition
Transformation3D.h:130
IMP::Vector3Ds
Vector< VectorD< 3 > > Vector3Ds
Definition
VectorD.h:409
IMP::Particles
Vector< Pointer< Particle > > Particles
A list of reference-counted Particle objects.
Definition
base_types.h:138
IMP::Float
double Float
Basic floating-point value (could be float, double...).
Definition
types.h:19
IMP::Vector3D
VectorD< 3 > Vector3D
Definition
VectorD.h:407
IMP::ModelObjectsTemp
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition
base_types.h:122
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition
object_macros.h:25
IMP::PointerMember
A smart pointer to a ref-counted Object that is a class member.
Definition
Pointer.h:144
IMP::core::MonteCarloMoverResult
Return value of the MonteCarloMover::propose() function.
Definition
MonteCarloMover.h:31