# Capabilities

Questaal is a suite of codes that implements various forms of *ab initio* electronic structure theory, and a brief overview is presented on this page. The purpose of the present page is to point to different capabilities available, organized by application rather than by code.

This page briefly explains what *ab initio* methods are, and a comparative survey of the different flavors of first principles methods in the literature. For a very brief comparison of the relative advantages different *ab initio* methods offer, and why the quasiparticle self-consistent *GW* approximation (Questaal’s trademark feature), can be particularly advantageous, see this page.

Several tutorials have been written to explain a particular capability in some detail. Where tutorials are available, this page will point to them. However, many features do not have accompanying tutorials, and this page points to a script in Questaal’s testing suite to demonstrate the functionality. For definiteness, we assume that the top-level directory is named *~/lm*.

### Table of Contents

- Drawing Energy Bands
- Drawing Fermi Surfaces
- Density-of-States, Partial DOS, Mulliken Analysis and Core Level Spectroscopy
- Spectral Functions
- Obtaining a Self-Energy in Dynamical Mean Field Theory
- Dielectric Response and Optics
- Spin Susceptibility and Magnetic Exchange Interactions
- Properties of Disordered Materials and the Coherent Potential Approximation
- Molecular Statics
- Molecular Dynamics
- Noncollinear Magnetism
- Spin Statistics: Relaxation of Spin Quantization Axis
- Spin Orbit Coupling
- Fully Relativistic Dirac Equation
- Application of External Scalar Potential
- Fixed spin-moment
- Drawing Charge densities
- Application of External Zeeman B Field
- Using Functionals Other Than LDA
- LDA+U
- Adding a Homogenous Background Density
- Band Edge and Effective Mass Finder
- Building a Supercell
- Point Defects in Large Supercells
- Special Quasirandom Structures
- Spin Dynamics and Spin Statics
- Phonons
- Other Notes
- References

### Drawing Energy Bands

Energy bands can be drawn with the *lmf*, *lm*, *tbe*, *lmfgws*, *lmfdmft*, and *lmgf* codes. using the band mode.

This tutorial uses the ASA code *lm*; this one uses the full-potential code *lmf*, while this tutorial makes energy bands in the LDA and QS*GW*.

Particularly useful are the color weights as shown in this tutorial and this one.

The Green’s function codes (*lmgf*, the *GW* and DMFT codes) are somewhat more complicated, as the bands are broadened, either through alloy scattering (CPA) or through many-body electron-electron interactions. Interacting energy bands for Fe generated by the fully dynamical self-energy are generated in this tutorial, and those for La_{2}CuO_{4} generated by DMFT are explained in this tutorial.

The *plbnds* utility is a very useful tool to render the bands generated by band codes in an easy-to read format for graphics packages to make figures with. It automatically makes a script for Questaal’s *fplot* (graphics utility). The *plbnds* documentation offers several examples.

### Drawing Fermi Surfaces

Fermi surfaces can be drawn with the *lmf* and *lm* codes. See this tutorial. The tutorial shows several ways you can use colors when making Fermi surfaces.

### Density-of-States, Partial DOS, Mulliken Analysis and Core Level Spectroscopy

All of the band codes (*lmf*, *lm*, and *tbe*) have the ability to generate the total density-of-states (DOS). Total DOS are automatically generated when you set **BZ_SAVDOS**. DOS are written to file *dos.ext* (one DOS in the nonmagnetic case and two in the spin-polarized case). *Note:* this switch will not be active if **BZ_METAL** is zero. You can also make the DOS using the command-line switch **--dos** as described in this tutorial.

The *pldos* utility will render *dos.ext* into more user friendly formats, and perform other functions.

Questaal codes *lmf* and *lm* can resolve densities-of-states into partial contributions, either by projecting onto partial waves in augmentation spheres, or by Mulliken analysis. Questaal can also perform Core-Level Spectroscopy (CLS), also known as EELS, which is closely related to the DOS.

Accomplish these by adding one of following switches to the commmand-line:

**--dos**generates total DOS**--pdos**projects onto partial waves in augmentation spheres**--mull**projects onto basis functions.**--cls**performs core-level spectroscopy.

All the switches have several options; for **--pdos** and **--mull** see here; for **--cls** see here.

Tutorials for partial DOS, Mulliken analysis, and core-level spectroscopy, can be found on this page.

For *k*-resolved DOS, and as well as joint projection of *k* resolved and Mulliken resolved DOS onto orbitals, see this tutorial.

*lmgf* and *lmpg* can make partial DOS. They can either do it by Pade extrapolation to the real axis of the imaginary part of the Green’s function calculated on the contour in the complex plane, or you can choose a contour close to the real axis and generate DOS directly. The latter is more accurate, but more time consuming. For a demonstration, try

```
$ ~/lm/src/gf/test/test.gf nife
```

### Spectral Functions

DOS are equivalent to spectral functions, though generally spectral functions refer to DOS when there is some scattering to spread out the pole in from a noninteracting eigenstate at energy .

