Molecular Dynamics Simulations in Materials Science: Algorithms, Interatomic Potentials and Parallel Computing

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

MOLECULAR DYNAMICS SIMULATIONS IN MATERIALS

SCIENCE: ALGORITHMS, INTERATOMIC POTENTIALS


AND PARALLEL COMPUTING

Fabrizio CLERI

Department of Physics, University of Rome “La Sapienza”, and


ENEA, Centro Ricerche Casaccia, Roma (Italy)

Four lectures given at the Materials Science Division,


Argonne National Laboratory, Chicago, July 1997
F. Cleri – Introduction to Molecular Dynamics

© Copyright F. Cleri, University of Rome I and ENEA 1997


© Copyright F. Cleri, University of Lille I and IEMN Cnrs, 2006

Reproduction Reserved – Free for Academic use


If you use this material for your courses please send an information e-mail to the author:
cleri@casaccia.enea.it fabrizio.cleri@univ-lille1.fr

2
F. Cleri – Introduction to Molecular Dynamics

OUTLINE

(1) WHY COMPUTER SIMULATIONS, WHAT IS MOLECULAR


DYNAMICS , AND ALL OF THAT ...
(STATISTICAL MECHANICS, LAGRANGIAN / HAMILTONIAN
DYNAMICS, INTEGRATION OF THE CLASSICAL EQUATIONS OF
MOTION.)

(2) POTENTIAL THEORY (where do interatomic forces come from?):


• FROM HARTREE-FOCK, to
• DENSITY-FUNCTIONAL / LDA, to
• TIGHT-BINDING , and finally to
• EMPIRICAL POTENTIALS

(3) TWO PRACTICAL EXAMPLES:


• MOLECULAR DYNAMICS WITH QUANTUM - MECHANICAL
FORCES : LOCALIZED ELECTRONIC STATES IN GRAIN
BOUNDARIES IN Si.

• ORDER - DISORDER PHASE TRANSITION IN Cu3Au:


HOW TO OBTAIN FREE ENERGIES FROM A COUPLED
MOLECULAR-DYNAMICS AND CLUSTER-VARIATION
METHOD.

(4) MATERIALS SCIENCE AND THE NEED FOR IRREDUCIBLY


LARGE SYSTEMS:
PARALLEL COMPUTING FOR MOLECULAR DYNAMICS.

3
F. Cleri – Introduction to Molecular Dynamics

4
F. Cleri – Introduction to Molecular Dynamics
MOTIVATION : WHY ATOMIC-SCALE COMPUTER SIMULATIONS ?

THE THEORETICIANʼS APPROACH :


“By atomistic simulations I can perform a conceptual experiment
(gedankenexperiment) on a general, and even arbitrary, class of materials, in
situations that would be experimentally unattainable, such as ideal chemical
purity, extremely large strain rates and pressures or very fast heating/cooling
rates, having full control over the thermodynamical variables, full control over the
microstructure and interaction parameters (computational alchemy !).”

In this sense, atomistic simulations are complementary to experiments, in that


they give general insights which stem from the strictly theoretical formulation of
a problem.

THE EXPERIMENTALISTSʼ APPROACH :


“Thanks to the continuous increase in computer power and development of new
simulation techniques, I can use atomistic simulations in the so-called
computational materials engineering, namely, the possibility of designing a
material, or even a particular processing path to obtain that material, with the
required functional and/or structural characteristics.
Moreover, I can obtain quantitative data which are too difficult and/or too
expensive to obtain experimentally.”

In this sense, atomistic simulations could be substitutive (...) of the


experiments, and represent a sort of ideal microscope by virtue of which one
can obtain the most complete details on the system or process of interest.

5
F. Cleri – Introduction to Molecular Dynamics
STATISTICAL MECHANICS AND THERMODYNAMIC ENSEMBLES .

Without going into excessive details about the formal connection between the
kinetic theory and statistical mechanics of a classical system, we will
consider a system of N pointlike atoms, and want to be able to perform
measurements of some observable A (internal energy, pressure, specific heat,
transport coefficients, ...).

Let Γ be a point in the (6N-3)-dimensional phase space of our system.

The “ergodic hypothesis” assumes that the macroscopic statistical average


value of A over the ensemble of the microstates available to the system under
the given thermodynamic constraints is equal to the time average over a
sequence of microstates over a “long” time interval τ :

1 ⌠τ
A Macroscopic = < A >Ensemble ˜ lim τ⌡ A(Γ(t)) dt
0

The time (or “trajectory”) average must be performed under the same
thermodynamic constraints of the ensemble average that it replaces.
For example:

constant-{NVE} (number, volume and energy: “microcanonical” ensemble)

constant-{NVT} (number, volume and temperature: “canonical”)

constant-{NpT} (number, pressure and temperature: isothermal-isobaric)

constant-{µpT} (chemical potential, pressure and temperature: “grand-canonical”)

6
F. Cleri – Introduction to Molecular Dynamics
CLASSICAL DYNAMICS FROM A LAGRANGIAN POINT OF VIEW .

The time evolution of the phase-space point Γ is governed by the Newtonʼs


equations of motion for the N-atom system.

Rather than from the Hamiltonian formulation, we usually start from a


conservative Lagrangian equation of motion

d ∂L ∂L
( )
dt ∂q• - (∂qi ) = 0
i

where the Lagrangian is L = T - V , (but IMPORTANT: the Hamiltonian


H = T + V is the constant of motion !!!) the qi are generalized coordinates, and

the q i are their time derivatives (proportional to the conjugate momenta pi of
Hamilton).

The distribution of microstates generated by our Lagrangian must be consistent with


the partition function Z of the chosen thermodynamic ensemble.

