IMP  2.0.0
The Integrative Modeling Platform
MolecularDynamicsMover.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/MolecularDynamicsMover.h
3  * \brief A modifier which perturbs XYZs or Nuisances with a constant energy
4  * MD simulation.
5  *
6  * Copyright 2007-2013 IMP Inventors. All rights reserved.
7  *
8  */
9 
10 #ifndef IMPISD_MOLECULAR_DYNAMICS_MOVER_H
11 #define IMPISD_MOLECULAR_DYNAMICS_MOVER_H
12 
13 #include <IMP/isd/isd_config.h>
14 #include <IMP/core/Mover.h>
16 #include <IMP/core/mover_macros.h>
17 
18 IMPISD_BEGIN_NAMESPACE
19 
20 //! Modify a set of continuous variables using a MD simulation.
21 /** \see MonteCarlo
22  */
23 class IMPISDEXPORT MolecularDynamicsMover : public core::Mover
24 {
25 public:
26 
27  MolecularDynamicsMover(Model *m, unsigned nsteps=100, Float timestep=1.);
28 
29  MolecularDynamics * get_md() const { return md_; }
30 
31  unsigned get_number_of_md_steps() const {return nsteps_;}
32  void set_number_of_md_steps(unsigned nsteps) {nsteps_=nsteps;}
33 
34 
36 
37 private:
38  //mover-specific function calls
39  void save_coordinates();
40  void do_move(Float f);
41  void reset_coordinates();
42 
43 private:
44  IMP::internal::OwnerPointer<MolecularDynamics> md_;
45  unsigned nsteps_;
46  std::vector<std::vector<double> > coordinates_;
47  std::vector<std::vector<double> > velocities_;
48 };
49 
50 IMPISD_END_NAMESPACE
51 
52 #endif /* IMPISD_MOLECULAR_DYNAMICS_MOVER_H */