IMP logo
IMP Reference Guide  2.12.0
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-2019 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 
12 #include <IMP/SingletonContainer.h>
14 #include <IMP/algebra/Vector3D.h>
15 #include <IMP/core/MonteCarlo.h>
16 #include "spb_config.h"
17 
18 IMPSPB_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  */
25 class 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:
40  virtual void do_reject() IMP_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_;
53  core::RigidBody d_;
54  IMP::Particles ps_;
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);
64  algebra::Transformation3D get_transformation(algebra::Transformation3D trans);
66  std::vector<core::RigidBody> get_rigid_bodies(IMP::Particles ps);
67 };
68 
69 IMPSPB_END_NAMESPACE
70 
71 #endif /* IMPSPB_PBC_BOXED_RIGID_BODY_MOVER_H */
Simple 3D transformation class.
A container for Singletons.
Simple Monte Carlo optimizer.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
#define IMP_SHOWABLE(Name)
virtual void do_reject()=0
Implement reset_proposed_move()
Return value of the MonteCarloMover::propose() function.
Modify the transformation of a rigid body.
A base class for classes which perturb particles.
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
Simple 3D transformation class.
VectorD< 3 > Vector3D
Definition: VectorD.h:421
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:20
Simple 3D vector class.
Class to handle individual particles of a Model object.
Definition: Particle.h:41
A decorator for a rigid body.
Definition: rigid_bodies.h:82
virtual ModelObjectsTemp do_get_inputs() const =0
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.