IMP logo
IMP Reference Guide  2.7.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-2017 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  public:
24  MolecularDynamicsMover(Model *m, unsigned nsteps = 100,
25  Float timestep = 1.);
26 
27  MolecularDynamics *get_md() const { return md_; }
28 
29  unsigned get_number_of_md_steps() const { return nsteps_; }
30  void set_number_of_md_steps(unsigned nsteps) {
31  IMP_USAGE_CHECK(nsteps >= 1, "nsteps must be positive!");
32  nsteps_ = nsteps;
33  }
34 
35  protected:
36  // mover-specific function calls
39  virtual void do_reject() IMP_OVERRIDE;
41 
42  private:
43  void save_coordinates();
44 
45  unsigned nsteps_;
47  std::vector<std::vector<double> > coordinates_;
48  std::vector<std::vector<double> > velocities_;
49 };
50 
51 IMPISD_END_NAMESPACE
52 
53 #endif /* IMPISD_MOLECULAR_DYNAMICS_MOVER_H */
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Simple molecular dynamics optimizer.
virtual void do_reject()=0
Implement reset_proposed_move()
Return value of the MonteCarloMover::propose() function.
A more IMP-like version of the std::vector.
Definition: Vector.h:39
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
A base class for classes which perturb particles.
The base class for movers for Monte Carlo optimization.
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:146
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
double Float
Basic floating-point value (could be float, double...)
Definition: types.h:20
Modify a set of continuous variables using a MD simulation.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
Definition: check_macros.h:168
Molecular dynamics optimizer on 1-D and 3-D particles.
virtual ModelObjectsTemp do_get_inputs() const =0
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.