_______________________________

With the standard definitions of T =Σi


1 • 2 • 2 • 2
2 mi (q ix +q iy +q iz ) (generalized kinetic energy) and V (a conservative
potential function), the equations of motion take the usual form

••
mi q i
= Fi

with the generalized forces

Fi = - Σqi V

7
F. Cleri – Introduction to Molecular Dynamics
In a rather general way, atomic coordinates Ri are expressed in a scaled form
si ∈{0,1} through the introduction of a metric tensor

G = hT ⊗ h

h being the matrix of the metric vectors {a,b,c} , such that :

Ri = h ⊗ s i cartesian coordinates

Ω = det h = a ( b ^ c ) volume

Rz
sz c

sy
0 1 0
b Ry
Rx a
1
sx

This definition is very useful because it allows any generalized variables (other
than R: chemical species, magnetic moment, spin, ...) to be attached to an atom
, or to the system as a whole.

The system is made infinite in


extent using periodic boundary
conditions. distances are
calculated using the minimum
image convention.

8
F. Cleri – Introduction to Molecular Dynamics

For example, one can consider the 9 components of h to be additional


dynamical variables, allowing the system to “reshape” in response to
internal and/or external stresses (Parrinello-Rahman method).

The new Lagrangian is written explicitly as

1 • • 1 • •
L = 2 Σ i mi s i
T
Gs i + 2 W Tr (h T
h ) - Σ i,j>i V(Rij) - pΩ

and the new ( 3N + 9 ) equations of motions become

1 ∂V
mi s
••
i
= - Σ j≠i ( )
Rij ∂Rij (s i - s j) - G -1 •
G s

i

••
Wh = (π - p) σ

with σ = Ω(hT)-1 and π the “atomic-level stress” tensor (Born &


Huang,1954)
1 1 ∂V
• 2
π = Ω Σ i mi (h s i) - Σ i,j>i Rij ∂Rij Rij Rij[ ( )]
The new constant of the motion is the "effective" Hamiltonian

1 1 • •
H = 2 Σ i mi v2i + 2 W Tr (h T
h ) + Σ i,j>i V(Rij) + pΩ

This new Hamiltonian is nothing but the enthalpy H, to an accuracy of O(3/N)

H = U + pΩ
with the internal energy:

1
U = 2 Σ i mi v2i + Σ i,j>i V(Rij)

Then the above Lagrangian generates a isoenthalpic-isobaric {N,p,H} ensemble.

9
F. Cleri – Introduction to Molecular Dynamics

INTEGRATION OF THE EQUATIONS OF MOTION : FORCES.

The first ingredient to integrate the Lagrangian / Hamiltonian eoms are


obviously the components of the total force Fi on each atom.

For an empirical potential function V, the total force is simply the


functional derivative of the potential :

1 ∂V
α
Ri
Fi
α
= - Σ j≠i [ ( )] (
Rij ∂Rij Rij )

∂V ∂f
where for a non-pair-additive V = V[f(R)] we compute ∂R = ∂R ( ) (∂V
∂f
).
Special recipes (Ewald sum) exist to evaluate infinitely-ranged forces,
such as the Coulomb 1/R potential.

For quantum-mechanical forces (e.g., tight-binding, DFT/LDA) one


makes recourse to the much celebrated Hellmann-Feynman Theorem,
which says that for a Hamiltonian depending on a perturbation parameter λ
the generalized force is

∂ ∂H (λ )
Fλ = - ∂λ < H (λ) > = < ∂λ >

For example, for a TB Hamiltonian the perturbation parameters are the


(small) displacements around the equilibrium atomic positions Ri , and the
quantum-mechanical contribution to the force on atom i is simply

∂Hkβjα
n
Fi = - 2 Σ n Σ kβjα (ckβ )* ( ∂Ri ) cjαn

10
F. Cleri – Introduction to Molecular Dynamics

INTEGRATION OF THE EQUATIONS OF MOTION : ALGORITHMS .

All integration methods are based on finite differences and are explicit-
forward in time.

Specific algorithmic requirements for Molecular Dynamics (with respect to


generic finite-difference solvers):

(1) Force calculations are CPU-demanding ➠


exclude algorithms that require more than 1 force
evaluation per time-step (ex. Runge-Kutta)

(2) Second derivatives have a “systematic” sign ➠


algorithm should be at least of 3rd order in the time-step

OPEN Algorithms

1
Euler: xn+1 = xn + h vn + 2 h2 f(xn) (essentially a Taylor
vn+1 = vn + h f(xn) expansion for x and v)

Verlet: xn+1 = 2xn - xn-1 + h2 f(xn)


vn = (xn+1 - xn-1) / 2h (velocities not needed !!)

Leap-Frog: xn+1 = xn + h vn+1/2 (strictly equivalent to


vn+1/2 = vn-1/2 + h f(xn) Verlet’s)

2 1
Beeman: xn+1 = xn + h vn + 3 h2 f(xn) - 6 h2 f(xn-1)
1 5 1
vn+1 = vn + 3 h f(xn+1) + 6 h f(xn) - 6 h f(xn-1)

11
F. Cleri – Introduction to Molecular Dynamics

CLOSED Algorithms

Gear m-th order:

Keep track of a vector containing for each atom the coordinates xn and its
first m derivatives

1 1 1
xn ={ xn ; h xʼn ; 2 h2 xʼʼn ; 6 h3 xʼʼʼn ; ... m! hm x(m)n }

PREDICT a value for a temporary set of coordinates yn (and derivatives)

yn+1 = A xn
with

1 1 1 1 1 .... .... ....


