Questaal Home
Navigation

Introductory ASA Tutorial

The aim of this tutorial is to give a light introduction to the operation of the Questaal package using ASA code, lm, as propaedeutic for other tutorials. The presentation is minimal, and the input file is supplied without explanation. See other tutorials such as this tutorial on PbTe for more in depth description. Also see an analogous introductory tutorial for Si, using the full-potential code lmf.

The Command Summary gives the commands, inputs and outputs for each section in this tutorial, without further explanation. It is useful for those who may want to remind themselves of the command usage or check their output against a reference.

Running Band Calculations
Command
~/lmbuild/lmstr si  > out.lmstr
Expected Output
 --------------  START LMSTR - ref: 87376a95 --------------
 HEADER Si in diamond lattice with empty spheres.

 LMSTR:    nbas = 4  nspec = 2  verb 31,35

                Plat                                  Qlat
   0.000000   0.500000   0.500000       -1.000000   1.000000   1.000000
   0.500000   0.000000   0.500000        1.000000  -1.000000   1.000000
   0.500000   0.500000   0.000000        1.000000   1.000000  -1.000000
   alat = 10.262661  Cell vol = 270.221506

 LATTC:  as= 2.000   tol=1.00e-8   alat=10.26266   awald= 0.309   lmax=6
         r1=  1.853   nkd= 87       q1=  5.557   nkg= 169

 SGROUP: 48 symmetry operations from 2 generators
 MKSYM:  found 48 space group operations ... includes inversion

 ASASTR: strux for 2nd gen LMTOs, and Sdot
         avw = 2.526526

 pairc, ib=  1:  59 neighbors in range  0.886*alat =   9.10
 pairc, ib=  2:  59 neighbors in range  0.886*alat =   9.10
 pairc, ib=  3:  59 neighbors in range  0.886*alat =   9.10
 pairc, ib=  4:  59 neighbors in range  0.886*alat =   9.10
 pairc:  236 pairs total  59 is max cluster size
 strscr:  generated 236 inequivalent strux from 236 total
 Exit 0 LMSTR
 CPU time:  0.070s   Wall clock 0.140s  at  14:11:23 28.04.2021  on  ellery
Command
~/lmbuild/lm si  > out.lm
Expected Output
 ---------------  START LM - ref: 87376a95 ----------------
 HEADER Si in diamond lattice with empty spheres.

 LM:       nbas = 4  nspec = 2  verb 31,35
 pot XC:BH
 bz:       metal, tetra, invit

                Plat                                  Qlat
   0.000000   0.500000   0.500000       -1.000000   1.000000   1.000000
   0.500000   0.000000   0.500000        1.000000  -1.000000   1.000000
   0.500000   0.500000   0.000000        1.000000   1.000000  -1.000000
   alat = 10.262661  Cell vol = 270.221506

 LATTC:  as= 2.000   tol=1.00e-8   alat=10.26266   awald= 0.309   lmax=6
         r1=  1.853   nkd= 87       q1=  5.557   nkg= 169

 SGROUP: 48 symmetry operations from 2 generators
 MKSYM:  found 48 space group operations ... includes inversion
 BZMESH: 8 irreducible QP from 64 ( 4 4 4 )  shift= F F F

 GETZV:  8 valence electrons

ATOM=SI   Z=14  Qc=10  R=2.526526  Qv=0  a=0.025  nr=345
  Pl=  3.5     3.5     3.5
  Ql=  2.0     2.0     0.0

  iter     qint         drho          vh0          rho0          vsum     beta
    1   14.000000   1.307E+03       70.0159    0.6965E+02      -28.0339   0.30
   10   14.000000   1.663E-05       99.1713    0.1936E+04      -79.1078   1.00


 v_rmax= -0.898068     etot= -580.086711
 thrpv=  0.000000      by l: 0.000000 0.000000 0.000000

PPAR:  SI        nl=3  nsp=1  ves=  0.00000000
 l     e_nu          C        +/-del     1/sqrt(p)      gam         alp
 0 -1.13028707 -0.73731517  0.16637532   4.3499527  0.42337892  0.42337892
 1 -0.53734316  0.23227394  0.14386818   4.9250003  0.10360085  0.10360085
 2  0.40295477  1.50574200  0.12262053   5.0193643  0.04452316  0.04452316
