Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Particle Dynamics & DL_POLY
ILIAN TODOROV, ALIN ELENA
MICHAEL SEATON, IVAN SCIVETTI
VLAD SOKHAN, ANDREY BRUKHNO
CHIN YONG, JACOB WILKINS
JIM MADGE , HENRY BOATENG
BILL SMITH, IAN BUSH
STFC DARESBURY LABORATORY
SCIENTIFIC COMPUTING DEPARTMENT
UNITED KINGDOM
Daresbury LaboratoryAlice’s Wonderland (1865)
Lewis Carroll (Charles Lutwidge Dodgson)
Importance
Identification
Persistence
Specificity
Credit
Accessibility
Who We Are
You can support and work with us advancing and
utilising our methodologies by:
• citing appropriately our software packages
• collaborating and publishing research with us
MS & MD via DL_POLY
DPD & LB via DL_MESO
KMC via DL_AKMC
FF mapping
via DL_FIELD
MC
via D
L_M
ON
TE
Coarse graining
via DL_CGMAP
QM/MM bridging
via #ChemShell
CRYSTAL (B. Searl, I. Bush)
CASTEP (D. Jochym)
Multiple Scales of Materials Modelling
Part 0
The DL_Software Packages
Solution
Theory Experiment
Computation
Computer modelling is used to provide insight and understanding of how complex systems behave beyond what theory and experiment could deliver separately. It bridges theory and experiment by solving state equations numerically.
Computer simulations are used as an assisting tool by scientists and engineers to verify and/or predict experimental observations as well as test and/or tune theoretical models.
Computer Modelling
Computational Science is a generic term for any field of
science where computer simulation is used in conjunction
with theory and experiment to model various aspects of
“reality” (observed or sought after phenomena), to provide
solution to problems and answer to questions that often
cannot be satisfactory explained by theory and experiment
alone.
Within natural sciences one could outline a number of fields
which generally resolve behaviour of nature (the physical
world surrounding us) on different time- and length-scales:
Physics, Chemistry, Materials and Engineering.
Computational Science
Two primary roles:
• Test models which explain
experiments
• Test theoretical predictions
Driving forces:
• Computers are fast enough
for numerical experiments
• Most models are too
complicated for purely
theoretical reasoning
• There are phenomena which
can not be observed directly
by experiments
Allen & Tildesley
Modelling & Simulation
Computation
Solution
Newton’s Laws of Motion
force = mass * acceleration
t = time
v = velocity
r = position
r = r0 + v * t + f * t2 / m
Instruments
Computer (crunch)Model (forces)Software (maths)
Micro/Meso-scopic/Celestial Evolution
r (t), v(t), f(t) r (t+Dt), v(t+Dt), f(t+Dt)
A
B
r (t)
r (t+Dt)v (t)Dt
f(t)Dt2/m
r’ (t+Dt)
r” (t+Dt)
The DL_POLY Vehicle
Build to Performon supercomputers, mobiles, laptops...
Powerful & Versatileto handle obstacles on unchartered terrain in
unknown conditions
Multifunction Controlto navigate safely & securely in all circumstances
Comfortablefor STEM researchers to use for everyday’s tasks
Informative & Responsiveto indicate why, where & how a problem occurred
As Functional as a Sports Utility Vehicle
Proteins
solvation & binding
DNA strands
dynamics
Membranes’ processes
Drug polymorphs
& discovery
Crystalline & Amorphous
Solids – damage and recovery
Dynamic processes in
Metal-Organic & Organic Frameworks
Dynamics at Interfaces &
of Phase Transformations
Examples of Model Systems
Examples of Videos
DL_FIELDA force field and model development tool
for DL_POLY
Dr Chin W. YongComputational Chemistry, Daresbury Laboratory
DL_FIELD uses:
Important application tool to enhance the usability of DL_POLY MD simulation package and to facilitate the use of a wide range of advance features included in the DL_POLY program.
Force field model conversion tool – produces CONFIG, FIELD files for DL_POLY runs.
Software infrastructure for users to easily simulate a wide-range of different types molecular models with minimum effort, while giving choice to adjust force field models.
Organic cagesPolymer nanoparticleOn POPC membrane
RpNiR - Complex multi-domain, multi-metal centers protein
Nanocomposite materialsinvolving graphene
Carbohydrates and complex drug molecules
Selected model examples using DL_FIELD
• Modelling at mesoscale
– Between atomistic and fluid dynamics
length/time scales
– Both atom-like and fluid-like
behaviours important
– Bottom-up (coarse-graining) or top-
down approaches valid
Source: Prof. PV Coveney,
Centre for Computational Science, UCL
• DL_MESO: mesoscopic modelling software suite
– Authored by Dr Michael Seaton
– Created for CCP5, base code for UKCOMES, used extensively by industry
– Contains serial/parallel codes for different techniques (LBE, DPD)
– Currently on version 2.6 (released November 2015)
– 800 academic users (20% from UK) from variety of backgrounds
(chemistry, physics, engineering etc.)
Accessing the Mesoscale via DL_MESO
• Lattice Boltzmann Equation (LBE)
– Statistical mechanics representation of fluid as
gas particles: automatically gives Navier-Stokes
(correct fluid) behaviour
– Intuitive modelling of boundary conditions and
interactions between multiple fluids
– Inherently parallelisable using domain
decomposition
• Dissipative Particle Dynamics (DPD)
– Soft particles with pairwise thermostat: give
Gallilean invariance and correct fluid behaviour
– Close to classical molecular dynamics: particles
can be coarse grains and represent (sections of)
molecules with different interactions
– Well suited to domain decomposition parallelism
www.ccp5.ac.uk/DL_MESO
Developer: [email protected]
DL_MESO: Overview
• Multiscale QM/MM simulations
• Wide range of interfaces to
external QM and MM codes
– inc. GAMESS-UK & DL_POLY
• ChemShell provides QM/MM
driver and high-level tasks
(optimisation, dynamics…)
• Parallelisation via MPI
• Controlled by scripts written in Tcl
C
N
H /H
C
CH3
N
NH //C
H
H
CN
H
CH
O
O
HO
H
HO
H
H
N
H
NH HC
NH C H
H
H N
H N
H
H
C N
H
C
H
H
O
H
H
C
CO O
HN
C
C
H
O
H
H
N
H
C
OC
O
C
C
HH
HO
C
CH3
H
C
H
O
NC
HO
H
N C
H
O
O
NH2
HH
H
H
Arg-109
-
Arg-171
+His-195
NADH
+Pyruvate
Asn-140
Asp-168
Thr-246-
+
Rib
Nic
environment
core
QM
MMC
N
H /H /H
C
CH3CH3
N
NH //H //C
H
H
CN
H
CH
OCN
H
CH
O
O
HO
H
HO
H
H
N
H
NH HC
NH C H
H
H N
H N
H
H
C N
H
C
H
H
O
H
H
C
CO O
HN
C
C
H
O
H
H
N
H
C
OC
O
C
C
HH
HO
C
CH3CH3
H
C
H
O
NC
HO
H
N C
H
O
O
NH2NH2
HH
H
H
Arg-109
-
Arg-171
+His-195
NADH
+Pyruvate
Asn-140
Asp-168
Thr-246-
+
Rib
Nic
environment
core
QM
MM
www.chemshell.org
DL developers:
ChemShell
• Open source geometry optimisation library written in Fortran
• Standard optimisation driver for ChemShell
• Supports minimisation, transition state optimisation,
reaction path optimisation, global optimisation, …
• Special algorithms for efficient QM/MM optimisation
J. Kästner, J.M. Carr, T.W. Keal, W. Thiel, A. Wander, P. Sherwood, J. Phys. Chem. A, 113, 11856, (2009)
DL-FIND
DL_MONTEA general purpose parallel Monte Carlo
program
Daresbury Laboratory
University of Bath
Dr John PurtonDr Andrey Brukhno
Dr James GrantDr Tom Underwood
A technique to explore “equilibrium” and answer “hypothetical” questions by throwing dice and using the Metropolis scheme for numerical integration
Advantages of MC– atom/molecule insersions/deletions/mutations → chemical equilibrium
– ”artistic” moves and pathways to skip energy barriers → metastability & coexistence
– efficient biased exploration of configuration space → thermodynamic equilibrium
– powerful riding free-energy landscapes → transition states & rare events
– Metropolis scheme is simple conceptually & inexpensive algorithmically
– easy to exploit parallelism (HPC)
MC lacks time & forces (major players in MD)– no mapping onto real time scale -> no kinetics
– no momenta / real forces -> might suffer from slow motion in dense systems
– efficient MC implies an imaginative and knowledgeable developer
Why Monte Carlo
J.A. Purton, J.C. Crabtree & S.C. Parker (2013) DL_MONTE: a
general purpose program for parallel Monte Carlo simulation,
Molecular Simulation, 39:14-15, 1240-1252, DOI:
10.1080/08927022.2013.839871
Grand Canonical Ensemble - maintaining chemical potential
H2O adsorption on MgO surface
• Kinetic Monte Carlo (KMC) - simulates state-to-state kinetics of a rare event
system. Rare events correspond to the thermal activation of atoms from one
energy basin to another on the potential energy surface. If the rates of these
transitions are known, KMC can be used to simulate kinetics over long time
scales.
• Adaptive Kinetic Monte Carlo (aKMC) is a method for determining all of the
transitions from each state on the fly, eliminating the need to use a pre-defined
rate-list.
Developers: [email protected]
DL_AKMC:
– Uses MD-type potentials
(e.g. Buckingham, Tersoff, EAM etc.)
– Dimer method for finding transition states,
from DL_FIND
– DL_POLY-type input files
– Simulation times reaching the level of
seconds
– Runs on small workstations and large HPCs
Uses:• Diffusion across/to surfaces and
bulk• Surface growth• Defect mobility and clustering• Simulation of infrequent event
kinetics
DL_AKMC
Objectives
– provide the CCP5 community
with state-of-the-art CG utilities
– enable user-defined, numerically
optimised coarse-grain models
to be simulated by DL_POLY,
DL_MESO, DL_MONTE
– truly multiscale simulations
with the use of DL_POLY
Dr Andrey Brukhno in collaboration with CCG and
VOTCA team (work originated at the University of
Bath) www.ccp5.ac.uk/projects/ccp5_cg.shtml & www.votca.org
DL_CGMAP
Part 1
The Molecular Dynamics Method
Elements of Molecular Dynamics W. Smith, 2017 (WWW)
Statistical Mechanics: Theory and Molecular Simulation Mark
Tuckerman, Oxford Graduate Texts, (FE 2010, SE 2016)
Computer Simulation of Liquids M.P. Allen & D.J. Tildesley, Oxford
(FE 1998, SE 2017)
The Art of Molecular Dynamics Simulation D.C. Rapaport,
Cambridge University Press (2004)
Understanding Molecular Simulation Daan Frenkel & Berend Smit,
Academic Press, (FE 1996, SE 2010)
Theory of Simple Liquids J.-P. Hansen and I.R. McDonald, Academic
Press (1986).
Classical Mechanics H. Goldstein+ (FE 1950, SE 1980, TR 2001)
Molecular Modelling, Principles & Applications A.R. Leach, Pearson
Prentice Hall (SE 2001)
Recommended Books
• Just because you see something in a simulation does NOT
mean it is real! There are a lot of approximations (numerical &
statistical errors) and assumptions (ergodicity, potentials
holding beyond state points fitted for – T, P, pH; no quantum
effects at low temperature, no ionisation processes, charges
are fixed, etc.).
• Equilibrium properties are all about statistics! However,
systems may be subject to trapping (in phase space) due to
circumstances as initial conditions.
• When you’ve seen it 10 times it’s significant - a single event is
often not! This relates to how long is long for simulations.
• You should always try to calculate error estimates for
predicted properties!
Statistics & Warnings
• Theoretical tool for modelling the detailed microscopic behaviour
of many different types of systems, including; gases, liquids,
solids, polymers, surfaces and clusters.
• In an MD simulation, the classical equations of motion governing
the microscopic time evolution of a many body system are solved
numerically, subject to the boundary conditions appropriate for
the geometry or symmetry of the system.
• Can be used to monitor the microscopic mechanisms of energy
and mass transfer in chemical processes, and dynamical
properties such as absorption spectra, rate constants and
transport properties can be calculated.
• Can be employed as a means of sampling from a statistical
mechanical ensemble and determining equilibrium properties.
These properties include average thermodynamic quantities
(pressure, volume, temperature, etc.), structure, and free energies
along reaction paths.
Molecular Dynamics: Definitions
• MD is the solution of the classical
equations of motion for atoms and
molecules to obtain the time evolution of a
system.
• It is applied to many-particle systems
since a general analytical solution is not
possible. Thus one must resort to
numerical methods and computers.
• It does classical mechanics only since a
fully fledged many-particle time-dependent
quantum method is not yet available.
• It uses a Maxwell-Boltzmann averaging
process for thermodynamic properties (i.e.
time averaging).
Molecular Dynamics in a Nutshell
10-15s 10-12s 10-9s 10-6s 10-3s 100s 103s
Biological Experiments
Molecular dynamics
QM simulations
(Atomic detail)
(Electrons)
Coarse-grained models
(Whole proteins, viruses)
(MD is fast!)
Time and Length Scales
MD simulations are used for:
• Microscopic insight: we can follow the
motion of a single molecule (glass of
water)
• Investigation of phase change (NaCl)
• Understanding of complex systems like
polymers (plastics – hydrophilic and
hydrophobic behaviour)
Molecular Dynamics for Beginners
rcut
Pair Potential:
Lagrangian:
Example: Simulation of Argon
𝑉 𝑟𝑖𝑗 = 4휀𝜎
𝑟𝑖𝑗
12
−𝜎
𝑟𝑖𝑗
6
𝐿 𝑟𝑖 , 𝑣𝑖 = 12
𝑖=1
𝑁
𝑚𝑖𝑣𝑖2 −
𝑖=1
𝑁−1
𝑗<𝑖
𝑁
𝑉(𝑟𝑖𝑗)
𝐿 = 𝐾( ሶԦ𝑣) − 𝑈(Ԧ𝑟)
V(r)
r
s
e rcut
Note that the using a potential cut-
off, rcut, implies a discontinuity in f
which can be avoided by using a
shifted potential.
Models the Pauli exclusion principle (repulsive) at short distances
& the van der Waals forces (attractive) at long ones
Pair-wise radial distance
𝑉 𝑟𝑖𝑗 = 4휀𝜎
𝑟𝑖𝑗
12
−𝜎
𝑟𝑖𝑗
6
𝑓𝑖𝑥 = −
𝜕𝑉(𝑟𝑖𝑗)
𝜕𝑥𝑖
Lennard-Jones Potential
Lagrange Equation –
time evolution
Force Evaluation –
particle interactions
𝜕
𝜕𝑡
𝜕𝐿
𝜕 ሶ𝑣𝑖=𝜕𝐿
𝜕𝑟𝑖
𝑚𝑖 Ԧ𝑎𝑖 = Ԧ𝐹𝑖
Ԧ𝐹𝑖 =
𝑖=1
𝑁
Ԧ𝑓𝑖𝑗
Ԧ𝑓𝑖𝑗 = −𝛻𝑖𝑉(𝑟𝑖𝑗)
Equations of Motion
Pair force:
Note this leads to equal and opposite
forces on the two particles.
𝑟𝑖𝑗 = 𝑥𝑗 − 𝑥𝑖2+ 𝑦𝑗 − 𝑦𝑖
2+ 𝑧𝑗 − 𝑧𝑖
212
𝑟𝑖𝑗 = 𝑟𝑗 − 𝑟𝑖
𝜕𝑟𝑖𝑗
𝜕𝑥𝑖= −
𝑥𝑗 − 𝑥𝑖
𝑟𝑖𝑗=𝑟𝑖𝑗𝑥
𝑟𝑖𝑗
𝑓𝑖(𝑗)𝑥 = −
𝜕𝑉(𝑟𝑖𝑗)
𝜕𝑥𝑖= −
𝜕𝑉(𝑟𝑖𝑗)
𝜕𝑟𝑖𝑗
𝜕𝑟𝑖𝑗
𝜕𝑥𝑖
X Y
Z
i
j
𝑟𝑖𝑗𝑟𝑖
𝑟𝑖
EoM Consequences
If a particle has an initial velocity, vi(0), and
moves under the action of this force for a
time, τ, its velocity after the time, τ, will be
given by integration.
i
ii
m
f
t
v
0
)0( dtdt
dvvv i
ii
t
vmf i
ii
The force on atom i for any given configuration can
be calculated from the force-field. This equation
relates force and acceleration.
So for any given configuration we know the
acceleration of each particle.
0
0 dttvrr iii
Similarly the position of the particle after
time, τ, is given by an integral of the velocity.
Unfortunately once the particles move the distances
governing the potential change and so the forces are altered.
Molecular dynamics is about integrating these equations of
motion such that the continuous trajectories are obtained
numerically.
2D cubic periodic
Boundary Conditions
• None – biopolymer
simulations
• Stochastic boundaries –
biopolymers
• Hard wall boundaries –
pores, capillaries
• Periodic boundaries (PBC) –
most MD simulations
Why PBC: Our model systems are
still too small especially with respect
to Avogadro’s number! To avoid
surface over bulk domination effects
we resort to periodic boundaries,
pretending that boundaries do not
exist (like in pacman)!
The system no longer has a surface.
The system becomes pseudo-periodic (used to
advantage for Ewald sums). It is incorrect to impose
cutoff on long range interactions. However, the Ewald
method can deal with infinite number of periodic
images – specifically Particle Mesh Ewald (PME)
Correlations in space beyond half cell width (L/2) are
artificial. For this reason, the cut-off rcut
is usually no
greater than L/2.
Correlations in time beyond t=L/c are (in principle)
subject to recurrence. In practice this does not seem
to be the case.
Use with Minimum Image convention
PBC Consequences
Ewald Summation
The method offers an elegant
solution to solving the full
electrostatic problem by splitting it
in two parts – one in real space
and one in reciprocal space. In
real space, complying with the
cutoff concept, a convenient
screening function is added
around all charges to make their
interactions decay very fast at rcut.
The added screening functions
can be subtracted in reciprocal
space due to the periodic
boundary condition by using
Fourier transforms.
Triclinic
Truncated octahedron
Hexagonal prism
Rhombic dodecahedron
Periodic Boundary Conditions
Minimum Image Condition (MIC)
ijj’
rcut
L
rcut < L/2
Use rij’ not rij
xij = xij - L* Nint(xij/L)
Nint(a)=nearest integer to a
2D cubic periodic
3D MIC
For van der Waals interactions use only the nearest images of atoms.
The minimum image convention limits the cut off used in the
potential sum to half the shortest lattice parameter.
i
j j’
Use rij’ not rij : To find rij’ work in fractional co-ordinates:
(nint(f )=nearest integer to f )
ijijij fff intn'
a
b
rij’rij
rcut
ijijaijijbijija rcfrbfraf *** (* indicates reciprocal
space vectors)
These need to be in the range -½ < f ≤ ½
Then convert back to Cartesian:
'
'
'
'
'
'
cij
bij
aij
zzz
yyy
xxx
zij
yij
xij
f
f
f
cba
cba
cba
r
r
r
Lennard-Jones Spheres
(Argon)Provides a relatively simple system in which
the ideas of using molecular dynamics to study
kinetics and thermodynamics of physical
processes can be tested.
Here is a simulation of Ar condensation at the
surface of a polyethylene film is simulated.
System size: Film consists of 374 chains, 70
sites each.
Vapor phase: 5000 argon atoms.
Run times: 1 ns equilibration of components.
12 ns run times.
R. Rozas & T. Kraska, J. Phys. Chem. C, 111, 15784, (2007).
Set up initial system
positions of atoms and initial velocities
(3D Boltzmann distributed)
Calculate atomic forces
based on potential model
Calculate atomic motion
via an integration algorithm
Calculate physical properties
basically collect instantaneous data
for statistical purposes
Repeat !
Produce final summary
Initialise
Forces
Motion
Properties
Summarise
Key Stages in MD Simulation
Essential Requirements:
• Computational speed
• Low memory demand
• Accuracy
• Stability (energy conservation, no drift)
• Useful property – time reversibility
• Extremely useful property – symplecticness
= time reversibility + long term stability
(warranting bounded errors in time)
Integration Algorithms
r (t)
r (t+Dt)v (t)Dt
f(t)Dt2/m
r’ (t+Dt)
[r (t), v(t), f(t)] [r (t+Dt), v(t+Dt), f(t+Dt)]
Integration: Essential Idea
r” (t+Dt)
Accumulate
statistical
data
Setup
Forces
Motion
Stats.
Results
Set up
initial
system
Calculate
forces
Calculate
motion
Summarise
simulation
Taylor expansion:
Leapfrog Verlet (LFV) Velocity Verlet (VV)
Simulation Cycle & Integration Schemes
𝑟𝑛+1 = 𝑟𝑛 + ∆𝑡 𝑣𝑖 𝑡 +∆𝑡2
2!
𝑓𝑛𝑚
+∆𝑡3
3!ഺ𝑟𝑖 𝑡 ∆𝑡
3 + 𝑂(∆𝑡4)
0. 𝑟𝑖 𝑡 , 𝑣𝑖 𝑡 −1
2∆𝑡
1. 𝑓𝑖 𝑡 – calculated afresh
2. 𝑣𝑖 𝑡 +1
2∆𝑡 = 𝑣𝑖 𝑡 −
1
2∆𝑡 + ∆𝑡
𝑓𝑖 𝑡
𝑚𝑖
3. 𝑟𝑖 𝑡 + ∆𝑡 = 𝑟𝑖 𝑡 + ∆𝑡 𝑣𝑖 𝑡 +1
2∆𝑡
3’. SHAKE (𝑟𝑖, 𝑣𝑖 , 𝑓𝑖)
3”. 𝑣𝑖 𝑡 =𝑣𝑖 𝑡−
1
2∆𝑡 +𝑣𝑖 𝑡+
1
2∆𝑡
2
1.0. 𝑟𝑖 𝑡 , 𝑣𝑖 𝑡 , 𝑓𝑖 𝑡
1.1. 𝑣𝑖 𝑡 +1
2∆𝑡 = 𝑣𝑖 𝑡 +
∆𝑡
2
𝑓𝑖 𝑡
𝑚𝑖
1.2. 𝑟𝑖 𝑡 + ∆𝑡 = 𝑟𝑖 𝑡 + ∆𝑡 𝑣𝑖 𝑡 +1
2∆𝑡
1.2’. SHAKE (𝑟𝑖 , 𝑣𝑖 , 𝑓𝑖)
2.0. 𝑓𝑖 𝑡 + ∆𝑡 – calculated afresh
2.1. 𝑣𝑖 𝑡 + ∆𝑡 = 𝑣𝑖 𝑡 +1
2∆𝑡 +
∆𝑡
2
𝑓𝑖 𝑡+∆𝑡
𝑚𝑖
2.1’. Rattle (𝑣𝑖)
Discrete time
rn+1rnrn-1rn-2
vn+1/2
f nf n-1f n-2
vn-1/2vn-3/2
Application in Practice
Ԧ𝑟𝑖𝑛+1 = Ԧ𝑟𝑖
𝑛 + ∆𝑡 Ԧ𝑣𝑖𝑛+ Τ1 2 + 𝑂(∆𝑡4)
Ԧ𝑣𝑖𝑛+ Τ1 2 = Ԧ𝑣𝑖
𝑛− Τ1 2 +∆𝑡
𝑚𝑖
Ԧ𝑓𝑖𝑛 + 𝑂 ∆𝑡3
Ԧ𝑟𝑖𝑛+1 = Ԧ𝑟𝑖
𝑛 + ∆𝑡 Ԧ𝑣𝑖𝑛+ Τ1 2
Ԧ𝑣𝑖𝑛+ Τ1 2 = Ԧ𝑣𝑖
𝑛− Τ1 2 +∆𝑡
𝑚𝑖
Ԧ𝑓𝑖𝑛
Ԧ𝑣𝑖𝑛 =
Ԧ𝑣𝑖𝑛− Τ1 2 + Ԧ𝑣𝑖
𝑛+ Τ1 2
2
Leapfrog Verlet Integration
Discrete time
rn+1rnrn-1rn-2
vn+1vnvn-1vn-2
f n+1f nf n-1f n-2 Application in Practice
Ԧ𝑟𝑖𝑛+1 = Ԧ𝑟𝑖
𝑛 + ∆𝑡 Ԧ𝑣𝑖𝑛 +
∆𝑡2
2𝑚𝑖
Ԧ𝑓𝑖𝑛 + 𝑂(∆𝑡4)
Ԧ𝑣𝑖𝑛+1 = Ԧ𝑣𝑖
𝑛 +∆𝑡
2𝑚𝑖
Ԧ𝑓𝑖𝑛 + Ԧ𝑓𝑖
𝑛+1 + 𝑂 ∆𝑡2
Ԧ𝑟𝑖𝑛+1 = Ԧ𝑟𝑖
𝑛 + ∆𝑡 Ԧ𝑣𝑖𝑛+ Τ1 2
Ԧ𝑣𝑖𝑛+1 = Ԧ𝑣𝑖
𝑛+ Τ1 2 +∆𝑡
2𝑚𝑖
Ԧ𝑓𝑖𝑛+1
Ԧ𝑣𝑖𝑛+ Τ1 2 = Ԧ𝑣𝑖
𝑛 +∆𝑡
2𝑚𝑖
Ԧ𝑓𝑖𝑛
Velocity Verlet Integration
Considerations for MD
In MD we have two contributions to the
energy.
1) Kinetic energy, which sets the temperature:
2) Potential energy, which is dependent
on the atomic configuration according to
the force-field:
The energy of the system is continually interchanging between
potential and kinetic contributions (when all interactions are
conservative, no external fields).
In the potentials we are using the force generated between a pair
of atoms is equal and opposite. This means that the total
momentum of the system cannot change, i.e.:
Similarly the centre
of mass position
should be fixed:
Observations such as this allow checks that coding/integration are working!
since
𝑖
𝑚𝑖 Ԧ𝑣𝑖 = 0ሶԦ𝑟𝑐𝑚 =
σ𝑖 𝑚𝑖ሶԦ𝑟𝑖
σ𝑖 𝑚𝑖Ԧ𝑟𝑐𝑚 =
σ𝑖 𝑚𝑖 Ԧ𝑟𝑖
σ𝑖 𝑚𝑖
𝐾𝐸 𝑡 = 12
𝑖
𝑚𝑖 Ԧ𝑣𝑖(𝑡)2
𝑃𝐸 𝑡 =
𝑖
𝑗>𝑖
𝑉𝑖𝑗 𝑟𝑖𝑗(𝑡)
• Kinetic Energy:
• Temperature:
• Configuration Energy:
• Pressure:
• Specific heat:
𝐾. 𝐸. =1
2
𝑖
𝑁
𝑚𝑖𝑣𝑖2
𝑈𝑐 =
𝑖
𝑁−1
𝑗>𝑖
𝑁
𝑉(𝑟𝑖𝑗)
𝑇 =2
3
𝐾. 𝐸.
𝑁𝑘𝐵
𝑃𝑉 = 𝑁𝑘𝐵𝑇 −1
3
𝑖
𝑁
Ԧ𝑟𝑖 ∙ Ԧ𝑓𝑖
𝛿(𝑈𝑐)2 =
3
2𝑁𝑘𝐵
2𝑇2 1 −3
2
𝑁𝑘𝐵𝐶𝑣
Data from: R. Rozas & T. Kraska, J. Phys. Chem. C, 111, 15784, (2007).
System Properties – Static (1)
Structural Properties
– Pair correlation (Radial Distribution Function):
𝑔 𝑟 =𝑛(𝑟)
4𝜋𝜌𝑟2∆𝑟=
𝑉
𝑁2
𝑖=1
𝑁−1
𝑗≠𝑖
𝑁
𝛿(𝑟 − 𝑟𝑖𝑗)
– Structure factor:
𝑆 𝑘 = 1 + 4𝜋𝜌න
0
∞sin 𝑘𝑟
𝑘𝑟𝑔 𝑟 − 1 𝑟2 𝑑𝑟
– Note: S(k) available from X-ray diffraction
System Properties – Static (2)
DR
R
Radial Distribution Function (RDF)
g(r)
separation (r)
1.0
Typical RDF
Single correlation functions:
Mean squared displacement (Einstein relation)
2𝐷𝑡 =1
3𝑟𝑖 𝑡 − 𝑟𝑖(0)
2
Velocity Autocorrelation (Green-Kubo relation)
𝐷 =1
3න
0
𝑡
𝑣𝑖 𝑡 − 𝑣𝑖(0) 𝑑𝑡
System Properties – Dynamic (1)
Typical VAF
1.0<
vi(t)
.vi(0)>
0.0
time (ps)
Collective Correlation Functions: DL_POLY GUI
• General van Hove correlation function
• van Hove self-correlation function
• van Hove distinct correlation function
N
ji
ji trrrN
tG1,
)]()0([1
),( r
N
i
iis trrrN
tG )]()0([1
),( r
N
i
N
ij
jid trrrN
tG )]()0([1
),( r
System Properties – Dynamic (2)
Ensemble average:
• Free energy (of binding, solvation, interaction) differences
• Diffusion coefficients, viscosity, elastic constants
• Reaction rates, phase transition properties
• Protein folding times
• Structure refinement
Non-equilibrium processes:
• Energy Dissipation/Radiation damage
• Sound Propagation
• Surface coating
• Nucleation (meta-dynamics)
Some properties can be obtained directly from neutron scattering
Uses of MD
Time / ps
Temperature vs Time
The first thing is to locate the PLD within CC3.
Use crystal structure of CC3 to compareagainst 3D pore network. Establishedthat the cage was limiting the PLD,therefore one cage isolated.
This cage was examined and the atoms involved in creating the narrow neck inthe pore topology identified; the circumference of this circle was 3.62 Å – thisis the PLD.
We know that CC3 has a 3D diamondoid network.
CC3 RESEARCH, DAN HOLDEN & ABBIE TREWIN (LIVERPOOL)
The PLD could then be compared to the diameter of the gases:
CC3 RESEARCH
This now suggests that all the gases, save SF6, are small enough to diffuse through CC3.
Limitations of MD
• Parameters are imperfect and fit to particular P, T, pH, etc.
• Phase space is not sampled exhaustively
• Example: Free energies of solvation for amino acids often have
errors ~1kJ/mol
• Likely impossible to calculate binding free energies more
accurately than this
• Chemical bonds breaking and creation is not allowed
• Limited polarization effects; waters can reorient, but partial
charges are fixed
However, MD simulations are cheaper than experiments as more
easy to set up, repeat with changes to the models system, force-
field and/or initial conditions and thus serve as an invaluable
testing tool for scientists! It may be used cleverly to answer
cheaply hypothetical and comparative questions!
How to Use MD
• Think first and then simulate
• Ask specific questions
• Which of a set of molecules binds best?
• Which material recovers better, faster under
irradiation?
• Simulate 10 models: do they act the same?
• Try to answer A/B type questions:
• Does a His-Arg mutation affect stability?
• Does replacement of Zr with Pb in pyrochlores
affect the recovery processes under ballistic
bombardment?
Beyond Classical MD
The atomic scale is not always best choice when trying to access
phenomena occurring on a larger time- or length scales. There ways
to use MD strengths and modify the equations of motion and reduce
the degrees of freedom as in Dissipative Particle Dynamics or just
the do the latter use Coarse Grained MD. These simulations will be
cheaper to run but some of the fine-grainness (chemistry and small
scale details) will be lost as well as will the accurate timing. Particles
will be a congregations of atoms and may even have a shape and
interact via non-spherically symmetric potentials.
Another way to ask questions for rare processes and speed up time-
scale (nucleation, vacancy hopping, defects annihilation, protein
folding, crystal phases in emulsion formation) is to extend dynamics
using advanced methodologies such as temperature accelerated
dynamics, hyper-dynamics and meta-dynamics.
Think about what you want to get from the simulation: predictions or
explanations!
Part 2
DL_POLY Project Background
• General purpose parallel (classical) MD simulation software
• It was conceived to meet needs of CCP5 - The Computer
Simulation of Condensed Phases (academic collaboration
community)
• Written in modularised Fortran90 (NagWare & FORCHECK
compliant) with MPI2 (MPI1+MPI-I/O) & fully self-contained
- 1994 – 2010: DL_POLY_2 (RD) by W. Smith & T.R. Forester
(funded for 6 years by EPSRC at DL). In 2010 moved to a
BSD open source licence as DL_POLY_Classic.
- 2003 – 2010: DL_POLY_3 (DD) by I.T. Todorov & W. Smith
(funded for 4 years by NERC at Cambridge). Up-licensed
to DL_POLY_4 in 2010 – free of charge to academic
researchers and at cost to industry (provided as source).
• ~ 21,600 licences taken out since 1994 (~1,500 pa since 2007)
• ~ 4,500 e-mail list
DL_POLY Trivia
Written in modularised free formatted F90 (+MPI) with rigorous
code syntax (FORCHECK and NAGWare verified) and no external
library dependencies
• DL_POLY_4 (version 9)
– Domain Decomposition parallelisation, based on domain
decomposition (no dynamic load balancing), limits: up to
≈2.1×109
atoms with inherent parallelisation
– Parallel I/O (amber netCDF) and radiation damage features
– Free format (flexible) reading with some fail-safe features
and basic reporting (but not fully fool-proofed)
• DL_POLY_Classic (version 1.10)
– Replicated Data parallelisation, limits up to ≈30,000 atoms
with good parallelisation up to 100 (system dependent)
processors (running on any processor count)
– Hyper-dynamics, Temperature Accelerated Dynamics,
Solvation Dynamics, Path Integral MD
– Free format reading (somewhat rigid)
Current Versions
WWW:
http://www.ccp5.ac.uk/DL_POLY/
FTP:
ftp://ftp.dl.ac.uk/ccp5/DL_POLY/
COMM:
http:/www.jiscmail.ac.uk/DLPOLY/
DL_POLY on the Web
W. Smith and T.R. Forester
J. Molec. Graphics (1996), 14, 136
W. Smith, C.W. Yong, P.M. Rodger
Molecular Simulation (2002), 28, 385
I.T. Todorov, W. Smith, K. Trachenko, M.T. Dove
J. Mater. Chem. (2006), 16, 1611-1618
W. Smith (Guest Editor)
Molecular Simulation (2006), 32, 933
I.J. Bush, I.T. Todorov and W. Smith
Comp. Phys. Commun. (2006), 175, 323-329
W. Smith
Elements of MD
Further Information
0
20
40
60
80
100
120
140
160
180
200
220
2002 2004 2006 2008 2010 2012 2014 2016 2018 2020
Pu
blis
he
d li
ne
s o
f co
de
[x
1,0
00
]
Year
Lines [x 1,000]
Comment 4.0
Blank 5.6
Total 36.5
Manual 178 p
DL_POLY_3.01
DL_POLY_4.09
7.1% Varia (CI scripts)
20.2% LaTeX
72.7% Fortran
Lines [x 1,000]
Comment 21.1
Blank 49.1
Total 193.9
Manual 343 p
DL_POLY_DD Project Evolution
0
1000
2000
3000
4000
5000
1992 1996 2000 2004 2008 2012 2016
Co
un
t
Year
Annual Downloads & Valid eMail List Size
web-registration
web
-reg
istr
ati
on
2018 Downloads
• UK – 21.6%
• EU-UK – 17.6%
• China – 15.0%
• USA – 11.5%
• India – 5.5%
• France – 4.6%
• London - 4.3%
• Bath - 2.3%
• Wuhan - 2.1%D
L_P
OLY
_3
DL
_P
OLY
_4
DL
_P
OLY
_2
DL
_P
OLY
_C
2010 :: DL_POLY (2+3+MULTI) - 1,000 (list end)
2017 :: DL_POLY_4 - 4,200 (list start 2011)
Licence Statistics
Project Impact by Google
0
100
200
300
400
500
1993 1997 2001 2005 2009 2013 2017
Cit
atio
ns
Year
Asia29%
EU-UK18%
North America12%
UK22%
LatinAmerica
8%
Europe-EU5%
Africa4%
Australia &New Zealand
2%
DL_POLY Licences2018 by Sub-Areas
Project Reach
Project Reach
Chemistry37%
Physics22%
Materials19%
Engineering11%
Geology2%
Organic and Bio-Molecular Chemistry
2%
Biology2%
Pharmaceutical2%
Other1%
Mechanics1%
Software Development
1%
Astronomy0.3%
Agriculture0.2%
Mathematics0.2%
REST11%
DL_POLY Licences2018 by Science Domain
Vlad Sokhan – Shaped Particles
• Anisotropic coarse-grained
fields
• Gay-Berne’s potentials
Alin Elena – Forward Flux
Sampling
• Rare events technique
originally developed for non-
equilibrium systems, with
stochastic element to the
integration, with ability to
extract reaction rates
Ivan Scivetti – Empirical Valence
Bond
• Reactive dynamics for bond
breaking and (re)making via
product and reactant mixing
terms
Project Team
Alin Elena –
DL_PO
LY M
odernisation
•N
atural Interfaces &
Integration
•Best softw
are practices &
Sustainabilit
y
Bill Smith – project originator
Ian Bush – 3DFFT DaFT
Andrey Brukhno – PDF for intramolecular interactions (CG)
Henry Boateng – Multipolar Electrostatics
Michael Seaton – TTM, DPD, ...
Chin Yong – FF expert, DL_FIELD
Peicho Petkov – Direct Poisson Solver efforts
Others – ICHEC collaborators
Project Contributors
Part 3
DL_POLY Basics & Algorithms
• Bonded interactions – also referred as intra-molecular
• Non-bonded interactions – also referred as inter-molecular
short-ranged long-ranged
Simplified View of Force Field Elements
Point ions
and atoms
Polarisable ions
(core+shell)
Flexible
molecules
Constraint
bonds
Rigid
molecules
Flexibly
linked rigid
molecules
Rigid bond
linked rigid
molecules
Supported Molecular Entities
• particle: a rigid ion or an atom (charged or not), a core or a
shell of a polarisable ion (with or without associated degrees
of freedom), a massless charged site. A particle is a countable
object and has a global ID index.
• site: a particle prototype that serves to define the chemical &
physical nature (topology/connectivity/stoichiometry) of a
particle (mass, charge, frozen-ness). Sites are not atoms they
are prototypes!
• Intra-molecular interactions: chemical bonds, bond angles,
dihedral angles, improper dihedral angles, inversions.
Usually, the members in a unit do not interact via an inter-
molecular term. However, this can be overridden for some
interactions. These are defined by site.
• Inter-molecular interactions: van der Waals, metal
(2B/E/EAM, Gupta, Finnis-Sinclair, Sutton-Chen), Tersoff, three-
body, four-body. Defined by species.
Force Field Definitions – I
• Electrostatics: Standard Ewald*, Hautman-Klein (2D) Ewald*,
SPM Ewald (3D FFTs), Force-Shifted Coulomb, Reaction Field,
Fennell damped FSC+RF, Distance dependent dielectric constant,
Fuchs correction for non charge neutral MD cells.
• Ion polarisation via Dynamic (Adiabatic) or Relaxed shell model.
• External fields: Electric, Magnetic, Gravitational, Oscillating &
Continuous Shear, Containing Sphere, Repulsive Wall.
• Intra-molecular like interactions: tethers, core shells units,
constraint and PMF units, rigid body units. These are also
defined by site.
• Potentials: parameterised analytical forms defining the
interactions. These are always spherically symmetric!
• THE CHEMICAL NATURE OF PARTICLES DOES NOT CHANGE IN
SPACE AND TIME!!! *
Force Field Definitions – II
Force Field by Sums
0. None (e.g. isolated macromolecules)
1. Cubic periodic boundaries
2. Orthorhombic periodic boundaries
3. Parallelepiped (triclinic) periodic boundaries
4. Truncated octahedral periodic boundaries*
5. Rhombic dodecahedral periodic boundaries*
6. Slabs (i.e. x,y periodic, z non-periodic)
Boundary Conditions
DL_POLY is designed for homogenious
distributed parallel machines
M1 P1
M2 P2
M3 P3
M0 P0 M4P4
M5P5
M6P6
M7P7
Assumed Parallel Architecture
Initialize
Forces
Motion
Statistics
Summary
Initialize
Forces
Motion
Statistics
Summary
Initialize
Forces
Motion
Statistics
Summary
Initialize
Forces
Motion
Statistics
Summary
A B C D
Replicated Data Strategy – I
• Every processor sees the
full system
• No memory distribution
(performance overheads
and limitations increase
with increasing system size)
• Functional/algorithmic
decomposition of the
workload
• Cutoff ≤ 0.5 min system
width
• Extensive global
communications (extensive
overheads increase with
increasing system size)
Replicated Data Strategy – II
1,2 1,3 1,4 1,5 1,6 1,7
2,3 2,4 2,5 2,6 2,7 2,8
3,4 3,5 3,6 3,7 3,8 3,9
4,5 4,6 4,7 4,8 4,9 4,10
5,6 5,7 5,8 5,9 5,10 5,11
6,7 6,8 6,9 6,10 6,11 6,12
7,8 7,9 7,10 7,11 7,12
8,9 8,10 8,11 8,12 8,1
9,10 9,11 9,12 9,1 9,2
10,11 10,12 10,1 10,2 10,3
11,12 11,1 11,2 11,3 11,4
12,1 12,2 12,3 12,4 12,5
A
A
A
C
C
C
Brode-Ahlrichs distributed list!
B
B
B
D
D
D
Parallel RD Verlet Neighbour List
A B
C D
Domain Decomposition MD
• Linked lists provide an elegant way to scale short-ranged
two body interactions from O(N2/2) to ≈O(N). The efficiency
increases with increasing link cell partitioning – as a rule of
thumb best efficacy is achieved for cubic-like partitioning
with number of link-cells per domain ≥ 4 for any dimension.
• Linked lists can be used with the same efficiency for 3-body
(bond-angles) and 4-body (dihedral & improper dihedral &
inversion angles) interactions. For these, the linked cell
halo is double-layered and as cutoff3/4-body
≤ 0.5*cutoff2-body
this makes the partitioning more effective than that for the
2-body interactions.
• The larger the particle density and/or the smaller the cutoff
with respect to the domain width, (the larger the sub-selling
and the better the spherical approximation of the search
area), the shorter the Verlet neighbour-list search.
Linked Cell Lists
6
1 2 3 4 5
Link
Cell 2
6
10
12
16
17
Head of Chain
List
1 2 3 4 5 6 7 8 9 2019181716151413121110
10 12 16 17 0Link
List
Atom number
Cell number
Liked Cell List Idea
• Provides dynamically adjustable workload for variable local density and VNL speed up of ≈30% (45% theoretically).
• Provides excellent serial performance, extremely close to that of Brode-Ahlrichs method for construction of the Verletneighbour-list when system sizes are smaller < 5000 particles.
1 2 3 4 5 6 7
Sub-celling of the LC
• Replicated Data Shell Stripping – the VNL build up is extended for rcut+δr (shell width). The extended two body list is rebuild only and only when a pair of neighbouring particles has travelled more than δr apart since the last VNL build point. Rule of thumb δr/rcut≈5-15%.
• Domian Decomposition Particle Blurring – the VNL build up is extended for rcut+δr (domain padding). The extended two body list is rebuild only and only when a particle has travelled apart more than δr/2 apart since the last VNL build point. Rule of thumb δr/rcut≈1-5%.
• Consequences:
• All short-ranged force evaluations have an additional check on pairs distance!
• Memory and Communication over Computation and Communication balance. Force field (FF) dependent.
• Short ranged FF 60-100% gains, FF with Ewald 10-35%.
Conditional Update of the VLN
• Bonded forces:
- Algorithmic decomposition for DL_POLY_C
- Interactions managed by bookkeeping arrays,
i.e. explicit bond definition!!!
- Shared bookkeeping arrays
• Non-bonded forces:
- Distributed Verlet neighbour list (pair forces)
- Link cells (3,4-body forces)
• Implementations differ between DL_POLY_4 & C!
Parallel Forces Calculations
Molecular force fielddefinition
Glo
bal Forc
e F
ield
P0Localforceterms
P1Localforceterms
P2Localforceterms
Pro
cessors
DL_POLY_C & Bonded Forces
Glo
bal fo
rce f
ield
P0Localatomicindices
P1Localatomicindices
P2Localatomicindices
Pro
cessor
Dom
ain
s
Tricky!Molecular force fielddefinition
DL_POLY_4 & Bonded Forces
A1 A3A5
A7 A9A11 A13 A15 A17
A2 A4 A6 A8A10 A12 A14 A16
A B C D
RD Distribution Scheme: Bonded Forces
A B
C D
DD Distribution Scheme: Bonded Forces
Integration:
Available as velocity Verlet (VV) or leapfrog Verlet (LFV) generating
flavours of the following ensembles
• NVE
• NVT (Ekin
) Evans
• NVT dpdS1 dpdS2 Sharlow 1st
or 2nd
order splitting (VV only)
• NVT Andersen^, Langevin^, Berendsen, Nosé-Hoover, GST
• NPT Langevin^, Berendsen, Nosé-Hoover,
Martyna-Tuckerman-Klein^
• NsT/NPnAT/NPnT Langevin^, Berendsen, Nosé-Hoover,
Martyna-Tuckerman-Klein^
Note: CoM motion is removed from non-conserving integrators!
Constraints & Rigid Body Solvers:
• VV dependent – RATTLE, No_Squish, QSHAKE*
• LFV dependent – SHAKE, Euler-Quaternion, QSHAKE*
Ensembles & Algorithms
Constraint Bonds & Rigid Bodies
𝑣𝑖
𝑓𝑖Ԧ𝑔𝑖𝑗
𝑖
𝑗
𝑗𝑢
𝑖𝑢
𝑖𝑜
𝑗𝑜
− Ԧ𝑔𝑖𝑗
𝑓𝑖 + 𝑔𝑖𝑗
𝑓𝑗 − 𝑔𝑖𝑗
𝑖
𝑗
ℎ𝑖𝑗
−ℎ𝑖𝑗
𝑣𝑗 − ℎ𝑖𝑗
𝑣𝑖 + ℎ𝑖𝑗
𝑣𝑗
SHAKE
RATTLE
z
x
θz
y
θy
θx
Constraint bonds can be used to increase
the timestep size removing vibration of
chemical bonds by an iterative procedure.
SHAKE introduces retrospective force to get
to CB’s length to the desired equilibrium
distance within a tolerance (retrospective
pressure effect). RATTLE removes
iteratively CBs’ particles velocities
components along the CBs direction
(retrospective kinetic effect). A CB removes
a half degree of freedom from each particle!
Rigid bodies provide a smarter way to
move whole molecular fragments as a
whole, keeping all fragments’ internal
distances invariant in time. A RB has
up to 6 degrees freedom – 3 for CoM
motion and 3 for rotation (2 for linear
molecules as CO2)! Rotational motion
requires solving numerically the
Eulerian equations of rotation.
Velocity Verlet integration algorithms can be naturally derived from the
non-commutable Liouville evolution operator by using a second order
Suzuki-Trotter expansion. Thus they are symplectic/true ensembles
(with conserved quantities) warranting conservation of the phase-space
volume, time-reversibility and long term numerical stability…
Exemplary VV Expansion of NVE to NVT, NPT & NσT
SY
MM
ET
RIC
Extended Ensembles in VV casting
VV-Stage-1:
𝑟𝑖 𝑡 , 𝑣𝑖 𝑡 , 𝑓𝑖 𝑡
𝑇ℎ𝑒𝑟𝑚𝑜𝑠𝑡𝑎𝑡 𝑡 → 𝑡 + 1
4∆𝑡 : 1
4∆𝑡
𝐵𝑎𝑟𝑜𝑠𝑡𝑎𝑡 𝑡 → 𝑡 + 1
2∆𝑡 : 1
2∆𝑡
𝑇ℎ𝑒𝑟𝑚𝑜𝑠𝑡𝑎𝑡 𝑡 + 1
4∆𝑡 → 𝑡 + 1
2∆𝑡 : 1
4∆𝑡
𝑣𝑖 𝑡 +1
2∆𝑡 = 𝑣𝑖 𝑡 +
∆𝑡
2
𝑓𝑖 𝑡
𝑚𝑖: 12∆𝑡
𝑟𝑖 𝑡 + ∆𝑡 = 𝑟𝑖 𝑡 + ∆𝑡 𝑣𝑖 𝑡 +1
2∆𝑡 : ∆𝑡
𝑅𝐴𝑇𝑇𝐿𝐸_𝑅 𝑡 → 𝑡 + ∆𝑡 (𝑟𝑖, 𝑣𝑖 , 𝑓𝑖) : ∆𝑡
VV-Stage-2:
𝑟𝑖 𝑡 + ∆𝑡 , 𝑣𝑖 𝑡 +1
2∆𝑡 , 𝑓𝑖 𝑡 + ∆𝑡 – afresh
𝑣𝑖 𝑡 + ∆𝑡 = 𝑣𝑖 𝑡 +1
2∆𝑡 +
∆𝑡
2
𝑓𝑖 𝑡+∆𝑡
𝑚𝑖: 12∆𝑡
𝑅𝐴𝑇𝑇𝐿𝐸_𝑉 𝑡 + 1
2∆𝑡 → 𝑡 + ∆𝑡 (𝑣𝑖) : ∆𝑡
𝑇ℎ𝑒𝑟𝑚𝑜𝑠𝑡𝑎𝑡 𝑡 + 1
2∆𝑡 → 𝑡 + 3
4∆𝑡 : 1
4∆𝑡
𝐵𝑎𝑟𝑜𝑠𝑡𝑎𝑡 𝑡 + 1
2∆𝑡 → 𝑡 + ∆𝑡 : 1
2∆𝑡
𝑇ℎ𝑒𝑟𝑚𝑜𝑠𝑡𝑎𝑡 𝑡 + 3
2∆𝑡 → 𝑡 + ∆𝑡 : 1
4∆𝑡
𝑟𝑖 𝑡 + ∆𝑡 , 𝑣𝑖 𝑡 + ∆𝑡 , 𝑓𝑖 𝑡 + ∆𝑡
The time constants to do with
thermostats/barostats control
the exchange of energy
between the system and the
reference baths.
Long time constants will result
in slow equilibration.
Short time constants will
interfere with the simulation
results, particularly those
dependant on fluctuations.
The compromise is system
dependant and requires
experiment!
Choosing the coupling time constants
Berendsen et al., J. Chem. Phys.,
81, 3684, (1984).
• Similar methodology to classical MD:
– Condensed phase system modelled by
particles (‘beads’) using pairwise potentials
– Particle motion determined by force
integration (e.g. Velocity Verlet)
– System properties at equilibrium calculated
as ensemble averages
• System coupled to heat bath using
pairwise dissipative and random forces
– Pairwise thermostatting conserves system
momentum and produces correct
hydrodynamics
CG & Dissipative Particle Dynamics
Dissipative Particle Dynamics
Coarse Grained MD
• Dissipative force:
• Random force:
• Fluctuation-dissipation theory demonstrates these
forces act as thermostat if:
– Dissipative force parameter related to fluid viscosity
Distance-based screening function
Relative velocity between particles
Gaussian random number (zero mean, unity variance)
DPD Algorithm – I
• Conservative force often selected as
although this is not necessary for a coarse-grained (CG) MD
– Quadratic potential: soft and repulsive
– Gives quadratic equation of state for fluid:
– Soft potential allows for larger time steps than classical MD: beads can ‘pass through’ each other and reach equilibrium in fewer time steps
– Flexible definition of beads: either coarse-grains or ‘momentum carriers’
Interaction length (cutoff radius)
DPD Algorithm – II
• Flexible interactions between
species pairs
– Can specify e.g. hydrophobicity
– Interaction parameters can be
connected to Flory-Huggins solution
theory
• Bond interactions
– Allow for construction of ‘molecules’
from differently interacting beads
– Example: spontaneous vesicle
formation of amphiphilic molecules in
solution
Source: Yamamoto et al., J Chem Phys,
116, 5842–5849 (2002)
Hydrophilic head Hydrophobic tail
DPD Capabilities
– Example: formation of
water drops on
hydrophobic surface
under influence of
gravity
Source: Johansson, Simulating fluid flow
and heat transfer using dissipative particle
Dynamics, Dept. Energy Sci., Lund
University (2012)
DPD via DL_MESO
• Gear Predictor-Corrector – generally easily
extendable to any high order of accuracy. It
is used in satellite trajectory
calculations/corrections. However, lacking
long term stability.
• Trotter derived evolution algorithms –
generally easily extendable to any high
order of accuracy. Symplectic.
Other Integration Algorithms
• Molecular dynamics of polyatomic systems with
options to save the micro evolution trajectory at
regular intervals
• Optimisation by conjugate gradients method or zero
Kelvin annealing
• Statistics of common thermodynamic properties
(temperature, pressure, energy, enthalpy, volume)
with options to specify collection intervals and stack
size for production of rolling and final averages
• Calculation of RDFs and Z-density profiles
• Temperature scaling, velocity re-Gaussing
• Force capping in equilibration
Base Functionality
Velocity re-Scaling
To get around the problem of temperature drift we can simply
remove or inject kinetic energy by scaling the velocities in the initial
stages of the calculation:
2/1
2
21
)(
)()(.)(
tT
setTstvsmtKE
i
ii
Where T(set) is the target temperature for the simulation. This
technique is referred to as velocity scaling and is used during the
equilibration period of the simulation.
TNk
K EB
2
3. .
250
260
270
280
290
300
310
320
330
340
350
0 5 10 15 20 25
Tem
perature / K
Time /
ps
Example MD run with T set at 300K,
velocity scaling used up to 5ps.
Thereafter fluctuations in T
increase but no drift away from
average.
• Radiation damage driven features:
- defects analysis
- boundary/stochastic thermostats
- volumetric expansion (integer) – nfold Nx Ny Nz
- replay history
- variable time step algorithm
• Extra ensembles:
- DPD, Langevin, Andersen, MTK, GST
- extensions of NsT to NPnAT and NP
nT
• Infrequent k-space Ewald evaluation
• Direct VdW/Metal
• Force shifted VdW
• I/O driven features Parallel I/O & netCDF
• Extra Reporting (& opting out of nagging)
• Extensions: PLUMED, OpenKIM
• VdW potentials mixing schemes
Specialised Functionality
DL_POLY_4 GENERIC EQUILIBRATION SET OF CONTROL DIRECTIVES
temperature 300 Kelvin
pressure 0.001 k-atmospheres
#ensemble nst ber 0.75 1.7 # uncomment only for non-liquid or non-bio/organo-chemical systems!!!
#ensemble nst ber 0.75 1.7 orth # uncomment for non-liquid or non-bio/organo-chemical systems!!!
variable timestep 0.0015 pico-seconds
maxdis 0.11 Angstroms
mindis 0.04 Angstroms
mxstep 0.005 pico-seconds
steps 3000
equilibration 1500
scale every 7
#regauss every 70
cap 1000 k-T/Angstrom
#zero fire 12 # uncomment for really bad starting configurations!!!
#minimise force 115 10.0 # uncomment only for non-liquid or non-bio/organo-chemical systems!!!
#minimise dist 115 0.06 # uncomment for liquid or bio/organo-chemical systems (solvent/H motion)!
#rlxtol 75 # uncomment for models with difficult relaxed shell convergence
#shake 1.0e-7 force units # uncomment for making constrained units good for rigid body
shake 1.0e-5 force units
cutoff 10.0 Angstrom # remember 3 (2-5) times the largest sigma from LJ interactions
ewald precision 1.0e-5 # 1.0e-6 for non-metallic solids & Ionic Liquids!
finish
CONTROL for Equilibration
Part 4
DL_POLY I/O Files
• Crystallographic
(Dynamic) data
• Reference data for
DEFECTS
• Traj. data for replay
• Simulation controls
• Molecular/Topologic
al Data
• Tabulated
interactions
• Restart data
• Final & CGM
configurations
• Best CGM configuration
• Simulation summary
data
• Trajectory data
• Defects data
• Statistics data
• RSD, MSD & Tinst
data
• VAF data
• Intra PDF data
• Inter PDF/RDF data
• Z density data
• Restart data
CONFIG
CONTROL
FIELD
TABLE*
TABEAM*
TABBND*
TABANG*
TABDIH*
TABINV*
REFERENCE*
HISTORY*
REVCON
CFGMIN*
STATIS
HISTORY*, HISTORF*
DEFECTS*
MSDTMP*, RSDDAT*
BNDDAT*, BNDPMF*, BNDTAB*
ANGDAT*, ANGPMF*, ANGTAB*
DIHDAT*, DIHPMF*, DIHTAB*
INVDAT*, INVPMF*, INVTAB*
RDFDAT*, VDWPMF*, VDWTAB*
ZDNDAT*
REVIVE
REVOLD*
OUTPUT
VAFDAT_*
DL_POLY_4
I/O FILES
I/O Files
Internally, DL_POLY uses atomic scale units:
• Mass – mass of H atom (D) [Daltons]
• Charge – charge on proton (e)
• Length – Angstroms (Å)
• Time – picoseconds (ps)
• Force – D Å ps-2
• Energy – D Å2
ps-2
[10 J mol-1]
• Temperature is expressed in Kelvin for I/O
• Pressure is expressed in k-atm for I/O
• Angles are expressed in degrees (not radians)
DL_POLY Units
UNITS directive in FIELD file allows to opt for the
following energy units
• Internal DL_POLY units – 10 J mol-1
• Electron-volts – eV
• kilo calories per mol – k-cal mol-1
• kilo Joules per mol – k-J mol-1
• Kelvin per Boltzmann – K Boltzmann-1
All interaction MUST have the same energy units!
Not only in FIELD but in TABLE, TABEAM, TABINT!
Acceptable DL_POLY Units
• SIMULATION CONTROL
• Free Format
• Mandatory
• Driven by keywords:
keyword [options] {data}
e.g.:
ensemble NPT Hoover 1.0 8.0
CONTROL File
• Initial atomic coordinates
• Format
- Integers (I10)
- Reals (F20)
- Names (A8)
• Mandatory
• Units:
- Position – Angstroms (Å)
- Velocity – Å ps-1
- Force – D Å ps-2
• Construction: Some kind of
GUI or DL_FIELD essential for
complex systems
CONFIG [REVCON,CFGMIN] File
• Force Field specification
• Mandatory
• Format:
• Integers (I5)
• Reals (F12)
• Names (A8)
• Keywords (A4)
• Maps on to CONFIG file
structure
• Construction
• Small systems – by hand
• Large systems – nfold or
GUI or DL_FIELD!
FIELD File
• Defines non-analytic
pair (vdw) potentials
• Format
• Integers (I10)
• Reals (F15)
• Names (A8)
• Conditional, activated
by FIELD file option
• Potential & Force
• NB force (here) is:
)()( rUr
rrG
TABLE FileTABLE File
• Defines embedded atom potentials
• Format
• Integers (I10)
• Reals (F15)
• Names (A8)
• Conditional, activated by FIELD file option
• Potentials only
• pair, embed & dens keywords for atom types
followed by data records (4 real numbers per
record)
• Individual interpolation arrays
TABEAM File
• Provides program restart capability
• File is unformatted (not human readable)
• Contains thermodynamic accumulators, RDF
data, MSD data and other checkpoint data
• REVIVE (output file) ---> REVOLD (input file)
REVOLD [REVIVE] File
• Provides Job Summary (mandatory!)
• Formatted to be human readable
• Contents:
• Summary of input data
• Instantaneous thermodynamic data at selected intervals
• Rolling averages of thermodynamic data
• Statistical averages
• Final configuration
• Radial distribution data
• Estimated mean-square displacements and 3D diffusion
coefficient
• Plus:
• Timing data, CGM and relaxed shell model iteration data
• Warning & Error reports
OUTPUT File
• System properties at
intervals selected by user
• Optional
• Formatted (I10,E14)
• Intended use: statistical
analysis (e.g. error) and
plotting vs. time.
• Recommend use with GUI!
• Header:
• Title
• Units
• Data:
• Time step, time,
#entries
• System data
STATIS File
• Configuration data at user
selected intervals
• Formatted
• Optional
• Header:
• Title
• Data level, cell key,
number
• Configuration data:
• Time step and data keys
• Cell Matrix
• Atom name, mass, charge
• X,Y,Z coordinates (level 0)
• X,Y,Z velocities (level 1)
• X,Y,Z forces (level 2)
HISTORY [HISTORF] File
• Formatted (A8,I10,E14)
• Plotable
• Optional
• RDFs from pair forces
• Header:
• Title
• No. plots & length of plot
• RDF data:
• Atom symbols (2)
• Radius (A) & RDF
• Repeated…
• ZDNDAT file has same format
RDFDAT [ZDNDAT] File
• REFERENCE file
- Reference structure to compare against
• DEFECTS file
- Trajectory file of vacancies and interstitials migration
• MSDTMP file
- Trajectory like file containing particles’ Sqrt(MSDmean
) and Tmean
• RSDDAT file
- Trajectory like file containing particles’ Sqrt(RSD from origin)
• TABINT file
- Table file for INTra-molecular interactions
• INTDAT file
- Probability Distribution Functions for INTra-molecular interactions
• HISTORF file
- Force replayed HISTORY
• …
Other Extra Files
Part 5
DL_POLY_4 Performance
300,763,000 NaCl with full SPME electrostatics
evaluation on 1024 CPU cores
IBM p575 2004/5 Cray XE6 2013/4
• Start-up time 60 min 15 min
• Timestep time 68 sec 23 sec
• FFT evaluation 55 sec 18 sec
In theory ,the system can be seen by the eye. Although
you would need a very good microscope – the MD cell
size for this system is 2μm along the side and as the
wavelength of the visible light is 0.5μm so it should be
theoretically possible.
Proof of Concept
2000 4000 6000 8000 10000 12000 14000 16000
2000
4000
6000
8000
10000
12000
14000
16000
14.6 million particle Gd2Zr
2O
7 system
Sp
ee
d G
ain
Processor count
Perfect
MD step total
Link cells
van der Waals
Ewald real
Ewald k-space
Benchmarking BG/L Jülich 2007
0 200 400 600 800 1000
0
200
400
600
800
1000
max load 700'000 atoms per 1GB/CPU
max load 220'000 ions per 1GB/CPU
max load 210'000 ions per 1GB/CPU
Solid Ar (32'000 atoms per CPU)
NaCl (27'000 ions per CPU)
SPC Water (20'736 ions per CPU)
21 million atoms
28 million atoms
33 million atoms
good parallelisation
perfect p
aralle
lisatio
n
Sp
ee
d G
ain
Processor Count
Weak Scaling
HECToR (Cray XE6) 2013
RB v/s CB Performance & Scalability
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
0 200 400 600 800 1000
Tim
e p
er
tim
este
p[s
]
MPI tasks count
ArgonTransferrinNaClRB waterCB waterPoly. (Argon)
HECToR (Cray XE6) 2013
Weak Scaling and Cost Complexity
1. Serial read and write (sorted/unsorted) – where only a single MPI
task, the master, handles it all and all the rest communicate in turn to or
get broadcasted to while the master completes writing a configuration of
the time evolution.
2. Parallel write via direct access or MPI-I/O (sorted/unsorted) –
where ALL / SOME MPI tasks print in the same file in some orderly
manner so (no overlapping occurs using Fortran direct access printing.
However, it should be noted that the behaviour of this method is not
defined by the Fortran standard, and in particular we have experienced
problems when disk cache is not coherent with the memory).
3. Parallel read via MPI-I/O or Fortran
4. Serial NetCDF read and write using NetCDF libraries for machine-
independent data formats of array-based, scientific data (widely used by
various scientific communities).
I/O Solutions
MX1-1
PX0-1
M1
P1
MX0+1
PX0+1
MX1-1
PX1-1
M0
P0
MXn+1
PXn+1
MN-1
PN-1
MXn
PXn
MX0
PX0
I/O Group 0
I/O Group 1
I/O Group n=M-1
I/O
BA
TC
HI/O
BA
TC
HI/O
BA
TC
HD
I S
K
Memory
PHEAD Pslave I/O WRITE COMMS
I/O READ COMMS
HECToR (Cray XE6) 2013
• 72 I/O NODES
• READ ~ 50-300 Mbyte/s
with best performance
on 16 to 128 I/O Groups
• WRITE ~ 50-150 Mbyte/s
with best performance
on 64 to 512 I/O Groups
• Performance depends
on user defined number
of I/O groups, and I/O
batch (memory CPU to
disk) and buffer
(memory of comms
transactions between
CPUs)
• Reasonable defaults as
a function of all MPI
tasks are provided
N compute cores of which M < N do I/O
The Advanced Parallel I/O Strategy
Part 5
Obtaining & Building DL_POLY
• Online Licence Facility at http://www.ccp5.ac.uk/DL_POLY/
• The licence is
- To protect copyright of STFC Daresbury Laboratory
- To reserve commercial rights
- To provide documentary evidence justifying continued
support by UK Research Councils (UKRI)
• It covers only the DL_POLY_4 package
• Registered users are entered on the DL_POLY mailshot list
- Support is available (under CCP5 & MCC SLA via EPSRC)
only to UK academic researchers
- For the rest of the world there is the JISC Community
List
• Last but not least there is a detailed, interactive, self-
referencing PDF (LaTeX) user manual
DL_POLY_4 Licensing & Support
• Register at http://www.ccp5.ac.uk/DL_POLY/
• Registration provides a decryption key, sent by
• Source is provided as an encrypted ZIP file on
the FTP
• Successful unpacking produces a unix
directory structure
• TEST, BENCH and TUTORIAL data are also
available on the FTP
Supply of DL_POLY_4
• Full documentation of software supplied with source
• Support is available through the CCP5 user community
WWW:
http://www.ccp5.ac.uk/DL_POLY_CLASSIC/
FTP:
ftp://ftp.dl.ac.uk/ccp5/DL_POLY/
COMM:
http:/www.jiscmail.ac.uk/DLPOLY/
DL_POLY_Classic Support
• Downloads are available from CCP5 website
• No registration required – BSD licence
• Sources is a in tarred and gzipped form
• Successful unpacking produces a unix directory structure
• Test data are also available
Supply of DL_POLY_Classic
DL_POLY
build
source
execute
java
utility
Home of makefiles
DL_POLY source code
Home of executable &Working Directory
Java GUI source code
Utility codes
data Test data
Home of Manualsmanual
DL_POLY Directory Structure
Part 6
Usability
DL_POLY & Project ATEN
• VMD is a free software package for visualising MD
data.
• Website: http://www.ks.uiuc.edu/Research/vmd/
• Useful for viewing snapshots and movies.
– A plug in is available for DL_POLY HISTORY files
– Otherwise convert HISTORY to XYZ or PDB format
DL_POLY & VMD
xyz
PDB
DL_FIELD
‘black box’FIELD CONFIG
http://www.ccp5.ac.uk/DL_FIELD/
• Orgainic Fields – AMBER+Glycam, CHARM, OPLS-AA, PCFF,
Drieding, CHARM19 (united atom)
• Inorganic Fields including a core-shell polarisation option
• Solvation Features, Auto-CONNECT feature for mapping
complex random structures such as gels and random polymers
• input units freedom and molecular rigidification
Protonated4382 atoms (excluding water)
19400 bond interactions
7993 angles interactions
13000 dihedral interactions
730 VDW interactions
Developed by Chin Yong
SOD
DL_FIELD/ANALYSER
DL_POLY Hands-On
ftp://ftp.dl.ac.uk/ccp5/DL_POLY/DL_POLY_4.0/TUTORIAL/
Thank You
500 keV cascade in 200 million Fe system using TTM
Electronic effects in high-energy radiation damage in iron, E. Zarkadoula, S.L.
Daraszewicz, D.M. Duffy, M.A. Seaton, I.T. Todorov, K. Nordlund, M.T. Dove and K.
Trachenko, J. Phys.: Condens. Matter 26 (2014) 085401 (8pp), doi:10.1088/0953-
8984/26/8/085401
Part 7
The DL_POLY Java GUIW. Smith
• Java is Free!
• Facilitate use of code
• Selection of options (control of capability)
• Construct (model) input files
• Control of job submission
• Analysis of output
• Portable and easily extended by user
GUI Overview
• Edit source in java directory
• Edit using vi, emacs, nano, gedit, whatever
• Compile in java directory:
javac *.java
jar -cfm GUI.jar manifesto *.class
• Executable is GUI.jar
• But.....
****Don't Panic!****
The GUI.jar file is provided in the download or may be not
Compiling/Editing the GUI
• Invoke the GUI from within the execute directory
(or equivalent):
java -jar ../java/GUI.jar
• Colour scheme options:
java -jar ../java/GUI.jar –colourscheme
with colourscheme one of:
monet, vangoch, picasso, cezanne, mondrian
(default picasso).
Invoking the GUI
Menus
The Monitor Window
ShowEditorOption
Using Menus
GraphicsButtons
GraphicsWindow
EditorButton
The Molecular Viewer
EditorButtons
EditorWindow
The Molecular Editor
• File - Simple file manipulation, exit etc.
• FileMaker - make input files:
– CONTROL, FIELD, CONFIG, TABLE
• Execute
– Select/store input files, run job
• Analysis
– Static, dynamic,statistics,viewing,plotting
• Information
– Licence, Force Field files, disclaimers etc.
Available Menus
Buttons
Text Boxes
A Typical GUI Panel