IMP
2.1.0
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-2013 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
#include <
IMP/optimizer_state_macros.h
>
18
19
IMPATOM_BEGIN_NAMESPACE
20
21
//! Maintains temperature during molecular dynamics.
22
/** The thermostat scales velocities using the algorithm described
23
in H. J. C. Berendsen, J. P. M. Postma,
24
W. F. van Gunsteren, A. DiNola, and J. R. Haak "Molecular dynamics
25
with coupling to an external bath", Journal of Chemical Physics 81
26
pp. 3684-3690 (1984).
27
28
At each update, velocities are rescaled by \f[
29
\lambda = \left[1 + \frac{\Delta t}{\tau_T}
30
\left( \frac{T}{T_k} -1\right)\right]^{1/2}
31
\f]
32
where \f$\Delta t\f$ is the molecular dynamics timestep, \f$\tau_T\f$
33
is the coupling constant (in fs) of the thermostat, \f$T\f$ is the
34
thermostat temperature, and \f$T_k\f$ is the instantaneous (kinetic)
35
temperature of the dynamics. (This is equation 11 from the reference above.)
36
*/
37
class
IMPATOMEXPORT
BerendsenThermostatOptimizerState
:
public
OptimizerState
{
38
public
:
39
BerendsenThermostatOptimizerState
(
const
kernel::Particles
&pis,
40
double
temperature,
double
tau);
41
42
//! Set the particles to use.
43
void
set_particles
(
const
kernel::Particles
&pis) { pis_ = pis; }
44
45
double
get_temperature() {
return
temperature_; }
46
47
double
get_tau() {
return
tau_; }
48
49
void
set_temperature(
double
temperature) { temperature_ = temperature; }
50
51
void
set_tau(
double
tau) { tau_ = tau; }
52
53
//! Rescale the velocities now
54
void
rescale_velocities()
const
;
55
56
IMP_OBJECT_METHODS
(
BerendsenThermostatOptimizerState
);
57
58
protected
:
59
virtual
void
do_update
(
unsigned
int
) IMP_OVERRIDE;
60
61
private
:
62
kernel::Particles
pis_;
63
double
temperature_;
64
double
tau_;
65
66
//! Keys of the xyz velocities
67
FloatKey
vs_[3];
68
};
69
70
IMP_OBJECTS
(
BerendsenThermostatOptimizerState
,
71
BerendsenThermostatOptimizerStates
);
72
73
IMPATOM_END_NAMESPACE
74
75
#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:123
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
optimizer_state_macros.h
Import IMP/kernel/optimizer_state_macros.h in the namespace.
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:77
IMP::atom::BerendsenThermostatOptimizerState::set_particles
void set_particles(const kernel::Particles &pis)
Set the particles to use.
Definition:
BerendsenThermostatOptimizerState.h:43
OptimizerState.h
Import IMP/kernel/OptimizerState.h in the namespace.
IMP::atom::BerendsenThermostatOptimizerState
Maintains temperature during molecular dynamics.
Definition:
BerendsenThermostatOptimizerState.h:37