Practical calculations using first-principles QM Convergence, convergence, convergence

Similar documents
Convergence: How to obtain reliable results

Practical calculations using first-principles QM Convergence, convergence, convergence

10: Testing Testing. Basic procedure to validate calculations

6: Plane waves, unit cells, k- points and all that

Structural Calculations phase stability, surfaces, interfaces etc

Systematic convergence for realistic projects Fast versus accurate

Practical Guide to Density Functional Theory (DFT)

DFT / SIESTA algorithms

Density Functional Theory

First-Principles Vibrational spectroscopy and lattice dynamics of materials in the solid state

1. Hydrogen atom in a box

Electronic band structure, sx-lda, Hybrid DFT, LDA+U and all that. Keith Refson STFC Rutherford Appleton Laboratory

DFT EXERCISES. FELIPE CERVANTES SODI January 2006

Electronic structure, plane waves and pseudopotentials

Vibrational Spectroscopy Methods

Electronic Structure Theory for Periodic Systems: The Concepts. Christian Ratsch

Introduction to first-principles modelling and CASTEP

Supporting Information for. Structural and Chemical Dynamics of Pyridinic Nitrogen. Defects in Graphene

References. Documentation Manuals Tutorials Publications

Electronic Structure Methodology 1

Problem Set 2: First-Principles Energy Methods

Ab Initio modelling of structural and electronic. Matt Probert University of York

The electronic structure of materials 2 - DFT

Algorithms and Computational Aspects of DFT Calculations

Self Consistent Cycle

Tutorial on DFPT and TD-DFPT: calculations of phonons and absorption spectra

Vibrational Spectroscopy

Fundamentals and applications of Density Functional Theory Astrid Marthinsen PhD candidate, Department of Materials Science and Engineering

Chapter 3. The (L)APW+lo Method. 3.1 Choosing A Basis Set

The Plane-wave Pseudopotential Method

Solid State Theory: Band Structure Methods

The Plane-Wave Pseudopotential Method

Institut Néel Institut Laue Langevin. Introduction to electronic structure calculations

This is a repository copy of Supercell technique for total-energy calculations of finite charged and polar systems.

Bloch s Theorem: Some Notes

Norm-conserving pseudopotentials and basis sets in electronic structure calculations. Javier Junquera. Universidad de Cantabria

Density Functional Theory. Martin Lüders Daresbury Laboratory

How to run SIESTA. Introduction to input & output files

Potentials, periodicity

DFT: Exchange-Correlation

Geometry Optimisation

Geometry Optimisation with CASTEP

Supporting Information

Density Functional Theory

The Linearized Augmented Planewave (LAPW) Method

Comparison of various abinitio codes used in periodic calculations

Defects in TiO 2 Crystals

DFT and beyond: Hands-on Tutorial Workshop Tutorial 1: Basics of Electronic Structure Theory

Materials Studio 5.0: Spectroscopy Methods in CASTEP

Pseudopotentials for hybrid density functionals and SCAN

Integrated Computational Materials Engineering Education

DENSITY FUNCTIONAL THEORY FOR NON-THEORISTS JOHN P. PERDEW DEPARTMENTS OF PHYSICS AND CHEMISTRY TEMPLE UNIVERSITY

Selectivity in the initial C-H bond cleavage of n-butane on PdO(101)

Computer simulation methods (2) Dr. Vania Calandrini

MODULE 2: QUANTUM MECHANICS. Practice: Quantum ESPRESSO

Band calculations: Theory and Applications

Mustafa Uludogan 1, Tahir Cagin, William A. Goddard, III Materials and Process Simulation Center, Caltech, Pasadena, CA 91125, U.S.A.

Computational Modeling Software and their applications

Introduction to Density Functional Theory in a Plane Wave + Pseudopotential Framework

Generation of Thermal Scattering Laws for YH 2 using Ab Initio Methods

Introduction to First-Principles Method

First Principles Investigation of Structural, Electronic and Optical Properties of MgRh Intermetallic Compound

Electronic-structure calculations at macroscopic scales

Density Functional Theory (DFT)

First-principles calculations of structural, electronic and optical properties of HfZn 2

Band Structure Calculations; Electronic and Optical Properties

Many electrons: Density functional theory Part II. Bedřich Velický VI.

The Structural, Elastic, Electronic and Optical Properties of Cubic Perovskite SrVO 3 Compound: An Ab Initio Study

