home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.15.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
atom
version 2.15.0
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-2021 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/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
Particles
&pis,
39
double
temperature,
double
tau);
40
41
//! Set the particles to use.
42
void
set_particles
(
const
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
Particles
pis_;
62
double
temperature_;
63
double
tau_;
64
};
65
66
IMP_OBJECTS
(
BerendsenThermostatOptimizerState
,
67
BerendsenThermostatOptimizerStates
);
68
69
IMPATOM_END_NAMESPACE
70
71
#endif
/* IMPATOM_BERENDSEN_THERMOSTAT_OPTIMIZER_STATE_H */
base_types.h
Basic types used by IMP.
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::OptimizerState::do_update
virtual void do_update(unsigned int)
Definition:
OptimizerState.h:120
IMP::Vector< Pointer< Particle > >
IMP::atom::BerendsenThermostatOptimizerState::set_particles
void set_particles(const Particles &pis)
Set the particles to use.
Definition:
BerendsenThermostatOptimizerState.h:42
Particle.h
Classes to handle individual model particles. (Note that implementation of inline functions is in int...
IMP_OBJECTS
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition:
object_macros.h:44
IMP::OptimizerState
Shared optimizer state that is invoked upon commitment of new coordinates.
Definition:
OptimizerState.h:43
OptimizerState.h
Shared optimizer state.
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:78
IMP::atom::BerendsenThermostatOptimizerState
Maintains temperature during molecular dynamics.
Definition:
BerendsenThermostatOptimizerState.h:36