IMP
2.2.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
BerendsenThermostatOptimizerState.h
Go to the documentation of this file.
1
/**
2
* \file IMP/atom/BerendsenThermostatOptimizerState.h
3
* \brief Maintains temperature during molecular dynamics using a
4
* Berendsen thermostat.
5
*
6
* Copyright 2007-2014 IMP Inventors. All rights reserved.
7
*
8
*/
9
10
#ifndef IMPATOM_BERENDSEN_THERMOSTAT_OPTIMIZER_STATE_H
11
#define IMPATOM_BERENDSEN_THERMOSTAT_OPTIMIZER_STATE_H
12
13
#include <IMP/atom/atom_config.h>
14
#include <
IMP/kernel/Particle.h
>
15
#include <
IMP/base_types.h
>
16
#include <
IMP/OptimizerState.h
>
17
18
IMPATOM_BEGIN_NAMESPACE
19
20
//! Maintains temperature during molecular dynamics.
21
/** The thermostat scales velocities using the algorithm described
22
in H. J. C. Berendsen, J. P. M. Postma,
23
W. F. van Gunsteren, A. DiNola, and J. R. Haak "Molecular dynamics
24
with coupling to an external bath", Journal of Chemical Physics 81
25
pp. 3684-3690 (1984).
26
27
At each update, velocities are rescaled by \f[
28
\lambda = \left[1 + \frac{\Delta t}{\tau_T}
29
\left( \frac{T}{T_k} -1\right)\right]^{1/2}
30
\f]
31
where \f$\Delta t\f$ is the molecular dynamics timestep, \f$\tau_T\f$
32
is the coupling constant (in fs) of the thermostat, \f$T\f$ is the
33
thermostat temperature, and \f$T_k\f$ is the instantaneous (kinetic)
34
temperature of the dynamics. (This is equation 11 from the reference above.)
35
*/
36
class
IMPATOMEXPORT
BerendsenThermostatOptimizerState
:
public
OptimizerState
{
37
public
:
38
BerendsenThermostatOptimizerState
(
const
kernel::Particles
&pis,
39
double
temperature,
double
tau);
40
41
//! Set the particles to use.
42
void
set_particles
(
const
kernel::Particles
&pis) { pis_ = pis; }
43
44
double
get_temperature() {
return
temperature_; }
45
46
double
get_tau() {
return
tau_; }
47
48
void
set_temperature(
double
temperature) { temperature_ = temperature; }
49
50
void
set_tau(
double
tau) { tau_ = tau; }
51
52
//! Rescale the velocities now
53
void
rescale_velocities()
const
;
54
55
IMP_OBJECT_METHODS
(
BerendsenThermostatOptimizerState
);
56
57
protected
:
58
virtual
void
do_update
(
unsigned
int
) IMP_OVERRIDE;
59
60
private
:
61
kernel::Particles
pis_;
62
double
temperature_;
63
double
tau_;
64
65
//! Keys of the xyz velocities
66
FloatKey
vs_[3];
67
};
68
69
IMP_OBJECTS
(
BerendsenThermostatOptimizerState
,
70
BerendsenThermostatOptimizerStates
);
71
72
IMPATOM_END_NAMESPACE
73
74
#endif
/* IMPATOM_BERENDSEN_THERMOSTAT_OPTIMIZER_STATE_H */
IMP::kernel::Key< 0, true >
base_types.h
Import IMP/kernel/base_types.h in the namespace.
IMP::kernel::OptimizerState::do_update
virtual void do_update(unsigned int)
Definition:
kernel/OptimizerState.h:119
IMP::kernel::OptimizerState
Shared optimizer state that is invoked upon commitment of new coordinates.
Definition:
kernel/OptimizerState.h:43
IMP::base::Vector< base::Pointer< Particle > >
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
base/object_macros.h:25
Particle.h
Classes to handle individual model particles.
IMP_OBJECTS
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing sets of objects.
Definition:
base/object_macros.h:52
IMP::atom::BerendsenThermostatOptimizerState::set_particles
void set_particles(const kernel::Particles &pis)
Set the particles to use.
Definition:
BerendsenThermostatOptimizerState.h:42
OptimizerState.h
Import IMP/kernel/OptimizerState.h in the namespace.
IMP::atom::BerendsenThermostatOptimizerState
Maintains temperature during molecular dynamics.
Definition:
BerendsenThermostatOptimizerState.h:36