ATOM=ES   Z=0  Qc=0  R=2.526526  Qv=0  a=0.025  nr=101
  Pl=  1.5     2.5     3.5
  Ql=  0.0     0.0     0.0

  iter     qint         drho          vh0          rho0          vsum     beta
    1    0.000000   0.000E+00        0.0000    0.0000E+00       -0.0000   0.30


 v_rmax= 0.000000      etot= 0.000000
 thrpv=  0.000000      by l: 0.000000 0.000000 0.000000

PPAR:  ES        nl=3  nsp=1  ves=  0.00000000
 l     e_nu          C        +/-del     1/sqrt(p)      gam         alp
 0 -0.00000000  0.39164524  0.16318543   3.5893107  0.41666679  0.41666679
 1  0.67878663  1.56971612  0.17050910   5.8127443  0.10804853  0.10804853
 2  1.74976676  3.21776590  0.17686576   8.1196305  0.05381162  0.05381162

 Class        Qtot       Qbak       Vmad     Vh(Rmax)    V(Rmax)
 SI         0.000000   0.000000   0.000000   0.000000  -0.898068
 ES         0.000000   0.000000   0.000000   0.000000   0.000000
 Sum Q=0.000000  Emad=0.000000(0.000000)  Vmtz=-0.449034
 LM: it 0 of 10  ehk0=-1160.173422  pv=0  mmom=0  seref=0
 cpudel    ...   Time this iter:  time(s):  0.0401   total:  0.0401s

 Makidx:  hamiltonian dimensions Low, Int, High, Negl: 36 0 0 0

 --- BNDASA : iteration 1 ---

 subzi: tetrahedron integration of bands; tetrahedron integration of density

 SECMAT:  kpt 1 of 8, k=  0.00000  0.00000  0.00000
 -0.7597  0.0747  0.0747  0.0747  0.3490  0.3490  0.3490  0.3607  0.7058

 BZWTS : --- Tetrahedron Integration ---
 ... only filled or empty bands encountered:  ev=0.074734  ec=0.227756
 VBmax = 0.074734  CBmin = 0.227756  gap = 0.153021 Ry = 2.08109 eV
 BZINTS: Fermi energy:      0.074734;   8.000000 electrons;  D(Ef):    0.000
         Sum occ. bands:   -2.1054872  incl. Bloechl correction:    0.000000

 Saved qp weights ...

 LM: ehf=-1155.6083879  ehk=-1156.0328682  sumev=-2.1054872  delsev=4.5650338

 mixing: mode=B  nmix=2  wc=3  beta=1
 PQMIX:  read 0 iter from file mixm.  RMS DQ=2.30e-1
 AMIX: nmix=0 mmix=8  nelts=24  beta=1  tm=10  rmsdel=2.3e-1

 GETZV:  8 valence electrons

ATOM=SI   Z=14  Qc=10  R=2.526526  Qv=-0.628572  a=0.025  nr=345
   l        pl           q0           q1           q2      id       dl
   0    3.8394164    1.2099052    0.0000000    0.0503617   0   -1.8111193
   1    3.7280551    1.9580060    0.0000000    0.0559823   0   -0.8708176
   2    3.2697013    0.2035173   -0.0000000    0.0065939   0    0.8832876

  iter     qint         drho          vh0          rho0          vsum     beta
    1   13.371428   1.986E+00       99.1998    0.1935E+04      -81.3859   0.30
    8   13.371428   1.948E-06       99.1952    0.1935E+04      -81.0837   1.00


 v_rmax= -0.770037     etot= -577.714953
 thrpv=  1.002858      by l: 0.596073 0.607216 -0.200431

PPAR:  SI        nl=3  nsp=1  ves= -0.06943559
 l     e_nu          C        +/-del     1/sqrt(p)      gam         alp
 0 -0.57712189 -0.80153201  0.16020747   3.3590499  0.40253305  0.40253305
 1 -0.20357205  0.15202344  0.13214885   4.1743553  0.09549092  0.09549092
 2 -0.19646482  1.54368211  0.13914170   6.1624488  0.05120300  0.05120300
