IMP logo
IMP Reference Guide  develop.63b38c487d,2024/12/21
The Integrative Modeling Platform
CellMover.h
Go to the documentation of this file.
1 /**
2  * \file IMP/spb/CellMover.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_CELL_MOVER_H
10 #define IMPSPB_CELL_MOVER_H
11 
12 #include <IMP/SingletonContainer.h>
14 #include <IMP/algebra/Vector3D.h>
16 #include <IMP/core/rigid_bodies.h>
17 #include <IMP/spb/spb_config.h>
18 
19 IMPSPB_BEGIN_NAMESPACE
20 
21 //! Apply a mover that moves particles inside the unit cell.
22 /** The mover takes into account the fact that the unit cell size
23  changes from one step to the next.
24  */
25 class IMPSPBEXPORT CellMover : public core::MonteCarloMover {
26  public:
27  CellMover(Particle *p, Particles ps, Float max_translation);
28 
29  // IMP_MOVER(CellMover);
30  protected:
31  virtual core::MonteCarloMoverResult do_propose() override;
32  virtual void do_reject() override;
33  virtual IMP::ModelObjectsTemp do_get_inputs() const override;
34 
37 
38  private:
39  Float old_scale_;
40  algebra::Vector3Ds oldcoords_;
43  Particles ps_;
44  Float max_translation_;
45  Particles ps_norb_;
46  std::vector<core::RigidBody> rbs_;
47 
49  std::vector<core::RigidBody> get_rigid_bodies(Particles ps);
50  algebra::Vector3D get_transformed(Float cf, algebra::Vector3D oc);
51 };
52 
53 IMPSPB_END_NAMESPACE
54 
55 #endif /* IMPSPB_CELL_MOVER_H */
A container for Singletons.
#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)
Get the particles from a list of indexes.
#define IMP_SHOWABLE(Name)
virtual void do_reject()=0
Implement reset_proposed_move()
Apply a mover that moves particles inside the unit cell.
Definition: CellMover.h:25
Return value of the MonteCarloMover::propose() function.
A base class for classes which perturb particles.
functionality for defining rigid bodies
The base class for movers for Monte Carlo optimization.
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
Simple 3D transformation class.
VectorD< 3 > Vector3D
Definition: VectorD.h:408
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:19
Simple 3D vector class.
Class to handle individual particles of a Model object.
Definition: Particle.h:43
virtual ModelObjectsTemp do_get_inputs() const =0