Questaal Home

Command Line switches


Most executables in the Questaal suite accept command-line arguments. A few switches, e.g. variable declarations, are shared in common by the great majority of them.

This page documents the comman and program specific command-line switches for many of the Questaal codes.

Table of Contents


All of the programs have special branches that may be (and sometimes must be) set from command-line switches.

Here is an example:

$ lmf cafeas -vns=4 -vnm=5 --rpos=pos

Following unix style, switches always begin with dash (). Many codes have command-line switches unique to their purpose, but a number of switches are shared in common.

Some switches have a single dash ; some have two. Those with two tend to control program flow (e.g. --show), while those with a single dash tend to have an “assignment” function, such as a variables declaration (e.g. -vns=4). Sometimes there is not a clear distinction between the two, e.g. the printout verbosity --pr accepts either one or two dashes (see below).

In the example above, -vns=4 -vnm=5 assigns variables ns and nm to 4 and 5, respectively, while --rpos=pos tells lmf to read site positions from file pos.cafeas.

Switches Common to Most or All Programs

  • --help | --h
    • Lists command-line switches for that program and exits.
  • --input
    • Lists tags (categories and tokens) a program will read. Same as turning on IO_HELP=T
  • --showp
    • Prints out input file after parsing by preprocessor, and exits. It shows the action of the preprocessor, without parsing any tags.
  • --show | --show=2
    • Prints the input file parsed by preprocessor, and the value of the tags parsed or default values taken.
      --show=2 causes the program to exits after printing.

Note: the preceding switches are intended to assist in managing and reading input files. They are discussed in more detail here.

  • --pr#1[,#2] | -pr#1[,#2]
    • Sets output verbosities, overriding any specification in the ctrl file.
    • Optional #2 sets verbosity for the potential generation part (applicable to some codes)
  • --quit=keyword
    • quit after execution of certain blocks (electronic structure programs only). Keywords are:  ham  pot  dos  rho  band.
  • --noinv  |  --nosym apply to programs that use symmetry operations
    • --noinv  suppresses the automatic inclusion of inversion symmetry (this symmetry follows from time reversal symmetry).
    • --nosym  suppresses symmetry operations all together
  • --time=#1[,#2]
    • Prints out a summary of timings in various sections of the code. Timings are kept to a nesting level of #1.
      If #2 is nonzero, timings are printed on the fly.
  • --iactive
  • --iactive=no | --no-iactive
    • Turns off ‘interactive’ mode.
  • -cname=”string
    • Declares a character variable name and gives it a value string. The quotation marks are not needed if string has no spaces.
  • -vname=expr
    • Declares a numeric variable name and assigns its value to the result of expression expr. Only the first declaration of a variable is used. Later declarations have no effect.

      Note: there are also generalized assignment operators  *=,  /=, +=,  -=,  and ^= that modify already-declared variables, following C syntax.

Switches Common To Programs Using Site Information