ATOM=ES   Z=0  Qc=0  R=2.526526  Qv=0.628572  a=0.025  nr=101
   l        pl           q0           q1           q2      id       dl
   0    1.3178804    0.2175356   -0.0000000    0.0095154   0    0.6440000
   1    2.2139024    0.2790947   -0.0000000    0.0181331   0    1.2570628
   2    3.1505230    0.1319412    0.0000000    0.0280573   0    1.9546650

  iter     qint         drho          vh0          rho0          vsum     beta
    1    0.628572   3.589E-01        0.1398    0.2116E-02        4.9045   0.30
    4    0.628572   3.279E-05        0.1322    0.1696E-02        4.7721   1.00


 v_rmax= -0.603191     etot= -0.365335
 thrpv=  -0.305671     by l: -0.141959 -0.142956 -0.020756

PPAR:  ES        nl=3  nsp=1  ves=  0.06943559
 l     e_nu          C        +/-del     1/sqrt(p)      gam         alp
 0 -0.72253120  0.08140449  0.18877499   4.7233464  0.43067968  0.43067968
 1 -0.61987854  1.32720389  0.20747596   8.2568133  0.11971356  0.11971356
 2 -0.38284617  3.14656911  0.23079359  12.6105508  0.06447875  0.06447875

 Class        Qtot       Qbak       Vmad     Vh(Rmax)    V(Rmax)
 SI        -0.628572   0.000000   0.428142  -0.069436  -0.839473
 ES         0.628572   0.000000  -0.428142   0.069436  -0.533755
 Sum Q=0.000000  Emad=0.087290(-0.538236)  Vmtz=-0.686614
 SV:   1  2.304e-1 1.0000  3.600e-1   -1156.03286823 0.000000 L

  it   1 of  10    ehf=   -1155.608388   ehk=   -1156.032868
i ehf=-1155.6083879 ehk=-1156.0328682
 cpudel    ...   Time this iter:  time(s):  0.0192   total:  0.0593s

 Makidx:  hamiltonian dimensions Low, Int, High, Negl: 36 0 0 0

 --- BNDASA : iteration 2 ---

 subzi: tetrahedron integration of bands; tetrahedron integration of density

 SECMAT:  kpt 1 of 8, k=  0.00000  0.00000  0.00000
 -0.8926 -0.0011 -0.0011 -0.0011  0.1878  0.1878  0.1878  0.2337  0.5473

 BZWTS : --- Tetrahedron Integration ---
 ... only filled or empty bands encountered:  ev=-0.001116  ec=0.027324
 VBmax = -0.001116  CBmin = 0.027324  gap = 0.028440 Ry = 0.38678 eV
 BZINTS: Fermi energy:     -0.001116;   8.000000 electrons;  D(Ef):    0.000
         Sum occ. bands:   -3.0519550  incl. Bloechl correction:    0.000000

 Saved qp weights ...

 LM: ehf=-1156.0901666  ehk=-1156.0807798  sumev=-3.0519550  delsev=-0.0168823

 mixing: mode=B  nmix=2  wc=3  beta=1
 PQMIX:  read 1 iter from file mixm.  RMS DQ=4.23e-2  last it=2.30e-1
 broyj:  start  beta=1  w0=0.01  isw=0  gmax=0.11

 Class        Qtot       Qbak       Vmad     Vh(Rmax)    V(Rmax)
 SI        -0.806915   0.000000   0.549618  -0.089136  -0.851194
 ES         0.806915   0.000000  -0.549618   0.089136  -0.541898
 Sum Q=0.000000  Emad=0.143851(-0.886990)  Vmtz=-0.696546
 SV:   2  4.232e-2 1.0000  6.576e-2   -1156.08077981 0.000000 B 0.0100

  it   2 of  10    ehf=   -1156.090167   ehk=   -1156.080780
 From last iter    ehf=   -1155.608388   ehk=   -1156.032868
 diffe(q)= -0.481779 (0.042318)    tol= 0.000010 (0.000010)   more=T
