Questaal Home
Navigation

Velocity matrix elements in lmf

Summary

This page describes how lmf computes optical matrix elements of the velocity operator when the one-particle Hamiltonian contains a non-local self-energy (for example the quasiparticle self-energy of the GW approximation). For a local potential the velocity equals the momentum, , and the matrix elements of are what lmf normally computes. With a non-local the velocity acquires an additional term, , which is the subject of this page.

The correction is selected with the input-file token OPTICS_MEFAC. Summary of the modes:

OPTICS_MEFACMethodStatus
0none: momentum matrix elements onlydefault
1 from the phase derivative of the Bloch sum (no explicit basis-function X term)approximate
2scissors-like rescaling of the matrix elements by a ratio of quasiparticle to LDA transition energiesapproximate
3exact basis-set form: from and the position matrix Xrecommended
4diagnostics: finite-difference self-checks of the ingredients of mefac=3 and 5; no correction applieddiagnostic use only
5commutator form in the eigenfunction basisdeprecated (ill-conditioned for a real )

For a real self-energy use OPTICS_MEFAC=3. In the LDA () modes 3 and 5 give exactly.

Table of Contents

Theory

Units are Rydberg atomic units, , so that . The velocity operator is the derivative of the Bloch Hamiltonian with respect to ,

Write with . The exchange-correlation potential is local, so it commutes with the position operator . The LDA kinetic term gives the momentum operator, while is non-local and . Thus

lmf always computes the matrix elements of between LDA-basis eigenfunctions (the usual optics path). The correction is added to them.

The commutator form is preferred over the equivalent because the relation holds only to in an incomplete basis. Using the commutator with only, the basis-set error enters through the correction alone.

Position matrix in the basis

For basis functions $$\alpha\rangle=e^{i\mathbf k\cdot\mathbf r}u_\alpha\rangle$$ define

including the origin shift of the site on which is centred. It is not Hermitian; instead

where is the overlap matrix. In the eigenfunction basis, , where are the eigenvectors of .

Position matrix elements between eigenstates

The Hermitian position matrix is

with . This follows from together with the LDA relation. The factor is the source of the ill-conditioning of mefac=5 (see below).

Convention for optme

The optics matrix elements stored in lmf (optme) are . In particular . The factor was calibrated numerically: for (switch --xlam=) the corrected velocity must equal . With one finds over all points and directions (Si+2E; relative residual to , a direct measure of the basis-set error of ). The corrected elements are

Implementations

mefac=1: Bloch-sum phase derivative

is constructed in the orbital basis as a Bloch sum of real-space matrix elements, . Differentiating the phase gives

(dsdk, from hambldsdk). It is added to the optical matrix element in fpopm as ( = lattice constant). This correction does not include the explicit -dependence of the basis functions themselves (the X term of mefac=3); it is only as good as the lattice-phase derivative of . A nonlocal must be read (see HAM_RDSIG).

mefac=2: scissors-like

A first band pass with the LDA Hamiltonian gives eigenvalues ; a second pass with gives . Matrix elements for a transition are scaled,

(in optsf; the factor is capped at maxfac, and pairs on the same side of the Fermi level, or with tiny , are skipped). The scaling is exact only for a scissors-like (a constant shift between occupied and empty states, or ), and is an approximation otherwise. It is a weak reference when LDA and GW states differ considerably (e.g. SrTiO).

Starting from the commutator expression, with evaluated in the eigenfunction basis and the position matrix expressed through X,

Here in the second term is (an matrix in the eigenfunction basis) and the first term is the explicit -dependence of in the orbital basis. No energy denominators appear, so the expression is well conditioned even when states are degenerate.

  • The complete eigenfunction basis is required (). lmf sets nevmx=ndhamx for mefac=3, and xposop stops with an error otherwise.
  • is computed analytically (dsigmod, hambls with lwsig=5). This is automatic for mefac=3. The switch --xdskfd selects central finite differences instead.
  • Requires --v8, no APW basis, and HAM_RDSIG with 100s digit 1 and 10s digit 0–2.
  • Screened-basis calculations are handled through (the xdb term in xposop).
  • Neither the energy tolerance (--xetol) nor is used.

mefac=5: commutator form (deprecated)

Here is evaluated from the commutator in the eigenfunction basis with the explicit position matrix r defined above:

The off-diagonal elements of r contain . When two states are nearly degenerate and is real and not small, these terms are large and inaccurate: mefac=5 then fails the consistency test (identity , printed by --xdiag as xconsist). For pairs with (--xetol=, default Ry) only is used (no term). mefac=5 does not include the correction for the screened basis (mismatch 0.62 for SrTiO). A warning is printed once if near-degenerate pairs are found for a real . It is kept for comparison and for LDA tests. Use mefac=3 instead.

is computed analytically (dhambl) by default, or by finite differences with --xhfd / --xfd.

mefac=4: diagnostics

mefac=4 does not apply a correction. It activates the finite-difference self-checks xhcheck and xpcheck after the eigenfunctions are generated and the checks of xsphdbg (see below). Use it, with --xdiag, to verify a build or a new basis.

What xposop.f90 and xsphdbg.f90 do

Both files are part of the optics path of the full-potential code and are active only for OPTICS_MEFAC≥3.

xsphdbg.f90 (module xsphdbg_m) builds the sphere part of the position matrix. For each augmentation sphere it integrates the radial functions with the derivative of the augmentation coefficients with respect to (dausgq, or finite-difference dausfd when requested), giving the intrasphere contribution to (xsphk, xdsph) and the sphere overlap term osphk. It is called from bndfp for mefac≥3. Mode 4 additionally runs the finite-difference self-checks (ldiag).

xposop.f90 (module xposop_m) assembles the plane-wave/envelope part of X (analytic bstrux derivatives; hambl/dhambl for and ), combines it with the sphere part into , evaluates and in the eigenfunction basis, and adds the correction to optme. It is called from bndfp after addrbl and before symdme, so that --opt~woptmc receives the corrected matrix elements.

How the modes enter:

mefacbndfpxsphdbgxposop
0mefac reset to 0 when no and mefac<3not callednot called
1ldsdk onnot callednot called
2extra LDA pass for evlda; optsf rescalesnot callednot called
3nevmx=ndhamx; screened saved in xzkcalledbasis form (eq. vbasis); analytic forced
4xhcheck, xpcheckcalled, FD self-checksnot called
5screened savedcalledcommutator form with

Modes 3–5 also run in the LDA (no ); modes 1 and 2 reset to 0 in that case.

Diagnostic command-line switches

All switches are on the lmf command line. Entries are summarised in the command-line reference.

SwitchFileEffect
--xdiagbothprint diagnostic lines (xposop screened, xposdiag, xconsist, xposop dir, xsphdbg lines)
--xetol=xposopdegeneracy threshold in Ry (default ); mefac=5 only
--xlam=xposopcalibration: set ; prints xlamcal ( and residual)
--xlow[=n]xposopkeep only among states (default: upper limit of the middle block)
--xdskxposopinclude in b for mefac=5 (automatic for 3)
--xdskfdxposopcentral FD instead of analytic
--xdskchkxposopevaluate both analytic and FD and compare
--xdskdq=xposopFD step for the above (default )
--xhfd, --xfdxposop (xsphdbg)FD of hambl for , instead of dhambl; --xfd also uses dausfd in xsphdbg
--xpair=i,jxposopprint the terms of a single state pair
--xgqdbgbothcompare dausgq with dausfd (xsphdbg, first 3 ); in xposop run bstruxgqdbg/hxpgqdbg and stop after the 2nd
--xorbdbgxsphdbgorbital-basis checks of the sphere matrices
--xdbkdbg, --xdbsdbg, --xdaugdbg, --xdintdbg, --xdhdbgxposopdrivers that test one ingredient (envelope , screened , augmentation, interstitial integrals, ) and stop after the 2nd

Subroutines

xposop.f90 (module xposop_m)

SubroutinePurpose
xposopmain driver: builds , , ; applies the mefac=3 or 5 correction to optme
xposdiagdiagnostic: prints the largest off-diagonal and the pair responsible
xdbkdbgdebug driver: unscreened envelope against finite differences
xdbsdbgdebug driver: same for screened (transformed)
xdaugdbgdebug driver: derivative of augmentation coefficients
xdintdbgdebug driver: interstitial integrals
xdhdbgdebug driver: ,
bstruxgqdbgdebug (--xgqdbg): analytic -gradient of the structure constants (bstruxgq) against a 4-point central finite difference
hxpgqdbgdebug (called from bstruxgqdbg): hxpblgq against hxpbl and finite differences

xsphdbg.f90 (module xsphdbg_m)

