Algorithms for Total Energy and Forces in Condensed-Matter DFT codes IPAM workshop “Density-Functional Theory Calculations for Modeling Materials and Bio-Molecular Properties and Functions” Oct. 31 – Nov. 5, 2005 P. Kratzer Fritz-Haber-Institut der MPG D-14195 Berlin-Dahlem, Germany
26
Embed
Algorithms for Total Energy and Forces in Condensed-Matter DFT codes
Algorithms for Total Energy and Forces in Condensed-Matter DFT codes. IPAM workshop “Density-Functional Theory Calculations for Modeling Materials and Bio-Molecular Properties and Functions” Oct. 31 – Nov. 5, 2005 P. Kratzer Fritz-Haber-Institut der MPG D-14195 Berlin-Dahlem, Germany. - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Algorithms for Total Energy and Forces in Condensed-Matter DFT codes
IPAM workshop “Density-Functional Theory Calculations for Modeling Materials and Bio-Molecular Properties and Functions”
Kohn & Hohenberg (1965)For ground state properties, knowledge of the electronic density (r) is sufficient. For any given external potential v0(r), the ground state energy is the stationary point of a uniquely defined functional
)()(][][ 00rvrdrEv F
Outline
• flow chart of a typical DFT code• basis sets used to solve the Kohn-Sham equations• algorithms for calculating the KS wavefunctions and KS
band energies• algorithms for charge self-consistency• algorithms for forces, structural optimization and
molecular dynamics
for all k determine wavefunctions spanning the occupied space
initialize charge density
initialize wavefunctions
forces converged ?
forces small ?
construct new charge density
determine occupancies of states
energy converged ?
move ions STOP
STOPyesstatic run
yesrelaxation run or molecular dynamicsno
no
yes
yes
no
DFT methods for Condensed-Matter Systems
• All-electron methods
• Pseudopotential / plane wave method: only valence electrons (which are involved in chemical bonding) are treated explicitly
1) ‘frozen core’ approximation
2) fixed ‘pseudo-wavefunction’ approximation
projector-augmented wave (PAW) method
Pseudopotentials and -wavefunctions
• idea: construct ‘pseudo-atom’ which has the valence states as its lowest electronic states
• preserves scattering properties and total energy differences
• removal of orbital nodes makes plane-wave expansion feasible
• limitations: Can the pseudo-atomcorrectly describe the bonding in different environments ? → transferability
1. All-electron: atomic orbitals + plane waves in interstitial region (matching condition)
2. All-electron: LMTO (atomic orbitals + spherical Bessel function tails, orthogonalized to neighboring atomic centers)
3. PAW: plane waves plus projectors on radial grid at atom centers (additive augmentation)
4. All-electron or pseudopotential: Gaussian orbitals5. All-electron or pseudopotential: numerical atom-centered
orbitals6. pseudopotentials: plane waves
Basis sets used to represent wavefuntions
LCAOsLCAOs
LCAOsLCAOs
PWs
Implementations, basis set sizes
implementation(examples)
bulk compound
surface,oligo-peptide
1 WIEN2K ~200 ~20,000
2 TB-LMTO ~50 ~1000
3 CP-PAW, VASP, abinit 100..200 5x103…5x105
4 Gaussian,Quickstep, …
50-500 103…104
5 Dmol3 ~50 ~1000
6 CPMD, abinit, sfhingx, FHImd
100..500 104…106
Eigenvalue problem: pre-conditioning
• spectral range of H: [Emin, Emax]in methods using plane-wave basis functions dominated by
kinetic energy; • reducing the spectral range of H: pre-conditioning
H → H’ = (L†)-1(H-E1)L-1 or H → H’’ = (L†L)-1(H-E1)
C:= L†L ~ H-E1• diagonal pre-conditioner (Teter et al.)
;2718128
27181281623
234
xxx
xxxxC cutETx /ˆ
)2(~ 22max ecutcut mkEE
Eigenvalue problem: ‘direct’ methods
• suitable for bulk systems or methods with atom-centered orbitals only
• full diagonalization of the Hamiltonian matrix• Householder tri-diagonalization followed by
– QL algorithm or– bracketing of selected eigenvalues by Sturmian sequence
→ all eigenvalues j,k and eigenvectors j,k • practical up to a Hamiltonian matrix size of ~10,000
– Broyden mixing schemes: iterative update of Jacobian J
idea: find approximation to during runtimeWIEN2K: mixer
– Pulay’s residuum minimization
inj
jjin fR 2
,,,][
kkk
][ )()()1( iin
iin
iin R
i
Nij
jinj
iin
iin R ][ )()()1(
;
,
1
1
kllk
llj
j A
A ][|][ )()( l
inkinlk RRA
);(][ scR J ]);[][(1 XCHartree VVJ
Total-Energy derivatives
• first derivatives– Pressure – stress– forces
Formulas for direct implementation available !• second derivatives
– force constant matrix, phonons
Extra computational and/or implementation work needed !
)()()( 2nOnEnnE SCFSCF
VEp
ijij E
REF
Hellmann-Feynman theorem
• Pulay forces vanish if the calculation has reached self-consistency and if basis set orthonormality persists independent of the atomic positions
1st + 3rd term =
• FIBS=0 holds for pure plane-wave basis sets (methods 3,6), not for 1,2,3,5.
k
kkkkk
k HH
H,
,,,,,
, ||||||j
jjjjj
j
dR
d
dR
d
dR
ddR
dEF
kkk
k ,,,
, | jjj
j
IBS
dRdF
Forces in LAPW
FACTIBScoreHF FFFFFF
R
E
R
VF ionion
jj
effj
HF
k
kk,
,, ||
dSTdSTFMTr
jjj MTr
jjT
kk
kkk ,,
,,,
ˆˆ
rrr dVnF effcorecore )()(
0FACF
Combining DFT with Molecular Dynamics
• Born-Oppenheimer MD • Car-Parrinello MD
construct new charge density and potential
|| (i) –(i-1) ||=0 ?
|| (i) –(i-1) ||=0 ?
{(i-1)}→ {(i)}
move ions
Forces converged?
construct new charge density and potential
|| (i) –(i-1) ||=0 ?
|| (i) –(i-1) ||=0 ?
{(i-1)}→ {(i)}
move ions
Forces converged?
Car-Parrinello Molecular Dynamics• treat nuclear and atomic coordinates on the same footing:
generalized Lagrangian
• equations of motion for the wavefunctions and coordinates
• conserved quantity• in practical application: coupling to thermostat(s)
kkk ,,,, nn
njjj H
RE jtotjjj
,,,,,
kkkk
REL jtotjjj
,,,,,
kkkk
FRM
Schemes for damped wavefunction dynamics
• Second-order with damping
numerical solution: integrate diagonal part (in the occupied subspace) analytically, remainder by finite-time step integration scheme (damped Joannopoulos), orthogonalize after advancing all wavefunctions
• Dynamics modified to first order (Williams-Soler)
kkkk ,,,, )( jjjj H
kkk ,,, )( jjj H
)(,
)(,,
)1(, )ˆ()]ˆ(exp[ i
javgijjavg
ij VVVT kkkk
Comparison of Algorithms (pure plane-waves)
bulk semi-metal (MnAs), SFHIngx code
Summary
• Algorithms for eigensystem calculations: preferred choice depends on basis set size.
• Eigenvalue problem is coupled to charge-consistency problem, hence algorithms inspired by physics considerations.
• Forces (in general: first derivatives) are most easily calculated in a plane-wave basis; other basis sets require the calculations of Pulay corrections.
Literature
• G.K.H. Madsen et al., Phys. Rev. B 64, 195134 (2001) [WIEN2K].• W. E. Pickett, Comput. Phys. Rep. 9, 117(1989) [pseudopotential
approach].• G. Kresse and J. Furthmüller, Phys. Rev. B 54, 11169 (1996)
[comparison of algorithms].• M. Payne et al., Rev. Mod. Phys. 64, 1045 (1992) [iterative
minimization].• R. Yu, D. Singh, and H. Krakauer, Phys. Rev. B 43, 6411 (1991)
[forces in LAPW]. • D. Singh, Phys. Rev. B 40, 5428(1989) [Davidson in LAPW].