![Page 1: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/1.jpg)
Technische Universitat Munchen
Introduction to Scientific Computing II
Molecular Dynamics Simulation
Michael Bader – SCCSSummer Term 2012
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 1
![Page 2: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/2.jpg)
Technische Universitat Munchen
Molecular Dynamics and N-Body Problems – An IntroductionMicro and Nano SimulationsAstrophysicsParticle-oriented Numerical MethodsLaws of Motion
Molecular Dynamics – the Physical ModelQuantum vs. Classical MechanicsVan der Waals AttractionLennard Jones Potential
Molecular Dynamics – the Mathematical ModelSystem of ODEInitial and Boundary ConditionsComputational Domain
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 2
![Page 3: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/3.jpg)
Technische Universitat Munchen
Molecular Dynamics and N-Body Problems – An IntroductionMicro and Nano SimulationsAstrophysicsParticle-oriented Numerical MethodsLaws of Motion
Molecular Dynamics – the Physical ModelQuantum vs. Classical MechanicsVan der Waals AttractionLennard Jones Potential
Molecular Dynamics – the Mathematical ModelSystem of ODEInitial and Boundary ConditionsComputational Domain
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 3
![Page 4: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/4.jpg)
Technische Universitat Munchen
The Simulation Pipeline – What Did We Cover So Far?
phenomenon, process etc.
mathematical model?
modelling
numerical algorithm?
numerical treatment
simulation code?
implementation
results to interpret?
visualization
�����
HHHHj embedding
statement tool
-
-
-
validation
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 4
![Page 5: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/5.jpg)
Technische Universitat Munchen
The Seven Dwarfs of HPC – Dwarf # 4
“dwarfs” = key algorithmic kernels in many scientific computingapplications
P. Colella (LBNL), 2004:
1. dense linear algebra
2. sparse linear algebra
3. spectral methods
4. N-body methods5. structured grids
6. unstructured grids
7. Monte Carlo
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 5
![Page 6: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/6.jpg)
Technische Universitat Munchen
Molecular Dynamics – Overview
• modelling aspects of molecular dynamics simulations:• why to leave the classical continuum mechanics point of view?• where appropriate?• which models, i.e. which equations?
• numerical aspects of molecular dynamics simulations?• how to discretize the resulting modelling equations?• efficient algorithms?
• implementation aspects of molecular dynamics simulations?• suitable data structures?• parallelisation?
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 6
![Page 7: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/7.jpg)
Technische Universitat Munchen
Hierarchy of Models
Different points of view for simulating human beings:
issue level of resolution model basis (e.g.!)
global increase inpopulation
countries, regions population dynamics
local increase inpopulation
villages, individuals population dynamics
man circulations, organs system simulatorblood circulation pump/channels/valves network simulatorheart blood cells continuum mechanicscell macro molecules continuum mechanicsmacro molecules atoms molecular dynamicsatoms electrons or finer quantum mechanics
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 7
![Page 8: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/8.jpg)
Technische Universitat Munchen
Scales – an Important Issue
• length scales in simulations:• from 10−9m (atoms)• to 1023m (galaxy clusters)
• time scales in simulations:• from 10−15s• to 1017s
• mass scales in simulations:• from 10−24g (atoms)• to 1043g (galaxies)
• obviously impossible to take all scales into acount in an explicit andsimultaneous way
• first molecular dynamics simulations reported in 1957
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 8
![Page 9: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/9.jpg)
Technische Universitat Munchen
More General: Particle-Oriented Simulation Methods
General Approach:
• “N-body problem”→ compute motion paths of many individual particles
• requires modelling and computation of inter-particle forces• typ. leads to ODE for particle positions and velocities
Examples:
• Molecular dynamics• Astrophysics• Particle-oriented discretisation techniques
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 9
![Page 10: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/10.jpg)
Technische Universitat Munchen
Applications for Micro and Nano Simulations
Lab-on-a-chip, used in brewing technology (Siemens)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 10
![Page 11: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/11.jpg)
Technische Universitat Munchen
Applications for Micro and Nano Simulations
Flow through a nanotube (where the assumptions of continuum mechanicsare no longer valid)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 11
![Page 12: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/12.jpg)
Technische Universitat Munchen
Applications for Micro and Nano Simulations
Protein simulation: actin, important component of muscles (overlay ofmacromolecular model with electron density obtained by X-ray
crystallography (brown) and simulation (blue))
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 12
![Page 13: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/13.jpg)
Technische Universitat Munchen
Applications for Micro and Nano Simulations
Protein simulation: human haemoglobin (light blue and purple: alpha chains;red and green: beta chains; yellow, black, and dark blue: docked stabilizers
or potential docking positions for oxygen)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 13
![Page 14: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/14.jpg)
Technische Universitat Munchen
Applications for Micro and Nano Simulations
Material science: hexagonal crystal grid of Bornitrid
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 14
![Page 15: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/15.jpg)
Technische Universitat Munchen
HPC Example – Gordon Bell Prize 2005
• Gordon-Bell-Prize 2005 (most important annual supercomputing award)• phenomenon studied: solidification processes in Tantalum and Uranium• method: 3D molecular dynamics, up to 524,000,000 atoms simulated• machine: IBM Blue Gene/L, 131,072 processors (world’s #1 in
November 2005)• performance: more than 101 TeraFlops (almost 30% of the peak
performance)
(Streitz et al., 2005)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 15
![Page 16: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/16.jpg)
Technische Universitat Munchen
HPC Example – Millennium-XXL Project
(Springel, Angulo, et al., 2010)
• N-body simulation with N = 3 · 1011 “particles”• study gravitational forces
(each “particles” corresp. to ∼ 109 suns)• simulates the generation of galaxy clusters
served to “validate” the cold dark matter model
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 16
![Page 17: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/17.jpg)
Technische Universitat Munchen
Millennium-XXL Project (2)
Simulation Figures:• N-body simulation with N = 3 · 1011 particles• 10 TB RAM required only to store positions and velocities (single
precision)• entire memory requirements: 29 TB• JuRoPa Supercomputer (Jlich)• computation on 1536 nodes
(each 2x QuadCore, i.e., 12 288 cores)• hybrid parallelisation: MPI plus OpenMP/Posix threads• execution time: 9.3 days; ca. 300 CPU years
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 17
![Page 18: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/18.jpg)
Technische Universitat Munchen
Example – Smoothed Particle Hydrodynamics
• approximate functions using kernel functions W :
f (x) ≈∫V
f (r ′)W (|r − r ′|, h) dV ′
• for h→ 0: W → δ (Dirac function)• approximation of derivatives:
∇f (x) ≈∫V
f (r ′)∇W (|r − r ′|, h) dV ′
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 18
![Page 19: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/19.jpg)
Technische Universitat Munchen
Example – Smoothed Particle Hydrodynamics (2)
• approximate integrals at particle positions:
f (ri ) ≈N∑
j=1
mj
ρ(rj )f (rj )W (|ri − rj |, h)
• similar for derivatives:
∇f (ri ) ≈N∑
j=1
mj
ρ(rj )f (rj )∇W (|ri − rj |, h)
• leads to N-body problem (based on Navier-Stokes equations, e.q.)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 19
![Page 20: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/20.jpg)
Technische Universitat Munchen
Laws of Motion
• force on a molecule: ~Fi =∑
j 6=i~Fij
• leads to acceleration (Newton’s 2nd Law):
~ri =~Fi
mi=
∑j 6=i~Fij
mi= −
∑j 6=i
∂U(~ri ,~rj )∂|rij |
mi(1)
• system of dN ODE (2nd order)(N: number of molecules, d : dimension),
• reformulated into a system of 2dN 1st-order ODEs:
~pi := mi~ri (2a)
~pi = ~Fi (2b)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 20
![Page 21: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/21.jpg)
Technische Universitat Munchen
Example: Hooke’s Law
i j
rij
• ”‘harmonic potential”’: Uharm (rij ) = 12 k (rij − r0)2
• potential energy of a spring of length r0 when extended or compressedto length rij
• resulting force:
1D : ~Fij = −gradU (rij ) = −∂U∂rij
= −k (rij − r0)
allg. : ~Fij = −k (rij − r0)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 21
![Page 22: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/22.jpg)
Technische Universitat Munchen
Example: Gravity
• attractive force due to the mass of two bodies (planets, etc.)• gravity potential: Ugrav (rij ) = −g mi mj
rij
• resulting force:
1D : ~Fij = −gradU (rij ) = −gmimj
r 2ij
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 22
![Page 23: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/23.jpg)
Technische Universitat Munchen
Example: Coulomb Potential
1q
2qr12
+ −
• attractive or repulsive force between charged particles• Coulomb potential: Ugrav (rij ) = 1
4πε0
qi qjrij
• resulting force:
1D : ~Fij = −gradU (rij ) =1
4πε0
qiqj
r 2ij
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 23
![Page 24: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/24.jpg)
Technische Universitat Munchen
Molecular Dynamics and N-Body Problems – An IntroductionMicro and Nano SimulationsAstrophysicsParticle-oriented Numerical MethodsLaws of Motion
Molecular Dynamics – the Physical ModelQuantum vs. Classical MechanicsVan der Waals AttractionLennard Jones Potential
Molecular Dynamics – the Mathematical ModelSystem of ODEInitial and Boundary ConditionsComputational Domain
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 24
![Page 25: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/25.jpg)
Technische Universitat Munchen
2. Molecular Dynamics – the Physical ModelQuantum Mechanics – a “Tour de Force”
• particle dynamics described by the Schrodinger equation• its solution (state or wave function ψ) only provides probability
distributions for the particles’ (i.e. nuclei and electrons) position andmomentum
• Heisenberg’s uncertainty principle: position and momentum can not bemeasured with arbitrary accuracy simultaneously
• there are discrete values/units (for the energy of bonded electrons, e.g.)• in general, no analytical solution available
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 25
![Page 26: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/26.jpg)
Technische Universitat Munchen
Quantum Mechanics – a “Tour de Force” (2)
• high dimensional problems: dimensionality corresponds to number ofnuclei and electrons
Ψ = Ψ(R1, . . . ,RN , r1, . . . , rK , t)
ψ - wave functionR - position of nucleusr - position of electront - time
• hence, numerical solution is possible for rather small systems only• therefore, various (simplifying and approximating) approaches such as
density functional method or Hartree-Fock approach (ab-initio MolecularDynamics, see next slide)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 26
![Page 27: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/27.jpg)
Technische Universitat Munchen
Classical Molecular Dynamics
• Quantum mechanicsapproximation−−−−−−−→ classical Molecular Dynamics
• classical Molecular Dynamics is based on Newton’s equations of motion• molecules are modelled as particles; simplest case: point masses• there are interactions between molecules• multibody potential functions describe the potential energy of the system;
the velocities of the molecules (kinetic energy) are a composition of• the Brownian motion (high velocities, no macroscopic movement),• flow velocity (for fluids)
• ab-initio Molecular Dynamics uses quantum mechanical calculations todetermine the potential hypersurface, apart from semi-empirical potentialfunctions (cf. Car Parrinello Molecular Dynamics (CPMD) methods)
• total energy is constant↔ energy conservation
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 27
![Page 28: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/28.jpg)
Technische Universitat Munchen
Fundamental Interactions
• Classification of the fundamentalinteractions:
• strong nuclear force• electromagnetic force• weak nuclear force• gravity
O
rk
ri
rj
• interaction→ potential energy• the total potential of N particles is the sum of multibody potentials:
• U :=∑
0<i<N U1(ri ) +∑
0<i<N
∑i<j<N U2(ri , rj )
+∑
0<i<N
∑i<j<N
∑j<k<N U3(ri , rj , rk ) + . . .
• there are ( Nn ) = N!
n!(N−n)! ∈ O(Nn) n-body potentials Un, particularyN one-body and 1
2 N(N − 1) two-body potentials
• force ~F = −gradU
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 28
![Page 29: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/29.jpg)
Technische Universitat Munchen
Van der Waals Attraction
• intermolecular, electrostatic interactions• electron motion in the atomic hull may result in a temporary asymmetric
charge distribution in the atom (i.e. more electrons (or negative charge,resp.) on one side of the atom than on the opposite one)
• charge displacement⇒ temporary dipole• a temporary dipole
• attracts another temporary dipole• induces an opposite dipole moment for a non-dipole atom and
attracts it• dipole moments are very small and the resulting electric attraction forces
(van der Waals or London dispersion forces) are weak and act in a shortrange only
• atoms have to be very close to attract each other, for a long distance thetwo dipole partial charges cancel each other
• high temperature (kinetic energy) breaks van der Waals bonds
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 29
![Page 30: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/30.jpg)
Technische Universitat Munchen
Well-Known Potentials
i j
rij
• some potentials from mechanics:• harmonic potential (Hooke’s law): Uharm (rij ) = 1
2 k (rij − r0)2;potential energy of a spring with length r0, stretched/clinched to alength rij
• gravitational potential: Ugrav (rij ) = −g mi mjrij
;potential energy caused by a mass attraction of two bodies (planets,e.g.)
• the resulting force is ~Fij = −gradU (rij ) = − ∂U∂rij
integration of the force over the displacement results in the energy or a potentialdifference
• Newton’s 3rd law (actio=reactio):~Fij = −~Fji
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 30
![Page 31: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/31.jpg)
Technische Universitat Munchen
Intermolecular Two-Body Potentials
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
0 0.5 1 1.5 2 2.5 3
pote
ntia
l U
distance r
hard sphere potentials
hard sphereSquare−well
Sutherland
σ
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
0 0.5 1 1.5 2 2.5 3po
tent
ial U
distance r
soft sphere potentials
soft sphereLennard−Jonesvan der Waals
σ
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 31
![Page 32: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/32.jpg)
Technische Universitat Munchen
Intermolecular Two-Body Potentials
• hard sphere potential: UHS (rij ) =
{∞ ∀ rij ≤ d0 ∀ rij > d
Force: Dirac Funktion• soft sphere potential: USS (rij ) = ε
(σrij
)n
• Square-well potential: USW (rij ) =
∞ ∀ rij ≤ d1
−ε ∀ d1 < rij < d2
0 ∀ rij ≥ d2
• Sutherland potential: USu (rij ) =
∞ ∀ rij ≤ d−εr6ij∀ rij > d
• Lennard Jones potential
• van der Waals potential UW (rij ) = −4εσ6(
1rij
)6
• Coulomb potential: UC (rij ) = 14πε0
qi qjrij
ε = energy parameterσ = length parameter (corresponds to atom diameter, cmp. van der Waalsradius)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 32
![Page 33: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/33.jpg)
Technische Universitat Munchen
Lennard Jones Potential
e s
e,s
O
ri
rj
rij
• Lennard Jones potential: ULJ (rij ) = αε((
σrij
)n−(σrij
)m)with n > m and α = 1
n−m
(nn
mm
) 1n−m
• continuous and differentiable (C∞), since rij > 0
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 33
![Page 34: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/34.jpg)
Technische Universitat Munchen
Lennard Jones Potential (2)
LJ 12-6 potential
ULJ (rij ) = 4ε((
σrij
)12−(σrij
)6)
• m = 6: van der Waals attraction (van der Waals potential)
• n = 12: Pauli repulsion (softsphere potential): heuristic• application: simulation of inert gases (e.g. Argon)
• force between 2 molecules:
Fij = − ∂U(rij )∂rij
= 24εrij
(2(σrij
)12−(σrij
)6)
• very fast fade away⇒ short range (m = 6 > 3 = d dimension)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 34
![Page 35: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/35.jpg)
Technische Universitat Munchen
LJ Atom-Interaction Parameters
atom ε σ
[1.38066 · 10−23J]a [10−1nm]b
H 8.6 2.81He 10.2 2.28C 51.2 3.35N 37.3 3.31O 61.6 2.95F 52.8 2.83
Ne 47.0 2.72S 183.0 3.52Cl 173.5 3.35Ar 119.8 3.41Br 257.2 3.54Kr 164.0 3.83
aBoltzmann-constant: kB := 1.38066 · 10−23 JK
b10−1nm = 1A (Angstom)
e s
ε = energy parameterσ = length parameter (cmp.van der Waals radius)→ parameter fitting to realworld experiments
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 35
![Page 36: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/36.jpg)
Technische Universitat Munchen
Dimensionsless Formulation
using reference values such as σ, ε, reduced forms of the equations can bederived and implemented→ transformation of the problem• position, distance
~r∗ :=1σ~r (3a)
• time
t∗ :=1σ
√ε
mt (3b)
• velocity
~v∗ :=∆tσ~v (3c)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 36
![Page 37: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/37.jpg)
Technische Universitat Munchen
Dimensionsless Formulation (2)
• potential (atom-interaction parameters are eliminated!): U∗ := Uε
U∗LJ (rij ) :=ULJ (rij )
ε= 4
((r∗ij
2)−6−(
r∗ij2)−3
)(4a)
U∗kin :=Ukin
ε=
1ε
mv2
2=
v∗2
2∆t∗2 (4b)
• force~F∗ij :=
~Fijσ
ε= 24
(2(
r∗ij2)−6−(
r∗ij2)−3
)~r∗ijr∗ij
2 (4c)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 37
![Page 38: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/38.jpg)
Technische Universitat Munchen
Skipped: Multi-Centered Molecules
CA1 CA2
CA
CB1
CB2
CB
FA1B1
FA1B2FA2B1
FA2B2
FB1A1
FB1A2
FB2A1
FB2A2
FAB
FBA
• molecules can be composed with multipleLJ-centers→ rigid bodies without internal degrees offreedom
• additionally: orientation (quarternions), angularvelocity
• additionally: moment of inertia (principal axestransformation)
• calculation of the interactions between eachcenter of one molecule to each center of theother
• resulting force (sum) acts at the center of gravity,additional calculation of torque
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 38
![Page 39: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/39.jpg)
Technische Universitat Munchen
Skipped: Multi-Centered Molecules (2)
• MBS (Multi Body System) point of view: instead of movingmulti-centered molecules, there is a holonomically constrained motion ofatoms (for a constraint to be holonomic it can be expressible as a function f (r, v, t) = 0)
• advantage: better approximation of unsymmetric molecules• there is not necessarily one LJ center for each atom
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 39
![Page 40: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/40.jpg)
Technische Universitat Munchen
Skipped: Mixtures of Fluids
• simulation of various components (molecule types)• modified Lorentz-Berthelot rules for interaction of molecules of different
types
σAB :=σA + σB
2(5a)
εAB := ξ√εaεB (5b)
with ξ ≈ 1e.g. N2 + O2 → ξ = 1.007, O2 + CO2 → ξ = 0.979 . . .
A A
B B
e ,sA A
e ,sA A
e ,sAB AB
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 40
![Page 41: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/41.jpg)
Technische Universitat Munchen
Molecular Dynamics and N-Body Problems – An IntroductionMicro and Nano SimulationsAstrophysicsParticle-oriented Numerical MethodsLaws of Motion
Molecular Dynamics – the Physical ModelQuantum vs. Classical MechanicsVan der Waals AttractionLennard Jones Potential
Molecular Dynamics – the Mathematical ModelSystem of ODEInitial and Boundary ConditionsComputational Domain
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 41
![Page 42: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/42.jpg)
Technische Universitat Munchen
3. Molecular Dynamics – the Mathematical ModelSystem of ODE
• resulting force acting on a molecule: ~Fi =∑
j 6=i~Fij
• acceleration of a molecule (Newton’s 2nd law):
~ir =~Fi
mi=
∑j 6=i~Fij
mi= −
∑j 6=i
∂U(~ri ,~rj )∂|rij |
mi(6)
• system of dN coupled ordinary differential equations of 2nd ordertransferable (as compared to Hamilton formalism) to 2dN coupledordinary differential equations of 1st order (N: number of molecules, d :dimension), e.g. independent variables q := r and p with
~pi := mi~ri (7a)
~pi = ~Fi (7b)
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 42
![Page 43: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/43.jpg)
Technische Universitat Munchen
Boundary Conditions
Initial Value Problem:position of the molecules and velocities have to begiven;initial configuration e.g.:• molecules in crystal lattice (body-/face-centered
cell)• initial velocity
• random direction• absolute value dependent of the temperature
(normal distribution or uniform), e.g.32 NkBT = 1
2
∑Ni=1 mv2
i with vi := v0
⇒ v0 :=√
3kBTm resp. v∗0 :=
√3T ∗∆t∗
Time discretisation: t := t0 + i ·∆t→ time integration procedure
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 43
![Page 44: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/44.jpg)
Technische Universitat Munchen
NVT-Ensemble, Thermostat
statistical (thermodynamics) ensemble: set of possible states a system mightbe in• for the simulation of a (canonical) NVT-ensemble, the following values
have to be kept constant:• N: number of molecules• V : volume• T : temperature
• a thermostat regulates and controls the temperature (the kinetic energy),which is fluctuating in a simulation
• the kinetic energy is specified by the velocity of the molecules:Ekin = 1
2
∑i mi~v2
i
• the temperatur is defined by T = 23NkB
Ekin
(N: number of molecules, kB : Boltzmann-constant)
• simple method: the isokinetic (velocity) scaling:
vcorr := βvact mit β =√
TrefTact
• further methods e.g. Berendsen-, Nose-Hoover-thermostat
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 44
![Page 45: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/45.jpg)
Technische Universitat Munchen
Domain
aa
b
b
• Periodic Boundary Conditions (PBC):• modelling an infinite space, built from identical cells⇒ domain with torus topology
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 45
![Page 46: Introduction to Scientific Computing II...Michael Bader – SCCS: Introduction to Scientific Computing II Molecular Dynamics Simulation, Summer Term 2012 25 Technische Universit¨at](https://reader034.vdocuments.us/reader034/viewer/2022051809/601241bacffe1734ca63e52e/html5/thumbnails/46.jpg)
Technische Universitat Munchen
Domain
• Minimum Image Convention (MIC):• with PBC, each molecule and the associated interactions exist
several times• with MIC, only interactions between the closest representants of a
molecule are taken into consideration
Michael Bader – SCCS: Introduction to Scientific Computing II
Molecular Dynamics Simulation, Summer Term 2012 46