Upload
cordelia-davis
View
218
Download
1
Embed Size (px)
Citation preview
MSc in High Performance ComputingMSc in High Performance ComputingComputational Chemistry ModuleComputational Chemistry Module
Introduction to Molecular DynamicsIntroduction to Molecular Dynamics
Bill SmithComputational Science and Engineering
STFC Daresbury LaboratoryWarrington WA4 4AD
● MD is the solution of the classical equations of motion for atoms and molecules to obtain the time evolution of the system.
● Applied to many-particle systems - a general analytical solution not possible. Must resort to numerical methods and computers
● Classical mechanics only - fully fledged many-particle time-dependent quantum method not yet available
● Maxwell-Boltzmann averaging process for thermodynamic properties (time averaging).
What is Molecular Dynamics?What is Molecular Dynamics?
Example: Simulation of ArgonExample: Simulation of Argon
rrcutcut
612
4)(rr
rV
Pair Potential:Pair Potential:
Lagrangian:Lagrangian:
L r v m v V ri i i ii
N
ijj ii
N
( , ) ( )
1
22
1
Lennard -Jones PotentialLennard -Jones Potential
612
4)(rr
rV
V(r)V(r)
rr
rrcutcut
Equations of MotionEquations of Motion
d
dt
L
v
L
ri i
N
ijiji
iii
fF
Fam
Lagrange
ijijijij
ijiij rrrr
rVf
612
2224)(
Newton
Lennard-Jones
Periodic Boundary ConditionsPeriodic Boundary Conditions
Minimum Image ConventionMinimum Image Convention
iijjj’j’
rrcutcut
LL
rrcutcut < L/2 < L/2
Use rUse rij’ij’ not r not rijij
xxij ij = x= xij ij - L* Nint(x- L* Nint(xijij/L)/L)
Nint(a)=nearest integer to aNint(a)=nearest integer to a
Integration Algorithms: Essential IdeaIntegration Algorithms: Essential Idea
r (t)
r (t+t)v (t)t
f(t)t2/m
Net displacement
r’ (t+t)
[r (t), v(t), f(t)] [r (t+t), v(t+t), f(t+t)]
Time step t chosen to balance efficiencyand accuracy of energy conservation
Integration Algorithms (i)Integration Algorithms (i)
r r rtm
F t
vtr r t
in
in
in
iin
in
in
in
1 12
4
1 1 2
2
12
( )
( ) ( )
Verlet algorithm
Integration Algorithms (ii)Integration Algorithms (ii)
)(
)(
42/11
32/12/1
tvtrr
tFm
tvv
ni
ni
ni
ni
i
ni
ni
Leapfrog Verlet Algorithm
Integration AlgorithmsIntegration Algorithms
)()(2
)(2
211
42
1
tFFm
tvv
tFm
tvtrr
ni
ni
i
ni
ni
ni
i
ni
ni
ni
Velocity VerletAlgorithm
12/11
2/11
2/1
2
2
ni
i
ni
ni
ni
ni
ni
ni
i
ni
ni
Fm
tvv
vtrr
Fm
tvv
As Applied
Verlet Algorithm: DerivationVerlet Algorithm: Derivation
)4()(2/)()(
:or
)()(2)()(
:(1) from (2)Subtract
)3()(/)()()(2)(
:or
)()()(2)()(
:(2) and (1) Add
2)()()()()()(
1)()()()()()(
:expansions sTaylor'
2
3
42
42
43612
21
43612
21
tOtttrttrv(t)
tOttrttrttr
tOmttfttrtrttr
tOttrtrttrttr
tOttrttrttrtrttr
tOttrttrttrtrttr
Key Stages in MD SimulationKey Stages in MD Simulation
●Set up initial systemSet up initial system●Calculate atomic forcesCalculate atomic forces●Calculate atomic motionCalculate atomic motion●Calculate physical propertiesCalculate physical properties●Repeat !Repeat !●Produce final summaryProduce final summary
InitialiseInitialise
ForcesForces
MotionMotion
PropertiesProperties
SummariseSummarise
MD – Further CommentsMD – Further Comments
Constraints and ShakeIf certain motions are considered unimportant, constrained MD can be more efficient e.g. SHAKE algorithm - bond length constraintsRigid bodies can be used e.g. Eulers methods and quaternion algorithms
Statistical MechanicsThe prime purpose of MD is to sample the phase space of the statistical mechanics ensemble.Most physical properties are obtained as averages of some sort.Structural properties obtained from spatial correlation functions e.g. radial distribution function.Time dependent properties (transport coefficients) obtained via temporal correlation functions e.g. velocity autocorrelation function.
System Properties: Static (1)System Properties: Static (1)
● Thermodynamic Properties– Kinetic Energy:
– Temperature:
K E m vi ii
N
. . 1
22
TNk
K EB
2
3. .
System Properties: Static (2)System Properties: Static (2)
– Configuration Energy:
– Pressure:
– Specific Heat
U V rc ijj i
N
i
( )
1
13
1 N
i
N
ijijijB frTNkPV
( ) ( )U Nk TNk
Cc NVE BB
v
2 2 23
21
3
2
System Properties: Static (3)System Properties: Static (3)
● Structural Properties– Pair correlation (Radial Distribution Function):
– Structure factor:
Note: S(k) available from x-ray diffraction
g rn r
r r
V
Nr rij
j i
N
i
( )( )
( )
4 2 2
drrrgkr
krkS 2
01)(
)sin(41)(
Radial Distribution FunctionRadial Distribution Function
RR
RR
g(r)g(r)
separation (r)separation (r)
1.01.0
Typical RDFTypical RDF
Free Energies?Free Energies?
● All above calculable by molecular dynamics or Monte Carlo simulation. But NOT Free Energy:
where
is the Partition Function.But can calculate a free energy difference!
A V T k T Q V TB e N( , ) log ( , )
Q V TN h
H r p dr dpN NN N N N( , )
!exp ( , )
13
● The bulk of these are in the form of Correlation Functions :
2
0
)0()()(
or
)()(1
)(
av
T
avav
fftftC
dffftfT
tC
System Properties: Dynamic (1)System Properties: Dynamic (1)
System Properties: Dynamic (2)System Properties: Dynamic (2)
● Mean squared displacement (Einstein relation)
● Velocity Autocorrelation (Green-Kubo relation)
2|)0()(|3
12 ii tDt rr
dttD ii
0
)0()(3
1vv
time (ps)time (ps)
<|r<|r
ii(t)-
r(t
)-r ii(0
)|(0
)|22 >
(A
>
(A22 ))
SolidSolid
LiquidLiquid
Typical MSDsTypical MSDs
1.01.0
<v<v ii(t
).v
(t).
v ii(0)>
(0)>
0.00.0t (ps)t (ps)
Typical VAFTypical VAF
Recommended TextbooksRecommended Textbooks
● The Art of Molecular Dynamics Simulation, D.C. Rapaport, Camb. Univ. Press (2004)
● Understanding Molecular Simulation, D. Frenkel and B. Smit, Academic Press (2002).
● Computer Simulation of Liquids, M.P. Allen and D.J. Tildesley, Oxford (1989).
● Theory of Simple Liquids, J.-P. Hansen and I.R. McDonald, Academic Press (1986).
● Classical Mechanics, H. Goldstein, Addison Wesley (1980)
The DL_POLY PackageThe DL_POLY Package
A General Purpose Molecular Dynamics Simulation Package
DL_POLY BackgroundDL_POLY Background
● General purpose parallel MD code to meet needs of CCP5 (academic collaboration)
● Authors W. Smith, T.R. Forester & I. Todorov● Over 3000 licences taken out since 1995● Available free of charge (under licence) to University
researchers.
DL_POLY VersionsDL_POLY Versions
● DL_POLY_2– Replicated Data, up to 30,000 atoms– Full force field and molecular description
● DL_POLY_3– Domain Decomposition, up to 10,000,000
atoms– Full force field but no rigid body description.
● I/O files cross-compatible (mostly)● DL_POLY_4
– New code under development– Dynamic load balancing
Supported Molecular EntitiesSupported Molecular Entities
Point ionsand atoms
Polarisableions (core+shell)
Flexiblemolecules
Rigidbonds
Rigidmolecules
Flexiblylinked rigidmolecules
Rigid bondlinked rigidmolecules
DL_POLY is for Distributed DL_POLY is for Distributed Parallel MachinesParallel Machines
M1 P1
M2 P2
M3 P3
M0 P0 M4P4
M5P5
M6P6
M7P7
DL_POLY: Target SimulationsDL_POLY: Target Simulations
● Atomic systems● Ionic systems● Polarisable ionics● Molecular liquids● Molecular ionics● Metals
● Biopolymers and macromolecules
● Membranes● Aqueous solutions● Synthetic polymers● Polymer electrolytes
DL_POLY Force FieldDL_POLY Force Field● Intermolecular forces
– All common van der Waals potentials– Finnis_Sinclair and EAM metal (many-body) potential
(Cu3Au)– Tersoff potential (2&3-body, local density sensitive, SiC)– 3-body angle forces (SiO2)– 4-body inversion forces (BO3)
● Intramolecular forces– bonds, angle, dihedrals, improper dihedrals, inversions– tethers, frozen particles
● Coulombic forces– Ewald* & SPME (3D), HK Ewald* (2D), Adiabatic shell model,
Neutral groups*, Bare Coulombic, Shifted Coulombic, Reaction field
● Externally applied field– Electric, magnetic and gravitational fields, continuous and
oscillating shear fields, containing sphere field, repulsive wall field
* Not in DL_POLY_3
Algorithms and EnsemblesAlgorithms and Ensembles
Algorithms● Verlet leapfrog● Velocity Verlet● RD-SHAKE● Euler-Quaternion*● No_Squish*● QSHAKE*● [Plus combinations]
* Not in DL_POLY_3
Ensembles● NVE● Berendsen NVT● Hoover NVT● Evans NVT● Berendsen NPT● Hoover NPT● Berendsen NT● Hoover NT● PMF
The DL_POLY Java GUIThe DL_POLY Java GUI
The DL_POLY WebsiteThe DL_POLY Website
http://www.ccp5.ac.uk/DL_POLY/
The End