Thermostat MD
Thermostat MD
Thermostat MD
, Z
j
e
E
j
=
1
k
B
T
Derivation follows from maximizing entropy
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 5 / 29
Ergodic Hypothesis
The ergodic hypothesis says the long time average of an observable f
coincides with an ensemble average of the observable f .
f = lim
t
1
t
_
t
0
f (x(s)) ds
f =
_
f (x) d(x)
where is the ensemble measure and is the phase space of the
observable.
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 6 / 29
Molecular Dynamics Simulation
Phase space is collection of positions q and momenta p of particles in
system
The Hamiltonian Form
_
dq
t
=
p
H(q
t
, p
t
) dt
dp
t
=
q
H(q
t
, p
t
) dt
H(q, p) = E
kin
(p) + V(q), E
kin
(p) =
1
2
p
T
M
1
p
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 7 / 29
Sampling from Ensembles
A canonical ensemble (constant average energy) is a distribution of
microcanonical ensembles (constant energy)
To sample from the canonical ensemble, the following thermostats
modulate the energy entering and leaving the boundaries of the
system
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 8 / 29
Velocity Rescaling
Velocities are described by Maxwell-Boltzmann distribution
P(v
i ,
) =
_
m
2k
B
T
_
1
2
e
mv
2
i ,
2k
B
T
Adjust instantaneous temperature by scaling all velocities
Average E
kin
per degree of freedom related to T via the equipartition
theorem
_
mv
2
i ,
2
_
=
1
2
k
B
T
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 9 / 29
Velocity Rescaling
Ensemble average average over velocities of all particles: dene
instantaneous temperature T
c
for a nite system
k
B
T
c
=
1
N
f
i ,
mv
2
i ,
T
c
= T until rescaling
v
i ,
=
_
T
T
c
v
i ,
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 10 / 29
Velocity Rescaling
Disadvantages
Straightforward to implement
Deterministic trajectory
Coordinates q
i
= q
i
Momenta p
i
= p
i
/s
Time t
t
0
dt
s
i =1
p
2
i
2m
i
s
2
+ V(q) +
Q s
2
2
+ (3N + 1)k
B
Tln s
Logarithmic term required for proper time scaling: canonical ensemble
Eective mass Q associated with s
Implement as a chain
2
= 2m
i
k
B
T
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 15 / 29
Langevin
Disadvantages
Ergodic
T)
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 17 / 29
Andersen
Disadvantages
Optimization
OpenMP
CUDA
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 20 / 29
Lennard-Jones Potential
Alden Johnson, Teresa Johnson, Aimee Khan (UMass Amherst) Thermostats in MD Simulations December 6th, 2012 21 / 29
Numeric Integration
Verlet Algorithm
p
n+1/2
= p
n
t
2
V(q
n
)
q
n+1
= q
n
+ tM
1
p
n+1/2
p
n+1
= p
n+1/2
t
2
V(q
n+1
)
p
i
_
T
T
c
p
i
Anderson
T)
Langevin
BBK algorithm
p
n+1/2
= p
n
t
2
V(q
n
)
t
2
(q
n
)M
1
p
n
+
_
t
2
(q
n
)G
n
q
n+1
= q
n
+ tM
1
p
n+1/2
p
n+1
= p
n+1/2
t
2
V(q
n+1
)
t
2
(q
n+1
)M
1
p
n+1
+
_
t
2
(q
n+1
)G
n+1
chosen to be constant
2Mk
B
T