Recent advances in development of single-point orbital-free kinetic energy functionals

CHAPTER 3 WIEN2k. Chapter 3 : WIEN2k 50

Ab Initio Study of the Mechanical, Electronic, Thermal and Optical Properties of Ge 2 Sb 2 Te 5

Performance of MAX phase Ti 3 SiC 2 under the irradiation of He/H :

Atomic orbitals of finite range as basis sets. Javier Junquera

Lecture 3: methods and terminology, part I

The Power of FirstPrinciples Simulation

Stability, Composition and Function of Palladium Surfaces in Oxidizing Environments: A First-Principles Statistical Mechanics Approach

ELECTRONIC AND MAGNETIC PROPERTIES OF BERKELIUM MONONITRIDE BKN: A FIRST- PRINCIPLES STUDY

Charged point defects in semiconductors and the supercell approximation

Teoría del Funcional de la Densidad (Density Functional Theory)

An Introduction to Quantum Chemistry and Potential Energy Surfaces. Benjamin G. Levine

Ab Ini'o Molecular Dynamics (MD) Simula?ons

Basis sets for SIESTA. Emilio Artacho. Nanogune, Ikerbasque & DIPC, San Sebastian, Spain Cavendish Laboratory, University of Cambridge

Ab initio molecular dynamics : BO

22 Path Optimisation Methods

Accuracy benchmarking of DFT results, domain libraries for electrostatics, hybrid functional and solvation

Advanced Molecular Molecular Dynamics

221B Lecture Notes Scattering Theory II

First-principles studies of the structural, electronic, and optical properties of a novel thorium compound Rb 2 Th 7 Se 15

Table of Contents. Table of Contents Spin-orbit splitting of semiconductor band structures

Rustam Z. Khaliullin University of Zürich

Geology 2112 Principles and Applications of Geophysical Methods WEEK 1. Lecture Notes Week 1

Supporting Information. Don-Hyung Ha, Liane M. Moreau, Clive R. Bealing, Haitao Zhang, Richard G. Hennig, and. Richard D.

Phonon calculations with SCAN

and strong interlayer quantum confinement

CHE3935. Lecture 4 Quantum Mechanical Simulation Methods Continued

Prerequisites for reliable modeling with first-principles methods. P. Kratzer Fritz-Haber-Institut der MPG D Berlin-Dahlem, Germany

Supporting Information

Introduction to Parallelism in CASTEP

Quantum ESPRESSO. PWSCF: first steps

Materials that you may find helpful when working through this exercise

Transcription:

Practical calculations using first-principles QM Convergence, convergence, convergence Keith Refson STFC Rutherford Appleton Laboratory September 18, 2007 Results of First-Principles Simulations.......................................................... 2 Synopsis.............................................................................. 3 Convergence 4 Approximations and Convergence.......................................................... 5 Convergence with basis set.............................................................. 6 Error Cancellation..................................................................... 7 Plane-wave cutoff convergence/testing...................................................... 8 Pseudopotentials and cutoff behaviour....................................................... 9 FFT Grid parameters................................................................. 10 Force and Stress..................................................................... 11 Iterative Tolerances................................................................... 12 K-point convergence.................................................................. 13 Golden rules of convergence testing........................................................ 14 Structural Calculations 15 Solids, molecules and surfaces........................................................... 16 Convergence of Supercells for Molecules.................................................... 17 Variable Volume Calculations............................................................ 18 Variable Volume Calculations -II.......................................................... 19 Summary 20 Summary......................................................................... 21 1

Results of First-Principles Simulations First-principles methods may be used for subtle, elegant and accurate computer experiments and insight into the structure and behaviour of matter. First principles results may be worthless nonsense 2 / 21 Synopsis This aims of this lecture are 1. To use the examples to demonstrate how to obtain converged results, ie correct predictions from the theory. 2. How to avoid some of the common pitfalls and to avoid computing nonsense. Further reading: Designing meaningful density functional theory calculation in materials science - a primer Anne E Mattson et al. Model. Sim. Mater. Sci Eng. 13 R1-R31 (2005). 3 / 21 2

