IMP  2.1.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>
16 
17 IMPISD_BEGIN_NAMESPACE
18 
19 //! Modify a set of continuous variables using a MD simulation.
20 /** \see MonteCarlo
21  */
22 class IMPISDEXPORT MolecularDynamicsMover : public core::MonteCarloMover
23 {
24 public:
25 
26  MolecularDynamicsMover(kernel::Model *m, unsigned nsteps=100,
27  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) {
33  IMP_USAGE_CHECK(nsteps>=1, "nsteps must be positive!");
34  nsteps_=nsteps;
35  }
36 
37 protected:
38  //mover-specific function calls
39  virtual kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
40  virtual core::MonteCarloMoverResult do_propose() IMP_OVERRIDE;
41  virtual void do_reject() IMP_OVERRIDE;
43 
44 private:
45  void save_coordinates();
46 
47  unsigned nsteps_;
49  std::vector<std::vector<double> > coordinates_;
50  std::vector<std::vector<double> > velocities_;
51 };
52 
53 IMPISD_END_NAMESPACE
54 
55 #endif /* IMPISD_MOLECULAR_DYNAMICS_MOVER_H */
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:146
Simple molecular dynamics optimizer.
virtual void do_reject()=0
Implement reset_proposed_move()
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
A base class for classes which perturb particles.
The base class for movers for MC optimization.
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
virtual ModelObjectsTemp do_get_inputs() const =0
double Float
Basic floating-point value (could be float, double...)
Definition: base/types.h:20
Modify a set of continuous variables using a MD simulation.
Molecular dynamics optimizer on 1-D and 3-D particles.
Class for storing model, its restraints, constraints, and particles.