systematic convergence for realistic projects from very fast to very accurate

31
Systematic convergence for realistic projects From very fast to very accurate Thanks to: J. Junquera, E. Artacho, S. Riikonen, S. García, José M. Soler, A. García and P. Ordejón Eduardo Anglada D. Sánchez-Portal

Upload: cormac

Post on 06-Feb-2016

45 views

Category:

Documents


0 download

DESCRIPTION

Systematic convergence for realistic projects From very fast to very accurate. Eduardo Anglada D. S ánchez-Portal. Thanks to: J. Junquera, E. Artacho, S. Riikonen , S. Garc í a , José M. Soler, A. García and P. Ordej ón. Basic strategy. Steps of a typical research project: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Systematic convergence for realistic projects  From very fast to very accurate

Systematic convergence for realistic projects

From very fast to very accurate

Thanks to: J. Junquera, E. Artacho, S. Riikonen, S. García,José M. Soler, A. García and P. Ordejón

Eduardo Anglada

D. Sánchez-Portal

Page 2: Systematic convergence for realistic projects  From very fast to very accurate

Basic strategy

Steps of a typical research project:

1. Exploratory-feasibility tests

2. Convergence tests

3. Converged calculations

A fully converged calculation is impossible without convergence tests

Page 3: Systematic convergence for realistic projects  From very fast to very accurate

Convergence tests• Choose relevant magnitude(s) A of the problem (e.g. an energy

barrier or a magnetic moment)

• Choose set of qualitative and quantitative parameters xi (e.g. xc functional, number of k-points, etc)

Goal: Approx. parameter independence:

Monitor:

•Convergence

•CPU time & memory

Page 4: Systematic convergence for realistic projects  From very fast to very accurate

Practical hints

•Ask your objective: find the truth or publish a paper?

•Do not try a converged calculation from the start

•Start with minimum values of all xi

•Do not assume convergence for any xi

•Choose a simpler reference system for some tests

•Take advantage of error cancellations (with care!)

•Refrain from stopping tests when results are “good”

Page 5: Systematic convergence for realistic projects  From very fast to very accurate

Almost complete parameter list for ab initio simulations

•XC functional: LDA, GGAs

•Pseudopotential

•Method of generation

•Number of valence states

•Number of angular momenta

•Core matching radii

•Nonlinear core corrections

•Basis set

•Number of functions

•LCAO:

•Highest angular momentum

•Number of zetas

•Range

•Shape (Optimized!)

•Real space mesh cutoff (Vxc) •Spin polarization

•Number of k-points •SCF convergence tolerance

•Supercell size (solid & vacuum) •Geometry relaxation tolerance

•Electronic temperature •O(N) Rc and minimization tolerance

Page 6: Systematic convergence for realistic projects  From very fast to very accurate

Parameter interactions

Number of k-points:

•Supercell size

•Geometry

•Electronic temperature

•Spin polarization

•Harris vs SCF

Mesh cutoff:

•Pseudopotential

•Nonlinear core corrections

•Basis set

•Functional: GGA

2A/xixj0

Page 7: Systematic convergence for realistic projects  From very fast to very accurate

Basis Sets

Page 8: Systematic convergence for realistic projects  From very fast to very accurate

Convergence of the basis set size

Single- (minimal or SZ)

One single radial function per angular

momentum shell occupied in the free –atom

Radial flexibilization:

Add more than one radial function with the same angular momentum: Multiple-

+ Diffuse orbitals, ghosts, ...

Angular flexibilization:

Add shells of different atomic symmetry Polarization

Ways to improve the quality

Golden Rule of Quantum Chemistry: a basis should be doubled before it’s polarized

Page 9: Systematic convergence for realistic projects  From very fast to very accurate

Convergence of the basis set size: bulk Si

Cohesion curves PW and NAO convergence

Page 10: Systematic convergence for realistic projects  From very fast to very accurate

QUALITY OF THE RESULTS WITH A SZ BASIS?

not so bad as you might expect:• energetics changes considerably; however, energy differences

might be reasonable enough• charge transfer and other basic chemistry is usually OK (at least in simple systems)• if the geometry is set to the experiment, we typically have a nice

band structure for occupied and lowest unoccupied bands

When can SZ basis sets be used: • long molecular dynamics simulations (once we have make

ourselves sure that energetics is reasonable)• exploring very large systems and/or systems with many degrees