i ehf=-1156.0901666 ehk=-1156.0807798
 cpudel    ...   Time this iter:  time(s):  0.0182   total:  0.0776s

 Makidx:  hamiltonian dimensions Low, Int, High, Negl: 36 0 0 0

 --- BNDASA : iteration 3 ---

 subzi: tetrahedron integration of bands; tetrahedron integration of density

 SECMAT:  kpt 1 of 8, k=  0.00000  0.00000  0.00000
 -0.9241 -0.0399 -0.0399 -0.0399  0.1580  0.1580  0.1580  0.1842  0.5220

 BZWTS : --- Tetrahedron Integration ---
 ... only filled or empty bands encountered:  ev=-0.039925  ec=0.006901
 VBmax = -0.039925  CBmin = 0.006901  gap = 0.046826 Ry = 0.63683 eV
 BZINTS: Fermi energy:     -0.039925;   8.000000 electrons;  D(Ef):    0.000
         Sum occ. bands:   -3.3208430  incl. Bloechl correction:    0.000000

 Saved qp weights ...

 LM: ehf=-1156.0861213  ehk=-1156.0856308  sumev=-3.3208430  delsev=0.0231661

 mixing: mode=B  nmix=2  wc=3  beta=1
 PQMIX:  read 2 iter from file mixm.  RMS DQ=8.26e-3  last it=4.23e-2
 broyj:  ir=2  dxmax=0.015  gmax=0.018  wc=3

 Class        Qtot       Qbak       Vmad     Vh(Rmax)    V(Rmax)
 SI        -0.775618   0.000000   0.528301  -0.085679  -0.848621
 ES         0.775618   0.000000  -0.528301   0.085679  -0.540375
 Sum Q=0.000000  Emad=0.132909(-0.819519)  Vmtz=-0.694498
 SV:   3  8.257e-3 1.0000  1.187e-2   -1156.08563079 0.000000 B 3.00

  it   3 of  10    ehf=   -1156.086121   ehk=   -1156.085631
 From last iter    ehf=   -1156.090167   ehk=   -1156.080780
 diffe(q)=  0.004045 (0.008257)    tol= 0.000010 (0.000010)   more=T
i ehf=-1156.0861213 ehk=-1156.0856308
 cpudel    ...   Time this iter:  time(s):  0.0176   total:  0.0952s

 Makidx:  hamiltonian dimensions Low, Int, High, Negl: 36 0 0 0

 --- BNDASA : iteration 4 ---

 subzi: tetrahedron integration of bands; tetrahedron integration of density

 SECMAT:  kpt 1 of 8, k=  0.00000  0.00000  0.00000
 -0.9183 -0.0327 -0.0327 -0.0327  0.1635  0.1635  0.1635  0.1933  0.5267

 BZWTS : --- Tetrahedron Integration ---
 ... only filled or empty bands encountered:  ev=-0.032694  ec=0.010334
 VBmax = -0.032694  CBmin = 0.010334  gap = 0.043028 Ry = 0.58518 eV
 BZINTS: Fermi energy:     -0.032694;   8.000000 electrons;  D(Ef):    0.000
         Sum occ. bands:   -3.2711438  incl. Bloechl correction:    0.000000

 Saved qp weights ...

 LM: ehf=-1156.0853279  ehk=-1156.0853273  sumev=-3.2711438  delsev=0.0257416

 mixing: mode=B  nmix=2  wc=3  beta=1
 PQMIX:  read 3 iter from file mixm.  RMS DQ=2.79e-4  last it=8.26e-3
 broyj:  ir=2  dxmax=6.2e-4  gmax=7.3e-4  wc=3

...

 Class        Qtot       Qbak       Vmad     Vh(Rmax)    V(Rmax)
 SI        -0.776779   0.000000   0.529091  -0.085807  -0.848686
 ES         0.776779   0.000000  -0.529091   0.085807  -0.540455
 Sum Q=0.000000  Emad=0.133307(-0.821974)  Vmtz=-0.694571
 SV:   4  2.793e-4 1.0000  4.355e-4   -1156.08532729 0.000000 B 3.00

  it   4 of  10    ehf=   -1156.085328   ehk=   -1156.085327
 From last iter    ehf=   -1156.086121   ehk=   -1156.085631
 diffe(q)=  0.000793 (0.000279)    tol= 0.000010 (0.000010)   more=T
