The Nuts and Bolts of First-Principles Simulation

Download Report

Transcript The Nuts and Bolts of First-Principles Simulation

The Nuts and Bolts of
First-Principles Simulation
2: The Modeller’s
Perspective
The philosophy and ingredients of
atomic-scale modelling
Durham, 6th-13th December 2001
CASTEP Developers’ Group
with support from the ESF k Network
Nuts and Bolts 2001
Applying it
So why do we need computers?
 What does “first principles” mean?
 Potted history of simulation
 Model systems
 The horse before the cart
 Taking advantage
 Is it theory or experiment?

The Equipment
Outline
Lecture 2: the modeller's perspective
2
First principles: the whole picture
The equipment
Application
Scientific
problemsolving
“Base
Theory”
(DFT)
Implementation
(the algorithms
and program)
Setup model,
run the code
Research
output
“Analysis
Theory”
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
3
So why do we need computers?
The “many-body problem”: atoms, molecules,
electrons, nuclei... interact with each other
 Example: equations of motion
under ionic interactions

q2


Two bodies: no problem
Three bodies: the
Hamiltonian yields
coupled equations we
q1
cannot solve analytically
Nuts and Bolts 2001
F21
F23
F12
F13 F32
F31
Lecture 2: the modeller's perspective
q3
4
Theory…exactly

In a simulation we solve coupled equations
using numerical methods, e. g.


Equations of motion: molecular dynamics
Interacting electrons: “self-consistent field”
In principle we can do this with no additional
approximations whatsoever
 Contrast this with traditional theory: drastic
approximations to allow solution
 Note too the calculations have millions of
variables
numerical approach

Nuts and Bolts 2001
Lecture 2: the modeller's perspective
5
An aside: statistical
mechanics
 Pre-simulation days



Good theories of the liquid state, but solutions
possible only when atomic interactions were
simplified in the extreme
Experiments on the real liquid yield data with
which to test these approximate theories
Using simulation


The “experiment” is done on the computer: exact
answers for a model system, which may be the
same model as in the analytic theory
There’s more: simulations the only way to find
answers to the theory in 99% of cases
The subject was revolutionised
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
6
Computers and condensed matter

The Dark Ages: 1950’s


Enlightenment: 60’s, 70’s


Model systems, statistical mechanics, theory of liquids,
simple band structure...
Revolution: 1980’s


Before Computers (BC). Pencils and a slide rule
Approximations persecuted — DFT implemented
efficiently, QMC, functional development...
Superpower: 1990’s


Making it all useful: faster algorithms, supercomputers
and parallel machines, scaleable calculations
Organisation: CDG, UKCP, Grand Challenge consortia,
k...
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
7
First-principles thinking
Use quantum mechanics to describe valence
electrons: making and breaking of bonds
 Don’t use adjustable parameters to fit to data
 Make as few serious approximations as
possible in arriving at the electronic solution
Corollaries
 Extract predictions (for a model system)



Don’t interfere! Accept all the results
Know your limits

What is the confidence limit in a calculated number?
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
8
Electrons in condensed matter

H atom, 1e: undergraduate exam question
He atom 2e: no analytic solution
Condensed matter 1023 e: hopeless?

Here’s what we do

Work with a few atoms (a model system)

Describe electronic interactions from first
principles (DFT: simple, cheap, accurate, versatile)

Solve DFT equations numerically
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
9
Glimpse of the DFT equations
E  E[ (r)]   drVext (r)(r)  E KE[ (r)] EH [(r)]  E X C[ (r)]
e-nuclear
(external pot)
Kinetic
Hartree
(Coulomb e-e)
 2 2
E XC[ (r)]
  Vext (r)  VH (r) 

 i   i i
 2m
(r) 
The one-electron “effective potential”
Numerical methods



represent variables and functions
evaluate the terms
iterate to self-consistency
Nuts and Bolts 2001
Exchangecorrelation
A set of n one-electron
equations that must be
solved self-consistently