0 1 2 3 4 .... .... ....
A = 0 0 1 3 6 .... .... .... MATRIX OF THE
0 0 0 1 4 .... .... .... BINOMIAL
0 0 0 0 1 .... .... .... COEFFICIENTS
... ... ... ... ... .... .... ....

Then , CALCULATE FORCES using the predicted positions

F ( yn+1 )

And finally , CORRECT using the difference between F(yn+1) and yʼʼn+1

1
xn+1 = yn+1 + a 2 h2 [ F(yn+1) - yʼʼn+1 ]

The correction vector a is chosen on the basis of accuracy and stability


requirements. For the “standard” 5-th order Gear algorithm

3 251 11 1 1
a = { 20 , 360 , 1 , 18 , 6 , 60 }

12
F. Cleri – Introduction to Molecular Dynamics

MOLECULAR DYNAMICS BASIC REFERENCES :

G. Ciccotti and W. G. Hoover,


Molecular Dynamics Simulations of Statistical-Mechanical Systems
North-Holland, Amsterdam, 1986.
Proceedings of the 1985 Varenna School, probably the first world-wide
event in the Molecular Dynamics community. Still the best source.

M. P. Allen and D. J. Tildesley,


Computer Simulation of Liquids
Oxford Science Publications, Oxford, 1989.
A very practical book, with a number of “tricks of the trade” and
Fortran programs. Not always enough rigorous ...

G. Ciccotti, D. Frenkel and I. R. MacDonald,


Simulation of liquids and solids : molecular dynamics and Monte
Carlo methods in statistical mechanics
North-Holland, Amsterdam, 1986.
A very-well-framed historical perspective of the field: all the relevant
papers, starting with the Metropolis et al. 1954 paper, are reprinted.
Each chapter begins with an Introduction which lays down the basics
and critically comments the reprints. A “must-have” .

M. Meyer and V. Pontikis,


Computer Simulation in Materials Science: Interatomic Potentials,
Simulation Techniques and Applications,
NATO-ASI, Series E vol. 205, Kluwer, Dordrecht, 1991.
Proceedings of a NATO School in Aussois (France). Not much different
from the Varenna book, contains a few more recent applications

K. Binder and G. Ciccotti,


Monte Carlo and Molecular Dynamics of Condensed Matter Systems,
Conference Proceedings of the Italian Physical Society, vol. 49, SIF,
Bologna, 1995.
The “only-authorized-update” of the historical Varenna book above !!

13
F. Cleri – Introduction to Molecular Dynamics

14
F. Cleri – Introduction to Molecular Dynamics

POTENTIAL THEORY : THE ATOMIC MANY-BODY PROBLEM .

We start from a crystal with N atoms at positions

{Ri}i=1,N Ri=n1a+n2b+n3c

Each atom has Z electrons. The system has M=ZN electrons and N ions.

In writing down the total energy we assume:

(1) Independent-Particle (or “impulse”) approximation: each electron


moves under the effective field of the others M-1 electrons and N ions.

(2) Born-Oppenheimer approximation: the ions follow the electron motion


adiabatically (“on the energy shell”). In other words, the motion of electrons
and ions have very different relaxation times.

The atomic many-body problem requires to solve the Schrodinger


equation for the system:

Htot |Ψtot > = Etot |Ψtot >

Using (1) and (2), the total Hamiltonian of the system can be written

H tot = Σ i H i (sum of independent one-electron Hʼs)

and the total wavefunction is a (antisymmetric) product of single-electron


w.f. (a Slater determinant)

1
|Ψtot > = Πi Φi = det { Φ1(Ri), ... , ΦN(Ri) }
N

15
F. Cleri – Introduction to Molecular Dynamics

In the Hartree-Fock method the wavefunction is a variational trial function to


minimize the total energy of the electrons+ions at fixed ionic coordinates.

<Ψtot | Htot | Ψtot >


Etot = <Ψtot | Ψtot >

The Schroedinger equation for the numerator is formally written like

Htot |Ψtot > = Σ i H i |Φi (x) > = Etot Σ i |Φi (x) > x={r,σ}
r=coordinates
σ=spin

electron electron-ion
kinetic energy potential
h 2 Z e2
Hi | Φi (x) > = { - 2m S2 - Σ k | r i - Rk | +

electron-electron direct interaction


(“Hartree” potential)

| Φ (xʼ) |2
+e Σj⌠ 2 j
⌡ dx4 ʻ | r - r ʼ |
i j
} | Φi(x) > -

electron-electron correlation
(“exchange” or “Fock” potential)

Φ∗j(xʼ) Φj(xʼ)
- e2 (Σ j

⌡ dx4 ʻ | ri - rjʼ | ) |Φj(x) >

The |Φi (x) > are obtained iteratively, adjusting at each step the Hartree
and the Fock-exchange potentials to the new variational set |Φi (x) > from
the previous step , until convergence is achieved.

16
F. Cleri – Introduction to Molecular Dynamics

SIMPLIFICATIONS OF THE HARTREE-FOCK PROBLEM :


(1) DENSITY FUNCTIONAL / LOCAL-DENSITY APPROXIMATION

Slater (1951): replace the exchange potential with an average potential


based on the homogeneous electron gas (“jellium”) of density n :

3 n(r)
VSlater = -3 e2 [ 4π ] 1/3

n(r) = <Φi (r) | Φi (r)>

Hohenberg-Kohn (1964): the ground-state energy of an inhomogeneous


electron gas in a static external potential V(r) (periodic, from the ionic
lattice) is a universal function of the electron density n(r) at the point r .
DENSITY-FUNCTIONAL THEORY (DFT):