i ehf=-1156.0853279 ehk=-1156.0853273
 cpudel    ...   Time this iter:  time(s):  0.0165   total:  0.112s

 Makidx:  hamiltonian dimensions Low, Int, High, Negl: 36 0 0 0

 --- BNDASA : iteration 5 ---

 subzi: tetrahedron integration of bands; tetrahedron integration of density

 SECMAT:  kpt 1 of 8, k=  0.00000  0.00000  0.00000
 -0.9185 -0.0329 -0.0329 -0.0329  0.1633  0.1633  0.1633  0.1930  0.5266

 BZWTS : --- Tetrahedron Integration ---
 ... only filled or empty bands encountered:  ev=-0.032939  ec=0.010219
 VBmax = -0.032939  CBmin = 0.010219  gap = 0.043157 Ry = 0.58694 eV
 BZINTS: Fermi energy:     -0.032939;   8.000000 electrons;  D(Ef):    0.000
         Sum occ. bands:   -3.2728366  incl. Bloechl correction:    0.000000

 Saved qp weights ...

 LM: ehf=-1156.0853417  ehk=-1156.0853417  sumev=-3.2728366  delsev=0.0256042

 mixing: mode=B  nmix=2  wc=3  beta=1
 PQMIX:  read 4 iter from file mixm.  RMS DQ=4.11e-6  last it=2.79e-4
 broyj:  ir=2  dxmax=8.4e-6  gmax=9.8e-6  wc=3

 Class        Qtot       Qbak       Vmad     Vh(Rmax)    V(Rmax)
 SI        -0.776765   0.000000   0.529082  -0.085806  -0.848685
 ES         0.776765   0.000000  -0.529082   0.085806  -0.540454
 Sum Q=0.000000  Emad=0.133302(-0.821945)  Vmtz=-0.694570
 SV:   5  4.109e-6 1.0000  5.585e-6   -1156.08534174 0.000000 B 3.00

  it   5 of  10    ehf=   -1156.085342   ehk=   -1156.085342
 From last iter    ehf=   -1156.085328   ehk=   -1156.085327
 diffe(q)= -0.000014 (0.000004)    tol= 0.000010 (0.000010)   more=T
i ehf=-1156.0853417 ehk=-1156.0853417
 cpudel    ...   Time this iter:  time(s):  0.0153   total:  0.127s

 Makidx:  hamiltonian dimensions Low, Int, High, Negl: 36 0 0 0

 --- BNDASA : iteration 6 ---

 subzi: tetrahedron integration of bands; tetrahedron integration of density

 SECMAT:  kpt 1 of 8, k=  0.00000  0.00000  0.00000
 -0.9185 -0.0329 -0.0329 -0.0329  0.1633  0.1633  0.1633  0.1930  0.5266

 BZWTS : --- Tetrahedron Integration ---
 ... only filled or empty bands encountered:  ev=-0.032936  ec=0.010220
 VBmax = -0.032936  CBmin = 0.010220  gap = 0.043156 Ry = 0.58692 eV
 BZINTS: Fermi energy:     -0.032936;   8.000000 electrons;  D(Ef):    0.000
         Sum occ. bands:   -3.2728157  incl. Bloechl correction:    0.000000

 Saved qp weights ...

 LM: ehf=-1156.0853416  ehk=-1156.0853416  sumev=-3.2728157  delsev=0.0256041

 mixing: mode=B  nmix=2  wc=3  beta=1
 PQMIX:  read 5 iter from file mixm.  RMS DQ=5.44e-8  last it=4.11e-6
 broyj:  ir=2  dxmax=1.2e-7  gmax=1.4e-7  wc=3

...

 Class        Qtot       Qbak       Vmad     Vh(Rmax)    V(Rmax)
 SI        -0.776765   0.000000   0.529082  -0.085806  -0.848685
 ES         0.776765   0.000000  -0.529082   0.085806  -0.540454
 Sum Q=0.000000  Emad=0.133302(-0.821945)  Vmtz=-0.694570
 SV:   6  5.441e-8 1.0000  7.730e-8   -1156.08534156 0.000000 B 3.00

  it   6 of  10    ehf=   -1156.085342   ehk=   -1156.085342
 From last iter    ehf=   -1156.085342   ehk=   -1156.085342
 diffe(q)=  0.000000 (0.000000)    tol= 0.000010 (0.000010)   more=F
c ehf=-1156.0853416 ehk=-1156.0853416
 cpudel    ...   Time this iter:  time(s):  0.0143   total:  0.141s

 Jolly good show !  You converged to rms DQ=  0.000000
 Exit 0 LM
 CPU time:  0.141s   Wall clock 0.207s  at  14:18:10 28.04.2021  on  ellery
