Source-linked AI summary

Wannier90: A Tool for Obtaining Maximally-Localised Wannier Functions

A. A. Mostofi, J. R. Yates, Y. -S. Lee, I. Souza, D. Vanderbilt, N. Marzari

arXiv:0708.0650v1cond-mat.mtrl-sci

TL;DR

Wannier functions are non-unique under k-dependent phase and unitary transformations, motivating a systematic way to obtain localized representations from possibly entangled bands. Wannier90 minimizes their real-space spread and, in most cases, runs an order of magnitude faster than its predecessor, with some cases exceeding two orders.

  • Problem

    Bloch-state phase and unitary freedom makes Wannier functions non-unique, including for band groups that may be entangled.

  • Method

    Wannier90 applies the Marzari–Vanderbilt and Souza–Marzari–Vanderbilt schemes, using neighboring-k-point overlap matrices to minimize Wannier-function spreads.

  • Results

    Wannier90 is faster than the original Fortran77 version by an order of magnitude in most cases and by more than two orders in some.

  • Takeaways & Limitations

    The program provides localized Wannier representations for visualisation, interpolation of electronic properties, and matrix-element output across electronic-structure workflows.

  • Takeaways & Limitations

    The finite-difference quadratic spread converges only polynomially with Brillouin-zone sampling, limiting convergence speed.

Abstract

from arXiv · show

We present Wannier90, a program for calculating maximally-localised Wannier functions (MLWF) from a set of Bloch energy bands that may or may not be attached to or mixed with other bands. The formalism works by minimising the total spread of the MLWF in real space. This done in the space of unitary matrices that describe rotations of the Bloch bands at each k-point. As a result, Wannier90 is independent of the basis set used in the underlying calculation to obtain the Bloch states. Therefore, it may be interfaced straightforwardly to any electronic structure code. The locality of MLWF can be exploited to compute band-structure, density of states and Fermi surfaces at modest computational cost. Furthermore, Wannier90 is able to output MLWF for visualisation and other post-processing purposes. Wannier functions are already used in a wide variety of applications. These include analysis of chemical bonding in real space; calculation of dielectric properties via the modern theory of polarisation; and as an accurate and minimal basis set in the construction of model Hamiltonians for large-scale systems, in linear-scaling quantum Monte Carlo calculations, and for efficient computation of material properties, such as the anomalous Hall coefficient. Wannier90 is freely available under the GNU General Public License from http://www.wannier.org/

PROGRAM SUMMARY

Wannier90 obtains maximally-localised Wannier functions from isolated or entangled Bloch bands by optimizing the relevant subspace and minimizing real-space spread. It is an open-source Fortran 90/perl program designed for broad architectures and tested across multiple operating systems.

  • Implementation: Wannier90 runs on any architecture with a Fortran 90 compiler and has been tested on Linux, Windows, Solaris, AIX, Tru64 Unix, and OSX.
  • Implementation: The program uses Fortran 90 and perl, with both languages available under open-source licenses.
  • Problem: Wannier90 obtains maximally-localised Wannier functions from Bloch energy bands that may or may not be entangled.
  • Method: For entangled bands, Wannier90 first minimizes subspace dispersion across the Brillouin zone, then minimizes the Wannier functions’ total real-space spread.Only the second minimization is required for isolated bands.
  • Implementation: The program provides a simple, user-friendly input system and outputs Wannier functions and interpolated band structures in varied visualization file formats.

LONG WRITE-UP · 1 Introduction

The introduction motivates maximally-localised Wannier functions as a real-space representation of electronic structure and presents wannier90 as a basis-independent tool for constructing, visualising, and exploiting them. It addresses non-uniqueness and entangled bands through unitary optimisation and disentanglement procedures, while highlighting broad applications and improved computational efficiency.

  • 1 Introduction: Wannier functions provide a localised real-space representation of electronic structure that offers insight into chemical bonding and dielectric properties.
  • 1 Introduction: The phase freedom of isolated Bloch states and arbitrary unitary rotations among isolated bands make Wannier functions non-unique.These transformations occur independently at each wave-vector k.
  • 1 Introduction: The Marzari-Vanderbilt scheme iteratively refines these degrees of freedom to minimise the second moment around Wannier centres, producing maximally-localised Wannier functions.
  • 1 Introduction: The original localisation method targets isolated band groups, whereas metallic bands near the Fermi level may be entangled with unwanted states.Entanglement can leave more bands in the relevant energy range than the required number N of Wannier functions.
  • 1 Introduction: wannier90 combines Marzari-Vanderbilt localisation with SMV disentanglement and requires only neighbouring-k-point overlap matrices, making it independent of the underlying basis set.This basis independence enables interfacing with electronic-structure codes generally.
  • 1 Introduction: wannier90 disentangles an N-dimensional band subspace, generates MLWF transformations, outputs visualisation files and Hamiltonian matrix elements, and interpolates band structures, densities of states, and Fermi surfaces.
  • 1 Introduction: The 2006 rewrite made wannier90 faster than the original Fortran77 version by an order of magnitude in most cases and by more than two in some cases.The rewrite also simplified the source code and interfacing, with an example incorporated into quantum-espresso.
  • 1 Introduction: The formalism has been applied to quantum Monte Carlo, photonic crystals, metal-insulator interfaces, anomalous Hall and electron-phonon calculations, large-scale systems, and model Hamiltonians.