SubroutinePurpose
xsphdbgmain driver: derivative coefficients (dausgq or dausfd), sphere matrices, calls the checks
xpcheckcompares pieces of optme (sphere and interstitial parts of ) with pieces of saved by xsphdbg; releases the module work arrays
pxfitfits for occupied and empty ; prints and the residual
xhcheckexact LDA test
xorbdbgorbital-basis check of the sphere matrices (, )
dausgq (private)analytic of the augmentation coefficients at fixed eigenvector: switches makusq to its analytic-derivative branch (setdqgq, from bstruxgq), one pass per direction; same interface and units as dausfd; requires no APW
dausfd (private)finite-difference (central difference of two makusq calls per direction) of the augmentation coefficients at fixed eigenvector; used with --xfd, for APW bases, and as the benchmark of dausgq
xovsph (private)sphere overlap term of the position operator, , between all states (via optdme)
xsphme (private)sphere matrix elements of the position operator from the radial table rgrme (same machinery as fpopm)
osphk (private)sphere overlap contribution for a
xsphk (private)sphere contribution to for a
xdsph (private)the term of the sphere matrices (uses zgemm)

Benchmarks

All results below use the test systems Fe (bcc) and LiF, screened and unscreened bases, with the commands shown. Numbers are minimum / median / maximum over the samples.

Calibration with (LDA)

lmf fe --v8 -voptmod=1 -vmefac=3 -vsig=0 --quit=rho --xlam=0.1 --xdiag
System (mefac=3 and 5)xconsist (rel. mismatch)
Fe1.001 / 1.019 / 1.0410.055 / 0.082 / 0.093
LiF0.944 / 1.029 / 1.1280.007 / 0.082 / 0.138
SrTiO (mefac=3, screened and unscreened)0.9979 – 1.0029 (residual )–

Screened and unscreened calculations agree, and mefac=3 and 5 agree in the LDA.

Real : consistency (LiF)

lmf lif --v8 -vrsham=2 -vloptic=1 -vmefac=3 --quit=rho --xdiag
mefacscreenedunscreened
30.027 / 0.042 / 0.0520.028 / 0.042 / 0.053
50.067 / 0.233 / 0.6890.112 / 0.401 / 0.942

mefac=5 fails the identity with a real ; mefac=3 passes at the level of the basis-set error. The corresponding spectra of mefac=3 and 5 differ by 9–13% of the peak height.

Peak of (real )

Systemmefac=2 (screened / unscreened)mefac=3 (screened / unscreened)mefac=5 (screened / unscreened)
Fe (spin 2)578.7 / 325.7284.9 / 165.0not run
LiF7.295 (both)6.840 / 7.0426.323 / 6.134

Size of the correction

Mismatch of the identity, LDA / real mefac=5 / real mefac=3, as a fraction of $$\mathbf v$$:
SystemLDAmefac=5mefac=3
Si+2E0.5%19%0.4%
SrTiO0.4%65%0.3%

Sum rule ratio for Si+2E over 282 pairs with : 1.462 (mefac=5), 1.463 (mefac=1), 1.564 (mefac=2). The mefac=1 and mefac=5 results differ by 15–20% pairwise but agree on the total strength to 0.1%.

Accuracy of the ingredients

  • analytic , vs finite differences:
  • analytic vs finite differences: to
  • envelope part vs NumPy:
  • : relative
  • completeness :

Timing

SrTiO, mefac=3: 354 s before, about 100 s after replacing the explicit loops of the term by zgemm (results bit-identical).

Limitations

  • Screened (STR_ENV_MODE>0) v8 basis: supported for mefac=3 only (extra term ), validated in the LDA (LiF, SrTiO) but not yet with a real in the screened basis. must be supplied in screened form (e.g. sigm.scr), and the basis must have no Bessel tails.
  • mefac=3 requires the complete eigenbasis (); bndfp sets nevmx=ndhamx, also without .
  • The --xlam calibration needs -vsig=0 and the complete eigenbasis.
  • Analytic derivatives: v8, collinear, no Bessel tail, no APW, non-lean basis.
  • The identity holds only to about in a finite basis; the effect on is second order.
  • No independent reference (e.g. the limit of the GW density response) has been compared.
  • In metals the intraband (Drude) part is not obtained from optme; only the interband part depends on these matrix elements.

Advice

  • For a real self-energy use OPTICS_MEFAC=3. It requires --v8, the complete eigenbasis, and HAM_RDSIG as above.
  • mefac=4 is for diagnostics, not for production spectra.
  • mefac=5 is deprecated and is not corrected for the screened basis; it is kept for comparison only.
  • mefac=1 and 2 are approximations; mefac=2 is exact only for scissors-like scaling.
  • In the LDA, modes 3 and 5 reproduce exactly; use the calibration with --xlam= to test a new build.