1 n(r) n(rʼ)
E = T [ n(r) ] + ⌠
⌡ V(r) n(r) dr + 2 ⌠
⌡ |r - rʼ| dr drʼ + ⌠
⌡ n(r) ε exc[n(r)]

dr
kinetic energy of electron-ion Hartree potential , Exchange-correlation
n(r)
noninteracting el. potential , Vext VH =⌠ ⌡ dr’ ,|r-r’| potential (contains all

gas with density n the non-trivial terms to E)

Kohn-Sham (1965): Introduce “localized orbitals” n0(r) , leading to M


uncoupled single-particle (i.e., no Slater determinants) equations under an
effective potential

Veff = Vext + VHartree + VKohn-Sham + ε exc

which at the self-consistency must satisfy n0(r-Ri)=n(r) (i.e., the exchange and
correlation potential is dictated by the average electron density <n>).
The K-S approximation first obtains a solution for the homogeneous electron
gas and then replaces the average density <n> with the point density n(r).
This is the LOCAL DENSITY APPROXIMATION (LDA).

17
F. Cleri – Introduction to Molecular Dynamics

FURTHER SIMPLIFICATIONS : (2) TIGHT-BINDING.

The idea of TIGHT-BINDING, or LCAO (Linear Combination of Atomic


Orbitals) is that the low-valence states which mostly contribute to the
bonding are usually strongly localized around each atomic site.

Then, one expands the w.f. on a basis set of orthornormal atomic-like


orbitals (the Lowdin expansion) , localized around each ion Ri

|Φi (r) > = Σα ciα Φα(r-Ri) = Σα ciα |Φiα >

The independent-particle Schroedinger equation using the Lowdin basis is

n n
Σα ciα H |Φiα > = ε n Σα ciα |Φiα >

multiplying on the left by < Φjβ| and using orthonormality,

Σα ciα
n
( < Φjβ | H |Φiα > - ε n < Φjβ |Φiα > ) =0

or in matrix form :
(this sometimes called the
n
Σα ciα ( Hiαjβ - ε n Siαjβ ) = 0 Roothan-Hartree-Fock equation)

which amounts to solve the secular equation det | H - ε S | = 0 .

For the TB-LCAO minimization of the total energy, loop on these two steps:

(1) the coefficients ciα are iteratively calculated, Hiαjβ and Siαjβ are fixed.

(2) then fix the ciα and recalculate self-consistently the |Φiα> .

This is the self-consistent TB method.

18
F. Cleri – Introduction to Molecular Dynamics

PRACTICAL IMPLEMENTATION OF A TIGHT-BINDING MODEL ...


(also called the EXTENDED-HUCKEL approximation)

Observations:

(1) The effective potential is very short-ranged ➠


CUT-OFF TO THE 1st or 2nd SHELL OF NEIGHBORS

(2) The most relevant physics happens in a restricted energy band ➠


USE A MINIMAL BASIS SET |Φ> (only sp3 for Si, Ge and C)

(3) The basis set is sufficiently transferable ➠


THE Hiαjβ and Siαjβ ARE JUST PARAMETERS TO BE FITTED
(on spectroscopic data, electron-structure calculations etc...)

(4) The multi-center (more than two-electron) integrals in Hiαjβ decay very
fast + the e-e (Pauli) repulsion is assumed spherically-symmetric ➠
TWO-CENTER APPROXIMATION (Slater & Koster 1954)
(CNDO/MNDO methods, very popular in chemistry)

The semi-empirical (i.e., no longer self-consistent) TB method does not


require the knowledge of the explicit form of the basis set |Φ>.

The fitting parameters Hiαjβ and Siαjβ are adjusted on a large data base
and are kept fixed during the calculation.

Energy minimization amounts to solve ONLY ONCE the (eigenvalue) secular


n
equation to obtain the coefficients (eigenvectors) ciα and eigenvalues εn.

Then, the band-structure energy is

n
EBS = Σ iα Σ n | ciα |2 ε n

19
F. Cleri – Introduction to Molecular Dynamics

The Slater-Koster two-center parameters incorporate naturally the angular


dependence of the many-body energy:

Hss = <ssσ>
<ss ">
Hspα = mα <spσ> <sp ">

Hpαpα = mα2 <ppσ>+(1-mα2)<ppπ>

Hpαpβ = mαmβ ( <ppσ> - <ppπ> )


<pp! >

<pp" >

To describe dynamical interactions between moving atoms, the Slater-


Koster parameters are multiplied by an empirical radial function,

Hiαjβ(Rij) = Hiαjβ • fαβ(Rij)

Then, to obtain the total energy, we rewrite the Hartree-Fock energy as

Etot = T + Vi-i + Vi-e + Ve-e = T + EBS + Vrep

with :
obtained from the eigenvalue problem
EBS = Vi-e + 2 Ve-e (includes all the direct eletronic interactions)

just an empirical potential V(R)


Vrep = ( Vi-i - Ve-e ) (OK at distances > Thomas-Fermi screening length)

20
F. Cleri – Introduction to Molecular Dynamics

FURTHER SIMPLIFICATIONS : (3) EMPIRICAL POTENTIALS .

If we consider all electrons “frozen” in the ground state, then the only term
describing the interaction is the classical (i.e., not explicitly quantum-
mechanical) many-body interatomic potential.

In general we can write a few-body expansion:

Va-a(Ri) = V1(Ri) + Σ j V2(Ri,Rj) + Σ j,k V3(Ri,Rj,Rk) + ... ...

The total (exact) interatomic potential is constructed as a series of one-,


two-, three-body etc. contributions.

A first, simple idea is that interatomic potentials could be originated by only


pairwise forces, i.e., the two-, three-, .... -n-body terms depend only on the
relative scalar distance Rij =|Ri - Rj| between pairs of atoms.

