IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
BoxedMover.h
Go to the documentation of this file.
1 /**
2  * \file IMP/spb/BoxedMover.h
3  * \brief A mover that keeps a particle in a box
4  *
5  * Copyright 2007-2020 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPSPB_BOXED_MOVER_H
10 #define IMPSPB_BOXED_MOVER_H
11 
12 #include "spb_config.h"
13 #include <IMP/algebra/Vector3D.h>
14 #include <IMP/core.h>
16 
17 IMPSPB_BEGIN_NAMESPACE
18 
19 //! Move a particle and keep it in a box
20 /** The transformation of a rigid body is moved in a ball of given
21  size. The probability distribution is uniform over the ball.
22  \see MonteCarlo
23  */
24 class IMPSPBEXPORT BoxedMover : public core::MonteCarloMover {
25  public:
26  /** The particle is moved within a (hexagonal or cubic) box
27  \param[in] p is the particle
28  \param[in] max_tr is the maximum translation during a step
29  */
30  BoxedMover(Particle *p, Float max_tr, algebra::Vector3Ds centers);
31 
32  protected:
34  virtual void do_reject() IMP_OVERRIDE;
36 
37  // IMP_MOVER(BoxedMover);
38 
41 
42  private:
43  Float max_tr_;
44  algebra::Vector3Ds centers_;
45  algebra::Vector3D oldcoord_;
46  Particle *p_;
47 };
48 
49 IMPSPB_END_NAMESPACE
50 
51 #endif /* IMPSPB_BOXED_MOVER_H */
Move a particle and keep it in a box.
Definition: BoxedMover.h:24
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Include all non-deprecated headers in IMP.core.
#define IMP_SHOWABLE(Name)
virtual void do_reject()=0
Implement reset_proposed_move()
Return value of the MonteCarloMover::propose() function.
A base class for classes which perturb particles.
The base class for movers for Monte Carlo optimization.
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
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
virtual ModelObjectsTemp do_get_inputs() const =0
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.