Command
~/lmbuild/lmchk ctrl.si --syml~n=21~mq~lblq:G=0,0,0,L=1/2,1/2,1/2,X=0,1/2,1/2,W=1/4,1/2,3/4,K=3/8,3/8,3/4~lbl=LGXWGK
Expected Output
 HEADER Si in diamond lattice with empty spheres.

 LMCHK:    nbas = 4  nspec = 2  verb 31,35
 pot XC:BH
 float:    float P LDA-style
 autoread: none

                Plat                                  Qlat
   0.000000   0.500000   0.500000       -1.000000   1.000000   1.000000
   0.500000   0.000000   0.500000        1.000000  -1.000000   1.000000
   0.500000   0.500000   0.000000        1.000000   1.000000  -1.000000
   alat = 10.262661  Cell vol = 270.221506

 LATTC:  as= 2.000   tol=1.00e-8   alat=10.26266   awald= 0.309   lmax=6
         r1=  1.853   nkd= 87       q1=  5.557   nkg= 169

 SGROUP: 48 symmetry operations from 2 generators
 MKSYM:  found 48 space group operations ... includes inversion

 MKSYML: generating symmetry line file ...
         rotating qp to Cartesian coordinates ...
 Exit 0  wrote symmetry lines to syml file
 CPU time:  0.027s   Wall clock 0.091s  at  15:32:24 28.04.2021  on  ellery
Command
~/lmbuild/lmdos si -vnk=16 --dos:npts=1001:window=-1,.3
Expected Output
 --------------  START LMDOS - ref: 87376a95 --------------
 HEADER Si in diamond lattice with empty spheres.

 LMDOS:    nbas = 4  nspec = 2  verb 31,35
 bz:       metal, tetra, invit 

                Plat                                  Qlat
   0.000000   0.500000   0.500000       -1.000000   1.000000   1.000000
   0.500000   0.000000   0.500000        1.000000  -1.000000   1.000000
   0.500000   0.500000   0.000000        1.000000   1.000000  -1.000000
   alat = 10.262661  Cell vol = 270.221506

 LATTC:  as= 2.000   tol=1.00e-8   alat=10.26266   awald= 0.309   lmax=6
         r1=  1.853   nkd= 87       q1=  5.557   nkg= 169

 SGROUP: 48 symmetry operations from 2 generators
 MKSYM:  found 48 space group operations ... includes inversion
 BZMESH: 145 irreducible QP from 4096 ( 16 16 16 )  shift= F F F
 TETIRR: sorting 24576 tetrahedra ... 570 inequivalent ones found

 ASADOS: reading weights from file moms
         expecting file to be resolved by l
         file has 6 channel(s)
         Using npts=1001  emin=-1  emax=0.3
 IOMOMQ: read 145 qp  efermi=-0.032936  vmtz=-0.694570

 ASADOS:  make dos for 1001 points from 9 bands in window (-1,0.3)

 Channels in dos file generated by LMDOS:
 site class label   spin-1
    1    1   SI     1:3
    3    2   ES     4:6
 Exit 0 LMDOS
 CPU time:  0.044s   Wall clock 0.105s  at  17:34:23 28.04.2021  on  ellery

Preliminaries


This tutorial assumes you have downloaded the repository (see here for instructions on getting access to and downloading the Questaal package), and, in a separate directory, built (compiled) the executable codes. For the purpose of demonstration, ~/lm will refer to the location of the downloaded repository and ~/lmbuild will refer to the build directory.

All instances of si in the command lines can be replaced with ctrl.si

1. Building the Input File


Shown below is a basic input file that can be used for this tutorial. First, navigate to a test directory testdir.

    mkdir testdir ; cd testdir

Once you have entered testdir, create a new file named ctrl.si with your preferred text editor. Paste into ctrl.si the text shown in the box below; this file is now your input file.

VERS    LM:7 ASA:7
HEADER  Si in diamond lattice with empty spheres.
SYMGRP  i*r3(1,1,-1)::(1/4,1/4,1/4) r4x::(1/4,1/4,1/4)
IO      SHOW=F HELP=F VERBOS=31,35 WKP=F
HEADER [ The contents of HEADER reside within the category delimiters,
       ] so this line isn't part of it.
STR     RMAX=3.6
STR     RMAX[3.6]                                          # An equivalent was of writing the previous line
OPTIONS NSPIN=1 ASA[ADNF=F TWOC=F CCOR=T]
% const a0=.5292 nk=4
BZ      NKABC={nk}
STRUC   NBAS=4 NSPEC=2 NL=3
        ALAT=5.431/{a0} PLAT= 0 .5 .5   .5 0 .5   .5 .5 0  # Lattice constant of Si = 5.431 Angstrom
