What to do after this tutorial?

After completing the two MoS2 examples, you have already learned the basic logic of a Wannier90 workflow:

DFT calculation → orbital projections → Wannier functions → tight-binding Hamiltonian → band interpolation

This is the central idea behind Wannier90. The program transforms the complicated Bloch wave functions from a first-principles calculation into a compact real-space model written in terms of localized Wannier functions.

However, it is important to understand that Wannier90 is not just a black-box post-processing tool. It is also a physical modeling tool. A good Wannier model requires physical judgment: you must decide which bands are important, which orbitals should be used, how large the energy windows should be, and how to verify that the final model is reliable.

The two examples in this tutorial were designed to show this clearly.

In the first example, we constructed a minimal three-orbital model using only three Mo d-orbitals:

$$d_{z^2}, \quad d_{xy}, \quad d_{x^2-y^2}$$

This model is simple, elegant, and physically transparent. It teaches the basic principles of Wannierization very well. At the same time, it also shows a typical practical difficulty: when the target bands are entangled with nearby DFT bands, a small Wannier basis may not reproduce every band perfectly.

In the second example, we constructed an 11-orbital model using all five Mo d-orbitals and all three S p-orbitals on each sulfur atom. This model is larger, but it is also much more robust. The selected 11-band manifold is better separated from the surrounding bands, so Wannier90 can reproduce the DFT bands very accurately.

This comparison gives one of the most important practical lessons:

A minimal model is easier to understand. A larger model is often easier to converge.

There is no universal best choice. The correct Wannier model depends on your scientific goal.

1. Always start with the physics

Before preparing a Wannier90 input file, ask yourself:

  • Which bands do I want to describe? 
  • Which energy range is important? 
  • Which atoms and orbitals form these bands? 
  • Do I need a minimal model or a more complete model?

The ordinary band structure helps you identify the energy range and the target bands. However, it does not tell you the orbital character of these bands. For that, you should look at projected band structures, projected density of states, or reliable information from the literature.

A good Wannier model starts from a good physical guess.

For example, in monolayer MoS2, the bands near the gap are mainly formed by Mo d-orbitals. This motivates the three-orbital model. But if we want a more accurate description over a wider energy range, sulfur p-orbitals also become important. This motivates the 11-orbital model.

2. Do not judge the result only by the absence of errors

A Wannier90 calculation may finish successfully, but the resulting model may still be poor.

Therefore, after every Wannier90 calculation, you should check:

  1. Do the Wannier-interpolated bands reproduce the DFT bands? 
  2. Are the Wannier centers located where you expect them? 
  3. Are the spreads physically reasonable? 
  4. Are the Wannier functions localized? 
  5. Do the Wannier functions look like the chosen orbital projections? 
  6. Is the result stable when you slightly change the energy windows? 
  7. Is the result stable when you increase the k-mesh?

These checks are much more important than simply seeing that the program finished without an error message.

The most important quality test is the band comparison. If the Wannier-interpolated bands do not reproduce the target DFT bands in the energy range of interest, the model should not be trusted for further calculations.

3. Treat the energy windows as modeling parameters

The frozen window and the outer disentanglement window are among the most important parameters in Wannier90.

The frozen window tells Wannier90:

These bands must be reproduced.

The outer window tells Wannier90:

Search for the optimal Wannier subspace inside this energy range.

If the frozen window is too narrow, some important parts of the target bands may not be protected. If it is too wide, it may contain more bands than the number of Wannier functions, and the calculation will fail.

If the outer window is too narrow, Wannier90 may not have enough states to build a smooth subspace. If it is too wide, too many irrelevant bands may enter the disentanglement procedure.

Therefore, energy windows should not be chosen randomly. They should be tested.

A useful practical strategy is to make several calculations with slightly different windows and compare the final band structures, spreads, and Wannier centers. A reliable model should not change dramatically under small reasonable changes of the windows.

4. Look at the Wannier centers

Wannier centers are one of the simplest and most useful diagnostics.

They are printed in the main output file:

seedname.wout

For example, for the seedname d, the output file is:

d.wout

Near the end of the file, Wannier90 prints lines such as:

WF centre and spread    1  ( x, y, z )    spread 
WF centre and spread    2  ( x, y, z )    spread

The centers should be physically meaningful. If you use Mo d-orbital projections, the corresponding Wannier centers should be close to the Mo atom. If you use S p-orbital projections, the centers should be close to sulfur atoms.

If the centers appear in strange positions, or if they move far away from the expected atoms, this may indicate that the chosen projections or energy windows are not appropriate.

This is a very simple check, but it often reveals problems immediately.

5. Visualize the Wannier functions

Whenever possible, visualize the Wannier functions.

To generate files for visualization, add to the .win file:

wannier_plot = true

Wannier90 will write files such as:

seedname_00001.xsf 
seedname_00002.xsf 
...

These files can be opened with visualization programs such as VESTA or XCrySDen.

The Wannier functions do not have to look like perfectly pure atomic orbitals. In real materials, they often contain hybridization tails on neighboring atoms. For example, a Mo-centered d-like Wannier function in MoS2 may also have visible weight on nearby sulfur atoms.

This is normal and physically meaningful.

What matters is that the main character and the center of the Wannier function are consistent with the chosen projection.

6. Use the small model to understand, and the larger model to calculate accurately

A very useful workflow is to build more than one Wannier model for the same material.

A small model helps you understand the essential physics. It is easier to interpret, easier to analyze, and often useful for analytical thinking.

A larger model is usually better for accurate numerical calculations. It can reproduce a wider energy range and is less sensitive to band entanglement.

