IMP Reference Guide  develop.97bab1d8fd,2021/09/21 The Integrative Modeling Platform
PbcBoxedMover.h
Go to the documentation of this file.
1 /**
2  * \file IMP/spb/PbcBoxedMover.h
3  * \brief A mover that keeps a particle in a box
4  *
6  *
7  */
8
9 #ifndef IMPSPB_PBC_BOXED_MOVER_H
10 #define IMPSPB_PBC_BOXED_MOVER_H
11
12 #include <IMP/algebra/Vector3D.h>
13 #include <IMP/core.h>
14 #include <IMP/core/MonteCarlo.h>
15 #include <IMP/spb/spb_config.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 PbcBoxedMover : 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  PbcBoxedMover(Particle *p, Particles ps, Float max_tr,
31  algebra::Vector3Ds centers,
32  algebra::Transformation3Ds transformations, Particle *px,
33  Particle *py, Particle *pz);
34
35  protected:
38  virtual void do_reject() IMP_OVERRIDE;
41
42  private:
43  Float max_tr_;
44  algebra::Transformation3Ds transformations_;
45  algebra::Vector3Ds centers_;
46  algebra::Vector3Ds oldcoords_;
48  IMP::Particles ps_;
52
53  algebra::Vector3D get_vector(algebra::Vector3D center);
54  algebra::Transformation3D get_transformation(algebra::Transformation3D trans);
55 };
56
57 IMPSPB_END_NAMESPACE
58
59 #endif /* IMPSPB_PBC_BOXED_MOVER_H */
Move a particle and keep it in a box.
Definition: PbcBoxedMover.h:24
Simple 3D transformation class.
Simple Monte Carlo optimizer.
#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.
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.