2 Theoretical Background

Wannier90 obtains maximally-localised Wannier functions by optimising unitary band rotations to minimise their spread, with reciprocal-space discretisation enabling practical evaluation. For entangled bands, disentanglement first selects a smoothly varying subspace, whose localisation then supports accurate interpolation of electronic properties.

  • Isolated bands: The MV strategy chooses unitary matrices U(k) that minimise the sum of quadratic Wannier-function spreads while preserving the same band manifold.The spread functional separates into gauge-invariant and gauge-dependent contributions, so isolated-band localisation reduces to minimising the latter.
  • Discrete formulation: Reciprocal-space derivatives are evaluated on a uniform Monkhorst-Pack mesh using finite-difference formulas based on neighbour vectors and weights.The mesh approximates both the self-consistent ground state and the differential operators, although higher-order formulas can improve the latter.
  • Entangled bands: For entangled bands, SMV disentanglement selects an N-dimensional subspace by minimising the gauge-invariant spread component, favouring maximum overlap between neighbouring k-point subspaces.A frozen inner window can preserve states in a specified energy range unchanged within the projected subspace.
  • Entangled bands: After subspace selection, MV localisation minimises the remaining spread within that subspace to obtain MLWF, while the converged rotations and overlap matrices define their centres and spreads.The MLWF need not be explicitly constructed unless visualization or other post-processing requires them.
  • Wannier interpolation: Strong localisation makes real-space Hamiltonian matrix elements decay rapidly, enabling interpolation of band structures, densities of states, and Fermi surfaces at modest computational cost.Interpolated energies coincide with the true bands on the original mesh, with SMV guaranteeing this within the inner energy window; intermediate-point accuracy depends on mesh density.

3 Some Technical Aspects

Wannier90 initializes subspace and gauge optimizations through projections onto trial orbitals, while automatically constructing finite-difference formulas for arbitrary-symmetry Brillouin-zone meshes. The method is robust but can depend on initial guesses, and its quadratic spread converges more slowly than the underlying MLWF.

  • Initialization: Trial functions are projected onto Bloch states and Löwdin-orthonormalized to initialize the disentanglement matrices U_dis(k).The resulting construction uses A S^-1/2 as the initial guess for U_dis(k).
  • Initialization: The same projected trial orbitals initialize the N × N unitary matrices U(k) for minimizing the gauge-dependent spread.wannier90 supports random spherically symmetric Gaussian centers and user-selected localized functions, including atomic and hybrid orbitals.
  • Limitations: The spread functional can have local minima, so the final MLWF may depend on the initial subspaces and trial functions; most such minima produce complex MLWF.Some local minima instead yield real MLWF.
  • Finite-difference derivatives: An automatic shell-selection procedure constructs finite-difference weights by adding neighbor shells until the linear-order gradient condition is satisfied, rejecting linearly dependent shells.The Brillouin zone is sampled on a uniform Monkhorst-Pack mesh, and singular-value decomposition enables solution for the shell weights.
  • Limitations: The quadratic spread converges only polynomially with Brillouin-zone sampling, whereas the underlying MLWF converge rapidly with k-point density.Higher-order finite-difference formulas might improve accuracy and convergence, but this was not explored.
  • Performance: Wannier90 requires only 5-7% of the total silicon calculation time for MLWF localization and visualization-file generation.Band-structure computation and construction of M_mn(k,b) are more time-consuming.

4 Structure of the Program

Wannier90 is organized as a hierarchy of Fortran90 modules, with each module depending only on lower-level modules. Its components handle inputs and utilities, reciprocal-space data, subspace optimization, Wannierisation, visualization, and program access.

  • Module organization: The program is structured as Fortran90 modules whose dependencies flow only from higher-level modules to lower-level modules.Figure 2 provides the schematic module structure, and each box represents a module.
  • Core modules: Core modules manage error handling, timing, input/output, common mathematical operations, physical parameters, reciprocal-space derivatives, and overlap data.The kmesh module can also communicate with an ab initio code about calculating M(k,b) in post-processing mode.
  • Wannier construction: The disentangle module optimizes the subspace within an energy window, while wannierise determines unitary transformations U(k) mn that produce MLWF.Disentanglement minimizes the gauge-invariant spread for entangled bands.
  • Outputs and interfaces: The plot module outputs Wannier functions, Fermi surfaces, and band structures for visualization, while wannier90 provides a main program and library-call interface.wannier90 may be invoked directly from an ab initio code through library routines.