SITE    ATOM=SI   POS= 0 0 0
        ATOM=SI   POS= .25 .25 .25
        ATOM=ES   POS= .5 .5 .5
        ATOM=ES   POS= .75 .75 .75
SPEC    ATOM=SI   R/W=1  Z=14
        ATOM=ES   R/W=1  Z=0
ITER    MIX=B2,wc=3,b0 CONVC=1D-5 NIT=10
START
% iffile si.si
        CNTROL=F (=T to use following to override disk; =F to ignore following)
% else
        BEGMOM=T (=T to begin with moments, =F to begin with band-structure)
        CNTROL=T (=T to use following to override disk; =F to ignore following)
          ATOM=SI  P=3.5 3.5 3.5    Q=2 0 0    2 0 0   0 0 0
          ATOM=ES  P=1.5 2.5 3.5
% endif

Note: the input file includes a fictitious “atom” ES, with atomic number zero. This is because the ASA is designed for reasonably close-packed systems (for an explanation, see this page). The diamond lattice of Si is quite open, but by adding the fictitious empty spheres it can artifically be made more close-packed and be reasonably accurate.

2. Running Band Calculations


The band calculation can be done with a combination of executables located in your build directory: lmstr, the structure constant utility, and lm, the ASA band program.

You must first run lmstr. To invoke lmstr and to pipe the output to a file, do the following

~/lmbuild/lmstr si > out.lmstr

This will run lmstr using the input file, ctrl.si, created above. lmstr must be run in advance of the band code lm, as it makes structure constants lm requires.

The output will be redirected from the screen to file out.lmstr.
Note: The output file can be named differently, and its extension does not matter. Further, it is not necessary to save the output to a file at all if you do not wish to, simply omit the > out.lmstr.

Next run lm

~/lmbuild/lm si > out.lm

The expected output is listed in full in the Command Summary at the top of this tutorial. To see the progression to self-consistency enter

grep DQ out.lm

The system should have become well converged after 5 iterations. To see the bandgap, enter

grep gap out.lm

It should have converged to about 0.58 eV (the initial values are a bit erratic, as the trial density is initially poor). As is typical, the local-density approximation underestimates the bandgap (it it is actually about 1.17 eV at 0 K).

Note: If you are going to use these codes often, it is recommended that you install theses codes into some directory in your path, e.g. ~/bin. Set the prefix variable as desired in ~/lmbuild/flags.mk, for example, using

prefix = ~

will cause the installer to copy the files into ~/bin. After modifying flags.mk, do the following:

cd ~/lmbuild/
ninja install

3. Generating Energy Bands


To draw energy bands, you must choose what lines in k space to draw them on. For fcc, the most common points are those denoted as the L point (k = (1/2,1/2,1/2) in units of 2π/a, a being the lattice constant, which is 5.431 Å for Si), the Γ point (k = (0,0,0)) and the X point k = (0,0,1).

lm reads this information from a symmetry lines file. With your text editor, you can make one on your own, though here we will use an auto-generator in Questaal’s lmchk utility.

Si crystallizes in the diamond cubic structure, which has an fcc Bravais lattice. For the fcc lattice, lmchk will generate a symmetry line file with the following instruction, adapted from this page:

~/lmbuild/lmchk ctrl.si --syml~n=21~mq~lblq:G=0,0,0,L=1/2,1/2,1/2,X=0,1/2,1/2,W=1/4,1/2,3/4,K=3/8,3/8,3/4~lbl=LGXWGK

Inspect syml.si. It should be Questaal’s standard format for symmetry line mode.

# generated from text ~n=21~mq~lblq:G=0,0,0,L=1/2,1/2,1/2,X=0,1/2,1/2,W=1/4,1/2,3/4,K=3/8,3/8,3/4~lbl=LGXWGK
  18    0.5000000   0.5000000   0.5000000     0.0000000   0.0000000   0.0000000  L  to  G
  21    0.0000000   0.0000000   0.0000000     1.0000000   0.0000000   0.0000000  G  to  X
  11    1.0000000   0.0000000   0.0000000     1.0000000   0.5000000   0.0000000  X  to  W
  23    1.0000000   0.5000000   0.0000000     0.0000000   0.0000000   0.0000000  W  to  G
  22    0.0000000   0.0000000   0.0000000     0.7500000   0.7500000   0.0000000  G  to  K

