Академический Документы
Профессиональный Документы
Культура Документы
B2-Al50Ni50
Part I
Introduction
a-Si
Molecular Dynamics Simulations
Examples of Simulations using Molecular Dynamics
Solid-Liquid Interface
Part II
Introduction to Molecular
Dynamics Simulations
Why do we need simulations?
In most cases, experiments are:
Time
second Macroscale
microsec.
Mesoscale
nanosec.
Molecular
Dynamics
picosec
Quantum
femtosec. Mechanics Length
nanometer micrometer mm meter
Molecular Dynamics simulations
Newton equation
mi ai = Fi
MD is the solution of the classical N
Fi = ∑ f ij
equations of motion for a system of N j ≠i
atoms or molecules in order to obtain
the time evolution of the system.
r (t + ∆t ) − r (t − ∆t ) = 2r(t ) ∆t + O ( ∆t 3 )
or :
v(t) = (r (t + ∆t ) − r (t − ∆t ) ) / 2 ∆t + O ( ∆t 2 ) {r(t), v(t)} ( IV )
Verlet algorithm
From the initial positions and velocities: ri (t ) v i (t )
1
a(r ) = F(r (t ))
m
Obtain the positions and velocities at: t + ∆t
• Velocity calculated explicitly 1
r (t + ∆t ) = r (t ) + v (t )∆t + a(r )∆t 2
• Possible to control the 2
temperature 1
• Stable in long simulation a(t + ∆t ) = F (r (t + ∆t ))
m
• Most used algorithm 1
v (t + ∆t / 2) = v (t )∆t + a(r )∆t
Leap-Frog algorithm 2
1
v (t + ∆t ) = v (t + ∆t / 2) + a(t + ∆t )∆t
2
Predictor-Corrector algorithms
1
Predictor step: from the initial ri (t ), v i (t ) a(r ) = F(r (t ))
m
predict ri (t + ∆t ) , v i (t + ∆t ) using Taylor’s series
a(t ) 2
r P (t + ∆t ) ≅ r (t ) + v (t )∆t + ∆t
2
v P (t + ∆t ) ≅ v (t ) + a(t )∆t
r iii : 3rd order derivatives
a P (t + ∆t ) ≅ a(t ) + r iii (t )∆t
Corrector step: get corrected acceleration: a (r ) = FC(r P
(t + ∆t ))
m
using error in acceleration: ∆a(t + ∆t ) ≅ a (t + ∆t ) − a (t + ∆t )
C P
∆t 2
correct the positions: r (t + ∆t ) ≅ r (t + ∆t ) + C0 ∆a(t + ∆t )
P
2
correct the velocities: v (t + ∆t ) ≅ v P (t + ∆t ) + C1∆t∆a(t + ∆t )
ri (t ) → ri (t + ∆t )
Solve the equation of motion
v i (t ) → v i (t + ∆t )
Sample
t = t + ∆t
Test and increase time
t > t max
PBC in x and
y direction
Walls: fixed
boundaries in z
Considered for force
direction. calculations
Use neighbor list to reduce execution time
atom within: rL
N L v∆t
Update every N L steps rL − rcut >
2
Thermodynamic ensembles
Ensembles:
NVE – micro-canonical ensemble
NVT – canonical ensemble Each ensemble is used for
a specific simulation.
NPT – grand-canonical ensemble
Temperature control
Berendsen thermostat (velocity rescaling)
Andersen thermostat
Nose-Hoover chain Choose the ensemble that best
fits your system and the
properties you want to simulate
Pressure control then start the simulations
Berendsen volume rescaling
Andersen piston
What can be computed from MD simulations
Statistical Mechanics
The prime purpose of MD is to sample the phase space of
the statistical mechanics ensemble.
Most physical properties can be related the atomic
trajectories and obtained as average as a function of time.
Structural properties:
obtained from spatial correlation functions e.g. radial
distribution function.
Dynamical Properties:
Time dependent properties (transport coefficients) obtained
via temporal correlation functions e.g. velocity
autocorrelation function.
Thermodynamic properties
1 N
Kinetic Energy K . E. = ∑ mi vi2
2 i
Temperature T=
2
3 Nk B
K .E.
N
Configuration Energy Uc = ∑ ∑ V (rij )
i j >i
1
N −1 N
Pressure PV = Nk BT −
3
∑∑ rij ⋅ f ij
i =1 j >i
3 2 2 3 Nk B
Specific Heat δ (Uc ) 2
NVE
= Nk B T (1 − )
2 2Cv
Structural properties
Radial Distribution Function
N
n( r ) V
g( r ) = =
4π ρ r 2 ∆r N 2
∑ ∑ δ (r − rij )
Al25Ni75: i j ≠i
Al80Ni20:
Structure Factor S ( k ) = 1 + 4π ρ ∫
∞ sin( kr )
( g ( r ) − 1) r 2 dr
0 kr
Structure Factor
Dynamical properties
Mean Square Displacement (Einstein relation)
1
2 Dt = | ri (t ) − ri (0) |2
3
MSD = cAl (rs, Ni (t ) − rs, Ni (0)) 2
+ cNi (rs, Al (t ) − rs, Al (0)) 2
Diffusion constants
N
(r(t) − r(0)) 2
∑
1
D = lim
t →∞ N 6t
i=1
Recommended textbooks
Commercial software:
Amber: http://ambermd.org/
Tm = ?
• binary alloys: glass formers in
general
• crystallization process too slow
• brute force method: not
How to solve this problem? appropriate to estimate TM
Solid-Liquid Interface
- Equilibrate a crystal (NPT)
- Fix the particles in the middle of the box
- Heat away the two other regions
- Quench at the target temperature
The Melting temperature TM from motion of interface?
T >TM : melting
T =TM : coexistence
A. Kerrache et al. EPL 2008 T <TM : crystallization
Melting
Coexistence
Crystallization
qn =
1
∑ cos(nθ (i, j, k ))
xy
Constant density in the liquid region.
N i, j ,k Solid-liquid interface over several layers.
n = 1,2,....,6 Pronounced chemical ordering in the
I,j and k: indices for nearest neighbors, θ(I,j,k): solid region:
bond angle formed by I, j and k atoms, rojected to Mass transport required for crystal
xy plane, Nz: number of nearest neighbors growth.
Diffusion Limited Growth
Wilson-Frenkel theory:
activated process controlled by
mass diffusion in the liquid phase
Mass transport and particle density Wilson H.A. Philos. Mag. , 50 (1900) 238.
across the solid-liquid interface Frenkel J., Phys. Z. Sowjetunion, 1 (1932) 498.
A. Kerrache et al. EPL, 2008.
Crystal growth: controlled by mass transport Experimental data?
in the liquid phase and solid-liquid interface
Comparison to experiment
• terrestrial data (Assadi et al.)
• µg data (parabolic flight)
H. Hartmann (PhD thesis)
A. Kerrache et al., EPL 81 (2008) 58001. good agreement with experimental data
Molecular Dynamics Simulation Results
Increase of the disorder at 300 and 600 K T 300 600 900 1000
At 900 K: increase of the order without ΔEP +0.02 +0.005 -0.01 -0.065
crystallization
At 1000 K: shear induce the crystallization of a-Si
A. Kerrache et al. PRB 84 (2011) 041110.
Shear induce crystallization
P. Beaucage et al. PRB (2005)
Coordination
number
300 K 600 K
Number of
crystalline
particles
900 K 1000 K
Molecular Dynamics Simulation Results
Indentation
Glass preparation
Glass preparation diagram
Indenter
Free atoms
Fixed layer
Ali Kerrache
Indentation
Ali Kerrache
Acknowledgments
14 MARS 2017
Introduction to Molecular Dynamics Simulations
Introduction to LAMMPS
Large-scale Atomic / Molecular Massively
Parallel Simulator
Source: some material and images were adapted from LAMMPS home page
LAMMPS: Classical Molecular Dynamics Code
Large-scale Atomic / Molecular Massively Parallel Simulator
S. Plimpton, A. Thompson, R. Shan, S. Moore, A. Kohlmeyer …
Sandia National Labs: http://www.sandia.gov/index.html
Biophysics
Material Science
Granular Flow
Chemistry
Start with LAMMPS
Documentat Related User
Big Picture Code Results Context
ion Tools Support
Pre/Post
Features Download Manual Publications Authors Mail list
processing
Developer Pizza.py Workshop
Non-features SourceForge Pictures History
guide Toolkit s
Offsite
Latest User
LAMMPS
FAQ features & Tutorials Movies Funding scripts and
packages &
bug fixes HowTos
tools
MD to Contribute
Unfixed
Wish list LAMMPS Benchmarks Visualization Open source to
bugs
glossary LAMMPS
Recent LAMMPS News
Design of LAMMPS
License
LAMMPS is provided through GNU Public License
https://www.gnu.org/licenses/licenses.en.html#GPL
Free to Use, Modify, and Distribute.
Contribute to LAMMPS:
http://lammps.sandia.gov/contribute.html
Code Layout
C++ and Object-Oriented approach
Parallelization via MPI and OpenMP; runs on GPU.
Is invoked by commands through input scripts.
Possibility to customized output.
Could be interfaced with other codes.
Obtaining LAMMPS
Download Page:
http://lammps.sandia.gov/download.html
Distributions:
Download a tarball Source Code
Git checkout and update
SVN checkout and update Executable Ubuntu
Pre-built Ubuntu executables
Pre-built binary RPMs for Fedora/RedHat/CentOS/openSUSE
Pre-built Gentoo executable
OS X with Homebrew RPMs - Linux
Windows installer package Installation under Windows
Applying patches
Download the source code
Files:
Input File: in.lmp_file
Potential: see examples and the last slides for more details
Initial configuration: can be generated by LAMMPS, or
another program or home made program.
Interactive Execution:
$ ./lmp_machine < in.lmp_file
$ ./lmp_machine –in in.lmp_file
Background Execution:
$ ./lmp_machine < in.lmp_file > log_lammps_output_file
$ ./lmp_machine –in in.lmp_file –l log_lammps_output_file
Command Line Options
Command-line options:
For example:
create_atoms 1 box
Created 4000 atoms
mass 1 1.0
LAMMPS: output log file
thermo 100
run 25000
Neighbor list info ...
1 neighbor list requests
update every 20 steps, delay 0 steps, check no
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 2.8
ghost atom cutoff = 2.8
binsize = 1.4 -> bins = 12 12 12
Memory usage per processor = 2.05293 Mbytes
Step Temp E_pair E_mol TotEng Press
0 3 -6.7733681 0 -2.2744931 -3.7033504
100 1.6510577 -4.7567887 0 -2.2808214 5.8208747
200 1.6393075 -4.7404901 0 -2.2821436 5.9139187
300 1.6626896 -4.7751761 0 -2.2817652 5.756386
400 1.6496817 -4.7563868 0 -2.2824829 5.7979802
LAMMPS: output log file
24900 1.5691281 -4.7849759 0 -2.4318721 5.605906
25000 1.552843 -4.7611011 0 -2.432419 5.7187477
Loop time of 15.4965 on 12 procs for 25000 steps with 4000 atoms
Performance: 696931.853 tau/day, 1613.268 timesteps/s
90.2% CPU use with 12 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
-----------------------------------------------------------------------------
Pair | 6.6964 | 7.1974 | 7.9599 | 14.8 | 46.45
Neigh | 0.94857 | 1.0047 | 1.0788 | 4.3 | 6.48
Comm | 6.0595 | 6.8957 | 7.4611 | 17.1 | 44.50
Output | 0.01517 | 0.01589 | 0.019863 | 1.0 | 0.10
Modify | 0.14023 | 0.14968 | 0.16127 | 1.7 | 0.97
Other | | 0.2332 | | | 1.50
thermo freq_steps
thermo_style style args
Resources:
Online Manual: http://lammps.sandia.gov/doc/Manual.html
Search the mailing list: http://lammps.sandia.gov/mail.html
Search, Subscribe and Email the Mailing List:
https://sourceforge.net/p/lammps/mailman/lammps-users/
Acknowledgments