IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
PbcBoxedRigidBodyMover.h
Go to the documentation of this file.
1/**
2 * \file IMP/spb/PbcBoxedRigidBodyMover.h
3 * \brief A mover that transform a rigid body
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 *
7 */
8
9#ifndef IMPSPB_PBC_BOXED_RIGID_BODY_MOVER_H
10#define IMPSPB_PBC_BOXED_RIGID_BODY_MOVER_H
11
15#include <IMP/core/MonteCarlo.h>
16#include <IMP/spb/spb_config.h>
17
18IMPSPB_BEGIN_NAMESPACE
19
20//! Modify the transformation of a rigid body
21/** The transformation of a rigid body is moved in a ball of given
22 size. The probability distribution is uniform over the ball.
23 \see MonteCarlo
24 */
25class IMPSPBEXPORT PbcBoxedRigidBodyMover : public core::MonteCarloMover {
26 public:
27 /** The rigid body is rotated and translated to move
28 \param[in] d the rigid body decorator
29 \param[in] max_translation maximum translation during a step
30 \param[in] max_rotation maximum rotation angle in radians
31 */
33 Float max_rotation, algebra::Vector3Ds centers,
34 algebra::Transformation3Ds transformations,
35 Particle *px, Particle *py, Particle *pz);
36
37 protected:
38 virtual IMP::ModelObjectsTemp do_get_inputs() const override;
40 virtual void do_reject() override;
41
44
45 private:
46 algebra::Transformation3D last_transformation_;
47 algebra::Vector3Ds oldcoords_;
49 Float max_translation_;
50 Float max_angle_;
51 algebra::Vector3Ds centers_;
52 algebra::Transformation3Ds transformations_;
55 IMP::Particles ps_norb_;
56 std::vector<core::RigidBody> rbs_;
57
58 // particles for scaling
62
63 algebra::Vector3D get_vector(algebra::Vector3D center);
65 IMP::Particles get_particles(IMP::Particles ps);
66 std::vector<core::RigidBody> get_rigid_bodies(IMP::Particles ps);
67};
68
69IMPSPB_END_NAMESPACE
70
71#endif /* IMPSPB_PBC_BOXED_RIGID_BODY_MOVER_H */
Simple Monte Carlo optimizer.
A container for Singletons.
Simple 3D transformation class.
Simple 3D vector class.
Class to handle individual particles of a Model object.
Definition Particle.h:45
Simple 3D transformation class.
A base class for classes which perturb particles.
A decorator for a rigid body.
PbcBoxedRigidBodyMover(core::RigidBody d, Particles ps, Float max_translation, Float max_rotation, algebra::Vector3Ds centers, algebra::Transformation3Ds transformations, Particle *px, Particle *py, Particle *pz)
virtual void do_reject() override
Implement reset_proposed_move().
virtual IMP::ModelObjectsTemp do_get_inputs() const override
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
VectorD< 3 > Vector3D
Definition VectorD.h:407
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
#define IMP_SHOWABLE(Name)
A smart pointer to a ref-counted Object that is a class member.
Definition Pointer.h:144
Return value of the MonteCarloMover::propose() function.