We provide an introduction to molecular dynamics simulations in the context of the Kob–Andersen model of a glass. We introduce a complete set of tools for doing and analyzing the results of simulations at fixed NVE and NVT. The modular format of the paper allows readers to select sections that meet their needs. We start with an introduction to molecular dynamics independent of the programming language, followed by introductions to an implementation using python and then the freely available open source software package lammps. We also describe analysis tools for the quick testing of the program during its development and compute the radial distribution function and the mean square displacement using both python and lammps.

1.
lammps molecular dynamics simulator
, <https://lammps.sandia.gov/>.
2.
W. W.
Wood
and
F. R.
Parker
, “
Monte Carlo equation of state of molecules interacting with the Lennard-Jones potential. I. A supercritical isotherm at about twice the critical temperature
,”
J. Chem. Phys.
27
,
720
733
(
1957
).
3.
W.
Kob
and
H. C.
Andersen
, “
Scaling behavior in the β-relaxation regime of a supercooled Lennard-Jones mixture
,”
Phys. Rev. Lett.
73
,
1376
1379
(
1994
).
4.
O.
Guzmán
and
J. J.
de Pablo
, “
An effective-colloid pair potential for Lennard-Jones colloid-polymer mixtures
,”
J. Chem. Phys.
118
,
2392
2397
(
2003
).
5.
Ch.
Bennemann
,
W.
Paul
, and
K.
Binder
, “
Molecular-dynamics simulations of the thermal glass transition in polymer melts: α-relaxation behavior
,”
Phys. Rev. E
57
,
843
851
(
1998
).
6.
J.-P.
Hansen
and
L.
Verlet
, “
Phase transitions of the Lennard-Jones system
,”
Phys. Rev.
184
,
151
161
(
1969
).
7.
M. C.
Abramo
,
C.
Caccamo
,
D.
Costa
,
P. V.
Giaquinta
,
G.
Malescio
,
G.
Munaò
, and
S.
Prestipino
, “
On the determination of phase boundaries via thermodynamic integration across coexistence regions
,”
J. Chem. Phys.
142
,
214502
(
2015
).
8.
J.-P.
Hansen
and
I. R.
McDonald
,
Theory of Simple Liquids: With Applications to Soft Matter
(
Academic Press
,
Boston
,
2013
).
9.
M. P.
Allen
and
D. J.
Tildesley
,
Computer Simulation of Liquids
(
Oxford U. P
.,
New York
,
1990
).
10.
D. C.
Rapaport
,
The Art of Molecular Dynamics Simulation
(
Cambridge U. P
.,
Cambridge, UK
,
2002
).
11.
W.
Kob
and
H. C.
Andersen
, “
Testing made-coupling theory for a supercooled binary Lennard-Jones I: The van Hove correlation function
,”
Phys. Rev. E
51
,
4626
4641
(
1995
).
12.
W.
Kob
and
H. C.
Andersen
, “
Testing mode-coupling theory for a supercooled binary Lennard-Jones mixture. II. Intermediate scattering function and dynamic susceptibility
,”
Phys. Rev. E
52
,
4134
4153
(
1995
).
13.
K.
Vollmayr
,
W.
Kob
, and
K.
Binder
, “
How do the properties of a glass depend on the cooling rate? A computer simulation study of a Lennard-Jones system
,”
J. Chem. Phys.
105
,
4714
4728
(
1996
).
14.
M.
Hassani
,
P.
Engels
,
D.
Raabe
, and
F.
Varnik
, “
Localized plastic deformation in a model metallic glass: A survey of free volume and local force distributions
,”
J. Stat. Mech.: Theory Exp.
2016
,
084006
.
15.
S. S.
Schoenholz
,
E. D.
Cubuk
,
D. M.
Sussman
,
E.
Kaziras
, and
A. J.
Liu
, “
A structural approach to relaxation in glassy liquids
,”
Nat. Phys.
12
,
469
471
(
2016
).
16.
G. P.
Shrivastav
,
P.
Chaudhuri
, and
J.
Horbach
, “
Yielding of glass under shear: A direct percolation transition precedes shear-band formation
,”
Phys. Rev. E
94
,
042605-1
10
(
2016
).
17.
M. A.
Makeev
and
N. V.
Priezjev
, “
Distributions of pore sizes and atomic densities in binary mixtures revealed by molecular dynamics simulations
,”
Phys. Rev. E
97
,
023002-1
8
(
2018
).
18.
U. R.
Pedersen
,
Th. B.
Schrøder
, and
J. C.
Dyre
, “
Phase diagram of Kob-Andersen-type binary Lennard-Jones mixtures
,”
Phys. Rev. Lett.
120
,
165501
(
2018
).
19.
H.
Gould
,
J.
Tobochnik
, and
W.
Christian
,
An Introduction to Computer Simulation Methods: Applications to Physical Systems
(
Pearson, Addison Wesley
,
San Francisco
,
2007
).
20.
M.
Newman
,
Computational Physics
(
Createspace
,
North Charleston
,
2013
).
21.
W. H.
Press
,
S. A.
Teukolsky
,
W. T.
Vetterling
, and
B. P.
Flannery
,
Numerical Recipes: The Art of Scientific Computing
, 3rd ed. (
Cambridge U. P
.,
New York
,
2007
).
22.
D. V.
Schroeder
,
An Introduction to Thermal Physics
(
Addison-Wesley Longman
,
San Francisco
,
2000
).
23.
S. J.
Blundell
and
K. M.
Blundell
,
Concepts in Thermal Physics
(
Oxford U. P
.,
New York
,
2010
).
24.
H.
Gould
and
J.
Tobochnik
,
Statistical and Thermal Physics
(
Princeton U. P.
,
Princeton
,
2010
).
25.
G. J.
Martyna
,
M. E.
Tuckerman
,
D. J.
Tobias
, and
M. L.
Klein
, “
Explicit reversible integrators for extended systems dynamics
,”
Mol. Phys.
87
,
1117
1157
(
1996
).
26.
H. C.
Andersen
, “
Molecular dynamics simulations at constantpressure and/or temperature
,”
J. Chem. Phys.
72
,
2384
2393
(
1980
).
27.
T. A.
Andrea
,
W. C.
Swope
, and
H. C.
Andersen
, “
The role of long ranged forces in determining the structure and properties of liquid water
,”
J. Chem. Phys.
79
,
4576
4584
(
1983
).
28.
lammps documentation for the fix NVT command, <
https://lammps.sandia.gov/doc/fix_nh.html>.
29.
W. G.
Hoover
, “
Canonical dynamics: Equilibrium phase-space distributions
,”
Phys. Rev. A
31
,
1695
1697
(
1985
).
30.
J. R.
Taylor
,
Classical Mechanics
(
University Science Books
,
Sausalito
,
2005
).
31.
D.
Frenkel
and
B.
Smit
,
Understanding Molecular Simulation: From Algorithms to Applications
(
Academic Press
,
San Diego
,
2002
).
32.
S.
Nosé
, “
A molecular dynamics method for simulations in the canonical ensemble
,”
Mol. Phys.
52
,
255
268
(
1984
).
33.
A. C.
Brańka
and
K. W.
Wojciechowski
, “
Generalization of Nosé and Nosé-Hoover isothermal dynamics
,”
Phys. Rev. E
62
,
3281
3292
(
2000
).
34.
G. J.
Martyna
,
D. J.
Tobias
, and
M. L.
Klein
, “
Constant pressure molecular dynamics algorithms
,”
J. Chem. Phys.
101
,
4177
4189
(
1994
).
35.
M. E.
Tuckerman
,
Y.
Liu
,
G.
Ciccotti
, and
G. J.
Martyna
, “
Non-Hamiltonian molecular dynamics: Generalizing Hamiltonian phase space principles to non-Hamiltonian systems
,”
J. Chem. Phys.
115
,
1678
1702
(
2001
).
36.
W.
Sinoda
,
M.
Shiga
, and
M.
Mikami
, “
Rapid estimation of elastic constants by molecular dynamics simulation under constant stress
,”
Phys. Rev. B
69
,
134103-1
8
(
2004
).
37.
G. J.
Martyna
,
M. L.
Klein
, and
M.
Tuckerman
, “
Nosé-Hoover chains: The canonical ensemble via continuous dynamics
,”
J. Chem. Phys.
97
,
2635
2643
(
1992
).
38.
J. R.
Fox
and
H. C.
Andersen
, “
Molecular dynamics simulations of a supercooled monatomic liquid and glass
,”
J. Phys. Chem.
88
,
4019
4027
(
1984
).
39.
D.
Tapias
,
D. P.
Sanders
, and
A.
Bravetti
, “
Geometric integrator for simulations in the canonical ensemble
,”
J. Chem. Phys.
145
,
0841133
(
2016
).
40.
M.
Newman
, Computational physics, <http://www-personal.umich.edu/mejn/cp/>, accessed on September 04, 2019.
41.
See Supplementary Material at https://doi.org/10.1119/10.0000654 for Python scripts and initial configuration files, LAMMPS input files, initial configuration files and a batch–script.
42.
Download the source and documentation as a tarball at
<https://lammps.sandia.gov/doc/Install_tarball.html>.
43.
See the lammps documentation at
<https://lammps.sandia.gov/doc/variable.html>.
44.
W.
Kob
and
J.-L.
Barrat
, “
Aging effects in a Lennard-Jones glass
,”
Phys. Rev. Lett.
78
,
4581
4584
(
1997
).
45.
W.
Kob
and
J.-L.
Barrat
, “
Aging in a Lennard-Jones glass
,”
Physica A
263
,
234
241
(
1999
).
46.
W.
Kob
,
J.-L.
Barrat
,
F.
Sciortino
, and
P.
Tartaglia
, “
Aging in a simple glass former
,”
J. Phys.: Condens. Matter
12
,
6385
6394
(
2000
).
47.
See the lammps documentation at <
https://lammps.sandia.gov/doc/fix_ave_time.html>.
48.
logfreq3 was added to lammps in June 2019. The example logfreq3(10,25,1000) is explained at Ref. 43.
49.
To reproduce these times with logarithmic time using python, choose t0msd=10, nmsdmax = 24 and in the time loop choose tmsdnextint = ceil(tmsd) instead of tmsdnextint=int(round(tmsd)).
50.
D. J.
Durian
, “
Foam mechanics at the bubble scale
,”
Phys. Rev. Lett.
75
,
4780
4783
(
1995
).
51.
D. J.
Durian
, “
Bubble-scale model of foam mechanics: Melting, nonlinear behavior, and avalanches
,”
Phys. Rev. E
55
,
1739
1751
(
1997
).
52.
W.
Kob
, private communication (
2020
).
53.
See the lammps documentation for 2d simulations at <https://lammps.sandia.gov/doc/Howto_2d.html>.
54.
R.
Brüning
,
D. A. St-Onge S.
Patterson
, and
W.
Kob
, “
Glass transitions in one-, two-, three-, and four-dimensional binary Lennard-Jones systems
,”
J. Phys.: Condens. Matter
21
,
035117
(
2009
).
55.
K.
Vollmayr-Lee
,
J. A.
Roman
, and
J.
Horbach
, “
Aging to equilibrium dynamics of SiO2
,”
Phys. Rev. E
81
,
061203-1
9
(
2010
).

Supplementary Material

AAPT members receive access to the American Journal of Physics and The Physics Teacher as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.