Questaal Home
Navigation

The static QSGW self-energy editor and some Applications of it

This tutorial presents various applications of the editor for the QSGW static derived from the dynamical one. Note that QSGW has two forms of the self-energy, the “quasiparticlized” form , which is a nonlocal but static, and which corresponds to a one-particle approximation to the full interacting self-energy. In the QSGW context there is a fully dynamical self-energy from which the static QSGW is derived. To see how to make and analyze the dynamical self-energy, see this page.

This tutorial documents the static Σ0(k) editor, and presents applications that require its use.

In more detail, Questaal has two self-energy editors corresponding to the two forms of self energy in QSGW:

  1. a static self-energy Σ0(k) that substitutes for the exchange-correlation potential in LDA, GGA, Hartree-Fock or LDA+U theory. Σ0(k) is static and hermitian, and generates a noninteracting hamiltonian H0 and a corresponding noninteracting Green’s function G0. This potential is the primary output of the the QSGW cycle and Σ0(k)  (actually ) is saved on disk, usually in file sigm.ext. There are numerous ways to use and transform Σ0; most are accomplished through the Σ0(k) editor described here.

  2. a frequency-dependent, nonhermitian self energy Σ(k,ω). The ω-dependence broadens the states; the non-hermitian part gives the quasiparticle a finite lifetime. This is not generated automatically, but must be done using a special setup, as described in this tutorial. Once the dynamical Σ(k,ω) is made, there is a corresponding dynamical self-energy editor to facilitate analysis.

Note: this page is under construction.

Sheared GaSb

Follow the steps that create input files and carry out QSGW self-consistency in the Command Summary of the superlattice tutorial.

The do:

lmscell gasb -vz=11.5/11.43 --stack~scale=1/z~stretch=z^3~wsitex@short
lmf ctrl.gasb --wsig:fbz
cp sigm2.gasb sigm.gasb
cp sites.gasb site.gasb
lmf ctrl.gasb --rsig:fbz:rlxkp --iactiv --wsig:newkp
cp sigm2.gasb sigm.gasb
lmgwsc --wt --insul=14 --mpi=12,12 --tol=2e-5 --sym --getsigp --save= gasb-shear gasb > out.job
mpix -n 16 lmf-MPIK ctrl.gasb > out.lmf

Table of Contents

Preliminaries

This tutorial uses the MPI parallel form of lmf. It assumes a script mpix is present in your path that runs an MPI job with  #  processors as follows:

mpix -n # MPI-job

mpix can be simply mpirun.

If you have compiled lmf in serial mode, you can run the tutorials here in serial mode, by omitting the mpix -n #.

Change in sigma on Shearing Zincblende GaSb

Here we demonstrate how to modify the static self-energy in the presence of a lattice shear. The shear reduces the symmetry, and must be adapted accordingly. For demonstration purposes we build on the tutorial on building superlattices, and shear GaSb in the manner used in that tutorial.

Here we modify calculated for the zincblende lattice, using it as a starting point for a new QSGW with the sheared lattice. Of course the entire QSGW calculation could be redone from scratch, but with small shears like this one it is a reasonable approximation that the matrix elements of remain invariant under the shear. Here we will check how good that ansatz is. In any case the ansatz gives a good estimate for the self-consistent , avoiding the need to start from scratch.

To set up input conditions of the original zincblende structure, cut and paste the init file designed for InAs and GaSb shown in the superlattice tutorial and name it init.gasb. Then build the input file and carry out both LDA and QSGW self-consistency as described in detail in that tutorial. If you don’t want to read the tutorial, follow the instructions for Zincblende GaSb in the Command Summary, skipping the last part about drawing energy bands.

Assuming you followed instructions you will have run this step

mpix -n 16 lmf-MPIK ctrl.gasb > out.lmf

Find the gap :

grep gap out.lmf

You should find that the gap is 1.29 eV.

Now we are ready to make the shear. Use the superlattice editor built into lmscell to scale and stretch the lattice, so that (1) the basal plane matches that of InAs and (2) the shear conserves volume.

$ lmscell gasb -vz=11.5/11.43 --stack~scale=1/z~stretch=z^3~wsitex@short

In this instruction preprocessor variable z is set to the ratio of GaSb and InAs lattice constants and:

  • ~scale=1/z      scales the lattice constant by 1/z
  • ~stretch=z^3    stretches the third lattice vector by z3
  • ~wsitex@short    saves the modified structure into into site file sites.gasb