Convergence 4 / 21 Approximations and Convergence Every ab-initio calculation is an approximate one. Distinguish physical approximations Born-Oppenheimer Level of Theory and approximate XC functional and convergable, numerical approximations basis-set size. Integral evaluation cutoffs numerical approximations - FFT grid Iterative schemes: number of iterations and exit criteria (tolerances) system size Scientific integrity and reproducibility: All methods should agree answer to (for example) What is lattice constant of silicon in LDA approximation if sufficiently well-converged. No ab-initio calculation is ever fully-converged! 5 / 21 Convergence with basis set Basis set is fundamental approximation to shape of orbitals. How accurate need it be? The variational principle states that E 0 <ψ H ψ> <ψ ψ> so a more accurate representation of the orbitals ψ arising from a more complete basis set will always lower the computed ground-state energy. corollary: Error in energy δe 0 δ ψ 2. Increase size and accuracy of plane-wave basis set by adding more plane waves with higher G (increase E cut). Increase size and accuracy of Gaussian basis set by adding additional orbitals, sometimes called diffuse or polarization functions. Ad-hoc because no single parameter to tune. Whatever the basis set it is prohibitively expensive to approach full convergence. Fortunately well converged properties may frequently be computed using an incomplete basis. Size of planewave basis set governed by single parameter cut off energy (in energy units) or basis precision=coarse/medium/fine. Though E is monotonic in E c it is not necessarily regular. 6 / 21 3

Error Cancellation Consider energetics of simple chemical reaction MgO (s) + H 2O (g) Mg(OH) 2,(s) Reaction energy computed as E = E product P E reactants = E Mg(OH)2 (E MgO + E H2 O) Energy change on increasing E cut from 500 4000eV MgO -0.021eV H 2O -0.566eV Mg(OH) 2-0.562eV Convergence error in E -0.030eV Errors associated with Hatom convergence are similar on LHS and RHS and cancel in final result. Energy differences converge much faster than ground-state energy. Always use same cutoff for all reactants and products. 7 / 21 Plane-wave cutoff convergence/testing Properties of a plane-wave basis. Cutoff determines highest representable spatial Fourier component of density. Energy differences converge faster than total energies. Electron density varies most rapidly near nuclei, where it n(r) Atom 1 r Atom 2 influences bonding very weakly. E cut (and G max) depend only on types of atoms, not numbers. Simulation cutoff is maximum of individual elements/pseudopotentials. Required cutoff is system-independent but not property-independent. 8 / 21 4

Pseudopotentials and cutoff behaviour KE convergence for O With efficient pseudopotentials rate of convergence with cutoff is not always smooth. Can get plateaus or other non-asymptotic behaviour Sometimes cause is over-optimization of the pseudopotential too low a desired cutoff. In cases with this behaviour can choose criterion for convergence energy to be plateau values. Absolute energy convergence is rarely desirable. Force and stress convergence is much more useful criterion. (Example is not a pseudpotential from the CASTEP database) Kinetic energy error per electron (ev) 0.1 0.05 2s 2p 0 0 50 100 150 200 E cut (Ry) 9 / 21 FFT Grid parameters Some optimizations and tweaks of FFT grid dimensions... FFT grid should be large enough to accommodate all G-vectors of density, n(r), within cutoff: G 2G MAX. Guaranteed to avoid aliasing errors in case of LDA and pseudopotentials without additional core-charge density. In practice can often get away with 1.5G MAX or 1.75G MAX with little error penalty for LDA without core or augmentation charge. GGA XC functionals give density with higher Fourier components, and need 1.75G MAX - 2G MAX Finer grid may be needed to represent USP augmentation charges or core-charge densities. CASTEP incorporates a second, finer grid for charge density to accommodate core/augmentation charges while using G MAX for orbitals. Set by either parameter fine grid scale (multiplier of G MAX ) or fine gmax (inverse length G FINE ) fine gmax is property of pseudopotential and transferable to other cells but fine grid scale is not. (Rarely) may need to increase fine grid scale for DFPT phonon calculations using GGA functionals for acoustic sum rule to be accurately satisfied. 10 / 21 5