One of the simplest pairwise interactions is the Lennard-Jones (12-6)


potential,

VLJ(Rij) = ε [ ( Rσ )
ij
12
- ( Rσ ) ]
ij
6

Many simple systems, e.g., non-polar fluids, rare-gases, are described by


LJs with appropriate choices of the free parameters ε and σ .

Ionic systems can be fairly well described by adding to the Coulombic


interaction a “dispersion” term plus a short range repulsion of the LJ or of
the Born-Mayer type:

Zi Zj
Vionic(Rij) = 4πε0 Rij + ( RΒ )ij
m
+ Ce
-ARij

These are the so-called “Buckingham” potentials, widespread in such systems


as alkali halogenides, light-metal- and transition-metal-oxides, ternary oxides.

21
F. Cleri – Introduction to Molecular Dynamics

MORE COMPLEX INTERATOMIC POTENTIALS :


(1) TRANSITION METALS SYSTEMS.

Interatomic forces in transition metals are a complex combination of


metallic bonding (free electron-gas, parabolic density-of-states) and
angular forces resulting from unfilled d-band states.
Metals and alloys with a face-centered cubic (Ni, Cu, Pd, Ag, Au) or hexagonal-
close-packed lattice (Ti, Zr, Co, Zn) have an almost flat electron DOS.

Al (fcc) Cr (bcc) Ni (fcc)

n(E)

E E E E
f f f

In this case the SECOND-MOMENT APPROXIMATION allows to express the


binding energy as the square-root of the second moment of the DOS n(E),

UB = µ2[n(E)] = Σ i Σ j ξ2 e -αRij

where ξ is the hopping integral, i.e., the average TB matrix element


Hiαjβ (here it is just a fitting parameter, together with α).

This is a MANY-BODY potential, which cannot be written simply as sum of


contributions from interacting pairs of atoms (non-pair-additive).

By adding also a repulsive term UR we can construct a dynamically stable


potential. Such potentials (also called EMBEDDED-ATOM potentials). have
been produced and used to study thermoelastic, structural, point defect and
free surface properties of most fcc and hcp transition metals and of their
intermetallic alloys.

22
F. Cleri – Introduction to Molecular Dynamics

MORE COMPLEX INTERATOMIC POTENTIALS :


(2) COVALENT BONDING .

Materials such as Silicon, Germanium, Carbon, the III-V compounds (GaAs,


InP, etc.) are bonded by hybrid orbitals formed by combinations of s- and p-
like atomic orbitals. The DOS is characterized by a gap and the materials are
insulators or semiconductors.

The interatomic bonds are extremely strong and angular forces (i.e., three-
and four-body terms) play a dominant role.

Covalent bonding can only approximately be described by empirical potentials.


The family of the many-body, angular-force Tersoff potentials is quite popular
for elemental Si, Ge and diamond C, and for stoichiometric SiC.

A successful potential which describes several properties of crystalline Silicon


is the Stillinger-Weber potential:

VSW =Σi { 7.049 Σ ( 0.602


j R - 1) + Σ [ h(R ,R ,θ
ij
4 j,k ij ik ijk) + cycl. perm. ]}

with :
1 2
h(Rij,Rik,θijk) = 21. (cos θijk +3 ) exp [ R 1.2
- 1.8
ij
1.2
+ Rik - 1.8 ]

The three-body term is always positive whenever the bond angle among a
triplet of nearest-neighbors θijk is not equal to 109.57˚, or if cos θijk ≠ -1/3,
which forces the structure to be tetrahedrally (four-fold) coordinated, as
expected for the diamond structure of crystalline Silicon.

23
F. Cleri – Introduction to Molecular Dynamics

24
F. Cleri – Introduction to Molecular Dynamics

EXAMPLE 1:
MOLECULAR DYNAMICS STUDY OF SILICON GRAIN BOUNDARIES
WITH SEMI-EMPIRICAL QUANTUM-MECHANICAL FORCES.

Objective: study the electron localization in disordered Si grain-boundaries.

We need Molecular Dynamics, to study the evolution of the disordered


structure, plus, we need a model capable of describing electronic properties.

Tool of choice: a semi-empirical Tight-Binding model


(by I. Kwon et al., Phys. Rev. B 49 (1994) p.7242)
(with a Tersoff classical-MD preparation phase to save computation time !!!)

pi2
H= Σi 2m + Σ n <Ψn| HTB |Ψn> + Urep

The matrix elements of the Hamiltonian have the following radial form:

HTB = hα(R) = hα(R0) (RR )n


0
{ [(RRα )mα - (RRα )mα]}
exp -n
0

with different constants hα(R0) , Rα and mα for each angular momentum


wave , α = <ssσ>, <spσ>, <ppσ> and <ppπ> .

The repulsive potential is a Tersoff-like many-body empirical interaction:

Urep= Σ i f [ Σ j V(Rij) ]

with

f(x) = c0 + c1 x + c2 x2 + c3 x3 + c4 x4

V(R) = (RR )p
0
exp -p{ [(RRq )q - (RRq )q]}
0

25
F. Cleri – Introduction to Molecular Dynamics

PROBLEM: WHAT IS THE “TRUE” STRUCTURE OF A HIGH-ENERGY GB ?

PREVIOUS STUDIES EMPLOYED STANDARD ZERO-TEMPERATURE RELAXATION, BY


SEARCHING THE MINIMUM ENERGY CONFIGURATION AROUND DIFFERENT
TRANSLATIONAL STATES OF THE GRAIN-BOUNDARY SYSTEM.

TRANSLATION !
VECTOR

