IMP
2.0.1
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
LangevinThermostatOptimizerState.h
Go to the documentation of this file.
1
/**
2
* \file IMP/atom/LangevinThermostatOptimizerState.h
3
* \brief Maintains temperature during molecular dynamics using
4
* a Langevin thermostat.
5
*
6
* Copyright 2007-2013 IMP Inventors. All rights reserved.
7
*
8
*/
9
10
#ifndef IMPATOM_LANGEVIN_THERMOSTAT_OPTIMIZER_STATE_H
11
#define IMPATOM_LANGEVIN_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
#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 in
23
G. Bussi and M. Parrinello "Accurate sampling using Langevin dynamics",
24
Phys. Rev. E 75, 056707 (2007)
25
*/
26
class
IMPATOMEXPORT
LangevinThermostatOptimizerState
:
public
OptimizerState
27
{
28
public
:
29
LangevinThermostatOptimizerState
(
const
ParticlesTemp &pis,
30
double
temperature,
31
double
gamma);
32
33
//! Set the particles to use.
34
void
set_particles
(
const
Particles &pis) {
35
pis_=pis;
36
}
37
38
double
get_temperature() {
39
return
temperature_;
40
}
41
42
double
get_gamma() {
43
return
gamma_;
44
}
45
46
void
set_temperature(
double
temperature) {
47
temperature_ = temperature;
48
}
49
50
void
set_gamma(
double
gamma) {
51
gamma_ = gamma;
52
}
53
54
//! Rescale the velocities now
55
void
rescale_velocities()
const
;
56
57
IMP_OPTIMIZER_STATE
(LangevinThermostatOptimizerState);
58
59
private
:
60
Particles pis_;
61
double
temperature_;
62
double
gamma_;
63
64
//! Keys of the xyz velocities
65
FloatKey
vs_[3];
66
};
67
68
IMP_OBJECTS
(
LangevinThermostatOptimizerState
,
LangevinThermostatOptimizerStates
);
69
70
IMPATOM_END_NAMESPACE
71
72
#endif
/* IMPATOM_LANGEVIN_THERMOSTAT_OPTIMIZER_STATE_H */