Codes calculate spectral functions for interacting electrons in several contexts:

- Calculated from
*GW*. See this tutorial. - Calculated in Dynamical Mean Field Theory. See the DMFT tutorial.
- The ASA Green’s function code
*lmgf*will calculate spectral functions in the context of the Coherent Potential Approximation, see this document. Electrons aren’t interacting in the many-body sense here; disorder causes scattering which has the same effect.

### Obtaining a Self-Energy in Dynamical Mean Field Theory

See this document and this tutorial.

### Dielectric Response and Optics

See this document and this tutorial.

### Spin Susceptibility and Magnetic Exchange Interactions

For spin susceptibility in the ASA-Green’s function scheme, see this tutorial.

For a demonstration of the transverse magnetic susceptibility in the *GW* frameowork, try

```
$ gwd/test/test.gwd zbmnas 6
```

### Properties of Disordered Materials and the Coherent Potential Approximation

The ASA Green’s function code *lmgf* can treat chemical and spin disorder, and both at the same time, with the Coherent Potential approximation. It is documented here.

### Molecular Statics

This tutorial shows how to use *lmf* to relax the crystal structure in Se to its equilibrium geometry.

### Molecular Dynamics

*lmf* can do molecular dynamics, but other DFT codes that use iterative diagonalization generally are more efficient.

The empirical tight-binding code *tbe* has an efficient implementation.

### Noncollinear Magnetism

This is available only in the ASA at present. There are no tutorials as yet. However, the source code has a number of tests that illustrate noncollinear magnetism. Try

```
$ ~/lm/src/nc/test/test.nc --list
$ ~/lm/src/gf/test/test.gf --list
$ ~/lm/src/pgf/test/test.pgf --list
```

### Spin Statistics: Relaxation of Spin Quantization Axis

*lm* and *lmgf* can perform “spin statics” — the analog of molecular statics where the spin quantization axis is relaxed to where the off-diagonal parts of the spin density matrix vanish.

There are no tutorials as yet. But try:

```
$ ~/lm/src/gf/test/test.gf nife
```

### Spin Orbit Coupling

Spin orbit coupling is implemented in different ways in the Questaal suite. See this introduction to spin orbit coupling.

*lmf* solves the scalar Dirac hamiltonian. The dominant difference between the full Dirac hamiltonian and the scalar one is the spin orbit coupling, which can be added as a term to the scalar Dirac Hamiltonian.

*lmf* can add to the scalar Dirac hamiltonian (courtesy of A. Chantis). It can be done in different ways

- Include the full coupling. The two independent spins are coupled, which doubles the rank of the hamiltonian.
- Include the part only. The spins are kept independent, and the hamiltonian rank is unchanged.
- can be added where the last term is added perturbatively. If
*Z*is not too large the approximation can be be rather good and because eigenfunctions are modified only by the term, and the hamiltonian rank is unchanged. The QS*GW*code does not as yet allow for the full coupling, so to use SO in this the*GW*part, you must use this switch for that purpose.

For illustrations of all three kinds of approaches, try

```
~/lm/src/fp/test/test.fp felz
~/lm/src/fp/test/test.fp gasls
~/lm/src/fp/test/test.fp coptso
```

The last test is an extensive one.

The ASA has a full noncollinear capability, and can implement spin orbit coupling similarly to *lmf*, in the collinear case and in the noncollinear case.. It also has a full Dirac solver.

The following test demonstrates the addition of into the band code *lm*:

```
$ ~/lm/src/nc/test/test.so
```

This test combines CPA and spin orbit coupling in *lmgf*:

```
$ ~/lm/src/gf/test/test.gf fe2b
```

### Fully Relativistic Dirac Equation

The Dirac equation is implemented in the ASA, in codes *lm* and *lmgf*.

There is no tutorial as yet. See this demonstration:

```
$ ~/lm/src/gf/test/test.frgf ni
```

*lmfa* will generate core levels from the Dirac equation. See this tutorial.

### Application of External Scalar Potential

For the *lmf* code, try the following demonstration:

```
$ ~/lm/src/fp/test/test.fp mgo
```

### Fixed spin-moment

One technique stabilize self-consistency in difficut magnetic calculations, or to extract quantities such as the magnetic susceptibility, you can imposed a fixed magnetic moment by imposing distinct Fermi levels for each spin. This is equivalent to imposing a static, Zeeman field.

The following tests demonstrate the fixed-spin moment technique

```
$ fp/test/test.fp felz
$ fp/test/test.fp ni
```

### Drawing Charge densities

*lmf* can write the charge density (smooth or not, with or without cores), and the contribution to the density from a selected window of states. It can also write the effective one-body potential. See **–wden** in command-line switches.

See this tutorial for a demonstration in Ba_{3}Ta_{2}ZnO_{9}. The tutorial also shows how write out the effective one-body potential for plotting.

For a quick test, try

```
~/lm/src/fp/test/test.fp bzt 3
```