FOR HIGH-ENERGY GBs THERE IS NO WELL-DEFINED STABLE MINIMUM-ENERGY


CONFIGURATION AGAINST TRANSLATIONS.

ALL CONFIGURATIONS ARE SEVERELY DISORDERED AND CONTAIN MANY


COORDINATION DEFECTS.

26
F. Cleri – Introduction to Molecular Dynamics

HIGH - TEMPERATURE EQUILIBRATION CYCLE

2000

melting
1500
TEMPERATURE (K)

1000

TERSOFF
classical MD
500
TB MD

0
0 10 20 30 40 50 60 70
TIME (psec)

HIGH-TEMPERATURE RELAXED Si Σ5 GRAIN BOUNDARY

27
F. Cleri – Introduction to Molecular Dynamics

CALCULATION OF ATOMIC-STRUCTURE QUANTITIES

THE RESULTING GB CONFIGURATION HAS THE TYPICAL STRUCTURAL FEATURES


OF AMORPHOUS-Si, e.g, THE PAIR-DISTANCE ( g(r) ) AND BOND-ANGLE- ( P(cosθ) )
DISTRIBUTION FUNCTION.

a-Si (a) a-Si (b)


GB
GB

P(cos !)
g(r)

0 0.25 0.5 0.75 1 -1 -0.5 0 0.5 1


r (a 0 ) cos !

THE AVERAGE COORDINATION IN THE GB REGIONS IS 4.07. THIS MEANS THAT THE
DISORDERED LAYER CAN SUSTAIN THE PRESENCE OF A SMALL CONCENTRATION
OF COORDINATION DEFECTS IN THERMAL EQUILIBRIUM.

28
F. Cleri – Introduction to Molecular Dynamics

CALCULATION OF ELECTRONIC -STRUCTURE QUANTITIES

Electronic density of states (i.e., FREQUENCY HISTOGRAM OF THE


EIGENVALUE DISTRIBUTION IN ENERGY) around coordination defects
(3-fold and 5-fold coordinated atoms) and around a 4-fold coordinated GB atom
with distorted bonds.

3-fold
ELECTRONIC DENSITY OF STATES

4-fold

5- f ol d

-6 -4 -2 0 2 4 6
Energy (eV)

29
F. Cleri – Introduction to Molecular Dynamics

CORRELATION BETWEEN ELECTRONIC GAP STATES AND THE


PRESENCE OF COORDINATION DEFECTS IN THE STRUCTURE.

LOCALIZATION INDEX :

(n ) 4
(n )
L
i = #" c i"

REPRESENTS THE CONTRIBUTION OF EACH SITE TO A SPECIFIC EIGENVALUE.


WE DEFINE A STATE TO BE AT LEAST PARTIALLY LOCALIZED AT SOME SITE IF
!
L ≥ 0.15

1.00

0.75

perfect-crystal band gap


[5 ]
[5 ]
Energy (eV)

0.50
[5 ] [5 ] [3 ]

0.25 [5 ]

0.00

-0.25

-0.50

• ALL THESE ATOMS ARE WITHIN THE GB REGIONS.


BY SUMMING UP THE L-VALUES FOR ALL THESE ATOMS WE OBTAIN VALUES OF
ABOUT 0.7-0.8 FOR THE EIGENVALUES OF GAP STATES AND MOST EDGE STATES.

CONCLUSION: GAP- AND EDGE-STATES IN Si GRAIN BOUNDARIES TEND TO BE


LOCALIZED IN THE 2-D CONFINED-AMORPHOUS (DISORDERED) LAYER.

30
F. Cleri – Introduction to Molecular Dynamics

EXAMPLE 2:
FREE ENERGIES OF DISORDERED SOLIDS FROM A COUPLED
MOLECULAR-DYNAMICS AND CLUSTER-VARIATION METHOD.

Objective: study the thermodynamics and, possibly, kinetics of order-


disorder phase transitions in the prototypical alloy Cu3Au.

We need Molecular Dynamics, to study the thermal evolution of the structure,


plus, we need a model capable of describing the disordering entropy
contribution to the free energy of the transformation.

Tool of choice: an empirical potential for metals to do classical Molecular


Dynamics, coupled to the Cluster-Variation method to obtain free energies.
(by F. Cleri et al., Phys. Rev. B 47 (1993) p.14541)

Interatomic potential for Cu3Au : a second-moment , electron-density-


based many-body potential :
(by F. Cleri et al., Phys. Rev. B 47 (1993) p.22)

mv i2
Etot = Σ i { 2 + [Σ j Φ e -β (Rij/R0 -1) - Σ j ξ2 e -α (Rij/R0 -1) ]}
with :
Cu-Cu Au-Au Cu-Au
m 63.54 196.97 -
R0 (Å) 2.556 2.884 2.642
Φ (eV) 0.0855 0.2061 0.1539
β 10.96 10.229 11.05
ξ (eV) 1.224 1.79 1.5605
α 2.278 4.036 3.0475

fitted on the T=0 cohesive and elastic properties of pure Cu3Au .

31
F. Cleri – Introduction to Molecular Dynamics

PROBLEM : WE WANT TO DESCRIBE THE CHANGE IN THE


OCCUPATION PROBABILITIES OF THE f.c.c. LATTICE BASIC
TETRAHEDRON UPON INCREASING TEMPERATURE ABOVE THE
CRITICAL VALUE Tc (expt. value Tc=663 K).
OCCUPATION
ORDERED:
1 Au
3 Cu

OCCUPATION
DISORDERED:
1/4 Au +
3/4 Cu

Phase transformation at Tc occurs because of the free-energy competition


between ENTHALPY and ENTROPY.