The two scalings together preserve the volume.

Compare sites.gasb to site.gasb and note that that the lattice constant has been reduced while the third lattice vector p3 has been stretched.

The shear reduces the symmetry. To obtain for reduced symmetry, first write for points in the full Brillouin zone. Then for the sheared lattice, read this and write it again under reduced symmetry.

lmf ctrl.gasb --wsig:fbz
cp sigm2.gasb sigm.gasb
cp sites.gasb site.gasb
lmf ctrl.gasb --rsig:fbz:rlxkp --iactiv --wsig:newkp
cp sigm2.gasb sigm.gasb
  • Steps (1) and (2) generate a sigm.gasb without any symmetry operations.
  • Step (3) replaces the site containing the zincblende structure with the sheared structure
  • Steps (4) and (5) read sigm.gasb for the full BZ and writes it for the reduced symmetry operations of the sheared lattice. Switch  --rsig:fbz:rlxkp tells lmf that contains k points for the full Brillouin zone, and also to ignore the mismatch in the k sought and file values of k (k points are shifted because the lattice is sheared). Switch  --wsig:newkp  tells lmf to write for the symmetry of the sheared mesh.

Try running

mpix -n 16 lmf-MPIK ctrl.gasb --rs=1,0 -vnit=1 > out &

This segment of output shows the symmetry operations of the sheared lattice is much reduced from the 24 point group operations of the Zincblende lattice:

 GROUPG: the following are sufficient to generate the space group:
         m(1,-1,0)
         m(1,-1,0)

This segment of output

 iors  : read restart file (binary, mesh density)
         remesh density from    20  *  20  *  20    to    20  *  20  *  21
         use from  restart file: ef window, pos(sheared), pnu
         ignore in restart file: *

indicates the given lattice is sheared relative to the contents in the restart file, rst.gasb. lmf can nevertheless read the file.

Look a little farther down can you can see the bandgap

 VBmax = 0.097372  CBmin = 0.182519  gap = 0.085147 Ry = 1.15799 eV

With this ansatz for the gap is reduced from 1.29 eV to 1.16 eV.

Now make it self-consistent

lmgwsc --wt --insul=14 --mpi=12,12 --tol=2e-5 --sym --getsigp --save= gasb-shear gasb > out.job
mpix -n 16 lmf-MPIK ctrl.gasb > out.lmf

You should find that the ansatz for is very close to the self-consistent one:

$ grep more out.job
lmgwsc : iter 1 of 999  RMS change in sigma = 2.53E-05  Tolerance = 2e-5  more=T ...
lmgwsc : iter 2 of 999  RMS change in sigma = 5.58E-06  Tolerance = 2e-5  more=F ...

Run lmf with the self-consistent and find the gap once again

mpix -n 16 lmf-MPIK ctrl.gasb --rs=1,0 -vnit=1 > out.lmf &
grep gap out.lmf

It should be essentially unchanged from the 1.16 eV found earlier. See also Additional Exercises.

Reading and writing Real-Space sigm Files

