Source-linked AI summary

Wannier90 as a community code: new features and applications

Giovanni Pizzi, Valerio Vitale, Ryotaro Arita, Stefan Blügel, Frank Freimuth, Guillaume Géranton, Marco Gibertini, Dominik Gresch, Charles Johnson, Takashi Koretsune, Julen Ibañez-Azpiroz, Hyungjun Lee, Jae-Mo Lihm, Daniel Marchand, Antimo Marrazzo, Yuriy Mokrousov, Jamal I. Mustafa, Yoshiro Nohara, Yusuke Nomura, Lorenzo Paulatto, Samuel Poncé, Thomas Ponweiser, Junfeng Qiao, Florian Thöle, Stepan S. Tsirkin, Małgorzata Wierzbowska, Nicola Marzari, David Vanderbilt, Ivo Souza, Arash A. Mostofi, Jonathan R. Yates

arXiv:1907.09788v1cond-mat.mtrl-sciphysics.comp-ph

TL;DR

Wannier90 addresses the need for efficient, accurate materials-property calculations from Bloch states across diverse electronic-structure codes. The paper describes the community-developed v3.0 release, whose new algorithms, properties, interfaces, performance improvements, and engineering practices broaden the code’s capabilities and sustainability.

  • Problem

    Wannier90 provides interoperable Wannier-function calculations for advanced materials properties, while the expanding code required new capabilities and sustainable community development.

  • Method

    The paper surveys Wannier90 v3.0 contributions, including new wannierisation and disentanglement methods, property calculations, interfaces, parallelisation, workflow tools, and software-engineering practices.

  • Results

    Wannier90 v3.0 includes numerous new functionalities and improvements, with parallelisation reducing per-iteration time by factors of 12.6 for disentanglement and 9.5 for wannierisation when cores increase from 4 to 64.

  • Takeaways & Limitations

    The release makes Wannier90 more robust, efficient, feature-rich, maintainable, and applicable to complex dielectric, electronic, magnetic, optical, topological, and transport properties.

Abstract

from arXiv · show

Wannier90 is an open-source computer program for calculating maximally-localised Wannier functions (MLWFs) from a set of Bloch states. It is interfaced to many widely used electronic-structure codes thanks to its independence from the basis sets representing these Bloch states. In the past few years the development of Wannier90 has transitioned to a community-driven model; this has resulted in a number of new developments that have been recently released in Wannier90 v3.0. In this article we describe these new functionalities, that include the implementation of new features for wannierisation and disentanglement (symmetry-adapted Wannier functions, selectively-localised Wannier functions, selected columns of the density matrix) and the ability to calculate new properties (shift currents and Berry-curvature dipole, and a new interface to many-body perturbation theory); performance improvements, including parallelisation of the core code; enhancements in functionality (support for spinor-valued Wannier functions, more accurate methods to interpolate quantities in the Brillouin zone); improved usability (improved plotting routines, integration with high-throughput automation frameworks), as well as the implementation of modern software engineering practices (unit testing, continuous integration, and automatic source-code documentation). These new features, capabilities, and code development model aim to further sustain and expand the community uptake and range of applicability, that nowadays spans complex and accurate dielectric, electronic, magnetic, optical, topological and transport properties of materials.

I. INTRODUCTION

Wannier90 is an interoperable open-source code that transforms Bloch states into maximally-localised Wannier functions for efficient materials-property calculations. The introduction establishes the theory, functionality, and development scope of the v3.0 community release.

  • Wannier90 generates maximally-localised Wannier functions from Bloch states and computes advanced materials properties independently of the underlying electronic-structure basis.
  • The paper presents Wannier90 v3.0 contributions spanning core wannierisation, disentanglement, functionality enhancements, property calculations, post-processing, and workflow integration.
  • Wannier functions represent isolated-band states through unitary transformations that exploit gauge freedom in the Bloch-state representation.
  • Maximal localisation is obtained by choosing the gauge that minimises the sum of quadratic Wannier-function spreads, specifically its gauge-dependent component.

B. Entangled bands

