Plotting bands using lmf and plbnds
Plotting bands using lmf is very easy. Once a calculation has been converged, lmf is restarted using the “–band” option, which calculates the eigenvalues at along a predefined path. Questaal comes with several tools for simplifying the plotting bands and producing simple figures, but the bnds.extn file has a simple format and is easily plotted otherwise.
We will look at the cubic perovskite strontium titanate and repeat the steps to setup the calculation starting from a cif file:
Edit the ctrl file and increase the number of iterations to ~20, and maybe choose the libxc’s PBE implementation (XCFUN=0 101 130).
The option –usebasp causes lmfa to write to the basp file directly. lmfa suggests a GMAX of 10.0 a.u., add this to the ctrl file also. A k-mesh of at least 8^3 is reasonable (feel free to check): either edit the ctrl file or invoke lmf with the option -vnkabc=8.
lmf reports in the first output lines that it is indeed using the PBE-GGA:
Converging the calculation should take 10 seconds or so.
Simple band plot
Create a file named qp.sto containing the following:
Each line of the file describes a section of a path in . The first column is the number of points in each segment followed by Cartesian coordinates of the start and end points. lmchk is capable of setting this up automatically, including proportionate scaling of the divisions.
Produces bnds.sto, an ASCII tabulation of the eigenvalues for along the path. –band takes various options, eg, –band~fn=syml causes syml.sto to be read instead of qp.sto.
Plotting using the plbnds utility
The plbnds tool reads the bnds.sto file and prepares instructions for the fplot plotting program (part of Questaal) that can generate postscript figures more or less automatically.
The meaning of the different options are:
- a: ymin, here in eV, of the figure to be produced
- b: ymax
- c: width in cm of the figure
- d: height (these could alternatively be provided interactively)
- e: prepare output for fplot
- f: shift to zero in the plot
- g: scale energies to eV
- h: labels for the plot – these should correspond to the coordinates in qp.sto
Finally, fplot can be executed to give a postscript file:
Which should produce a completely acceptable band structure plot: copy it to the local machine to have a look.
- fplot is quite an advanced package for general plotting tasks – fplot.
- Documentation for plbnds is here : plbnds.
Colouring band plots according to Mulliken decomposition
The bnd file can also be written with one or two weights for each eigenvalue, corresponding to the weight of different basis functions in the eigenfunction. In order to use this, we need to find the position in the Hamiltonian of the basis functions we are interested in – this is printed by lmf when the output verbosity is higher than normal:
yields:
Selecting the titanium d basis functions (the list syntax can be quite complex see here):
A second set can be included as ~col2, if desired. Then plotting proceeds:
which is the same as before except that the default colour and the weighted colour have been defined (black and red, in rgb).
Optical properties using lmf
lmf allows the calculation of dielectric function and joint densities of states. These are controlled by the OPTICS ctrl category, “lmf –input” reports:
For example, Im evaluated between 0 and 1 Ryd, in 1001 bins:
lmf again will now print the following after the k-integration step:
The range of bands included in the calculation can be reduced using the options OPTICS_FILBND and OPTICS_EMPBND. There are ways to decompose the output by or by band, see this tutorial for instructions.
The opt.sto file contains the energy and Im for polarisations along x,y,z (which are identical in this case). Copy the file to the local machine and plot using gnuplot, xmgrace or python.
Resolving the dielectric function precisely generally requires quite many k-points. Because of the LDA underestimate of the gap, this plot looks rather different to the experimental one.