Files associated with this tutorial are too large to be included with the basic distribution. Download and unpack the tarball FeTutorial.tar.gz and change to directory fetutorial.

  cp input/* .
  cp bas2.tppc3.tpd4.sep12/rst.fe .
  cp bas2.tppc3.tpd4.sep12/nk12/* .
  ln -s -f sigm sigm.fe

If your computer hardware does not not-use-ieee-conventions-for-binary-files, see here before proceeding.

Verify that the input conditions result in a self-consistent potential.

  rm -f mixm.fe log.fe
  mpix -n 12 lmf -vnit=1 --rs=1,0 ctrl.fe `cat switches-for-lm` > out.noso.001

If you want to carry out a corresponding LDA calculation, do:

  cp bas2.tppc3.tpd4.sep12/rst.lda rst.fe
  rm -f mixm.fe log.fe
  mpix -n 12 lmf -vsig=0 -vnit=1 --rs=1,0 ctrl.fe `cat switches-for-lm` > out.noso.lda.001

Problems arise if you try to include use the given self-energy in a calculation with lower symmetry, e.g. a shear distortion or the addition of spin-orbit coupling. It immediately appears if you repeat the calculation lmf with spin-orbit coupling on (note tag  SO  in the input file!):

  lmf -vso=1 -vnit=1 --rs=1,0 ctrl.fe `cat switches-for-lm`

This is because by the given Σ0xc is stored on a mesh of k-points. SO coupling reduces symmetry and requires that Σ0 be available on a different k-mesh.

You can work around this by saving Σ0 in a real space form; that is, map Σ0RL,RL(k) to Σ0RL,RL(T) = Σ0R+TL,RL. T is a crystal lattice translation vector; there are as many T-points as k points in k-space. The transformation is exact and no information is lost. (It is accomplished in practice using FFT techniques, and the original Σ0RL,RL(k) can be recovered by a Bloch sum.) Once generated Σ0(T) doesn’t depend on the number of k-points, so it is preferable in this context even while it is less compact.

Constructing a trial Σ0 from Σ0 generated for a different system

You can use the  “merge“  function of the static sigma editor to extract portions of Σ0 from an auxilliary (source) system and insert them into the current (target) system. This is an effective way to obtain a trial Σ0 that might be otherwise difficult to obtain.

The copying operations are done in real space, where Σ0 consists of an array of matrix elements between pairs of atom-centered sites. For the mapping the algorithm must be able to align pairwise neighbor lists in the source (or auxilliary) and target (or current) systems. The  merge  function can do this as follows. The entire set of pairs is grouped into clusters around a central site. A list of central sites is supplied in the  merge  instruction, for both source and target systems (specified by  site-list  in the  merge  instruction). The algorithm loops over each of the listed sites and looks for matches in the two neighbor lists. Pairs found to match are copied from source to target.

How are pairs determined to match?  merge  provides two ways.

  • The source and target neighbor tables are defined by five indices (ib,jb,p1,p2,p3) for each pair in the table. Here ib,jb are the site indices for the central site and a pair in its cluster; (p1,p2,p3) are three (integer) multiples of the primitive lattice vectors added to the difference in the basis vectors to generate the connecting vector. A match is made if all five elements are equal in the source and target lists. This mode of matching usually only makes sense if the lattice and basis vectors in the two systems are the same, though the editor does not require this. In this mode  site-list  applies to both source and targets. This mode has a demo, shown below.

  • Connecting vectors are constructed for each pair of sites in a cluster belonging to a central atom, for both source and target lists. A match is made if the connecting vector is the same within a certain tolerance. In this mode, site lists for source and targets can be different. No check is whether the species in the source and target pairs are the same. In this mode a site list must be specified for the source, via the  src=srclist  argument; the presence of this argument tells the editor to use this mode. It has its own demo, shown below.

Removing sites from Σ0

This example starts with a system containing 24 sites, with input file ctrl.lm. It removes matrix elements of Σ0 connected to the last 12 sites, leaving a self-energy with 12 sites.

This instance was drawn from a case where the last 12 sites are empty sites with floating orbitals; it is useful if you want to make a good trial Σ0 for a system without the extra empty sites.

In this example, your ctrl file must have a FILE tag in the STRUC category like the following

STRUC                                 # Crystal lattice information
%ifdef file | file==0
      FILE=   site{file}
%else
      FILE=site
%endif

You need two site files: site24.lm with 12 real atoms followed by 12 empty sites; and site12.lm with the 12 real atoms only, and of course the self energy file sigm. File switches-for-lm is only needed you have extra command line switches to feed to lmf.
Invoke the sigma editor as follows:

lmf ctrl.lm -vfile=24 `cat switches-for-lm` --wsig~edit

At the “Option :” prompt, enter the following

 Option : zero short ib=13:24
 Option : rssave
 Option : a

This should write the shortened Σ0 to file rssigm. rssigm nominally holds information for 24 sites but contains matrix elements of Σ0 only the first 12 sites. Note that the editor prints number of pairs written to disk.

This isn’t quite what we want: we need a sigm file that has information only about the 12 sites.

Invoke the editor once again as follows

lmf ctrl.lm -vfile=12 `cat switches-for-lm` --rsig~null --wsig~edit

--rsig~null creates a template Σ0 with all matrix elements initialized to zero. The number of pairs should match the number pairs in the reduced Σ0 you generated previously.

At the “Option :” prompt, enter the following

 Option : readx
 Option : merge -sigbar 1:12
 Option : q

This should write the Σ0 for the 12-atom cell to file sigm2.lm and cause the editor to exit. Copy the new Σ0 to the standard file.

cp sigm2.lm sigm.lm

You should be able to run lmf with this sigm files in the 12-atom basis

lmf ctrl.lm -vfile=12 `cat switches-for-lm`

To compare a converged result with and without floating orbitals you should recalculate the QSGW self-energy, since the changed basis will modify Σ0 a little.

Extracting portions of a supercell to construct Σ0

This demonstration culls rows and columns Σ0 from 12-atom cell to create a trial Σ0 for a 4-atom cell. In this example, clusters sites 1,6,8,10 in the auxilliary system have the same set of neighbors as sites 1,2,3,4 in the target system.

Is its assumed you have a configurations ready to go in two separate directories, aka folders. The auxilliary setup should include a sigm file and a rst file.

Begin in the path for the auxilliary system, and create the real-space Σ0 to act as the auxilliary in the new system. For convenience both systems have the same extension,  lm. If you have additional command line arguments for a setup put them in the place of  cat switches-for-lm

cd path-to-auxilliary-system
lmf ctrl.lm `cat switches-for-lm` --sigedit~rssave~a

This creates rssigm.lm. Copy it to the path where the target system resides, and in the target directory, do the following

cp rssigm.lm path-to-target-system
cd path-to-target-system
lmf ctrl.lm `cat switches-for-lm` --rsig~null '--sigedit~readx~merge sigbar src=1,6,8,10 dest=1:4~q'
cp sigm2.lm sigm.lm

--rsig~null creates a template Σ0 with all matrix elements initialized to zero

  1. readx loads the auxilliary Σ0 from rssigm.lm
  2. merge sigbar src=1,6,8,10 dest=1:4 loops over sites 1,6,8,10 in the source pair list looks for alignments in with sites 1,2,3,4 in the target, and copies matrix elements of Σ0 where connecting vectors match. sigbar tells the editor to copy the mean diagonal elements of Σ0 (used to approximate Σ0 for high-lying states) into the target.
  3. q causes the editor to write the newly edited Σ0 to sigm2.lm and exit

You can also use the restart file editor to copy elements from the source rst into the target. This may give a better trial density, depending on the case.

cp path-to-auxilliary-system/rst.lm rst2.lm
lmf ctrl.lm `cat switches-for-lm` '--rsedit~rs~rs2=rst2~add asite 0 1 1:4 1,6,8,10~savea~q'

See editor instructions for details, but in brief this instruction loads the density data for the current (target) from rst.lm, corresponding data for the auxilliary (source) from rst2.lm, and finally for the atom-centered parts of the density, it combines  0×target + 1×source  and copies it into the target, contents of source sites 1,6,8,10 into source sites 1,2,3,4.

It writes a restart file in ascii format (rsta.lm) so as not to overwrite the rst.lm already present. You can tell lmf, to read from the ascii file with lmf --rs=2...

Spin Orbit Coupling in Fe

Here we build … needs finishing

As Antisite Defect

Note: Other delimiters may be used in place of  @  assumed below,

Here we build … needs finishing

Static Sigma Editor instructions

This section documents the instruction set of static self-energy editor, built into lmf. You can operate it in interactive mode or in batch mode, or a mix, as described below.

Instructions are separated by a delimiter, the first character after --wsig (assumed in this documentation to be  ”~”). Instructions often have optional arguments, separated by a different delimiter, which is taken as the first character after the instruction (assumed in this documentation to be  ”@”).

Note: if you are operating the editor in batch mode, take care to differentiate the delimiters separating instructions from those separating optional arguments to an instruction.

Interactive mode
To operate lmscell in interactive mode, invoke
lmf --wsig~edit

You should see:

 Welcome to the static self-energy file editor.  Enter '?' to see options.

 Option :

The editor operates interactively. It reads a command from standard input, executes the command, and returns to the  Option prompt waiting for another instruction.
The editor will print a short summary of instructions if you type   ? <RET> .

Batch mode
You can also run the editor in batch mode by stringing instructions together separated by a delimiter, e.g.
lmf --wsig~edit~spin@zers~q

The delimiter ( ~  in this case), as the first character following --wsig. lmf will parse through all the commands sequentially until it encounters “quit” instruction ( ~q ) which causes it to exit. If no such instruction is encountered, lmf returns to the interactive mode.

Preliminaries

The real space form of the static Σ0(R,R’) is accessible to edits. This consists of blocks connecting pairs of sites, given by the neighbor table. The neighbor table consists of a (usually long) list of pairs connecting sites (pair-list). Sites ib and jb are used below to denote the first and second sites in pair-list.

You can restricts edits Σ0 in the total pair-list to subsets. There are various ways to specify the subset: they are given by specifying a set of conditions, called CONDITION below. For each pair if CONDITION is met, the pair is included in the subset.

CONDITION appears as an argument to several of the instructions.
Use ‘*’ or ‘’ to specify all pairs, or choose some combination of the following:

  • Either (or neither) of:
    1. ib=site-list  list of sites. Any pair is included whose cluster is centered at one of the sites ib in site-list.
    2. ip=pair-listpair-list is a subset of the total pair-list. Any element in pair-list is included.
      With this option you can additionally impose:
    3. jb=site-list  a pair is included if site index only for neighbors in the set of ib that are also among the set of jb.
    4. jbx=site-list complement : site for 2nd element in pair must not be jb
  • Any (or none) of:
    1. onsite connecting vector must be zero
    2. offsite complement of onsite
    3. ib==jb center and neighbor have same site index
    4. ib<>jb complement of ib==jb
  • Tags r< and r> impose constraints on range:
    1. r<#1 [p<#2 p1,p2,p3] pairs separated by distance r<#1
    2. r>#1 [p<#2 p1,p2,p3] pairs separated by distance r>#1
      Optional p<#2 p1,p2,p3 Both sites in the pair must be within neighborhood of fixed (p1,p2,p3), i.e. for each site, d = |(px-p1,py-p2,pz-p3)| where (px,py,pz) = site position.
  • Conjugate pairs are assigned the status of the original
    noconj suppresses this constraint

Example: ib=2,3 r<.45 p<.45 -.25,-.25,-.25

Editor Instructions

  • sum [#[,#]] : summarizes site pair table. Optional [#,#] gives detailed information about a specific range of pairs
  • sum ib=#1,#2 : shows hamiltonian subblocks for sites in (#1,#2)
  • sum ib : summarizes hamiltonian subblocks for all sites

  • scell[options] snam : map Σ0 into a supercell specified by site file snam.
    Options:
    • @sigq writes sigma(k)
    • @sigrs writes sigma(T)
    • @range=# limits the range of sigma(T) when matching
    • @nq=#,#,# sets the supercell k mesh
  • sigbar #1 [#2] set avg sigma for high-lying states. Use argument #2 in spin polarized case

  • rssave [fn] write rs sigma Σ0 to file. If not specified, file name is rssigm.

  • readx [fn] read rs sigma and associated files to auxilliary storage for subsequent pasting into Σ0. If not specified, file name is rssigm.

  • merge [sigbar] site-list merge pairs in Σ0x to corrresponding pairs in Σ0 for all pairs connected to sites in site-list
  • merge [sigbar] 0 merge Σ0x into Σ0 for all pairs in common. Optional ‘-sigbar’ imports avg sigma from auxilliary filereducing size of rs sigma

The following instructions use CONDITION noted above. pairc is used to create a permanent list which becomes the default for other instructions. For any instruction you can create a temporary list. If you don’t specify a temporary list, the permanent list is used if it is defined; otherwise the list becomes the entire pair list.

  • pair[options]  [CONDITION]
    Set permanent pair list according to CONDITION. If CONDITION is absent all pairs are included.

  • shows[options] r1,r2,c1,c2  [CONDITION]
    Shows r1,r2,c1,c2 orbital subblock of sigma, for a range of pairs. Substitute ‘-‘ for r1,r2,c1,c2 to print entire orbital block.

  • spin[options]  [CONDITION]
    For spin manipulations. Select one of the following options:
    • @flip exchanges (up,down) spins
    • @zers zero out spin-up - spin-dn
    • @zerq zero out spin-up + spin-dn
    • @scal=# scale spin-up - spin-dn matrix element by #
  • zero[options]  [CONDITION]
    Zero Σ0 for pairs specified by CONDITION
    Options:
    • @short reduce size of pair table and Σ0\

Example: GaAs has a neighbor table with 7 shells of neighbors within a range of 1.1×alat (if empty spheres are included). This command will zero out neighbors beyond the 7th shell, and shorten the neighbor table, limiting its range to 7 shells: '--wsig:rs:edit:pairs r>1.1:zero short'

  • showp[options]  [CONDITION]
    List attributes of pairs satisfying CONDITION
    Options:
    • @c+s print charge and spin parts instead of the separate up and down Σ0 (for spin polarized cases only)
    • @all print sum of matrix elements for each pair. Note: default accumulates sum of matrix elements for all pairs included in a cluster connected to one site.

Additional Exercises

For the GaSb shear demo, compare energy bnds for the ansatz and the self-consistent one. You should find them nearly identical.