IMP  2.0.0
The Integrative Modeling Platform
isd/MolecularDynamics.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/MolecularDynamics.h
3  * \brief Simple molecular dynamics optimizer.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPISD_MOLECULAR_DYNAMICS_H
10 #define IMPISD_MOLECULAR_DYNAMICS_H
11 
12 #include <IMP/isd/isd_config.h>
13 #include <IMP/Particle.h>
14 #include <IMP/Optimizer.h>
16 #include <IMP/isd/Nuisance.h>
17 
18 IMPISD_BEGIN_NAMESPACE
19 
20 //! Molecular dynamics optimizer on 1-D and 3-D particles
21 /** The particles to be optimized must be XYZs or Nuisances, and should have a
22  * non-optimizable mass.
23  * \see MolecularDynamics in the atom module for more details
24  */
25 class IMPISDEXPORT MolecularDynamics : public atom::MolecularDynamics
26 {
27 public:
28  /** Score based on the provided model */
29  MolecularDynamics(Model *m=nullptr);
30 
31  //! \return the current kinetic energy of the system, in kcal/mol
32  Float get_kinetic_energy() const;
33 
34  //! Assign velocities representative of the given temperature
35  void assign_velocities(Float temperature);
36 
37 protected:
38  bool get_is_simulation_particle(ParticleIndex pi) const;
39 
40  void setup_degrees_of_freedom(const ParticleIndexes &ps);
41 
42  //! First part of velocity Verlet (update coordinates and half-step velocity)
43  void propagate_coordinates(const ParticleIndexes &ps, double step_size);
44 
45  //! Second part of velocity Verlet (update velocity)
46  void propagate_velocities(const ParticleIndexes &ps, double step_size);
47 
48  //! Keys of the xyz velocities
50 
51 };
52 
53 IMPISD_END_NAMESPACE
54 
55 #endif /* IMPISD_MOLECULAR_DYNAMICS_H */