IMP  2.1.1
The Integrative Modeling Platform
RemoveRigidMotionOptimizerState.h
Go to the documentation of this file.
1 /**
2  * \file IMP/atom/RemoveRigidMotionOptimizerState.h
3  * \brief Remove rigid rotation and translation during molecular dynamics.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPATOM_REMOVE_RIGID_MOTION_OPTIMIZER_STATE_H
10 #define IMPATOM_REMOVE_RIGID_MOTION_OPTIMIZER_STATE_H
11 
12 #include <IMP/atom/atom_config.h>
13 #include <IMP/kernel/Particle.h>
14 #include <IMP/base_types.h>
15 #include <IMP/OptimizerState.h>
17 
18 IMPATOM_BEGIN_NAMESPACE
19 
20 //! Removes rigid translation and rotation from the particles.
21 class IMPATOMEXPORT RemoveRigidMotionOptimizerState : public OptimizerState {
22  public:
23  /** \deprecated_at{2.1} Use set_period() instead. */
24  IMPATOM_DEPRECATED_FUNCTION_DECL(2.1)
26  unsigned skip_steps);
29 
30  //! Set the particles to use.
31  void set_particles(const kernel::Particles &pis) { pis_ = pis; }
32 
33  //! Remove rigid motion now
34  void remove_rigid_motion() const;
35 
37 
38  protected:
39  virtual void do_update(unsigned int call) IMP_OVERRIDE;
40 
41  private:
42  void remove_linear() const;
43  void remove_angular() const;
44  kernel::Particles pis_;
45 
46  //! Keys of the xyz velocities
47  FloatKey vs_[3];
48 };
49 
51 
52 IMPATOM_END_NAMESPACE
53 
54 #endif /* IMPATOM_REMOVE_RIGID_MOTION_OPTIMIZER_STATE_H */
Import IMP/kernel/base_types.h in the namespace.
virtual void do_update(unsigned int)
void set_particles(const kernel::Particles &pis)
Set the particles to use.
Shared optimizer state that is invoked upon commitment of new coordinates.
Removes rigid translation and rotation from the particles.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Import IMP/kernel/optimizer_state_macros.h in the namespace.
Classes to handle individual model particles.
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Import IMP/kernel/OptimizerState.h in the namespace.
Class for storing model, its restraints, constraints, and particles.