Most Questaal codes read structural information (lattice and position vectors). For any program reading site information the following switches apply:

  • --rpos=fnam
    • Tells the program to read site positions from file fnam.ext after the input file has been read. fnam.ext is in standard Questaal format for 2D arrays.
  • --fixpos[:tol=#] | --fixpos[:#]
    • Adjust positions slightly, rendering them as consistent as possible with the symmetry group. That is, if possible to slightly displace site positions to make the bsis conform to a group operation, make the displacement. Optional tolerance specifies the maximum amount of adjustment allowed.
      Example: lmchk --fixpos:tol=.001
  • --fixlat
    • Adjust lattice vectors and point group operations, attempting to render them internally consistent with each other.
  • --sfill=class-list
    • Tells the program to adjust the sphere sizes to space filling.

      By default, “class-list” is a list of integers. These enumerate class indices for which spheres you wish to resize, eg 1,5,9 or 2:11. For “class-list” syntax see Syntax of Integer Lists

      A second alternative specification of a class-list uses the following: “-sfill~style=2~expression” The expression can involve the class index ic and atomic number z. Any class satisfying expression is included in the list.
      Example: “-sfill~style=2~ic<6&z==14”

      A third alternative specification of a class-list is specifically for unix systems. The syntax is “-sfill~style=3~fnam”. Here “fnam” is a filename with the usual unix wildcards. For each class, the program makes a system call “ls fnam | grep class” and any class which grep finds is included in the list.
      Example: “-sfill~style=3~a[1-6]”

See Table of Contents

Switches for blm

blm creates input (ctrl) files from structural information.
Command-line switches:

  • --express[=n]
    • Express style input file level n. If n>0, an express category is created.
      For n>0, an EXPRESS category is created and a site file is created. Lattice and site information are not included in the ctrl file but are read through the site file. As n increases, the ctrl file becomes simpler but contains less information.
      If --express is missing, a default value of n=3 is used.
      If n is missing, a default value of n=6 is used.
      Level  mode
      • 0:  Standalone: All input through standard categories, and site file is not automatically made. No supporting comments are given.
      • 1:  Expert: Similar to mode 9, but EXPRESS category is added.
           Input is terse with no supporting comments
           Tags duplicated by EXPRESS are retained to facilitate editing by the user (EXPRESS takes precedence).
      • 2:  Verbose: Similar to mode 1, with comments added
      • 3:  Large: Similar to mode 2, but duplicate tags are removed
      • 4:  Standard: Most tags covered by defaults are removed.
      • 5:  Simple: No preprocessor instructions, variables or expressions are used
      • 6:  Light: Some nonessential tags are removed
      • 7:  Skeleton: Minimal input file

The following tailor the input file to a target method.

  • --asa
    tailor input file to an ASA calculation. This tutorial has an example.
  • --gw[~options]
    tailor input file to a GW calculation. Modifies AUTOBAS; adds a GW category and some GW-specific tokens.
    Options are:
    ~eloc=# :      Sets AUTOBAS_ELOC to  #.   Same as --eloc=#.
    ~gcutb=# :    Sets GW_GCUTB to  #  (Determines how lmfgwd --job=−1 assigns G-vector cutoff for interstitial part of one-particle objects)
    ~gcutx=# :    Sets GW_GCUTX to  #  (Determines how lmfgwd --job=−1 assigns G-vector cutoff for interstitial part of two-particle objects)
    ~pbtol=strn :   Sets GW_PBOL to  strn  (Determines how lmfgwd --job=−1 assigns G-vector cutoff for interstitial part of two-particle objects)
    ~nk=# :     Sets GW_NKABC to  #.  (Determines how lmfgwd --job=−1 assigns GW k mesh)
    This tutorial has an example.
  • --gf
    add tokens for lmgf input file: adds BZ_EMESH and a GF category. This tutorial has an example.
  • --pgf
    add tokens for lmpg input file: adds BZ_EMESH and a PGF category.
  • --fpandasa
    tags for both ASA and FP.

The following set switches allow you to set parameters for which no defaults are supplied. You can enter them through command line arguments to blm as shown below, or edit the ctrl file later.

  • --gmax=#
    specify mesh density cutoff GMAX. You can use lmfa to determine this number for you, once the basis set has been supplied. See this tutorial for an example.
  • --nk=#1[,#2,#3]
    k-mesh for Brillouin zone integration. A typical number for semiconductors in small cells is  6. For metals it depends on how precisely you need to determine the Fermi level. See this tutorial for an example.
  • --nkgw=#1[,#2,#3]
    Similar as --nk but applies to GW k-mesh. Same as --gw~nk=…

The following set of switches control the approach to charge self-consistency.

  • --nit=#
    specify max number of iterations to attempt on the approach to self-consistency.
    Program ends after  #  iterations, or when self-consistency is reached, whichever occurs first. For an example, see this tutorial.
  • --conv=#
    specify tolerance for energy convergence (ITER_CONV), overriding default
  • --convc=#
    specify tolerance for charge convergence (ITER_CONVC), overriding default

The following miscellaneous set of switches control general program flow.

  • --mag
    sets up for spin polarized calculation. Note that you should also specify a magnetic moment. See this tutorial for lmf or this tutorial for lmgf.
  • --pbe
    set switches for PBE functional (libxc version). For an example, see this tutorial.
  • --pbesol
    set switches for PBESOL functional (libxc version).
  • --molstat
    Add category for molecular statics For an example, see this tutorial.
  • --loc=#
    Set AUTOBAS_LOC to  #.
  • --eloc=#
    Set AUTOBAS_ELOC to  #.
  • --mto=#
    Set AUTOBAS_MTO to  #.
  • --pmt[:emax=#]
    Set up input for the PMT basis. It:
    • sets tight tolerances for HAM_TOL and EWALD_TOL
    • sets HAM_PWMODE=11
    • Optional :emax sets HAM_PWEMAX

    For an example, see this tutorial.

  • --ldau[switches]
    Add tags for LDA+U. Absent specifications, one tag is added for each species.
    • Optional  ~spec=list : add tags for each species in  list. Use species names, separated by commas.
  • –dv=string
    Add a variable declaration to thei input file, e.g. --dv=idp=0 adds a declaration similar to
    % var   idp=0
  • --noshorten  |  --shorten=no
    suppress automatic shortening of site positions
  • --nosort  |  --sort=no
    suppress ordering of site postions by species.
  • --ehmx=#
    adds a tag  HAM_AUTOBAS_EHMX=#  (or the equivalent in EXPRESS mode).
    This is used by lmfa and limits the upper bound to LMTO sm-H energy, when autogenerating a basis set.
  • --rsmmx=#
    adds a tag  HAM_AUTOBAS_RSMMX=#  (or the equivalent in EXPRESS mode).
    This is used by lmfa and limits the upper bound to LMTO sm-H smoothing radius, when autogenerating a basis set.  # is a multiple of the MT radius (default value=2/3).
  • --frzwf
    add switches that can keep the basis set fixed
  • --clfloat
    use traditional float algorithm (see Troubleshooting issue [4]).

The following set of switches concern augentation spheres:

  • --findes[~switches]
    search for empty sphere sites to improve lattice packing. At present the only switch is:
    • ~rmin=# :   exclude empty spheres with augmentation less than  #.
    • ~float :     Make empty spheres floating orbitals
    • ~1spec :     Force E species (empty spheres or floating orbitals) to be the same species.
    • ~nspmx=# :   Limit the number of E species to #. The MT radius of all new classes exceeding # is set to the smallest E radius found.
      This tutorial has a simple example; this tutorial has a more detailed one.
  • --addes
    add tags to prepare for later addition of empty spheres. This tutorial has an example.
  • --omax=#1   |   --omax=#1,#2,#3
    Set maximum sphere overlaps to #1. #2 and #3 concern A-E and E-E overlaps, respectively where A are true atoms and E are empty spheres.

The following concern how structural data is written to disk or read from disk:

  • --rdsite[=fn]
    read structural data from site file fn. Default fn is sitein.ext. This tutorial has an example.
  • --ctrl=fn
    write input file to fn.ext instead of default actrl.ext.
  • --scala=#
    multiply ALAT by  #, and  PLAT  and  POS by  1/#.
  • --scalp=#
    like scala, but  #  specifies  PLAT  volume
  • --xpos
    write site positions as multiples of  PLAT.
  • --xshft=# | --xshftx=#
    shift site positions by a uniform translation, Cartesian coordinates (xshft or as multiples of lattice vectors (xshftx).
  • --wsrmax=#
    when finding sphere radii, do not permit any radius to exceed  #.
  • --wsite[~opt]  |  --wsitex[~opt]
    • --wsite writes site file for structural data
    • --wsitex writes site positions as fractional multiples of  PLAT.
      Optional ~quad1 shifts site positions to first quadrant.
      In any case a site file is written unless express=0.
  • --wpos=fnam
    write site positions to file fnam.

See Table of Contents

Switches for lmchk

lmchk has two main functions: to check augmentation sphere overlaps (and optionally to determine augmentation sphere radii), and to generate neighbor tables in various contexts.

--shell[~options]  |  --shell~tab[~options]
print out a neighbor table, in one of the following styles.
  • Standard style: a neighbors is printed, grouped in shells of neighbors centered the site in question. A table is made for one site in each inequivalent class. Neighbors are grouped by shell:
 Shell decomposition for class K1        class   1  z=19
 shell   d     nsh csiz  class ...
   1  0.000000   1    1  1:K1
   4  0.880105   8   15  4:Se1(8)
   5  1.000000   4   19  1:K1(4)
   6  1.026646   8   27  2:Fe1(4)      3:Fe2(4)
  • Tab style: (--shell~tab) a table of neighbors is printed in a table format, for all sites.
 # neighbor list for site 1, class 21x
     1   1   0.0000000   0.0000000   0.0000000     0.0000000  21x      21x
     1  44  -0.2500000   0.2500000  -0.2500000     0.4330127  21x      21
     1  48   0.2500000  -0.2500000  -0.2500000     0.4330127  21x      21

This mode prints out site indices to pairs, connecting vector and length, and class labels.

  • Compact Tab style: (--shell~tab=2) prints out the connecting vector only.
 # neighbor list for site 1, class K1
     0.0000000   0.0000000   0.0000000
     0.0000000   0.0000000  -0.6814628
     0.0000000   0.0000000   0.6814628
  • Tab displacement style: (--shell~tab=2~disp=file) special purpose mode that reads in a second set of site positions from file.ext.
    It lists only connecting vectors that are changed relative the original vectors.
    Moreover the table prints out both the original vector and the displacement vector, e.g.
 # neighbor list for site 1, class K1
     0.0000000   0.0000000   0.0000000     0.0000000   0.0000000   0.0100000
     1.0000000   0.0000000   0.0000000     0.0000000   0.0000000  -0.0100000
    -1.0000000   0.0000000   0.0000000     0.0000000   0.0000000  -0.0100000
     0.0000000   1.0000000   0.0000000     0.0000000   0.0000000  -0.0100000

file should take he standard Questaal style for 2D arrays. It can be generated with --wpos.
This mode synchronizes with lmscell switch --disp~tab2.

Options are delimited by  ~  (or the first character following --shell):
~r=#:  Specifies range of neighbor-list. Default value is 5.
~e:  prints inner product between Euler angles (relevant to noncollinear magnetism in the ASA)
~fn=filename:  writes neighbor table to file filename.ext
~sites~site-list:  restricts sites considered to site-list. See here for the syntax of site-list
~pair~site-list:  restricts neighbors to site-list.
~nn:  restrict table to nearest-neighbor shell (tab mode only)

Example: --shell:tab=2:disp=pos:sites:1:r=3:fn=tab2:nn
writes to tab2.ext a table in this format. The table is restricted to displacements around site 1, distance less than 3 a.u.

Prints angles between triples of sites.

Options are delimited by  ~  (or the first character following --shell):
~r=#:  Specifies range of neighbor-list. Default value is 2.5.
~sites~site-list:  loops over center atoms in site-list. See here for the syntax of site-list.
~bonds~site-list:  prints out table only for triples whose neighbors are in site-list.

Example: --angles~sites~1,2~bonds~style=2~z==34
finds triples of atoms connected to sites 1 and 2. Both sites connected to the central site must have atomic number 34 (Selenium) /tutorial/lmf/molstat/#11-bond-lengths-and-angles

Prints angles between spins (applicable to ASA noncollinear magnetism)

Euler angles must be supplied either in the input file, or in the Euler angles file eula.ext (in the standard Questaal format).
Options are delimited by  ~  (or the first character following --shell):
~r=rmax[,rmin]:  Include in table only pairs closer than rmax. If rmin is also given, exclude pairs closer than rmin.
~sites~site-list:  include only sites in site-list. See here for the syntax of site-list.
~sign:  If present, rotate angle by 180° for each member of the pair whose magnetic moment is negative.

Example: --euler~r=10,6~sign~sites~style=2~z==26
finds angles between Fe atoms (Z=26) between 6 and 10 atomic units apart.

--findes  |  --findes   --nescut=#
tells lmchk to locate empty spheres to fill space. It works by adding adding empty spheres (largest possible first)
until space is filled with sum-of-sphere volumes = unit cell volume.
Optional --nescut=# causes the finder stop adding sites once the number exceeds threshold  #.
Tags in the ctrl file affecting this switch are:
tells lmchk to use an algorithm to determine augmentation sphere radii.
Results are printed to stdout; you must modify the input file by hand.
--mino~z  |  --mino~site-list
tells lmchk to shuffle atom positions in site-list to minimize some simple function of the overlap.
(For now, the function has been set arbitrarily to the sixth power of the overlap).
--mino~z :   construct list from all sites with atomic number Z=0
--mino~site-list :   list of sites; see here for site-list syntax.
print minimum information about overlaps. Writes the site positions to file.ext
--wsite[options]  |  --wsitex  |  --wsitep  |  --wpos=file
Writes structural data to a site file or a positions file.

Options to --wsite are delimited by  ~  (or the first character following --shell):
~short :   write site file in short form
~fn=file :   writes site file to file.ext.

If used in conjunction with --findes, lmchk writes to file essite.ext with the basis enlarged by the new empty sites.
In this special mode there are two options: --wsite and --wsitex .

checks whether the given basis matches the basis in site file, up to a fixed translation
shorten basis vectors

See Table of Contents

Switches for lmfa

lmfa makes atomic densities and basis set parameters for the crystal code lmf. See the PbTe tutorial for a fuller description.

Command-line switches:

  • --plotwf
    • Writes atomic wave functions to files wfa_spid.ext.
  • --dumprho
    • Dumps atomic density and potential to disk, file out.ext. Operates interactively.
  • --norscnst
    • In optimization of s.m. Hankel basis, do not constrain rsm < rmt
  • --basfile=fn
    • write the autogenerated basis set parameters to file fn.ext instead of default basp0.ext.
  • --basp[~ctrl~eh=#~eh2=#~incrlmx]
    • Turns on autofind RSMH,EH (also accomplished through HAM_AUTOBAS)
      Options below are delimited by  ~  (or the first character following --basp):
    • ~ctrl:  Use any parameters RSMH,EH, RSMH2,EH2 already specified (from the ctrl or basp files)
    • ~eh=#:  Specify fixed EH
    • ~eh2=#:  Specify fixed EH2
    • ~incrlmx:  Include RSMH,EH to one higher l when writing basp0.ext. Extra RSMH,EH is used only if SPEC_ATOM_LMX is also increased.

Switches for lmf

lmf is the main density-functional code in the Questaal suite.

Command line switches with links are organized by function in the table below. Use the links for quick reference.

Affects program flow--ef  --no-fixef0  --oldvc  --optbas  --quit  --rdbasp  --rdatrho
--rhopos  --rpos  --rs  --shorten=no  --symsig  --vext  --zhblock
Additional files generated--band  --cv --wforce  --mull  --pdos 
--wden  --wpos  --wrhomt  --wpotmt  --wrhoat   --wratrho
Additional printout--efrnge  --pr  --SOefield
Optics specific--jdosw  --jdosw2  --opt  --cls
QSGW specific--mixsig  --rsig  --wsig
Editors--chimedit  --rsedit  --popted  --wsig~edit

Command-line switches:

tells lmf how to read from or write to the restart file.
  • #1=0: do not read the restart file on the initial iteration, but overlap free-atom densities. Requires atm.ext.
  • #1=1: read restart data from binary rst.ext
  • #1=2: read restart data from ascii rsta.ext
  • #1=3: same as 0, but also tells lmf to overlap free-atom densities after a molecular statics or molecular dynamics step.
  • Add 10 to additionally adjust the mesh density to approximately accommodate shifts in site positions relative to those used in the generation of the restart file. See --rs switch #3 below for which site positions the program uses.
  • Add 100 to rotate local densities, if the lattice has been rotated.

  • #2=0: serves same function as #1, but for writing output densities.
  • #2=1: write binary restart file rst.ext
  • #2=2: write ascii restart file rsta.ext
  • #2=3: write binary file to rst.#, where # = iteration number

  • #3=0: read site positions from restart file, overwriting positions from input file (default)
  • #3=1: ignore positions in restart file

  • #4=0: read guess for Fermi level and window from restart file, overwriting data from input file (default). This data is needed when the BZ integration is performed by sampling.
  • #4=1: ignore data in restart file

  • #5=0: read logarithmic derivative parameters P from restart file, overwriting data from input file (default).
  • #5=1: ignore P in restart file

Default switches:  --rs=1,1,0,0,0.  Enter anywhere between one and five integers; defaults are used for those not given.

tells lmf (or any program accepts --band to generate energy bands instead of making a self-consistent calculation. The energy bands (or energy levels) can be generated at specified k-points in one of three formats, or modes.
  • Symmetry line mode is designed for plotting energy bands along symmetry lines. In this case k-points are specifed by a sequences of lines with start and end points. The output is written in special format that plbnds is designed to read.
    This is the default mode; alternatively you can select the list or mesh modes:
  • The list mode is a general purpose mode to be used when energy levels are sought at some arbitrary set of k-points, specified by the user. Data is written in a standard Questaal format with k-points followed by eigenvalues.
  • The mesh mode generates states on a uniform mesh of k-points in a plane. Its purpose is to generate contour plots of constant energy surfaces, e.g. the Fermi surface. Data file output is written in a standard Questaal format designed for contour plots.

Unless you otherwise specify, input file specifing the k points is qp.ext, and the output written to bnds.ext for all three modes.

Options below are delimited by  ~  (or the first character following --band):

  • ~qp:  list mode. An arbitrary list of k points can be specified. See here for the input file format.
  • ~con:  mesh mode for contour plot. k-points are specified on a uniform 2D grid; data is written for a specified list of bands. See here for input file format in this mode.
  • ~bin:  write bands as a binary file, file name bbnds.ext. Works only with ~qp and ~con modes.
  • ~fn=fnam:  read k points from file fnam.ext. Default name is qp.ext.
  • ~ef=#:  Use # for Fermi level.
  • ~spin1:  generate bands for 1st spin only (spin polarized case)
  • ~spin2:  generate bands for 2nd spin only (spin polarized case)
  • ~mq:  q-points are given as multiples of reciprocal lattice vectors. Applies to symmetry line and qp-list modes only.
  • ~long:  write bands with extra digits precision (has no effect for default mode)
  • ~rot=strn:  rotates the given k by a rotation given by strn.
  • ~lst=list:  write only a subset of energy levels by an integer list (contour mode only).
  • ~nband=#:  Write out no more than # bands (not to be used in conjunction with ~lst !)
  • ~evn=# keep track of smallest and largest eval for #th band. Print result on exit (purely for informational purposes).
  • ~col=orbital-list:  assign weights to orbitals specified as an (extended) integer list.
  • ~col2=orbital-list generate a second weight to orbitals specified in a list.
    With this option you can create bands with three independent colors.
    Note: tbe does not yet possess color weights capability.

The col option tells the band generator to save, in addition to the energy bands, a corresponding weight for each energy. Each band is resolved into individual orbital character by a Mulliken decomposition The sum of Mulliken weights from orbital-list is the weight assigned to a state. Thus if orbital-list contains all orbitals the weights will be unity.

The individual orbitals make up the hamiltonian basis. States specified in orbital-list corresponding to the ordering of the orbitals in the hamiltonian. You can get a table of this ordering by invoking lm|lmf --pr55 --quit=ham .... Choose orbital-list from the orbitals you want to select out of the Table.

This list can sometimes be rather long and complex. To accomodate this, some simple enchancements are added to the standard integer list syntax.

Render all three components density everywhere positive. (This can be in an issue because of the three-fold representation of the density).
tells lmf to read site positions from fnam.ext after the input file has been read. fnam.ext is in standard Questaal format
tells lmf to write site positions to fnam.ext after self-consistency or a relaxation step.
--pdos[~options]  |  --mull[:options]
tells lmf to generate weights for density-of-states or Mulliken analysis resolved into partial waves. Options are described here.
Operates the program in a special mode to optimize the total energy wrt the basis set. lmf makes several band passes (not generating the output density or adding to the save file), varying selected parameters belonging to tokens RSMH= and EH= to minimize the total energy wrt these parameters.
Options are delimited by  ~  (or the first character following --optbas):
  • etol=#:  only adjust parameter if energy gain exceeds #.
  • No species given:  lmf optimizes wrt RSMH in each species.
  • spec=spid,rs: Optimize wrt RSMH for a particular species.
  • spec=spid,e: Optimize wrt EH for a particular species.
  • spec=spid,rs,e: Optimize wrt both RSMH and EH for a particular species.
  • spec=spid…,l=###: Specify which l to optimize (default is all l in the basis)
  • sort: sort RSMH from smallest to largest. The total energy is more sensitive to small RSMH;, then the most important parameters are optimized first.
tells the program to read basis parameters from file fn. If not present, fn defaults to basp.ext. This supersedes settings in HAM_AUTOBAS.
tells lmf to write the charge density to disk, on a uniform of mesh of points. At present, there is no capability to interpolate the smoothed density to an arbitrary plane, so you are restricted to choosing a plane that has points on the mesh.
Options syntax:

Information for the plane is specified by three groups of numbers: the origin (o=), i.e. a point through which the plane must pass; a first direction vector l1 with its number of points; and a second direction vector l2 with its number of points. Default values will be taken for any of the three sets you do not specify. The density generated is the smooth density, augmented by the local densities in a polynomial approximation (see option core)

To comply with this restriction, all three groups of numbers may be given sets of integers. Supposing your lattice vectors are p1, p2, and p3, and the smooth mesh has (n1,n2,n3) divisions. Then the vector (l1=#1,#2,#3) corresponds to
v1 = #1/n1 p1 + #2/n2 p2 + #3/n3 p3
Specify the origin (a point through which the plane must pass) by
Default value is o=0,0,0. Alternatively you can specify a the origin in Cartesian coordinates by:
(x1,x2,x3) a vector in Cartesian coordinates, units of alat, and it is converted into the nearest integers i1,i2,i3. Thus the actual origin may not exactly coincide with (x1,x2,x3).

Options are delimited by  ~  (or the first character following --wden):

  • ~l1=#1,#2,#3[,#4]  first direction vector as noted above, that is:
    #1,#2,#3 select the increments in mesh points along each of the three lattice vectors that define the direction vector.
    The last number (#4) specifies how many points to take in this direction and therefore corresponds to a length. Default values : l1=1,0,0,n1+1 where n1 is the number of points on the third axis.
  • ~l2=#1,#2,#3[,#4]  second direction vector as noted above, and number of points (#4)
    Default values : l2=0,1,0,n2+1 where n2 is the number of points on the second axis.
  • core=# specifies how local densities are to be included in the mesh.
    Any local density added is expanded as polynomial * gaussian, and added to the smoothed mesh density.
    • #=0  includes core densities + nuclear contributions
    • #=1  includes core densities, no nuclear contributions
    • #=2  exclude core densities
    • #=-1  no local densities to be included (only interstitial)
    • #=-2  local density, with no smoothed part
    • #=-3  interstitial and local smoothed densities
      Default: core=2
  • fn=filnam  specifies the file name for file I/O. The default name is smrho.ext
  • 3d  causes a 3D mesh density to be saved in XCRYSDEN format
  • q=q1,q2,q3 and lst=list-of-band-indices
    These switches should be taken together. They generate the density from a single k-point only (at q) and for a particular set of bands. Use integer list syntax for list-of-band-indices.

Example: suppose n1=n2=48 and n3=120. Then
writes to myrho.ext a mesh (49,121) points. The origin (first point) lies at (p3/2) since 60=120/2. The first vector (l1=1,1,0,49) points along (p1+p2) and has that length (48+1); the second vector points along p3 and has that length.

Example: suppose the lattice is fcc with n1=n2=n3=40. Then
generates the smoothed part of the density from the 7th band at Γ, in a plane normal to the z axis (q=0,0,0.001 is slightly displaced off Γ along z), passing through (0,0,0.25).

--cv:lst  |  --cvK:lst
Calculate electronic specific heat for a list of temperatures. You must use Brillouin sampling with Fermi function: BZ_N=−1.
Data is written to file cv.ext.
causes lmf to write forces to file fn.
Override file Fermi level; use with --band
Print out indices to bands that bracket the Fermi level
Do not adjust estimate of Fermi level after first band pass
chooses old-style energy zero, which sets the cell average of the potential to zero. By default average electrostatic potential at the augmentation boundary is chosen to be the zero. That puts the Fermi level at roughly zero.
suppress shortening of site positions
--symsig  |  --symsig=no
Symmetrize sigma overriding default behavior, or suppress symmetrizing it
Makes SO-weighted average of electric field at each site. Used for estimating size of Rashba effect.
--vext~step[~options…]~v=#  |  --vext~igv[~options…]~v=#
An external potential is added to the LDA hamiltonian. The size of the external potential is given by the argument following (~v=).  (Options are delimited by the first character following --vext, which is assumed to be  ~  in this description.)

is specified by a rule which can assume one of two forms (in reciprocal space, through --vext~igv~…, or in real space, through --vext~step~…). In either case is symmetrized by whatever symmetry operations are used.

The ~eps and ~eps=# _options
For either style, you may add an optional switch ~eps or ~eps=#. This will cause lmf to print an analysis of the response function. This analysis is printed at each iteration in the self-consistency cycle.

For the input density it prints a table including the static inverse dielectric function defined as , in a table like the following:

ig       kv       pi8/q2             dphitot               phiext               eps^-1
 2   1   1  88   336.143728   0.0034403 0.0000000   0.0100000 0.0000000   0.3440276 0.0000000
 3   1   1   2   336.143728   0.0034403 0.0000000   0.0100000 0.0000000   0.3440276 0.0000000

In this case (called phiext in the table) has two Fourier components, which correspond to two points (kv) on the density mesh (reciprocal space). Note: index 1 corresponds to k=0 along the direction of that lattice vector.

For the output density a table is printed including the response function, defined as , in a table like the following:

ig       kv       pi8/q2              drho                dphitot                phiext                R
 2   1   1  88   336.143728   -2.017e-5 0.0000000   0.0039812 0.0000000   0.0100000 0.0000000   -0.002017 0.0000000
 3   1   1   2   336.143728   -2.017e-5 0.0000000   0.0039812 0.0000000   0.0100000 0.0000000   -0.002017 0.0000000

The analysis applies if either ~eps or ~eps=eps0 is specified. The latter option has an additional feature, namely at the starting iteration it estimates the screening charge for a dielectric constant you specify by eps0. It assumes that, for each Fourier component, . It will print out a table similar to the following:

ig       kv        pi8/q2             rho0                 drho                  dphi
 2   1   1  88   336.143728   0.0000000 0.0000000   -1.983e-5 0.0000000   0.0100000 0.0000000
 3   1   1   2   336.143728   0.0000000 0.0000000   -1.983e-5 0.0000000   0.0100000 0.0000000

The ~pot0 option

To calculate the perturbation there has to be a memory of the initial unperturbed potential (density). lmf keeps track of the intial potential. If you begin execution from a self-consistent density for the unperturbed case, at self-consistency the difference in starting and final potential are indeed the perturbation. However, if you start from a different density, e.g. the self-consistent density after the perturbation was added, or a density modified with ~eps=#, the perturbation lmf prints out is fictitious.

The ~pot0 switch makes it possible to retain an original potential so perturbations can be properly calculated. Including this switch causes lmf to write whatever Hartree potential it has generated from the given density to file smpot0.ext, and exit.

Any subsequent invocation of lmf with --vext~eps will cause the reference potential and density to be read from this file, and the perturbation is calculated as the change in the current potential (density) relative to the reference potential (density) stored in smpot0.ext.

Specifying with a single Fourier component

The syntax is : --vext~igv=#1,#2,#3[~eps[=#]][~pot0]~v=#

~igv=#1,#2,#3 defines a particular k point, by . , , and are the number of divisions along each of the three reciprocal lattice directions. This information is printed at the start of execution: in this example, it prints out

GVLIST: gmax = 10.5 a.u. created 12317 vectors of 22528 (54%)
        mesh has 16 x 16 x 88 divisions; length 0.352, 0.352, 0.320

Evidently has nonzero points (1,1,2) and (1,1,88), which correspond to the first and last points along . It was specifed by --vext~igv=0,0,1; to make the potential real two Fourier components are required, corresponding to mesh points (1,1,2) and (1,1,88). Note: in the specification indexing starts at 0, while the indexing of the mesh density starts at 1.

Example : –vext~igv=0,0,1~eps=3~v=.02

Specifying in real space

At present the available option is to specify a step potential for a family of adjacent planes.
The minimum syntax is : –vext~step=#~l1=#1,#2,#3~l2=#1,#2,#3~v=#\

  • ~step=# tells lmf how many planes the potential spans. You can use ~stepx=# in place of ~step=#: this shifts the average perturbation to zero.
  • ~l1 and ~l2 define points in a plane in the same manner as described for the --wden switch.
    The first plane can also be specified with [~ro=#1,#2,#3] or [~o=#1,#2,#3] as described there.
  • ~v=# gives the size of the step.
  • You can use the ~eps, ~eps=#, and ~pot0 options in this mode.

Example : –vext~stepx=44~o=0,0,22~l1=1,0,0~l2=0,1,0~eps=3~v=.02

With a mesh density of 16×16×88 divisions and the following lattice vectors:

0.000000   0.500000   0.500000
0.500000   0.000000   0.500000
2.500000   2.500000   0.000000

a step potential in 44 planes perpendicular to is created, with zero average value:

Add external potential vext = 0.02 in 44 planes passing through origin at (0,0,22)
Origin, in cartesian coordinates  0.625000 0.625000 0.000000
v1: (16+1 pts) = (1,0,0)(p1,p2,p3) = (0.000000,0.500000,0.500000) l=0.707107
v2: (16+1 pts) = (0,1,0)(p1,p2,p3) = (0.500000,0.000000,0.500000) l=0.707107
Angle between vectors : 1.047198 radians = 60 deg

Unit normal vector (0.577350,0.577350,-0.577350).  Origin lines in plane 22
NN planes connected by (0,0,1)(p1,p2,p3) = (0.028409,0.028409,0.000000)
Planes separated by 0.032804, 88 planes to shortest period, 88 planes in normal direction
Put vext in 44 planes in interval [22,65] (50.0 %)
vext added to 11264 points out of 22528 (50.0 %)  <v>=0.01 (remove avg => <v>=0)
--rdatrho[~v0]   |   --wratrho
Reads/writes the l=0 part of sphere densities and potential to atmx.ext. This file has the same form as the atomic file atm.ext generated by lmfa. However the spherical density and spherical potential V0 are taken from lmf’s current contents, e.g. the self-consistent density. By reading data from atmx.ext you can start with a a better trial density when overlapping “atoms” Also, V0 is used to make partial waves φl. If also V0 is frozen (e.g. using HAM_FRZWF=t), the partial waves are constructed from this information, when V0 is read from this file.
Write partial atomic densities to atom files.
--wrhomt  |  --wpotmt
Not documented yet.
Zeros out or scales selected rows and columns of off-diagonal parts of the hamiltonian and overlap matrices. Diagonal parts are retained, though there is an option to set them through this switch. Both the hamiltonian and overlap matrix are modified.

For a single block a list of rows and columns must be specified; there is some some flexibility in how this is accomplished as described below. You can modify multiple blocks by successive block specifications. Different blocks are separated by a double delimiter. The delimiter is the first character after --zhblock (assumed to be  ~  in this documentation).

For one block, specify the list of (row,column) pairs using one of the following forms. ilist is described below; h is the hamiltonian and s is the overlap matrix.

  1. ~rows=ilist
    For each i and j in ilist, each h(i,j) is zeroed (or scaled by a factor  f) for ij. Thus ilist applies to both rows and columns.
  2. ~cols=ilist
    Has the same effect as 1.
  3. ~rows=ilist1~cols=ilist2
    Similar to 1, but the block is comprised of rows in ilist1, columns comprised of elements in ilist2.
  4. ~ilist1
    Similar to 3, but ilist2 is taken to comprise the entire hamiltonian. All elements in ~ilist are completely isolated from the rest of the hamiltonian; that is, h is diagonal for those elements.

The diagonal elements i=j are left untouched by default. To set them, include ~e=#1[,#2] in the block specification. #1 specifies the eigenvalue of spin 1, #2 the eigenvalue of spin 2, if it is supplied (if not, #1 is used for both spins). If e is given s(i,i) will be left untouched while h(i,i) is set to e×s(i,i), so that (if the element has no coupling to any other element, as in specification type 4) the hamiltonian will yield an eigenvalue e. for each i.

The scale factor f is zero, by default. To specify it, include  ~s=f  in the block specification.

ilist is an integer list of orbitals in the hamiltonian; integer lists are described here.
To see how the basis is ordered, run lmf with

 lmf --pr55 --quit=ham ...

and inspect the table following this header:

 Orbital positions in hamiltonian, resolved by l:

Further notes

  • For each (i,j) modified, (j,i) is modified in the same manner so that h and s remain hermitian.
  • e can be one or two numbers, so that the majority and minority spins can be scaled differently. If the second number is not specified e(1) is used for both spins.
  • f can be one or two numbers, corresponding to hamiltonian and overlap. If neither number is specified, f=0 for both h and s. If the second number is not specified, elements in the overlap are set to zero.
  • Caution: since both h and its hermitian conjugate are scaled, elements of h that belong to both ilist1 and ilist2 get scaled twice (this may change in future). This matters only if f is not zero.
  • If no list is specified in a block, --zhblock does nothing for that block and exits without parsing for more blocks.
  • Note that basis sets often have more than one orbital per l. To isolate a particular l or lm, include all basis functions with a particular (site, l) or (site, lm) in ilist.

Example 1 (specification type 4):


h(10:16,:) and h(:,10:16), and s(10:16,:) and s(:,10:16) are zeroed out except for the diagonal elements. The diagonal elements of s are left untouched. The diagonal elements of h(i,i) for i=10:16 are set to -1.5×s(i,i) for the majority spin and +1.4×s(i,i) for the minority spin. As a result 7 eigenvalues will be -1.5 Ry for spin 1, and +1.4 Ry for spin 2.

Example 2 (multiple blocks):


Scales the off-diagonal elements between t2g orbitals (5,6,8) by 0.52, and sets the off-diagonal elements between eg orbitals to zero.

Example 3 (specification type 3):


Scales the matrix elements connecting t2g and eg orbitals by 1/2, leaving the intra-t2g and intra-eg matrix elements intact.

The following switches concern the optics branch of both lmf and lm.

--jdosw  |  --jdosw2
Mulliken projection of channels for optical properties.

You can project onto one linear combination of basis functions (--jdosw) or two (also use --jdosw2).

  • For joint DOS and optics, use --jdosw~list1~list2; use --jdosw2~list1~list2 for a second projection.
    list1 is an integer list referring to occupied states, list2 to unoccupied states.
  • For single DOS, use --jdosw~list1 and optionally --jdosw2~list1.

Data is written to file jdos.ext; source code is found in optics/optint.f.

See this tutorial for an example.

--opt:read  |  --opt:write
Read or write matrix elements of the square of the velocity operator |v|2 to file optdata.ext.
  • Data is read or written for each band pair, k point, and spin (optical matrix elements).
  • |v|2 is symmetrized according to the given symmetry operations.
  • In the read case, the band pass is skipped and the band code proceeds directly to making the dielectric function (or a similar property).
  • In the write case, the band pass is skipped and the band code exits after writing; the dielectric function is not made.
--opt:woptmc  |  --opt:woptmc,rdqp
Writes the matrix elements both of the velocity operator v and |v|2, to file optdatac.ext.
  • |v|2, is symmetrized, but v is not.
  • Addition of modifier  ,rdqp  causes lmf to read the k-points from qpts.ext.
    Note:  to cause lmf to read the k-points in the same order that the GW codes require them, run lmfgwd with --job=6 or --job=7. and run lmf with --opt:woptmc,rdqp. This is necessary when setting up the velocity operator for Bethe-Salpeter equation.

See optics documentation.

Core level spectroscopy. After lmf completes, follow up the calculation with lmdos to generate a DOS-like file.
The theory used for this switch is described in J. Phys.: Condens. Matter 12 (2000).
To carry out CLS calculations in a potential containing a core hole, see tags SPEC_ATOM_C-HOLE and SPEC_ATOM_C-HQ when making the self-consistent density.

You must supply a list of core levels (site, l, and principal quantum number n) for which to calculate CLS.
Do it in one of three ways, through modifiers. Modifiers are separated by  '.' (any separator will do, e.g.  '#', other than  ':'  or  ',').

  • ib,l,n is a triple of site,core-l,core-n
  • lst=list,l,n is a list of sites having l and n in common
  • file=filename is a file of records of triples ib,l,n.

Example:  --cls#2,1,2#4,2,3#lst=3,5:7,0,1
produces the following list of (ib,l,n) for which to calculate CLS.


Tutorial:  See this tutorial and this tutorial.

Demonstration:  This makes CrN self-consistent with a core hole on a N 1s state, and performs CLS calculation in that potential. It corresponds to a ‘sudden approximation’ (system relaxes instantanously from electron ejected out of a core hole).
In your build directory do

./fp/test/test.fp crn

The CLS is written to a file in the DOS format. The script will ask you if you want to draw a figure of the CLS.

See Table of Contents

The following switches invoke editors. Invoke the editor to see see its usage.

Restart file editor — built into lmf.
Dynamic self-energy editor — built into lmfgws
Magnetic susceptibility editor — built into lmf.
Optics editor — built into lmf; see here for an instance of its usagex
QSGW self-energy editor

The following switches affect how lmf reads, writes, or modifies the QSGW self-energy Σ0.
Note:  Σ0 is stored in practice as , so that this potential can be added to the LDA potential.

lmf reads QSGW self-energy Σ0 from two files, sigm.ext and sigm1.ext. For Σ0 it takes the linear combination  #1×sigm.ext + #2×sigm1.ext.
If #2 is missing, it does not read sigm1.ext but scales Σ0 by #1.
Tells lmf about the form of the input self-energy file.

Options are delimited by  ~  (or the first character following --rsig).

  • ~ascii:  read from file sigma in ASCII format (see table below)
  • ~rs:  read in real space (see table below)
  • ~null:  generate a null consistent with the hamiltonian dimensions. Useful in combination with the sigma editor.
  • ~fbz:  flags that is stored for all k points in the full Brillouin zone. Equivalent to setting 10000s digit=1 in token RDSIG= . (Not meaningful if the ~rs switch is used)
  • ~spinav:  average spin channels in spin-polarized sigma
  • ~rlxkp:  when reading , do not impose requirement that each k correspond to the file k.
    Not generally advised, but useful in certain contexts, e.g shearing a lattice.
  • ~shftq=#,#,# indicates that sigma was generated on a kmesh offset by #,#,# #,#,# are optional; then a default of three small numbers is used.

If either ~ascii or ~rs is used, the input file name may change:

Writes a possibly modified QSGW self-energy to sigm2.ext and exits.

Options are delimited by  ~  (or the first character following --wsig):

  • ~ascii:  read sigm in ascii format (see table below)
  • ~newkp:  generate sigma on a new k mesh. It reads the mesh from GW_NKABC.
  • ~edit:  invoke the sigma editor. This editor has many options, which you can see by running the editor.
  • ~fbz:  causes lmf to ignore symmetry operations and generate a sigma file for k-points in the entire BZ. It is useful when generating a sigma file that allows fewer symmetry operations, e.g. when making the m-resolved density-of-states, or a trial sigm for a case (such as a shear) where symmetry operations are lowered.

The following are special-purpose modes

  • ~spinav:  average spin channels in spin-polarized sigma
  • ~onesp:  average spin channels in spin-polarized sigma
  • ~rot:  rotate the sigma matrix.
  • ~trans=#:  # specifies how sigma is to be modified, or if some special object is to be constructed instead of a band pass.
    • trans=1  Read sigm, save as-is Bloch-transformed sigm into file sigm2.ext.
    • trans=2  Read sigm, rotate from orbital basis to LDA basis and save into file sigm2.ext.
    • trans=3  Read sigm, approximate high-energy block by a diagonal matrix, and save sigm in LDA basis
    • trans=4  Make and save LDA eigenvalues, eigenvectors
  • ~phase:  Add phase shift to sigma
  • ~sumk:  sum sigma over k. Implies fbz
  • ~wvxcf:  read vxc file and write as vxcsig (used by lmfgwd).
  • ~shftq:  add qp offset to qp where sigma is made.

See Table of Contents

Switches for lmfgwd

lmfgwd is the interface to the GW code.

Command-line switches:

Tells lmfgwd what to make.
  1. Performs some sanity checks on GWinput.
  2. create GWinput template, and also KPTin1BZ, QIBZ.
  3. init mode : create files SYMOPSSYMOPSLATTCCLASSNLAindx.
  4. driver mode: make interface to the GW code: files  gwb.extgw1.extgw2.extgwa.extvxc.extevec.extnormchk.extrhoMT.*.
Write QSGW Σ0 in place of LDA exchange-correlation potential into vxc file. Use this switch when you are performing 1-shot GW calculations as a perturbation around the QSGW potential: the perturbation is Σ−Σ0.
Suppress shortening of k-points.

The following switches apply to GWinput creation mode (--job=−1):

Read parts of GWinput template from GWin0. Portions of GWin0 may substitute for corresponding parts in GWinput.

The GWinput syntax is roughly similar to the standard Questaal format but the syntax is more restricted. GWinput has categories but they are delimited by <name> and have a predetermined order. Also the first (Header) category has no delimiter.

GWin0 has the same structure as GWinput, but only parts of it are read and substituted for GWinput. The following subsitutions (arranged by category) are permitted:

  • Header (comments and tags at the top of the file, preceding the <PRODUCT BASIS> category. The header is read from GWin0 and used in place of GWinput. Next, the following line is written to GWinput:

    ! Supply possible tags not found in GWin0

    As the GWin0 file is read, the following tags are logged:

    • GWversion
    • KeepEigen
    • KeepPPOVL
    • BZmesh
    • WgtQ0P
    • NormChk
    • n1n2n3
    • QpGcut_psi
    • QpGcut_cou
    • unit_2pioa
    • alpha_OffG
    • emax_sigm
    • dw
    • omg_c
    • iSigMode
    • niw
    • delta
    • deltaw
    • esmr
    • rsm
    • GaussSmear

    Any tags in this list not logged are written to GWinput. in the same form that they would have been otherwise written.

  • Product basis section, which begins with delimiter <PRODUCT_BASIS>.
    These lines follow the delimiter:

    tolerance = minimum eigenvalue in PB overlap to reduce linear dependency
    [one or more floating point numbers]
    lcutmx(atom) = l-cutoff for the product basis
    [sequence of integers, one for each atom]

    If tolerance is present in GWin0, that line and the line following are substituted for the two lines that would normally be written.

    If lcutmx(atom) and the following line are present in GWin0, they are substituted for the two lines that would normally be written.

  • QPNT section, which begins with delimiter <QPNT>.

    If the following line is present in GWin0, it and the one following it are substituted for the two lines that would otherwise be written.

    *** Sigma ...

    If the following line is present in GWin0, it and the pair following it are substituted for the three lines that would otherwise be written.

    *** no. ...

    If the following line is present in GWin0

    *** q-points ...

    it and all subsequent lines to to the end-of-section (delimited by </QPNT>) are written to GWinput.


    Make a GWinput template in the usual way and copy it to GWin0, e.g.

    lmfgwd --job=-1
    cp GWinput GWin0

    Run lmfgwd again with the switch --gwin0 and compare GWinput to GWin0:

    lmfgwd --job=-1 --gwin0
    diff GWinput GWin0

    They should differ only in that an additional line is written to GWinput.

    ! Supply possible tags not found in GWin0

    Remove or modify various parts of GWin0 and see how GWinput changes.

Add lines to GWinput needed to make the dynamical self-energy, Σ(ω).
Note: With these modifications the 1-shot self-energy maker, hsfp0, must be run with --job=4. They do not affect QSGW self-energy maker, hs0fp0_sc.
Specify list of QP levels for which to make sigma (for 1-shot case only)
Make file Q0P. Usually this file is made by the GW package.

See Table of Contents

Switches for lm

lm is the main ASA density-functional code in the Questaal suite. See also lmgf and lmpg.

Command-line switches:

  • --rs=#1,#2
    • causes lm to read atomic data from a restart file rsta.ext. By default the ASA writes potential information, e.g. logarithmic derivative parameters P and energy moments of charge Q for each class to a separate file. If #1 is nonzero, data is read from rsta.ext, superseding information in class files. If #2 is nonzero, data written rsta.ext.
  • --band[~options]
    • tells lm to generate energy bands instead of making a self-consistent calculation. See here for options.
  • --pdos[~options]
    • tells lm to generate weights for density-of-states or Mulliken analysis resolved into partial waves. Options are described here
  • --mix=#
    • start the density mixing at rule  ’#’. See here for a description of the mixing tag.
  • --onesp
    • in the spin-polarized collinear case, tells the program that the spin-up and spin-down hamiltonians are equivalent (special antiferromagnetic case)
  • --sh=cmd
    • invoke the shell cmd after every iteration. (Not maintained).

See Table of Contents

Switches for lmgf

lmgf is Green’s function code based on the ASA. See also lm and lmpg.

To obtain the charge density or other integrated properties, lmgf requires an energy integration in addition to the k integration. The Fermi level must be found by iteration; alternatively (which is what this code does), it shifts the system by a constant potential to reach the prescribed Fermi level.

Command-line switches:

The following is specific to the exchange modes GF_MODE≥10

  • –sites[~pair]~site-list
    • GF_MODE=10 | GF_MODE>11:  calculate exchange interactions only for atoms in site-list
      Additional ~pair also restricts coupling to neighors for sites in the list.
    • GF_MODE=11:  Analyze exchange interactions only for atoms in site-list.
  • –vshft
    Read and apply constant potential shifts from file vshft.ext

The following are specific to the exchange-analysis mode GF_MODE=11

  • –wrsj[:j00][:amom][:sscl][:[g]scl=#][:tol=#]:
    Write exchange parameters to file, which can be used, e.g. by lmmag.
  • –wmfj:
    Output J(q=0) as input for mean-field calculation
  • –rcut=rcut:
    Truncate J(R-R’) to radius rcut
  • –tolJq=#:
    Sets tolerance for allowed deviation from symmetry in Jr
  • –amom[s]=mom1,mom2,…:
    Overrides moments calculated from ASA moments Q. Affects scaling of exchange parameters.\ Particularly useful when lmgf is being used to analyze exchange interactions computed from the GW code.
  • –2xrpa:
    Doubles the mesh of J(q) when estimating the critical temperature in RPA.
  • –long:
    Write spin wave energies with extra digits
  • –qp=fn:
    Read qp for SW energies from file fn

See Table of Contents

Switches for lmdos

lmdos is a postprocessing step that generates partial densities-of-states. It reads the weights file moms.ext generated by another program and makes partial contributions to the total DOS. Partial dos can be computed either with tetrahedron integration or with gaussian sampling moms.ext must be made in advance by a generating program, typically lmf, lm or tbe.

How channels for partial DOS are specified depends on the context. Typically you generate moms.ext specifying channels with --pdos. lmdos expects the DOS to be ordered as specified by the switch. lm will generates moms.ext even without --pdos, and orders the channels by class. If you invoke lmdos without --pdos, it assumes the ASA ordering.

Otherwise it assumes the weights are generated and stored by class. This works with lm and tbe, but otherwise, generate moms.ext with --pdos or something similar.

lmdos doesn’t need to know what the origin of the channels is; it simply reads the number of channels from the weights file. However, to assist you in making an identification of the channels with atom-centered functions, it will print out what it thinks the connection is.
Caution: lmdos may print out if you use the generating program inconsistently with it.

lmdos has a variety of options; for example it can generate the ballistic conductivity as matrix elements of the velocity operator.

Either of the following switches causes the generating program (lmf, lm, or tbe) to create moms.ext


Run the postprocessing lmdos after moms.ext has been made, with the same switch and arguments.

Command-line options:

--pdos | --mull [~mode=#][~sites=site-list][~group=lst1;lst2;…][~nl=#][~lcut=l1,l2,…]
Specifies the channels for which partial DOS are generated or analyzed.
Note: this switch applies to the both the generating program and lmdos. Use the same arguments for generating and postprocessing.
--pdos  partial DOS
--mull  Mulliken DOS
Options are delimited by  ~  (or the first character following --pdos):
  • ~mode=#:
    • #=0  DOS resolved by site
    • #=1  DOS resolved by l and site
    • #=2  DOS resolved by lm and site.
  • ~sites=site-list:  make DOS for a list of sites.
  • ~group=lst1;lst2;…:  DOS for a list of groups. A group can consist of one or more sites, which are combined to make a single channel.
  • ~nl=#:  a global l cutoff: l are written to maximum value of  #−1.
  • ~lcut=l1,l2,…:   l-cutoff for each group or site in the group or site list.

Example from the pldos manual :   --pdos~mode=2~group=1:3;4:9~lcut=2,1
makes DOS for sites 1:3 combined for the first channel, sites 4:9 for the second. DOS is resolved by l and m (mode=2), with l=0,1,2 for the first group and l=0,1 for the second.
See also this tutorial.

Various options that affect the action of lmdos (some elements apply to lmf for the total DOS).
Options are delimited by  ~  (or the first character following --dos):
  • wtfn=filename: name the file containing bands and DOS weights. By default, lmdos uses moms.ext.
  • cls: equivalent to wtfn=cls. To be used in conjunction with lmf’s core-level spectroscopy (--cls switch).
  • tbdos: sets defaults for to generate dos generated by tbe, which uses slightly different conventions.
  • idos: generate energy-integrated DOS.
  • npts=#: number of energy points. If unspecified with this command-line argument, user is prompted for this number
  • window=emin,emax: energy window over which data is to be computed. Defines the mesh together with npts.
    If unspecified with this command-line argument, the user is prompted for this number
  • mode=# compute quantities other than the DOS.
    • #=0  Standard DOS, i.e. ∫ d3k δ(E(k)-E)
    • #=1  Ballistic conductance, Landauer formula, i.e.   ∫ d3k δ(E(k)-E) ∇E(k)
      In this mode, you must supply vector vec to indicate which direction the gradient is to be projected.
    • #=2  diffusive conductivity in the relaxation time approximation ∫ d3k δ(E(k)-E) ∇1E(k) · ∇2E(k) In this mode you must supply both vec and vec2.
  • vec=#1,#2,#3:  k direction vector 1 for mode=1 or mode=2.
  • vec2=#1,#2,#3: k direction vector 2 for mode=2.
  • totdos: compute total DOS by combining weights from all partial DOS.
    Note: if input moments file has no special channels, this is the default.
  • rdm: write DOS in standard Questaal format.
  • ldig: read/write DOS with extra digits.
  • bands=list: compute contribution to DOS from a prescribed list of bands.
  • classes=list: generate DOS for a specified list of classes
    Caution: this option is only compatible with default moments files generated by the ASA, which stores dos weights by class. It is incompatible with the --pdos switch which stores weights by site.

Example: compute the ballistic conductance in the z direction over an energy range (-0.8,0.5)Ry:

tells lmdos that the moms.ext holds data for core-level (EELS) spectrosopy (lmf output).

See Table of Contents

Switches for lmscell

lmscell operates in one of two modes: supercell maker and superlattice maker. By default, lmscell operates in the supercell mode; the command-line switches corresponding to that mode are explained here.

Caution: lmscell may fail if you choose a supercell significantly elongated from the original, because the list of lattice vectors may not encompass all the translations needed to create the new basis.

--wsite[x][~map][~sort][~fn=file]  |  --wpos=file
Writes a site file to disk, or a positions file to dist.
--wsite[x] writes a site file with positions expressed as fractional multiples of lattice vectors. --wpos writes a file of site positions in standard Questaal format.
  • ~fn=file :   writes site file to file.ext.
  • ~quad1 :   translates site positions to first quadrant in unit cell.
  • ~short :   write site file in short form
  • ~map:   appends a table mapping sites in the original cell to the supercell
Translate basis atoms by constant vector (Cartesian coordinates or multiples of suplattice vectors)
--ring:i1,i2  |  --swap:i1,i2  |  --sort: expr1  |  --sort:’expr1 expr2’  |  --sort:’expr1 expr2 expr3
Rearrange order of sites in the supercell.
(ring) shifts sites i1…i2-1 to one position higher, and site i2 cycles to position i1.
(swap) swaps pairs i1 and i2
(sort) Sorts the basis by ordering algebraic expressions associated with them.
Expressions can use Cartesian components x1, x2, x3, e.g. --sort:’x3 x2’.
Optional expr2 sorts subsets of sites with equivalent values of expr1, similarly for expr3.
Make supercell of subset of sites in original basis. See here for site-list syntax.
--rsta  |  –rsta,amom
(ASA only) Makes ASA restart file for the supercell from existing file rsta.ext.
Optional amom applies to noncollinear magnetism: it flips the majority and minority spins for sites where the magnetic moment is negative, while rotating the Euler angle by 180°
shorten basis vectors.
(for lmpg code) Assign principal-layer index according to expr. Sites with equivalent values of expr are assigned the same PL index.
Writing the pairwise exchange parameters of the supercell generated, e.g., from lmgf. Input file rsj.ext must be present.
Displace a set of atoms in the neighborhood of a given one, e.g. --disp:tab2:style=3:Fex
Use in conjunction with lmchk command line argument (--shell~tab=2~disp=file). See here for site-list syntax.
Make a Special QuasiRandom Structure. It works by minimizing a norm function.
The norm is obtained by assigning a weight to each pair and three body correlator, and summing the individual weights.

Options are delimited by  ~  (or the first character following --shell):
~seed=#:  initial seed for random number generator. For a fixed seed the algorithm proceeds the same way each time.
~r2max=#:  Maximum distance between pairs for pair participate in the norm
~r3max=#:  Maximum sum of legs between for triples to participate in the norm.

Caution: This mode is still experimental.

See Table of Contents

Switches for lmfgws

lmfgws is the analyzer of the dynamical GW self-energy. You need to create the self-energy first and set up the input file (se) using spectral. See this tutorial.

  • –sfuned
    Run the spectral function editor. Its usage is documented in this tutorial. There is also a help mode when you run the editor interactively.

Switches for lmfdmft

lmdmft serves both as an interface linking lmf with DMFT solvers, and as a means to extract results given a DMFT-generated self-energy.
lmdmft requires an extra input file, indmfl.ext, that specifies the correlated orbitals and other conditions for DMFT calculations.

The DMFT code will generate a self-energy for the correlated channels. In the interface to Haule’s CTQMC code, this file is called sig.inp. If sig.inp is missing, lmdmft will make template for a Matsubara frequencies specified in the ctrl file, and populate the DMFT self-energy with 0.


  • --job=#:
    Set DMFT job to #
    • 0 creates files lattice, class
    • 1 setup for DMFT run or to perform analysis
  • --ldadc=#:
    Set double counting to #, using LDA double counting formula.
  • --makesigqp[:mode=#]:
    makes quasiparticle DMFT sigma, in format of QSGW sigma file.
  • --udrs:
    Generate and save output density.
  • --gprt[~rdsigr=fn][~rdsigr=fn][~mode=#][~band[@flags]][~nom=#]:
    Write local Green’s function gloc to disk. Options are delimited by the first character following --gprt ( ~  in this case).
    • ~rdsigr=fn   reads frequencies and self-energy from file fn. Frequencies are taken to be real.
    • ~rdsig=fn   reads frequencies and self-energy from file fn. Frequencies are taken to be Matsubara frequencies (imaginary).
      If you do not read frequencies, the code will use the standard (Matsubara) frequencies that build the hybridization function.
    • ~mode=#   choose from the following:
      • #=1   k-integrated gloc (this is the default)
      • #=2   k-resolved gkloc (output in gkloc.ext)
      • #=3   both 1 and 2
      • #=4   k-resolved hkloc (output in hkloc.ext)
      • #=8   k-resolved G in the basis of 1-particle eigenfunctions (output in gk.ext)
      • #=18   write diagonal in the basis of 1-particle eigenfunctions (output in se.ext)
      • #=19   write diagonal in the basis of 1-particle eigenfunctions (output in se.ext)
  • ~nom=#    calculate G only for the first # points.
  • ~band[@flags]   generates the self-energy for an independent set of k points, specified through the options modifying band.
    Flags are identical to those following the --band switch, and delimited by the first character following band ( @  in this case).
    It must be distinct from the delimiter to --gprt.
  • --dos:      Make dos (not documented; also implementation is correct only when sigma is static).
  • --mu=#:
    Use  #  for chemical potential, instead of calculating it.

See Table of Contents

Switches for spectral

spectral is a postprocessor of the raw GW dynamical self-energy files SEComg.UP and SEComg.DN.
Its main purpose is to translate self-energies generated by the GW self-energy maker hsfp0, into an input file se.ext that the dynamical self-energy analyzer, lmfgws, can read.

spectral also has a limited ability to make spectral functions, and most of its command-line switches are intended for that purpose.

spectral is used in the GW self-energy tutorial in both contexts, illustrating the switches below.

Note on interpolation: the spectral function is only reliable on a fine energy mesh. Unless many-body effects are very pronounced (rare in a GW context), varies smoothly with ω and can be interpolated to a fine mesh. nw and domg are designed to interpolate Σ. If you want to interpolate, choose one or the other.

If you are using spectral only to make se for lmfgws, it is better not to interpolate and use --nw=1.


  • --ws  |  --ws:x
    Does no analysis but write a self-energy file (se) for all k, suitable for reading by lmfgws.
    --ws:x performs the same function but also writes the exchange potential to se.ext.
    Note: when using this switch, --nw=1 is advised, since lmfgws can do its own interpolation.
  • --nw=nw
    Subdivide input energy mesh nw times
  • --domg=#
    Target energy spacing for A(ω), eV. nw is chosen that bests fits target domg.
  • --1shot
    evals do not correspond with QP levels
  • --range=ω1,ω2: restrict generated results to ω1 < ω < ω2
  • --eps=#
    smearing width, in eV.
  • --cnst:expr
    Exclude entries in SEComg.{UP,DN} for which expr is nonzero. expr is an integer expression that can include the following variables:
    • ib (band index)
    • iq (k-point index)
    • qx,qy,qz,q (components of q, and amplitude)
    • eqp (quasiparticle level)
    • spin (1 or 2)

    Example: Use only the first k-point and exclude Σ from QP levels whose bands fall below -10 eV.

See Table of Contents

Switches for reads spectral function files in the spf format, and makes figures from them. It reads a file spf.ext and writes data specfun.pm3d and gnu plotting script gnu.plt

The script is self-documenting. For help, try:

$  -h

Switches for fplot, plbnds, pldos

Switches for these utilities are found in the fplot manual, plbnds manual, and pldos manual.

Switches for vextract

vextract is a script that extracts values associated with variables from a list of lines, such as is found in a save file, for example

i gmax=4.4 nkabc=3 ehf=-0.2950731 ehk=-0.2950686
i gmax=6 nkabc=3 ehf=-0.294891 ehk=-0.294886

The script is self-documenting. For help, try:

$ vextract --h

Switches for symlinepoints

symlinepoints is a script that structures a file containing k point information into Questaal’s symmetry lines format. The symmetry lines file is used to generate energy band structures. You can supply k points in one of several possible forms.

This script is self-documenting. For help, run symlinepoints with no arguments or with --h, viz

$ symlinepoints --h

Switches are:

  • -nk=#
    Specify number of k-points on a line as (length of line)×#.
    This is useful because points on each line will be have approximately the same spacing.

  • -qlat=qfile | -qlatl=qfile
    Specify that each k-point is a multiple of the reciprocal lattice vectors (RLV).
    qfile is a file containing is a 3×3 matrix (9 elements) with elements ordered as follows:

      Qx1 Qy1 Qz1 Qx2 Qy2 Qz2 Qx3 Qy3 Qz3

    Questaal codes print out the RLV in this order. You can create qfile by doing, e.g.

      $ lmchk ext [switches] | grep -A 3 Qlat | tail -3 | awk '{print , , }' > qfile

    See this tutorial for an example.

    -qlat and -qlatl both interpret input k points as multiples of the reciprocal lattice vectors. The former writes them out as Cartesian coordinates, while the latter as multiples of RLV. Note: if the symmetry lines file contains k points in multiples of the RLV, be sure to generate the bands with  --band~mq .

  • –in=all (default)
    Each row has format: nk q1x q1y q1z q2x q2y q2z [string]
  • –in=q
    Each row has format: q1x q1y q1z q2x q2y q2z [string]
  • –in=q1
    Each row has format: q1x q1y q1z [string]

  • –help  |  –h show this message

Switches for lmctl

lmctl is an adjunct to the ASA, that read sphere moments from class files and writes the data in a form suitable for the input file. It is an easy way to collect the results into the ctrl file.

Command-line switches:

  • -spin1:  add spin-polarized moments into a non-polarized set
  • -spinf:  exchange up- and down- moments
  • -mad:  also write out the electrostatic potential, ves, at RMAX

See Table of Contents

Switches for tbe

tbe is the empirical tight-binding code.

Command-line switches:

  • --mxq:   do charge mixing
  • --mxq2:   mix spin and charge separately
  • --efield=#,#,#:  (MOL=T only) apply an electric field (atomic Rydberg units)
  • --st:    start new MD run (otherwise strt is read); begin new md, mv and xyz files
  • --md=#:   in MD write info to the md file every # timesteps
  • --mc=#:   in MD or static relaxation write to the xbs mv file every # steps
  • --xyz=#:  in MD or static relaxation write to a standard xyz file every # steps
  • --leanrho:  in MPI, try to save memory at the expense of some communication

The following switches apply to MPI process mapping options. In most cases the default mapping is the optimal choice.

  • --kblocks:  Number of rectangular processor blocks over which to distribute the k-points
  • --nprows:  Number of rows of the ScaLAPACK/BLACS process arrays/blocks.

Switches for lmxbs

lmxbs generates input for the graphics program xbs, a program written by M. Methfessel, which draws cartoons of crystals. See this page.

Command-line switches:

  • -bs=expr:  factor that scales the default ball (sphere) size. This factor scales SPEC_RMAX by expr**. By default, the scaling is 0.5.
  • -ss=expr:  controls the criterion for what length defines a connected bond. This switch scales the default factor scaling a ‘bond length’ which must be closer than RMAXi+RMAXj.
  • -shift=x1,x2,x3:  shifts all the coordinates by this amount, in units of ALAT.
  • -scale=val:  sets the xbs variable scale.
  • -spec:  shifts Organize sites by species (e.g. colors). By default sites are organized by classes.

  • -sp:rule1[:rule2][…]:  modifies the species rmax and colors.
    rule has the syntax
    expr is a logical expression involving the class index ic and atomic number z. If expr evalates to true, the rule applies to this class. rmax, red, green, blue are the ball size, and RGB colors for the ball. Default values are taken for those numbers omitted. For the colors, the defaults are random numbers between 0 and 1.

    Example: lmxbs -sp:z==0,.5,.1,.1,.1:z==13&ic>3,,1,0,0:z==13,,0,1,0’
    Empty spheres are nearly black, with rmax=.5 and Al atoms class index > 3 are red, with all remaining Al atoms green.

  • -dup=n1,n2,n3[,expr]:  duplicates the unit cell n1+1,n2+1,n3+1 times in the three lattice directions. Optional expr is a constraint. If expr is present, sites whose for which expr is zero are excluded.
    Variables that may be used in expr are:
    • x1,x2,x3 site positions, in units of ALAT
    • p1,p2,p3 site positions, as projections onto plat
    • ic,ib,z,r class index, basis index, atomic number, and radius

    Example: lmxbs   “-dup=4,4,4,0<=x1&x1<1.01&0<=x2&x2<1.01&0<=x3&x3<1.01&z>0”
    selects sites in a (dimensionless) cube of size 1 and exclude empty spheres.

See Table of Contents

Switches for site2init

site2init converts a site file to an init file, writing it to stdout, as explained here.

site2init   [-switches]   [site-filename]

sitefile-name is the full filename (no extension is appended). If the argument is missing, sitein is used.


  • -header=string:  Uses string for the header.
  • -wsitex  |  --wsitex:  writes basis vectors as multiples of the lattice vectors, instead of Cartesian coordinates.

See Table of Contents

Site-list syntax

Site-lists are used in command-line arguments in several contexts, e.g. in lmscell, lmgf’s exchange maker, and lmchk’s --shell and --angles switches.
For definiteness assume  ~  is the delimiter and the segment being parsed is sites~site-list.
sites~site-list can take one of the following forms:

list is an integer list of site indices, e.g. 1,5:9. The syntax for integer lists is described here.
list is an integer list of species or class indices (depending on the switch).

All sites which belong a species in the species (or class) list get included in the site list.

expr is an integer expression. The expression can involve the species index is (or class index ic) and atomic number z.
The species list (or class list) is composed of members for which expr is nonzero.
All sites which belong a species in the species (or class) list form the site list.
spec1,spec2,… are a string of one or more species names. The species list (or class list) is composed of species with a name in the list.

All sites which belong a species in the species (or class) list form the site list.

Note: some ASA-specific switches refer to class-list. The structure is identical to the construction above, except that the class list is not expanded into a site list.

See Table of Contents
Edit This Page