Questaal Home

Including Augmented Plane Waves in the lmf Basis Set

Table of Contents

Command Summary

These commands are sufficient to run the tutorial. They may not work in all environments, especially if they make use of tools like awk which can differ between MacOS and Linux. If you want more information or are running in to problems, read the tutorial in full.


This tutorial assumes you have cloned and built the lm repository (located here). For the purpose of demonstration, ~/lm will refer to the location of the cloned repository (source directory). In practice, this directory can be named differently.

All instances of commands assume the starting position is your build directory (this can be checked with the pwd command). In this tutorial it will be called ~/build/.

$ cd ~/build/

with ~/build being the directory the lm repository was built in to.

Note: the build directory should be different from the source directory.


Adding APWs to lmf is exemplified in these test cases

$ fp/test/test.fp srtio3
$ fp/test/test.fp cu

Should you want a more in depth look, or a practical example, these are good places to start. We will use these as a base and go through the steps required to add the APWs.

For APWs the important points are in the tokens used (tokens, of course, can be added either in the ctrl file or as part of the command line arguments, see here and here, for this tutorial we will use the command line argument method).

The tokens of importance are (these can be seen in detail here)


Specifically, PWMODE tells lmf how to add APWs to the basis. For our example we will use 11 (default=0), see the link above for a detailed description of the options. PWEMAX is the upper cutoff energy in Rydbergs, only G-vectors whose energy falls below this value will be included. Similarly, PWEMIN is the lower cutoff energy.

OVEPS, if its value is positive, tells lmf to diagonalise the overlap matrix and eliminate the subspace which has eigenvalues smaller than #. Necessary, as using many APWs can cause the overlap matrix to become nearly singular and thus unstable. A good value for OVEPS is 1E-7.

To continue our tutorial, we will focus on cu. First you must copy your and files to your working directory. Tutorials and documentation on these files can be found here and here respectively. Stock files can be found, in your lm repository, at:


To be used as references in building your more personally tailored files, or as a way to quickly jump in to the simulations. First, as with all lmf simulations, we must run lmfa to generate the free atom densities

lmfa --no-iactiv cu -vnk=8 -vbigbas=f

This runs lmfa, vnk=8 (which sets BZ_NKABC) telling it to use 8 divisions in the three directions (all 8) of the reciporcal lattice vectors. We then run our lmf command:

lmf  --no-iactiv cu -vnk=8 -vbigbas=t -vpwmode=11 -voveps=0d-7 --band:fn=syml

Breaking this command down: vnk=8 is as described above. -vpwmode=11, which sets HAM_PWMODE to 11, specifically tells lmf to use a LMTO basis only, and to fix the basis (read more here). -voveps=0d-7, being a positive value, works as described above. Finally, –band tells lmf to generate a file which is important for plotting our energy bands.

We now have our and the simulation is complete. You can plot this file with your preffered plotting software, although some data manipulaton may be required. Instructions for fplot are provided below:

cp bnds.lapw
echo -10 40 5 10 | plbnds -lbl=L,G,X,W,G,K -ef=0 -scl=13.6 -fplot -dat=apw bnds.lapw
cp bnds.lmto
echo -10 40 5 10 | plbnds -lbl=L,G,X,W,G,K -ef=0 -scl=13.6 -fplot -dat=lmto bnds.lmto
awk 'BEGIN {print "%char0 lta=2,bold=3,col=1,0,0"} {if ( $1 == "-colsy") {sub("lmto","apw"); sub("ltb","lta");print} else {print}}' plot.plbnds > plot.plbnds~
fplot -disp -f plot.plbnds~

Questions or Comments

If this page has any errors, there is something you think is missing or unclear, or for any other issues, you can create a post here letting us know.

This thread is intended for questions or comments about the tutorial page 'Including Augmented Plane Waves in the lmf Basis Set' located here.

Feel free to ask questions (or answer!) about the physics found on the page, to get help with the Questaal commands listed or for guidance on how to use Questaal for a similar application that the page did not cover.

For questions about physics or Questaal usage not related to this page, have a look around the site as you may find someone has already asked your question or you can post it yourself in the general questions category.

If you spot a bug, an error or have a suggestion for improvement, please use the GitLab issues page instead.

Anyone is welcome to contribute!