Entangled bands overlap and hybridise with other bands, so the number of available states varies across the Brillouin zone and differs from the target Wannier-function count. Wannier90 addresses this with disentanglement followed by wannierisation within a smoothly selected subspace.

  • Entangled bands overlap and hybridise with bands beyond the energy range of interest, preventing their separation by uniform Brillouin-zone energy gaps.
  • At each k-point, the energy window contains Jk states with Jk ≥ J, whereas the target Wannier representation requires a constant J-dimensional manifold.
  • Disentanglement first selects a smooth J-dimensional subspace from the available states, then wannierisation minimises the gauge-dependent spread within that subspace.
  • The intrinsic smoothness measure averages mismatch between neighbouring subspaces across the Brillouin zone and is minimised to select the optimal manifold.

C. Initial projections

Wannier90 uses trial orbitals and symmetry information to initialise or constrain Wannier functions. These approaches improve control over localisation, centres, and symmetry, while remaining subject to compatibility with the selected energy window.

  • Initial projections: Initial projections use localised trial orbitals projected onto the Bloch-state space, followed by Löwdin orthonormalisation to initialise the Wannierisation procedure.
  • Initial projections: The overlap and projection matrices are computed once within the electronic-structure code, after which Wannier90 operates independently of the specific basis set.
  • Symmetry-adapted Wannier functions: Symmetry-adapted Wannier functions impose symmetry and centre constraints during spread minimisation, enabling local orbital bases with site symmetries.
  • Symmetry-adapted Wannier functions: A requested irreducible representation cannot be enforced when it is incompatible with the states included in the finite target energy window.

B. Selectively-localised Wannier functions and constrained Wannier centres

Selective localisation optimises only a chosen subset of Wannier functions and can additionally constrain their centres. This improves the selected functions locally, but generally increases the total spread of the full set and does not guarantee symmetry.

  • Centre constraints have been observed to yield corresponding site symmetries, but the method does not enforce or guarantee those symmetries.
  • Selective localisation minimises the spreads of J′ ≤ J chosen Wannier functions while leaving the remaining functions unoptimised.
  • The selectively localised functions generally have smaller spreads than corresponding MLWFs, whereas the remaining functions become more delocalised.
  • The combined spread of selectively optimised and unoptimised functions is generally larger than the total MLWF spread.
  • Constraining centres adds a quadratic penalty around desired positions, producing selectively localised Wannier functions with fixed centres.

SAWF and SLWF+C in GaAs

Wannier90 provides symmetry-adapted and selectively localised approaches for constructing atom-centred Wannier functions in GaAs. These methods reproduce the desired As-centred function, with SLWF+C enforcing its centre and remaining robust to random initial guesses.

  • SAWF: GaAs valence-band MLWFs are naturally bond-centred sp3 functions associated with the A1 representation of the bond-site symmetry group C3v.Four s-like orbitals on the As–Ga bonds provide suitable initial projections for MLWFs and SAWFs.
  • SAWF: SAWF constructs four As-centred functions as one s-like A1 orbital and three p-like T2 orbitals compatible with Td symmetry.The A1 function transforms as the identity under the Td site-symmetry group.
  • SLWF+C: SLWF+C selectively localises one function among four and constrains its centre to the As site at (1/4,1/4,1/4).For GaAs, the optimised function is robust even when four s-like initial orbitals are randomly centred in the unit cell.
  • Comparison: For this GaAs case, maximal localisation can produce the same local symmetries only as a saddle point of the spread functional, unstable to small perturbations of the initial projections.This distinguishes the carefully initialised MLWF construction from the symmetry-adapted and constrained approaches.
  • Comparison: The figure compares MLWF, SAWF, SLWF, and SLWF+C functions, while the accompanying table reports their centres, individual spreads, and total spread for all four valence states.The plotted initial guesses use bond-centred s orbitals for MLWF, SLWF, and SLWF+C, versus As-centred s and p orbitals for SAWF.

C. Parallelisation