Run lm in band mode to generate bnds.si.

lm si  --iactiv --band:fn=syml

bnds.si is written in a format described on this page.

The bands can be plotted with various plotting packages. This is a personal choice, but you can do it efficiently with Questaal’s utilities, which are built with the all the other Questaal executables.

You can immediately make a postscript file with Questaal’s plbnds utility:

echo -13,10,5,10 | ~/lmbuild/plbnds -scl=13.6 -lbl bnds.si

It makes a (primitive) postscript file fplot.ps directly. You can do much better with the following:

echo -13,10,5,10 | ~/lmbuild/plbnds -fplot -ef=0 -scl=13.6 -lbl bnds.si

The -fplot switch tells plbnds to creates a file plot.plbnds. This is a script for Questaal’s graphics utility, fplot utility. Use fplot to create a postscript file based on the contents of plot.plbnds:

~/lmbuild/fplot -f plot.plbnds

This which creates a postscript file fplot.ps, much prettier than the one plbnds makes. You can tailor the script to tune the figure.

The bands you get should look very similar to the LDA band structure generated by the full-potential program lmf.

Click here to see the LDA band structure for Si.

You can see that silicon has an indirect band gap of around 0.60 eV. The valence band maximum falls at the point while the conduction band minimum lies between and X, at about 0.85 of the distance to X. The experimental gap is about 1.2 eV.

The energy bands generator has an optional feature that enables you to highlight a particular orbital character in the energy bands; see for example this page.

4. Generating Densities-of-States

You can generate the total density-of-states (DOS) by setting BZ_SAVDOS=T in ctrl.si before running lm. This will generate the DOS just with lm. To resolve the DOS by orbital, you must do an extra step, using the lmdos utility.

In the steps below we first re-run lm with a finer k mesh. This isn’t necessary but it makes a smoother DOS.

~/lmbuild/lm si -vnk=16 --quit=band

Now generate the orbital resolved DOS

~/lmbuild/lmdos si -vnk=16

During execution, a prompt will appear:

  Enter npts (def=501), emin and emax (def=-1,0):

Enter:

  1001 -1 0.3 <return>

Or run lmdos non-interactively

lmdos si -vnk=16 --dos:npts=1001:window=-1,.3

This generates an ASCII file dos.si, and its format is described on this page. It contains 6 channels, as shown in the output from lmdos :

 Channels in dos file generated by LMDOS:
 site class label   spin-1
    1    1   SI     1:3
    3    2   ES     4:6

Channels 1-3 are partial Si DOS for s, p, and d orbitals; channels 4-6 are the corresponding DOS for the empty spheres.

How to draw figures from this file is a personal choice, but you can do it efficiently with Questaal’s pldos utility.

For example,

echo 8 7 / | ~/lmbuild/pldos -fplot '-lst=1,2,3;4,5,6' dos.si

reads dos.si and creates a script plot.pldos the fplot utility can read, along with a data file dosp.dat in the standard Questaal format for 2D arrays. It has two columns containing partial DOS (one column combines DOS 1,2,3 —the Si DOS and the other combines DOS 4,5,6—the ES DOS). Use fplot to make a figure:

~/lmbuild/fplot -pr10 -f plot.dos

This creates postscript file fplot.ps, which you can view with your favorite view, e.g. the ghostscript utility, gs. The DOS should show a gap at the Fermi level of about 0.04 Ry, which is the LDA gap for Si.

You can resolve the DOS in other ways. In the instruction below Example: in file dos.dat the majority DOS are in channels 1,3,5 (atom 1) and 7,9,11 (atom 2), and the minority DOS are in channels 2,4,6 (atom 1) and 8,10,12 (atom 2), invoke, e.g.

echo 8 7 / | ~/lmbuild/pldos -fplot '-lst=1;2;3;4,5,6' dos.si

creates four panels: panels 1-3 are DOS for s, p, and d, and the fourth panel combines all the DOS for the ES channels

Note: there is a facility to draw two DOS in a single panel, one above the ‘zero’ and one below. This is particularly convenient in spin polarized cases when you want to compare the majority and minority DOS. See -lst2 in the pldos manual.

Further Reading


An overview of the Questaal package, and its main programs

Guide to the input file

The ASA suite and its programs explained

Drawing energy bands with colour weights