IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
symmetry/RigidBodyMover.h
Go to the documentation of this file.
1/**
2 * \file IMP/symmetry/RigidBodyMover.h
3 * \brief A mover that keeps a rigid body in a box
4 *
5 * Copyright 2007-2022 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 <IMP/symmetry/symmetry_config.h>
13#include <IMP/core/MonteCarlo.h>
19
20IMPSYMMETRY_BEGIN_NAMESPACE
21
22//! Move a rigid body and keep it in the primitive cell of a periodic lattice
23class IMPSYMMETRYEXPORT RigidBodyMover : public core::MonteCarloMover {
24 public:
25 /** The rigid body is rotated and translated to move
26 \param[in] d is the master rigid body decorator
27 \param[in] ps are the slave particles
28 \param[in] max_tr is the maximum translation during a step
29 \param[in] max_ang is the maximum rotation angle in radians
30 \param[in] ctrs is a list of all cell centers
31 \param[in] trs is the list of transformations from primitive to all cells
32 */
34 Float max_ang, algebra::Vector3Ds ctrs,
36
37 protected:
38 virtual ModelObjectsTemp do_get_inputs() const override;
40 virtual void do_reject() override;
42
43 private:
45 Particles ps_;
46 Float max_tr_;
47 Float max_ang_;
50 Particles ps_norb_;
51 std::vector<core::RigidBody> rbs_;
53 algebra::Vector3Ds oldcoords_;
55
56 Particles get_particles(Particles ps);
57 std::vector<core::RigidBody> get_rigid_bodies(Particles ps);
58};
59
60IMPSYMMETRY_END_NAMESPACE
61
62#endif /* IMPSYMMETRY_RIGID_BODY_MOVER_H */
The base class for movers for Monte Carlo optimization.
Simple Monte Carlo optimizer.
A container for Singletons.
Simple 3D transformation class.
Simple 3D vector class.
Simple 3D transformation class.
A base class for classes which perturb particles.
A decorator for a rigid body.
virtual void do_reject() override
Implement reset_proposed_move().
virtual ModelObjectsTemp do_get_inputs() const override
RigidBodyMover(core::RigidBody d, Particles ps, Float max_tr, Float max_ang, algebra::Vector3Ds ctrs, algebra::Transformation3Ds trs)
virtual core::MonteCarloMoverResult do_propose() override
Implement propose_move().
IMP::Vector< Transformation3D > Transformation3Ds
Vector< VectorD< 3 > > Vector3Ds
Definition VectorD.h:409
Vector< Pointer< Particle > > Particles
A list of reference-counted Particle objects.
Definition base_types.h:138
double Float
Basic floating-point value (could be float, double...).
Definition types.h:19
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
functionality for defining rigid bodies
Return value of the MonteCarloMover::propose() function.