Wannier90 v3.0 parallelises Wannierisation and disentanglement over k-points and distributes key matrix operations across processes. Benchmarks show near-weak scaling and substantial strong-scaling speedups, with communication limiting ideal scaling.

  • Parallel implementation: Wannier90 v3.0 implements MPI parallelisation for calculating maximally-localised Wannier functions.The scheme distributes work associated with k-points and the iterative minimisation across processes.
  • Parallel implementation: Disentanglement accelerates by distributing independent Z_k matrix diagonalizations across processes, while Wannierisation distributes the diagonalizations of ΔW_k matrices.Both procedures require communication of neighbouring-k-point matrices, including U_k+b and M(k,b)-related data.
  • Parallel implementation: Matrix storage can also be distributed across cores, reducing the memory per core needed for large numbers of k-points and bands.For isolated bands, this avoids storing all M(k,b) matrices redundantly on every process.
  • Performance: Weak scaling from 4 to 144 cores increases iteration time by factors of 1.3 for disentanglement and 1.8 for wannierisation.The weak-scaling test keeps one k-point per process.
  • Performance: Strong scaling from 4 to 64 cores reduces iteration time by factors of 12.6 for disentanglement and 9.5 for wannierisation at N = 64 k-points.Deviation from ideal scaling is mostly attributed to inter-core communication of the U_k+b matrices.

IV. ENHANCEMENTS IN FUNCTIONALITY

Wannier90 v3.0 expands core functionality with spinor-valued Wannier functions, improved Brillouin-zone interpolation, and enhanced plotting and interface support. The revised interpolation algorithm improves agreement with ab initio bands and preserves bulk-band degeneracies more accurately.

  • A. Spinor-valued Wannier functions with ultrasoft and projector-augmented-wave pseudopotentials: Wannier90 v3.0 supports spinor-valued Wannier functions, including non-collinear Quantum ESPRESSO calculations with ultrasoft pseudopotentials.The implementation extends both the interface and plotting routines to handle complex spinor components and alternative graphical representations.
  • A. Spinor-valued Wannier functions with ultrasoft and projector-augmented-wave pseudopotentials: Spinor Wannier functions can be plotted as total spinor density, separate component magnitudes, or component phase information.The selected representation is controlled by the wannier_plot_spinor_mode and wannier_plot_spinor_phase input parameters.
  • B. Improved Wannier interpolation by minimal-distance replica selection: The improved interpolation algorithm selects replicas that minimise Wannier-centre distances and includes equivalent boundary replicas with weight factors when necessary.This enforces the minimal-distance condition and reduces artefacts from artificial Born-von Karman supercell periodicity.
  • B. Improved Wannier interpolation by minimal-distance replica selection: For a carbon chain, the new interpolation produces dispersive bands in much better agreement with ab initio bands than the earlier flat-band procedure.The comparison applies up to a few eV above the Fermi energy.
  • B. Improved Wannier interpolation by minimal-distance replica selection: For silicon, the new interpolation recovers the two-fold degeneracy along X−W and more closely reproduces the ab initio band structure.Remaining small deviations are attributed to the coarse k-point mesh and would disappear with denser grids satisfying the Nyquist–Shannon condition.

C. Selection of projections

Wannier90 v3.0 separates projection generation from projection selection, allowing users to test alternative trial-orbital subsets without repeating the expensive interface calculation. The same precomputed projection superset can also support different band groups.

  • C. Selection of projections: Users can define J+ > J trial projections, then select the J columns used to construct MLWFs through a Wannier90 input parameter.Changing the selected subset avoids recomputing projection matrices during initial-guess exploration.
  • C. Selection of projections: The selection workflow reduces repeated preprocessing when exploring different trial orbitals or different groups of bands for the same material.Only the Wannier90 input parameter needs to be modified after the projection superset is available.
  • C. Selection of projections: For silicon, one precomputed set of 12 trial orbitals supports either four valence bands or four valence plus four conduction bands.The two cases use bond-centred s orbitals and atom-centred sp3 orbitals, respectively.

D. Plotting cube files with non-orthogonal vectors