### Application of External Zeeman B Field

In the ASA, try the following demonstrations

```
$ ~/lm/src/nc/test/test.nc 5 6
```

In the FP code, try the following demonstration

```
$ ~/lm/src/fp/test/test.fp gdn
```

### Using Functionals Other Than LDA

*lmf* demonstrates the PBE functional with this test:

The ASA code demonstrates the PBE functional with this test:

```
$ ~/lm/src/fp/test/test.fp te
```

The ASA code *lm* demonstrates the PBE functional with this test:

```
$ ~/lm/src/testing/test.lm kfese
```

### LDA+U

The LDA+*U* functional was built into *lmf* in v6.15 and later, by Walter Lambrecht. LDA+*U* needs in addition to the LDA, parameters **U** and **J** for selected orbitals, which are empirical. In the the LDA+*U* method an additional potential for a particular *l* subblock (*m = −l…l*) from the *U* supplied by the user (in the *ctrl* file), and the density-matrix, which is generated by *lmf*.

In a strictly LDA calculation, complete information is carried by the density, contained in the restart file, which for *lmf*, is the *rst* file. (In the ASA, the density is can be reduced to moments of the charge density).

In the LDA+*U* case, complete information is carried by density and on-site density matrices, which are contained in file *dmats.ext*.

For an example, look at this tutorial. The following tests also illustrate LDA+U in the *lmf* code:

```
$ ~/lm/src/fp/test/test.fp cdte
$ ~/lm/src/fp/test/test.fp gdn
$ ~/lm/src/fp/test/test.fp eras
$ ~/lm/src/fp/test/test.fp er
```

ErAs is an interesting case because LDA puts all 4 minority *f* electrons in a single extremely narrow band at the Fermi level. In LDA+*U* the minority *f* is split into a 4- and 3-manifold; see PRB 67, 035104 (2003).

In the ASA, try

```
$ ~/lm/src/testing/test.lm er
```

### Adding a Homogenous Background Density

There are no tutorials for this functionality. Try the following demonstration:

```
$ ~/lm/src/fp/test/test.fp c
```

### Band Edge and Effective Mass Finder

Finding band edges in complex semiconductors and insulators can be a tedious exercise. This tutorial explains a tool that automates the process and also gives effective mass tensors around band extrema.

### Building a Supercell

Questaal has a supercell maker. It oeprates in one of two modes: to make supercells, and as an editor to manipulate layered systems. See this tutorial. For the editor to manipulate layered systems, see here.

### Point Defects in Large Supercells

Tutorials are in progress. If you are interested contact us.

### Special Quasirandom Structures

There is a facility to generate special quasirandom structures. It is less developed than other utilities specialized for this purpose but it is much easier to use and is compatible with the Questaal file structure. For a demonstration, try

```
$ ~/lm/src/subs/test/test.lmscell 5
```

### Spin Dynamics and Spin Statics

No tutorials yet, sorry. For a list of tests in the standard distribution, do

```
$ ~/lm/src/nc/test/test.nc --list
```

### Phonons

Questaal has a interface to phonopy. No tutorials yet, sorry.

There is also a large project to generate the electron-phonon interaction from many-body perturbation theory. This is not completed yet.

### Other Notes

#### Techniques for Brillouin Zone Integration

Techniques for Brillouin zone integration are described some detail here.

#### How to Make Integer Lists in Various Contexts

The syntax for integer lists is described here. In some contexts lists can consist of real numbers. The same rules apply.

#### How to Define Rotations in Various Contexts

Rotations are used for crystal axes, spin quantization axes, and in a few other contexts. They are constructed by a succession of angles around specified axes. This page explains how to specify rotations.

#### How Site Positions are Read by the Input File

Lattice data (lattice vectors and site positions) can be read in different ways. See this page.

#### Angular Momentum in the Questaal suite

The are functions of solid angle, while are polynomials in , , and . This page documents Questaal’s conventions for real and spherical harmonics and shows the polynomial forms of hte for .

Questaal codes use real harmonics by default, which are real linear combination of spherical harmonics . They will, however, use true spherical harmonics if you set **OPTIONS_SHARM** to true.

### References

^{(1)} Dimitar Pashov, Swagata Acharya, Walter R. L. Lambrecht, Jerome Jackson, Kirill D. Belashchenko, Athanasios Chantis, Francois Jamet, Mark van Schilfgaarde, *Questaal: a package of electronic structure methods based on the linear muffin-tin orbital technique*, Comp. Phys. Comm. **249**, 107065 (2020).

^{(2)} Sergey V. Faleev, Mark van Schilfgaarde, Takao Kotani, *All-electron self-consistent GW approximation: Application to Si, MnO, and NiO*, Phys. Rev. Lett. 93, 126406 (2004); M. van Schilfgaarde, Takao Kotani, S. V. Faleev, *Quasiparticle self-consistent* GW *theory*, Phys. Rev. Lett. 96, 226402 (2006)