Force and Stress Frequently need to find crystal structure at mechanical equilibrium. Given guessed or exptl. initial structure, seek local minimum of Born-Oppenheimer energy surface generated by K-S functional. Energy minimum implies forces are zero but not vice versa. CASTEP provides for geometry optimization using quasi-newton methods. Need to worry about accuracy of forces. Forces usually converge at lower cutoff than total energy because density in region of nucleus unimportant. Convergence error 0.1 0.08 0.06 0.04 0.02 0-0.02-0.04-0.06-0.08 Cut-off convergence test cubic ZrO 2 E (ev) F (ev/a) P/1000 (GPa) P/100 (inc FSBC) -0.1 400 500 600 700 800 900 E cut (ev) different physical quantities converge at different rates. Always test convergence specifically of quantities of importance to your planned calculation 11 / 21 Iterative Tolerances How to control the iterative solvers? Parameter elec energy tol specifies when SCF energy converged. Optimizer also exits if max cycles reached always check that it really did converge. How accurate does SCF convergence need to be? Energetics: same accuracy of result. Geometry/MD: much smaller energy tolerance needed to converge forces. Cost of higher tolerance is only a few additional SCF iterations. Coming soon to a code near you elec force tol to exit SCF using force convergence criteria Inaccurate forces are common cause of geometry optimization failure. 12 / 21 6

K-point convergence Brillouin Zone sampling is another important convergence issue. Usually set in <seed>.cell with keyword kpoint mp grid p q r with optional offset kpoint mp offset. -56.36 Al k-point convergence test Smear=0.08, a0=4.04975, PBE, Ec=160eV Convergence is not variational and frequently oscillates. Even simple metals like Alneed dense meshes for primitive cell. Finite-temperature smearing can accelerate convergence, but must extrapolate the result back to 0K. In case of insulators some k-point error cancellation occurs but only between identical simulation cells. Consequently comparative phase stability energetics and surface energetics frequently demand high degree of k-point convergence. Energy (ev) -56.37-56.38-56.39-56.4-56.41-56.42 0 5 10 15 20 25 30 Monkhorst-Pack q 13 / 21 Golden rules of convergence testing 1. Test PW convergence on small model system(s) with same elements. 2. Testing requires going to unreasonably high degree of convergence, so calculations could be expensive. Test one parameter at a time. 3. Use knowledge of transferability of PW cutoff and fine gmax. 4. Don t be fooled into choosing too high a plane-wave cutoff when you are really just converging fine FFT grid. Check fine gmax for USPs. 5. Use physical k spacing to scale k-point sampling from small system to large. 6. Use forces, stresses and other cheap properties as measure of convergence. 7. May need small number of tests on full system and final property of interest (eg dielectric permittivities are very sensitive to k-point sampling). 8. Write your convergence criteria in the paper, not just 250eV cutoff and 10 k-points in IBZ. 9. Convergence is achieved when value stops changing with parameter under test, NOT when the calculation exceeds your computer resources and NOT when it agrees with experiment. 14 / 21 7

Structural Calculations 15 / 21 Solids, molecules and surfaces Sometimes we need to compute a non-periodic system with a PBC code. Surround molecule by vacuum space to model using periodic code. Similar trick used to construct slab for surfaces. Must include enough vacuum space that periodic images do not interact. To model surface, slab should be thick enough that centre is bulk-like. Beware of dipolar surfaces. Surface energy does not converge with slab thickness. When calculating surface energy, try to use same cell for bulk and slab to maximise error cancellation of k-point set. Sometimes need to compare dissimilar cells must use absolutely converged k-point set as no error cancellation. 16 / 21 Variable Volume Calculations Two ways to evaluate equilibrium lattice parameter - minimum of energy or zero of stress. Stress converges less well than energy minimum with cutoff. Incomplete basis error in stress approximated by Pulay stress correction. Jagged E vs V curve due to discreteness of N PW. Can be corrected using Francis-Payne method (J. Phys. Conden. Matt 2, 4395 (1990)) Finite-size basis corrections for energy and stress automatically computed by CASTEP. 17 / 21 8

Variable Volume Calculations -II Two possibilities for variable-cell MD or geometry optimization when using plane-wave basis set. In fixed basis size calculation, plane-wave basis N PW is constant as cell changes. Cell expansion lowers G max and K.E. of each plane wave, and therefore lowers effective E c. Easier to implement but easy to get erroneous results. Need very well-converged cutoff for success. fixed cutoff calculations reset basis for each volume, changing N PW but keeping G max and E c fixed. This is almost always the correct method to use. 18 / 21 Summary 19 / 21 Summary Used with care, first principles simulations can give highly accurate predictions of materials properties. Full plane-wave basis convergence is rarely if ever needed. Error cancellation ensure that energy differences, forces and stress converge at lower cutoff. Convergence as a function of adjustable parameters must be understood and monitored for the property of interest to calculate accurate results. Don t forget to converge the statistical mechanics as well as the electronic structure! A poorly converged calculation is of little scientific value. 20 / 21 9