00001 /** 00002 * \file RigidBodyMover.h 00003 * \brief A mover that transform a rigid body 00004 * 00005 * Copyright 2007-2010 IMP Inventors. All rights reserved. 00006 * 00007 */ 00008 00009 #ifndef IMPCORE_RIGID_BODY_MOVER_H 00010 #define IMPCORE_RIGID_BODY_MOVER_H 00011 00012 #include "core_config.h" 00013 #include <IMP/core/MonteCarlo.h> 00014 #include <IMP/core/Mover.h> 00015 #include <IMP/algebra/Vector3D.h> 00016 #include <IMP/algebra/Transformation3D.h> 00017 #include <IMP/SingletonContainer.h> 00018 #include <IMP/core/rigid_bodies.h> 00019 IMPCORE_BEGIN_NAMESPACE 00020 00021 //! Modify the transformation of a rigid body 00022 /** The transformation of a rigid body is moved in a ball of given 00023 size. The probability distribution is uniform over the ball. 00024 \see MonteCarlo 00025 */ 00026 class IMPCOREEXPORT RigidBodyMover : public Mover 00027 { 00028 public: 00029 /** The rigid body is rotated and translated to move 00030 \param[in] d the rigid body decorator 00031 \param[in] max_translation maximum translation during a step 00032 \param[in] max_rotation maximum rotation angle in radians 00033 */ 00034 RigidBodyMover(RigidBody d,Float max_translation, 00035 Float max_rotation); 00036 void reject_move(); 00037 void accept_move(); 00038 void propose_move(Float f); 00039 IMP_OBJECT(RigidBodyMover); 00040 private: 00041 algebra::Transformation3D last_transformation_; 00042 Float max_translation_; 00043 Float max_angle_; 00044 RigidBody d_; 00045 }; 00046 00047 IMPCORE_END_NAMESPACE 00048 00049 #endif /* IMPCORE_RIGID_BODY_MOVER_H */