Skip to content

qiaojunfeng/Wannier.jl

Repository files navigation

Wannier.jl

Stable Dev CI Aqua QA codecov pre-commit Code Style: Blue

A playground for experimentation with Wannier functions (WFs).

Features

  • Wannierization

    • maximal localization for isolated bands, e.g. insulators
    • disentanglement for entangled bands, e.g. metal
    • parallel transport gauge
    • split valence and conduction WFs
      • automated initial projection for valence or conduction WFs
    • constrain WF center
  • Interpolation of operators, e.g. band structure

  • Real space WFs

    • output xsf or cube file
    • evaluate operators in real space

Installation

Install with the Julia package manager Pkg, just like any other registered Julia package:

pkg> add Wannier  # Press ']' to enter the Pkg REPL mode.

or

julia> using Pkg; Pkg.add("Wannier")

CLI

Additionally, there is a command line interface

julia --project deps/build.jl install  # install CLI

The executable will be installed in ~/.julia/bin/wannier. After appending ~/.julia/bin to your $PATH, you can use the CLI as follows:

$ wannier -h


  wannier v0.1.0

Julia package for Wannier functions.

Usage

  wannier <command>
...

Note since julia needs precompilation of the code, there will be some delay when running the CLI.

Usage

For example, running a maximal localization can be easily achieved by

using Wannier

model = read_w90("silicon")
U = max_localize(model)
write_amn("silicon.amn", U)

For a much more detailed overview, please see the User Guide documentation.

Development

  • clone repo: git clone https://github.com/qiaojunfeng/Wannier.jl

  • install pre-commit: pre-commit install

  • test:

    julia --project=.  # start REPL
    ]                  # activate Pkg mode
    test               # run tests

Documentation

The docs are maintained in a dedicated repo WannierDocs.jl. This allows us to add large tutorial files (e.g. amn, mmn) without bloating the main repo. Furthermore, it also contains the docs for another two packages:

Contributing

The code initially started with Antoine Levitt's repo wannier, and went through a series of refactorization, bug fixes, and feature additions.

This is a research code mainly for development and testing. Issues and pull requests are welcome!