of freedom (complicated energy landscape).

Page 11: Systematic convergence for realistic projects  From very fast to very accurate

Example of SZ calculation: very long molecular dynamics

“Atomic Layering at the liquid silicon surface: a first principles simulation”G. Fabricius, E. Artacho, D. Sánchez-Portal, P. Ordejón, D. Drabold, J. Soler

Phys. Rev. B 60, R16283 (1999)

Only the gamma k point was used in the simulations, since previous work found cell-size effects to be small. For the present calculation we used a mini- mal basis set of four orbitals and 3p for each Si atom, with a cutoff radius of 2.65 Ang. We have extensively checked the basis with static calculations of different crystalline Si phases and solid surfaces, and MD simulations of the bulk liquid. The energy differences between solid phases are described within 0.1 eV of other ab initio calculations. The diamond structure has the lowest energy, with a lattice parameter of 5.46 A Adatom- and dimer-based and surface reconstructions found in other ab initio calculations are well reproduced, with geometries and relative energies changing less than 0.1 Ang and 0.15 eV when moving from a gamma-point calculation with a minimal basis set, to a converged k sampling with double- and polarization orbitals. The structural, electronic, and dynamical properties of l - Si are in good agreement with other ab initio calculations at the same density and temperature. The calculated diffusion constant is somewhat smaller than that obtained with a double- or polarized basis which is in agreement with other ab initio simulations. We interpret that the minimal basis overesti- mates the energies of the saddle point configurations occurring during diffusion, but we consider that this is not critical for the present application

Page 12: Systematic convergence for realistic projects  From very fast to very accurate

Convergence with respect to the orbitals range

J. Soler et al, J. Phys: Condens. Matter, 14, 2745 (2002)

bulk Si

equal s, p orbitals radii

Remarks:

• May require long radii (specially in molecules/surfaces)

• Affects total energies, but energy differences converge better

• For incomplete bases (SZ), increasing radii may not produce better properties.

Page 13: Systematic convergence for realistic projects  From very fast to very accurate

E. Artacho et al. Phys. Stat. Solidi (b) 215, 809 (1999)

A single parameter for all cutoff radii

Convergence vs Energy shift ofBond lengths Bond energies

Range: Energy shift

Reasonable values for practical calculations: ΔEPAO ~50-200 meV

Page 14: Systematic convergence for realistic projects  From very fast to very accurate

Procedure to converge the basisDifference in energies involved in your problem?

•SZ: (Energy shift)

Semiquantitative results and general trends

•DZP: automatically generated (Split Valence and Peturbative polarization)

High quality for most of the systems.

Good valence: well converged results computational cost

‘Standard’

•Variational optimization

Page 15: Systematic convergence for realistic projects  From very fast to very accurate

Gold (111) surface: basis set completeness

Special thanks to S. García and P. Ordejón

Page 16: Systematic convergence for realistic projects  From very fast to very accurate

Gold (111): Wavefunctions

+3.38 eV

-0.29 eV

-0.32 eV

-1.22 eV

Page 17: Systematic convergence for realistic projects  From very fast to very accurate

Gold (111): Bulk

Siesta :DZP optimizedAbinit Siesta: DZP optim. + diffuse orbitals

Page 18: Systematic convergence for realistic projects  From very fast to very accurate

Au (111): Surface states

Siesta :DZPAbinit Siesta: DZP + diffuse orbitals

Page 19: Systematic convergence for realistic projects  From very fast to very accurate

Other Parameters

Page 20: Systematic convergence for realistic projects  From very fast to very accurate

Used to compute ρ(r) in order to calculate:

-XC potential (non linear function of ρ(r) )

-Solve Poisson equation to get Hartree potential

-Calculate three center integrals (difficult to tabulate and store)

<φi(r-Ri) | Vlocal(r-Rk) | φj(r-Rj)>

-IMPORTANT this grid is NOT part of the basis set…

is an AUXILIARY integration grid and, therefore, convergence of energy is not necessarily variational respect to its fineness.

-Mesh cut-off: highest energy of PW that can be represented with such grid.

Real-space grid: Mesh cut-off

Page 21: Systematic convergence for realistic projects  From very fast to very accurate

Important tips:• Convergence is rarely achieved for less than 100 Ry.• Values between 150 and 200 Ry provide good results in most cases• GGA and pseudo-core require larger values than other systems• To obtain very fine results use GridCellSampling• Filtering of orbitals and potentials coming soon (E. Anglada)