G(T) = H(T) - T ( Sconf(T) + Svibr(T) + Selec(T) )

ISSUES :

(1) Electronic entropy is negligible ( TΔSelec(T) ˜ kB2π2Tn(εF)/3 = 4x10- 4 eV/atom)

(2) constant-{NpT} Molecular Dynamics gives access to the enthalpy H, but not
to entropy terms.

32
F. Cleri – Introduction to Molecular Dynamics

SOLUTION : Write the thermodynamic order parameters η and σ in


terms of occupation probabilities for the tetrahedron vertexes (one vertex
per sub-lattice, 3 sub-lattices occupied by Cu and the 4th by Au atoms), and
use the cluster-variation method for estimating the configurational entropy.

wijkl is the probability that a basic tetrahedron is occupied by the sequence ijkl.
(For example, if Cu=1 and Au=2, the sequence 1121 is Cu-Cu-Au-Cu. The
T=0 K “ordered” sequence is 1112)

Sum rules : Σ ijkl wijkl = 1 (normalization)


Σ kl wijkl = yij (probability of an ij sequence on a bond)
Σ jkl wijkl = xi (concentration of species i in one sublattice)

Long-range order parameter η (Bragg-Williams) : expresses the total


probability that the Au sublattice is really occupied by Au atoms.

( x4 - 1/4 ) 1
η = ( 1 - 1/4 ) = 6 Σ ijkl Hijkl wijkl

where Hijkl = hij+hik+hil+hjk+hjl+hkl and hαβ = (-1)β for β=i,j,k, (-1)β+1 for β=l.

Short-range order parameter σ (Bethe) : expresses the total probability


that each Au atom is surrounded by 12 Cu neighbors.
( nCuAu - 9 ) 1
σ= 3 = 6 Σ ijkl Kijkl wijkl

where Kijkl = kij+kik+kil+kjk+kjl+kkl and kαβ = (5 -8 δαβ) .

Configurational entropy at fixed η and σ :

5
Sconf = - NkB { 4 Σ ijkl [ L(xi) + L(xj) + L(xi) + L(xj) ]
- Σ ijkl [ L(yij) + L(yjk) + L(yjk) + L(yil) + L(yjl) + L(ykl) ] + 2 Σ ijkl L(wijkl) }

with L(z) = z log z - z .

33
F. Cleri – Introduction to Molecular Dynamics

Given the expression of the order parameters in terms of the occupation


probabilities , we can write also the enthalpy and vibrational entropy .

Enthalpy: perform many Molecular Dynamics simulations of Cu3Au at


different temperatures T, in configurations with well-defined quenched
disorder (i.e., fixed η and σ).

Obtain a matrix of values H(η,σ ,T) (we had about 300 different values) and
make a multi-linear fit. The best fitting function is

H(η ,σ,T) = U0 + cpT


+ 21.795 (1 + 0.5014η 2 - 1.46σ + 1.28x10- 4η T + 2.15x10- 4σT)

For the vibrational entropy we use the quasi-harmonic approximation and


the virtual crystal method (F. Cleri et al., Phil. Mag. Lett. 67 (1993) 761)

ωmax
Svibr(T) = kB ⌠
⌡ dω g(ω) {-log[2sinh(2khωBT )] + 2khωBT ( hω
coth 2k T
B
)}
0

and use the trial expression

Svibr(η,T) = Svibr(T) - 0.0103 (1 - η)m, m=0,1,2

34
F. Cleri – Introduction to Molecular Dynamics

Now we have a complete expression for the free energy , in terms of the
occupation probabilities wijkl of the basic tetrahedra:

G(wijkl ) = H(wijkl ) - T [ Sconf(wijkl ) + Svibr(wijkl ) ]

At fixed temperature T we can minimize the expression for G with respect


to the values wijkl and use this minimizing set to calculate back the values
of the order parameters η and σ at that temperature:

This is the CLUSTER VARIATION method, minimized with the “natural


iteration” technique by Kikuchi (1956).

We obtain an excellent reproduction of the transition temperature,


Tc=635 K, i.e., within 10% of the experimental value.
Also the latent volume and the latent heat of transformation are in the
correct range.

Most importantly, however, the above curves allow to discriminate the


kinetic mechanism of the phase transformation.

35
F. Cleri – Introduction to Molecular Dynamics

36
F. Cleri – Introduction to Molecular Dynamics

ATOMISTIC COMPUTER SIMULATIONS IN MATERIALS SCIENCE .

Materials science problems often require the simulation of

• systems with an irreducibly-large unit cell (amorphous materials


fullerites, schwartzites, zeolites) or

• systems containing extended defects (dislocations, cracks, grain


boundaries).

Current limits on the fastest single-processor computers (Cray C-90, IBM


990S, Digital Alpha 7500) can be roughly quantified as follows :

• about 500,000 atoms (forces, coordinates and 5th derivatives in


double precision) can fit into the work area of a processor equipped
with 128 Mb RAM.

• for a simple pair-wise Lennard-Jones potential with a cut-off radius


including 3rd neighbors in the fcc lattice, the CPU time for a 500,000
atom system is about 60 seconds/time-step on a processor capable
of about 400 Mflops (Alpha 7500).

Simulation of extended defects (cracks, dislocation forests) easily


requires systems with sizes in the range of several 106 atoms.

Similarly, more complex potential functions, or quantum-mechanical


force calculations (TB or DFT), require such long times per time-step that
the maximum size of the system is restricted to a few 100 atoms at most.

The only solution can derive from parallel processing on a multi-processor


computer (IBM SP2, Cray T3E, INTEL Paragon, Connection Machine CM5,
etc ...).

A new logic approach and new programming tools are also needed, to
organize and exchange information among the different processing units.