Wannier90 v3.0 adds real-space MLWF plotting in Gaussian cube format, including non-orthogonal cell vectors, with grids centred on individual Wannier functions. The section also introduces post-processing capabilities for optical responses, including shift currents and related interpolation methods.

  • D. Plotting cube files with non-orthogonal vectors: Gaussian cube output supports MLWF plots for non-orthogonal cell lattice vectors.The format is supported by modern visualization programs and uses a grid centred on each Wannier function.
  • D. Plotting cube files with non-orthogonal vectors: Each cube grid uses the smallest cell-aligned parallelepiped enclosing a user-defined-radius sphere around the Wannier function.Because MLWFs are strongly localized, relatively small cutoffs can provide a memory-efficient representation.
  • New post-processing features: Wannier90 v3.0 introduces post-processing features for advanced electronic-structure properties based on MLWFs.The package includes postw90.x, while external Wannier interfaces support tight-binding, transport, electron-phonon, and topological calculations.
  • Shift current: The shift current is the interband-light-absorption contribution to the linear photogalvanic photocurrent and depends on a real-space shift during photoexcitation.Its calculation uses interband dipoles, a shift vector, and gauge-aware formulations of generalized derivatives.
  • Shift current: Wannier90 implements shift-current interpolation using Hamiltonian elements, Wannier centres, and off-diagonal position matrix elements.The off-diagonal position matrix elements can affect the shift current sensitively.
  • Shift current: Second-harmonic generation is not currently implemented, although the generalized-derivative approach could be adapted for it.The section notes that such an adaptation should be straightforward.

B. postw90.x: Gyrotropic module

Wannier90 v3.0 adds the gyrotropic.F90 module for calculating gyrotropic response tensors and associated nonlinear optical, Hall, and magnetoelectric effects. The implementation builds on Wannier interpolation of Berry curvature and intrinsic orbital moments, which require dense Brillouin-zone sampling.

  • B. postw90.x: Gyrotropic module: In two dimensions the kinetic magnetoelectric effect is also called the Edelstein effect and is purely spin-based.Bulk crystals additionally have an orbital contribution.
  • B. postw90.x: Gyrotropic module: Gyrotropic effects are actively studied in topological semimetals and transition-metal dichalcogenides.Their accurate ab initio treatment requires efficient sampling because Berry curvature and intrinsic orbital moments are sensitive to electronic-structure details.
  • B. postw90.x: Gyrotropic module: The gyrotropic.F90 module implements methodologies for gyrotropic effects, incorporating them into Wannier90.The methodology was previously applied to p-doped trigonal tellurium, including the intraband contribution to the CPGE.
  • B. postw90.x: Gyrotropic module: Gyrotropic response calculations target tensors such as the Berry-curvature dipole D_ab and the magnetic-moment tensor K_ab.K_ab is obtained by replacing Berry curvature with the intrinsic magnetic moment of Bloch states.
  • B. postw90.x: Gyrotropic module: D_ab and K_ab describe effects including intraband circular photogalvanic response, current-induced Faraday effects, and natural optical activity.The implemented module includes formulas for current-induced Faraday effect and natural optical activity.

C. postw90.x: Spin Hall conductivity

Wannier90 v3.0 implements Wannier interpolation for intrinsic spin Hall conductivity and integrates it with existing post-processing modules. The same release substantially accelerates Berry-phase calculations through parallelization and BLAS-based optimizations.

  • C. postw90.x: Spin Hall conductivity: The intrinsic spin Hall conductivity uses a Kubo formula with spin, velocity, and spin-current operators sampled across the Brillouin zone.Compared with anomalous Hall conductivity, the formulation replaces a velocity matrix element with a spin-current matrix element.
  • C. postw90.x: Spin Hall conductivity: Wannier90 incorporates a Wannier-interpolation scheme for evaluating intrinsic spin Hall conductivity.The required ab initio inputs include spin matrix elements, Hamiltonian matrix elements, and overlap matrix elements.
  • C. postw90.x: Spin Hall conductivity: Figure 6 plots fcc Pt’s calculated spin Hall conductivity against Fermi-level position and shows the band-resolved spin Berry curvature.These functions are implemented in the berry.F90, kpath.F90, and kslice.F90 modules of postw90.x.
  • D. postw90.x: Parallelisation improvements: All parts of berry.F90 were parallelised in v3.0, improving scalability and accelerating performance by several orders of magnitude.The changes preserve code readability while targeting Berry-phase properties such as orbital magnetization and anomalous Hall conductivity.
  • D. postw90.x: Parallelisation improvements: A BLAS replacement made utility_rotate about 5.7 times faster and produced about a 55% total speedup for berry_main.The optimised routines support Berry calculations in three-dimensional k-space, two-dimensional planes, and one-dimensional Brillouin-zone paths.
  • D. postw90.x: Parallelisation improvements: Reducing matrix multiplications from 25 to 5 and using BLAS made get_imfgh_k_list exceed an 11-fold speedup, shortening berry_main runtime 2.5 times.A separate BLAS optimization accelerated one tested matrix product by a factor of 610.

