IMP
2.1.1
The Integrative Modeling Platform
IMP Mainpage
All IMP Modules
Related Pages
Modules
Namespaces
Classes
Files
Examples
Indexes
File List
File Members
VelocityScalingOptimizerState.h
Go to the documentation of this file.
1
/**
2
* \file IMP/atom/VelocityScalingOptimizerState.h
3
* \brief Maintains temperature during molecular dynamics by velocity scaling.
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPATOM_VELOCITY_SCALING_OPTIMIZER_STATE_H
10
#define IMPATOM_VELOCITY_SCALING_OPTIMIZER_STATE_H
11
12
#include <IMP/atom/atom_config.h>
13
#include <
IMP/kernel/Particle.h
>
14
#include <
IMP/base_types.h
>
15
#include <
IMP/OptimizerState.h
>
16
#include <
IMP/optimizer_state_macros.h
>
17
18
IMPATOM_BEGIN_NAMESPACE
19
20
//! Maintains temperature during molecular dynamics by velocity scaling.
21
/** This OptimizerState, when used with the MolecularDynamics optimizer,
22
implements a simple thermostat by periodically rescaling the velocities.
23
(Note that this results in discontinuous dynamics.)
24
\see MolecularDynamics
25
*/
26
class
IMPATOMEXPORT
VelocityScalingOptimizerState
:
public
OptimizerState
{
27
public
:
28
/** \deprecated_at{2.1} Use set_period() instead. */
29
IMPATOM_DEPRECATED_FUNCTION_DECL(2.1)
30
VelocityScalingOptimizerState
(
const
kernel::Particles
&pis,
Float
temperature,
31
unsigned
skip_steps);
32
VelocityScalingOptimizerState
(
kernel::Model
*m,
33
kernel::ParticleIndexesAdaptor
pis,
34
double
temperature);
35
36
//! Set the particles to use.
37
void
set_particles
(
const
kernel::Particles
&pis) { pis_ = pis; }
38
39
//! Set the temperature to use.
40
void
set_temperature
(
Float
temperature) { temperature_ = temperature; }
41
42
//! Rescale the velocities now
43
void
rescale_velocities()
const
;
44
45
IMP_OBJECT_METHODS
(
VelocityScalingOptimizerState
);
46
47
protected
:
48
virtual
void
do_update
(
unsigned
int
call) IMP_OVERRIDE;
49
50
private
:
51
kernel::Particles
pis_;
52
Float
temperature_;
53
unsigned
skip_steps_;
54
unsigned
call_number_;
55
56
//! Keys of the xyz velocities
57
FloatKey
vs_[3];
58
};
59
60
IMP_OBJECTS
(
VelocityScalingOptimizerState
,
VelocityScalingOptimizerStates
);
61
62
IMPATOM_END_NAMESPACE
63
64
#endif
/* IMPATOM_VELOCITY_SCALING_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::kernel::ParticleIndexesAdaptor
Definition:
kernel/particle_index.h:50
IMP::atom::VelocityScalingOptimizerState
Maintains temperature during molecular dynamics by velocity scaling.
Definition:
VelocityScalingOptimizerState.h:26
IMP::atom::VelocityScalingOptimizerState::set_particles
void set_particles(const kernel::Particles &pis)
Set the particles to use.
Definition:
VelocityScalingOptimizerState.h:37
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::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
base/types.h:20
IMP::atom::VelocityScalingOptimizerState::set_temperature
void set_temperature(Float temperature)
Set the temperature to use.
Definition:
VelocityScalingOptimizerState.h:40
OptimizerState.h
Import IMP/kernel/OptimizerState.h in the namespace.
IMP::kernel::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
kernel/declare_Model.h:72