n
n
Lecture 2: the modeller's perspective

Veff
10
Some key points about DFT
DFT is a description of interacting electrons in
the ground state, including exchange and
correlation
 The basic variable is the density rather than
the wavefunction
 The theory is simple and the implementations
efficient compared with other methods
 Implementations scale at least as well as N2
 It offers an excellent balance between
accuracy and scale of calculation

Nuts and Bolts 2001
Lecture 2: the modeller's perspective
11
Section summary
First principles: quantum mechanics for
bonds, no adjustable parameters
 Numerical solutions when we have coupled
equations
 Solutions may be exact but they are nonanalytic
 Must calculate on a small model system

Nuts and Bolts 2001
Lecture 2: the modeller's perspective
12
Model systems

In this kind of firstprinciples calculation


Are 3D-periodic
Are small: from one atom
to a few hundred atoms
Supercells
 Periodic boundaries
 Bloch functions,
k-point sampling

Nuts and Bolts 2001
Bulk crystal
Slab for surfaces
Lecture 2: the modeller's perspective
13
Modelling
FP Simulation
Make a model of a real system of interest
Capture essential physics
Capture as much physics
as possible
Make virtual matter
Explore model properties and behaviour
Gain insight
Gain insight, calculate
real properties
Produce simple and transferable concepts
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
14
Control and conditions

We can manipulate the model system:
complete control




Move and place atoms
Apply strains
Try configurations
Any conditions and situations are accessible


High pressures and temperatures
Buried interfaces, porous media, nanostructures
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
15
Horse before the cart

We can calculate experimental observables



But we can also can see the underlying model and
all its details!
Contrast with the experimentalist, who must infer
properties from obervables
Great power to interpret experiment
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
16
Power to interpret
The experimentalist sees...
...but we see this too
3.5
power (arb. units)
3
2.5
QuickTime™ and a
decompressor
are needed to see this picture.
2
1.5
1
0.5
0
0
10
20
30
40
50
60
70
80
Frequency (THz)
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
17
Taking advantage

Calculate quantities for other theories



Transition states and barriers
Defect energies
Use unphysical routes, e.g. free energy
calculations


Switch from reference system to full simulation
Transmute elements
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
18
Approximations: where, how bad
The usually good: DFT within LDA, GGA
 The not bad: plane waves and
pseudopotnentials, k-point sampling, other
parameters and tolerances
 The frequently ugly: the model





Too small
Too simplistic
No relaxations
No entropy...
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
19
Computer experiments?
Have to run the program to get the answer,
just as have to do the experiment to get
results
 This is where a lot of the art of simulation lies
 Very similar to experimental technique





Calibration, testing and validation
Sample preparation (model)
Analysis
Errors and precision
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
20
Analysis

More theories applied to the raw data



Physical structure and energetics
 Crystallography, defects, surfaces, phase
stability
Electronic structure
 STM
 Optical properties
Positions and momenta
 Statistical mechanics
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
21
Is it theory or experiment?
Theory with high-quality, low approximation,
non-analytic solutions for model systems
 In its application, very much like experiment,
giving high-quality, direct results for model
systems!
 Observables can be calculated, but we also
have direct control at the atomistic level
 It has ingredients of both, and more

Nuts and Bolts 2001
Lecture 2: the modeller's perspective
22
Further reading





A chemist’s guide to density-functional theory
Wolfram Koch and Max C. Holthausen (second edition, Wiley.
ISBN 3-52730372-3)
Understanding molecular simulation
Daan Frenkel and Berend Smit
(Academic press ISBN: 0122673700
The theory of the cohesive energies of solids
G. P. Srivastava and D. Weaire
Advances in Physics 36 (1987) 463-517
Gulliver among the atoms
Mike Gillan
New Scientist 138 (1993) 34
The Nobel prize in chemistry 1998
John A. Pople and Walter Kohn
http://www.nobel.se/chemistry/laureates/1998/
Nuts and Bolts 2001
Lecture 2: the modeller's perspective
23