E. GW bands interpolation

This section presents Wannier90 interfaces and methods for interpolating G0W0 quasiparticle bands, alongside the SCDM approach for automatically constructing localized Wannier functions. It also describes extensions to entangled manifolds and spinor wavefunctions.

  • DFT does not provide reliable spectral properties such as band structures, band gaps, and optical spectra, motivating many-body perturbation theory.
  • GW bands interpolation: Wannier90 supports G0W0 quasiparticle corrections through gw2wannier90.py and dedicated Quantum ESPRESSO and Yambo tools for symmetry-aware interpolation.The procedure uses quasiparticle corrections computed on regular grids and interpolates the full band structure along high-symmetry lines.
  • SCDM method: SCDM avoids localization-minimization issues because it does not minimize a gauge-dependent measure and therefore does not depend on initial guesses or local-minimum avoidance.
  • SCDM method: SCDM constructs localized Wannier bases by selecting well-conditioned density-matrix columns with QRCP and then applying Löwdin orthogonalisation.The selected columns form a localized basis, while orthogonalisation imposes the required unitary transformation without destroying locality.
  • SCDM method: The SCDM-k procedure extends to spinor wavefunctions by including the spin index alongside position during QRCP column selection.
  • SCDM method: For entangled manifolds, SCDM uses a quasi-density matrix and requires choices of µ, σ, and the target number J of Wannier functions.The paper suggests σ values of roughly 2–5 eV and often placing µ near the Fermi energy, while noting that exact choices depend on the system and selected bands.

VII. AUTOMATION AND WORKFLOWS: AIIDA-WANNIER90 PLUGIN

The AiiDA-Wannier90 plugin automates Wannier90 calculations within reproducible computational workflows. It manages inputs, execution, provenance, parsing, and chained preprocessing or post-processing, while feeding robustness improvements back into Wannier90.

  • AiiDA manages, automates, stores, and shares computations while tracking calculation provenance and providing a workflow engine.
  • The AiiDA-Wannier90 plugin lets users submit calculations and retrieve results through a high-level Python interface instead of directly creating Wannier90 input files.
  • AiiDA workflows can chain preprocessing and post-processing calculations and encode reproducible expert knowledge for simulation execution and error recovery.The passage states that such workflows reduce training time, eliminate sources of error, and enable large-scale high-throughput calculations.
  • The plugin accepts structured inputs including crystal structures, Wannier90 parameters, k-points, atomic projections, and local or remote input files.
  • After execution, parsers detect convergence and retrieve Wannier centres, spreads, spread components, localization ratios, and interpolated band structures when available.
  • The plugin has influenced Wannier90 v3.0 by motivating additional output files and algorithmic or default-parameter changes that improve robustness.

VIII. MODERN SOFTWARE ENGINEERING PRACTICES

Wannier90 v3.0 incorporates modern software-engineering practices, testing infrastructure, usability improvements, and library-mode enhancements to support robust community development and maintenance.

  • Automation and provenance: AiiDA automatically stores Wannier90 workflows as provenance graphs that explicitly connect calculations with their input and output data.The example includes Quantum ESPRESSO SCF and NSCF calculations, pw2wannier90.x, Wannier90 preprocessing and minimisation, and interpolated bands.
  • Development workflow: The community workflow uses GitHub version control, fork-and-pull requests, coding guidelines, and issue tracking for review and maintenance.Issues and pull requests link discussions, code lines, commits, bug reports, and fixes.
  • Testing: Over 50 tests run in serial and parallel cover over 60% of the source code, with many modules exceeding 80% coverage.Developers must add tests for new features to prevent future changes from breaking existing functionality.
  • Testing: Continuous integration runs the test suite after every commit and blocks pull requests when tests fail.Nightly Buildbot tests additionally compile and run the code across multiple compiler, MPI-library, and HPC-architecture combinations.
  • Usability: The command-line interface adds version reporting and a dry-run mode that validates inputs without executing the calculation.The dry-run mode is useful for input validators and for preprocessing checks.
Loading 1907.09788v1…