5 Installation

Wannier90 is distributed as a gzipped tar archive that can be unpacked to obtain the source, documentation, and examples. Compilation requires selecting and customizing a platform-specific make.sys configuration.

  • 5 Installation: Wannier90 is distributed as a gzipped tar file available from http://www.wannier.org/.The distribution is provided as an archive for installation.
  • 5 Installation: On Linux, the command `tar zxvf wannier90.tar.gz` unpacks the distribution.The command is given as an example for unpacking the archive.
  • 5 Installation: Unpacking creates a directory containing the source files, documentation, and examples.The extracted directory includes the materials needed to build and use the program.
  • 5 Installation: Compilation uses the config directory’s platform-specific make.sys.plat file, copied to the distribution root and renamed make.sys.Users should select the file most closely matching their platform before compilation.
  • 5 Installation: System-dependent settings such as BLAS and LAPACK locations, the Fortran compiler, and optimization flags must be modified accordingly.These parameters are defined in make.sys and should match the user’s system.

6 Running wannier90

Running wannier90 requires precomputed Bloch bands and proceeds through a two-pass post-processing workflow that constructs overlap matrices before maximal localization. The program can also interface with electronic-structure codes through an existing pwscf interface or compiled-library calls.

  • Prerequisites: A self-consistent first-principles calculation must first provide Bloch energy bands from which maximally-localised Wannier functions are constructed.wannier90 then operates in post-processing mode on those bands.
  • Input and post-processing workflow: The master input file is seedname.win, using seedname as the prefix for all input and output files.The input system is designed to be simple and user-friendly, with documentation and an example provided in the distribution.
  • Input and post-processing workflow: wannier90 must be run twice: first with -pp to generate seedname.nnkp, then without options to read the required data and perform maximal localization.The first pass supports construction of overlap matrices M(k,b)_mn from the precomputed Bloch bands; the second writes results to seedname.wout.
  • Interfaces: The pwscf code provides a pw2wannier90 post-processing interface, while wannier90 can also be compiled as libwannier.a and invoked through library subroutines.Library mode follows the same two-stage procedure, passing information through direct subroutine calls instead of intermediate files.

7 Examples

The examples demonstrate MLWF construction for graphite and lead, using compact Wannier sets to describe states near the Fermi level. Wannier interpolation reproduces the relevant electronic structure, while lead shows that sizable spin-orbit splittings need not substantially alter the Fermi surface.

  • Graphite: Graphite requires 10 Wannier functions per unit cell, or 2.5 per atom, to describe states around and below the Fermi level.This choice is expected to provide an intuitive chemical description of Bernal graphite.
  • Graphite: Graphite calculations use a 30 Ry plane-wave cutoff, norm-conserving Kleinman-Bylander pseudopotentials, a 16×16×16 k-point mesh, and 0.02 Ry Fermi smearing.The initial band structure is calculated with pwscf.
  • Lead: Lead’s isolated 6s and 6p bands around the Fermi level are represented by eight MLWF, including spin-orbit coupling because relativistic effects can be significant.Time-reversal and inversion symmetries make each lead band two-fold degenerate.
  • Lead: 3 eV spin-orbit-induced splitting at Γ in lead does not significantly change the Fermi surface relative to a scalar-relativistic calculation.Wannier90 interpolation is used for the band structure and Fermi surface after converging the gauge-dependent spread in 200 steps.

8 Conclusions

The paper presents wannier90, a user-friendly code for computing maximally localised Wannier functions. Its modular Fortran90 design supports future extensions and seamless interfacing with pwscf.

  • Conclusions: wannier90 computes maximally localised Wannier functions and is freely available under the GNU General Public Licence.The code is presented as the paper’s main contribution.
  • Conclusions: The user-friendly Fortran90 implementation uses modern programming techniques to facilitate modular extensions, including transport properties and electron-phonon coupling interpolation.The passage identifies these as examples of functionality that can be added easily.
  • Conclusions: wannier90 has been seamlessly interfaced with the pwscf plane-wave code.The supplied passage ends while describing this interface.

A Sample files

The sample files specify disentanglement and localization settings for 20 bands and 10 Wannier functions, using C1 sp2 and pz projections. The final total spread is 7.732554530 Å^2, decomposed into invariant, diagonal, and off-diagonal contributions.

  • Configuration: The sample configuration sets num_bands = 20, num_wann = 10, dis_win_max = 19.2, dis_froz_max = 9.8, dis_num_iter = 400, and num_iter = 100.These parameters define the band count, Wannier-function count, disentanglement windows, and iteration limits.
  • Projections: The projections are C1:sp2;pz and C2:pz.The sample uses orbital projections on atoms C1 and C2.
  • Final State: 7.732554530 Å^2 is the final total spread, comprising Omega I = 6.121019675, Omega D = 0.032181361, and Omega OD = 1.579353494.The reported spread components are given in Ang^2 in the final-state output.
Loading 0708.0650v1…