Convergence of energy with the grid: mesh cutoff

Page 22: Systematic convergence for realistic projects  From very fast to very accurate

Energy of an isolated atom moving along the grid

E(x)

ΔE

Δx

We know that ΔE goes to zero as Δx goes to zero, but what about the ratio ΔE/Δx?: • Tipically covergence of forces is somewhat slowler than for the

total energy• This has to be taken into account for very precise relaxations and

phonon calculations. • Also important and related: tolerance in forces (for relaxations, etc)

should not be smaller than tipical errors in the evaluation of forces.

atom

Grid points

Egg box effect

Page 23: Systematic convergence for realistic projects  From very fast to very accurate

-Only time reversal symmetry used in SIESTA (k=-k)

-Convergence in SIESTA not different from other codes:

•Metals require a lot of k-point for perfect convergence

(explore the Diag.ParallelOverK parallel option)

•Insulators require fewer k-points

-Gamma-only calculations should be reserved to really large simulation cells

-As usual, an incremental procedure might be the most intelligent approach:

•Density matrix and geometry calculated with a “reasonable” number of k-points should be close to the converged answer.

•Might provide an excellent input for more refined calculations

k-sampling

Page 24: Systematic convergence for realistic projects  From very fast to very accurate

K sampling: Al

kgrid_cutoff (Moreno and Soler, PRB 45, 13891 (1992)): Automatic generation of integration grid

kgrid_Monkhorst_Pack (Monkhorst and Pack, PRB 13, 5188 (1997)): Grid defined by hand

Page 25: Systematic convergence for realistic projects  From very fast to very accurate

DM.MixingWeight:

α is not easy to guess, has to be small (0.1-0.3) for insulator and semiconductors, tipically much smaller for metals

DM.NumberPulay (DM.NumberBroyden) : N

-| |such that

is minimum

N between 3 and 7 usually gives the best results

Convergence of the density matrix

Page 26: Systematic convergence for realistic projects  From very fast to very accurate

DM.Tolerance: you should stick to the default 10-4 or use even smaller values ……

… except in special situations:

- Preliminary relaxations

- Systems that resist complete convergence, but you are almost there

- in particular if the Harris energy is very well converged

- Warning: above 10-3 errors may be too large.

- ALWAYS CHECK THAT THINGS MAKE SENSE.

Convergence of the density matrix

Page 27: Systematic convergence for realistic projects  From very fast to very accurate

Special thanks to: S. Riikonen and D. Sánchez-Portal

More than 200 structures explored!!

A particular case: Determination of the Si(553)/Au structure

DM.Tolerance could be reduced

Page 28: Systematic convergence for realistic projects  From very fast to very accurate

i) SZ basis set, 2x1 sampling, constraint relaxations, slab with two silicon bulayers, DM.Tol=10-3

only surface layer: first relax interlayer height, then relaxations with some constraints to preserve model topology.

Selecting a subset with the most stable modelsii) DZ basis set, 8x4 sampling, full relaxation,

slab with four silicon bilayers, DM.Tol=10-3

Rescaling to match DZ bulk lattice parameter

iii) DZ basis set, 8x4 sampling, full relaxation, DM.Tol=10-4

iv) DZP basis set, 8x4 sampling, full relaxation, DM.Tol=10-4

Rescaling to match DZ bulk lattice parameter

Si(553)/Au: Incremental approach to convergence

Page 29: Systematic convergence for realistic projects  From very fast to very accurate

SZ: 88 initial structures converge to the 41 most stable different models

Already DZ recovers these as the most stable structures

All converged to thesame structure

Si(553)/Au: SZ energies might be a guide to select reasonable candidates, but… caution is needed!!!!

Page 30: Systematic convergence for realistic projects  From very fast to very accurate

Si(553)/Au: Finally we get quite accurate answer….

Page 31: Systematic convergence for realistic projects  From very fast to very accurate

Conclusions

• All the ab initio methods have approximations, and they must be carefully checked (convergence tests!!).

• The best way to handle them is an incremental approach, start from a reasonable guess and converging the parameters that control the approximations.

• In order to save computing time, use the lowest values of the parameters which provide reasonably converged results.

• There are no “magic numbers”, the effect of the parameters is system dependent.