IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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-2022 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
17IMPISD_BEGIN_NAMESPACE
18
19//! Modify a set of continuous variables using a MD simulation.
20/** \see MonteCarlo
21 */
22class 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
37 virtual ModelObjectsTemp do_get_inputs() const override;
39 virtual void do_reject() override;
40 IMP_OBJECT_METHODS(MolecularDynamicsMover);
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
51IMPISD_END_NAMESPACE
52
53#endif /* IMPISD_MOLECULAR_DYNAMICS_MOVER_H */
The base class for movers for Monte Carlo optimization.
#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.
virtual ModelObjectsTemp do_get_inputs() const override
virtual core::MonteCarloMoverResult do_propose() override
Implement propose_move().
virtual void do_reject() override
Implement reset_proposed_move().
Molecular dynamics optimizer on 1-D and 3-D particles.
Simple molecular dynamics optimizer.
double Float
Basic floating-point value (could be float, double...).
Definition types.h:19
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A smart pointer to a ref-counted Object that is a class member.
Definition Pointer.h:144
Return value of the MonteCarloMover::propose() function.