37
F. Cleri – Introduction to Molecular Dynamics

PARALLELIZATION STRATEGIES FOR A MOLECULAR DYNAMICS CODE.

We have fundamentally 3 choices in the modern informatic jungle:

• REPLICATED DATA
All processors have locally a copy of all the data necessary to the
calculation. However, each processor works on a portion of the data, and
one master processor gathers and summarizes the individual results.
PRO: Very simple programming, inter-processor data exchange restricted to
a minimum.
CON: Extremely memory-consuming, limited to the maximum system size on
one single processor.

• FORCE DECOMPOSITION
Each processor builds and uses only a portion of the force matrix (or the
Hamiltonian matrix in q.-m. calculations), without regard to the spatial location
of the atoms/electrons giving rise to the different elements of the matrix.
PRO: It is the only tool for diagonalization of a large Hamiltonian matrix. Also,
very useful when the number of interactions to compute is much larger than
the number of atoms in the system (e.g., Coulombic interactions).
CON: it can be very difficult to program; moreover, loosing the reference to
the spatial location of the atoms can be source of wasted and inefficient inter-
processor communications.

• DOMAIN DECOMPOSITION
Each processor works on the atoms contained inside a compact region
of space. Interactions along the border of such region require knowledge of
what is happening to the atoms in neighboring regions (i.e., on the
“logically adjacent” processors).
PRO: Relatively easy to program, requires some topology work to be made
efficient; can reach the limits of extremely large sizes (100ʼs millions of atoms
on very large parallel computers).
CON: The strategy and topology of the huge amount of inter-processor
communication required must be treated very carefully, otherwise efficiency is
very poor.

38
F. Cleri – Introduction to Molecular Dynamics

WHAT DOES IT MEAN “PARALLEL COMPUTING” ?

In a typical program some tasks can be performed indipendently, while


other require the simultaneous presence of all the necessary data.
Independent tasks can be dispatched on different processors in parallel.

Example: a monkeyʼs Molecular Dynamics code.

TASK TASK TYPE WHAT TO DO

INITIALIZE COORDINATES PARALLEL SPLIT THE DO-LOOPS

PREDICT NEW PARALLEL SPLIT THE DO-LOOPS


COORDINATES
TRANSFER COORDINATE PARALLEL SEND ARRAYS TO
INFORMATION COMMUNICATION NEIGHBOR PROCESSORS
CALCULATE FORCES PARALLEL SPLIT THE DO-LOOPS

CORRECT NEW PARALLEL SPLIT THE DO-LOOPS


COORDINATES
CALCULATE AVERAGE SEQUENTIAL CYCLE GLOBAL SUMS
QUANTITIES COMMUNICATION

39
F. Cleri – Introduction to Molecular Dynamics

HOW CAN I DO “PARALLEL COMPUTING” ?

The building blocks of a parallel applications are communication primitives,


machine-specific software calls capable of handling I/O calls and requests
between different processors (sequences of sw interrupt).

The basic communication tools made from such primitives are :

BROADCAST to send the same information to all processors

SEND to send information from one processor to another

RECEIVE to receive information from another processor

SYNCHRONIZE a “barrier” to stop the elaboration until all processors reach


it with an “everything is ok” signal.

Communications can be blocking, when the elaboration stops until the


receiving processor has completed the reception, or non-blocking, when the
elaboration resumes immediately after the sending processor has completed
the sending.

Many substantially equivalent communication libraries are around:


PVM, P4, MPI, TCGMSG, .... A typical TCGMSG Fortran call:

CALL RCV (type, BUF, lenght, lenmes, noderec, nodefrom, sync)

type = message identification tag


BUF = name of the array to receive
length = expected length of the array to receive (in bytes)
lenmes = actual length of the array received, for checking purposes
noderec = processor from which the array should arrive
nodefrom = processor from which the array actually arrived
sync =synchronous or asynchronous call (equivalent to blocking/non-blocking)

40
F. Cleri – Introduction to Molecular Dynamics

EXAMPLE OF A TCGMSG Fortran MD CODE :

A replicated data program with force decomposition : all processors have


all the data, but they contribute each other to the calculation of forces.

PROGRAM MD
#include "tcgmsg.fh"
[...........]
CALL PBEGINF
MYNOD = NODEID ()
NPROC = NNODES ()
[...........]
C READ INPUT DATA, INITIALIZE THE CALCULATION
[...........]
C Molecular Dynamics MAIN LOOP
DO ITIME=1,NTMAX
[...........]
CALL PREDICTOR (... ... ... )
C Broadcast predicted new coordinates to all processors
CALL SYNCH (nn1)
CALL BRDCST (msgid, RX, natoms*8, 0)
CALL BRDCST (msgid, RY, natoms*8, 0)
CALL BRDCST (msgid, RZ, natoms*8, 0)
[...........]
CALL FORCES (... ... ... )
CALL SYNCH (nn2)
IF (MYNOD. NE. 0) THEN
CALL SND (msgid, FORCEX, natoms*8, 0, 1)
CALL SND (msgid, FORCEY, natoms*8, 0, 1)
CALL SND (msgid, FORCEZ, natoms*8, 0, 1)
ELSE
DO nk=1,NPROC
CALL RCV (msgint, FORCEX, natoms*8, length, nk, n0, 1)
CALL RCV (msgint, FORCEY, natoms*8, length, nk, n0, 1)
CALL RCV (msgint, FORCEZ, natoms*8, length, nk, n0, 1)
END DO
END IF
CALL CORRECTOR (... ... ... )
[...........]
END DO ! End-do main MD loop
CALL PENDF
STOP
END

41

You might also like