home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.20.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
atom
version 2.20.0
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-2022 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/Particle.h
>
14
#include <
IMP/base_types.h
>
15
#include <
IMP/OptimizerState.h
>
16
17
IMPATOM_BEGIN_NAMESPACE
18
19
//! Maintains temperature during molecular dynamics by velocity scaling.
20
/** This OptimizerState, when used with the MolecularDynamics optimizer,
21
implements a simple thermostat by periodically rescaling the velocities.
22
(Note that this results in discontinuous dynamics.)
23
\see MolecularDynamics
24
*/
25
class
IMPATOMEXPORT
VelocityScalingOptimizerState
:
public
OptimizerState
{
26
public
:
27
VelocityScalingOptimizerState
(
Model
*m,
28
ParticleIndexesAdaptor
pis,
29
double
temperature);
30
31
//! Set the particles to use.
32
void
set_particles
(
const
Particles
&pis) { pis_ = pis; }
33
34
//! Set the temperature to use.
35
void
set_temperature
(
Float
temperature) { temperature_ = temperature; }
36
37
//! Rescale the velocities now
38
void
rescale_velocities()
const
;
39
40
IMP_OBJECT_METHODS
(
VelocityScalingOptimizerState
);
41
42
protected
:
43
virtual
void
do_update
(
unsigned
int
call)
override
;
44
45
private
:
46
Particles
pis_;
47
Float
temperature_;
48
unsigned
skip_steps_;
49
unsigned
call_number_;
50
};
51
52
IMP_OBJECTS
(
VelocityScalingOptimizerState
,
VelocityScalingOptimizerStates
);
53
54
IMPATOM_END_NAMESPACE
55
56
#endif
/* IMPATOM_VELOCITY_SCALING_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:133
IMP::Vector< Pointer< Particle > >
IMP::ParticleIndexesAdaptor
Take Decorator, Particle or ParticleIndex.
Definition:
particle_index.h:50
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:86
IMP::atom::VelocityScalingOptimizerState
Maintains temperature during molecular dynamics by velocity scaling.
Definition:
VelocityScalingOptimizerState.h:25
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::atom::VelocityScalingOptimizerState::set_particles
void set_particles(const Particles &pis)
Set the particles to use.
Definition:
VelocityScalingOptimizerState.h:32
IMP::OptimizerState
Shared optimizer state that is invoked upon commitment of new coordinates.
Definition:
OptimizerState.h:45
IMP::Float
double Float
Basic floating-point value (could be float, double...)
Definition:
types.h:19
IMP::atom::VelocityScalingOptimizerState::set_temperature
void set_temperature(Float temperature)
Set the temperature to use.
Definition:
VelocityScalingOptimizerState.h:35
OptimizerState.h
Shared optimizer state.