For monolayer MoS2, the three-orbital model is a good educational model. It captures the main Mo d-orbital physics near the band gap. But the 11-orbital model is more reliable if one wants a better interpolation over a larger energy window.

This is a general principle:

Use minimal models for insight. Use larger models for accuracy.

Both types of models are useful.

7. Learn to read the main Wannier90 output files

After finishing this tutorial, students should be familiar with several important files:

seedname.wout

This is the main output file. It contains information about convergence, spreads, centers, and disentanglement.

seedname_hr.dat

This file contains the tight-binding Hamiltonian matrix elements in the Wannier basis:

$$H_{mn}(\mathbf R)$$

This is one of the most important results of the calculation.

seedname_band.dat

This file contains the Wannier-interpolated band structure.

seedname_centres.xyz

If generated, this file contains the Wannier centers in a format that can be visualized.

seedname_00001.xsf, 
seedname_00002.xsf, ...

These files contain real-space Wannier functions for visualization.

A good habit is to inspect these files after every calculation. Do not only run the commands; read the output.

8. Common mistakes to avoid

Several mistakes are especially common when learning Wannier90.

First, using different k-meshes in QE and Wannier90. The k-mesh in the .win file must be consistent with the k-mesh used in the QE calculation.

Second, forgetting to run Wannier90 in preprocessing mode:

wannier90.x -pp seedname

before running pw2wannier90.x.

Third, choosing a frozen window that contains more bands than the number of Wannier functions. If num_wann = 3, the frozen window cannot contain more than three bands at any k-point.

Fourth, choosing projections without checking the orbital character of the target bands.

Fifth, trusting the result without comparing the Wannier bands to the original DFT bands.

These mistakes are normal at the beginning. The important point is to learn how to diagnose them.

9. Suggested next steps

After completing this tutorial, a good next step is to repeat the workflow for another material.

For example, students can try:

graphene 
h-BN 
bulk silicon 
monolayer WS2 
monolayer MoSe2

For each material, try to answer the same questions:

  • Which bands do I want to reproduce? 
  • Which orbitals form these bands? 
  • How many Wannier functions do I need? 
  • Are the target bands isolated or entangled? 
  • Do the Wannier centers make sense? 
  • Does the Wannier interpolation reproduce the DFT bands?

This is the best way to learn Wannier90. The program becomes clear only when one applies it to real examples and checks the result carefully.

10. Final message

Wannier90 is powerful because it connects two different ways of thinking about electronic structure.

DFT gives us Bloch bands in reciprocal space. Wannier90 transforms them into localized orbitals and hopping matrix elements in real space.

This transformation is extremely useful. Once the Wannier Hamiltonian is constructed, it can be used for many further calculations: dense band interpolation, Berry curvature, topological properties, transport, optical response, superconductivity, excitons, and more.

But the quality of all these later calculations depends on the quality of the Wannier model.

Therefore, the main lesson of this tutorial is not only how to run Wannier90. The main lesson is how to think about a Wannier model:

  • Choose the orbitals physically. 
  • Choose the energy windows carefully. 
  • Check the band interpolation. 
  • Check the Wannier centers. 
  • Visualize the Wannier functions. 
  • Test convergence. 
  • Do not be afraid to increase the basis if the minimal model is not enough.

If you follow these principles, Wannier90 becomes not just a program, but a practical bridge between first-principles calculations and intuitive physical models.

11. Explore more advanced Wannier90 topics

Once you are comfortable with the basic Wannier90 workflow, there are many directions for further study. These include more advanced disentanglement strategies and the careful choice of energy windows, symmetry-adapted Wannier functions, spinor calculations with spin–orbit coupling, and the construction and validation of Wannier models for more complex materials.

Wannier functions can also be used for much more than band interpolation. Advanced applications include the calculation of Berry phases, Berry curvature, anomalous Hall conductivity, transport and optical properties, topological invariants, electron–phonon interactions, and many other quantities that require efficient interpolation on very dense $\mathbf{k}$-point meshes.

At this stage, it is also useful to study how the quality of a Wannier model depends on the choice of projections, frozen and outer energy windows, $\mathbf{k}$-point sampling, and the number of Wannier functions. For complex systems, constructing a reliable Wannier model is often an iterative process: build the model, validate it, identify its limitations, adjust the parameters, and repeat.

The two examples in this tutorial provide the basic tools needed to start this process. From here, the most valuable next step is to apply the workflow to new materials and gradually explore the more advanced capabilities of Wannier90, including:

The two examples in this tutorial provide the basic tools needed to start this process. From here, the most valuable next step is to apply the workflow to new materials and gradually explore the more advanced capabilities of Wannier90, including:

  1. Disentanglement of complex band structures and the careful selection of frozen and outer energy windows.
  2. Construction of larger and more complex Wannier models, including models with multiple atoms, orbital manifolds, and spin-orbit coupling.
  3. Wannier interpolation on dense k-point grids for accurate and computationally efficient calculations of band structures, band derivatives, and related electronic properties.
  4. Fermi-surface calculations and analysis of the electronic structure near the Fermi level.
  5. Berry-phase properties, including Berry curvature, anomalous Hall conductivity, spin Hall conductivity, and orbital magnetization.
  6. Electronic transport calculations, including transport coefficients within the Boltzmann transport framework.
  7. Optical and nonlinear optical properties, such as optical conductivity and shift-current response.
  8. Construction of tight-binding Hamiltonians for use in external codes and more advanced simulations of transport, topology, superconductivity, excitons, and other many-body phenomena.
  9. Analysis of Wannier centers, spreads, orbital character, and real-space hopping parameters to develop a more intuitive physical picture of the electronic structure.
  10. Automation and high-throughput Wannierization workflows for studying larger families of materials.

Next: Afterword