aiida-wannierjl
An AiiDA plugin that wraps Wannier.jl (pinned to rev 65245c59 of the qiaojunfeng/Wannier.jl fork, requires Julia >= 1.11) to manipulate Wannier functions from within AiiDA workflows.
Each calculation renders a small Julia driver script (driver.jl) and runs it against a persistent, pinned Wannier.jl project environment. The AiiDA Code is the Julia binary itself, so the calculations are remote-capable and provenance is tracked like any other AiiDA CalcJob. Results come back through a machine-readable results.json that the parsers turn into AiiDA output nodes.
Features
The plugin provides three CalcJobs, one per Wannier.jl operation:
wannierjl.check_neighbors(CheckNeighborsCalculation) — reads a wannier90 run (.win,.chk,.mmn,.amn,.eig) withread_w90_with_chkand reports whether the k-point stencil contains the six cubic nearest-neighbour b-vectors (Wannier.has_cubic_neighbors). Output: aBoolnodehas_cubic_neighbors.wannierjl.generate_neighbors(GenerateNeighborsCalculation) — writes acubic.nnkpfile with the six cubic b-vectors viaWannier.write_nnkp_cubic, so that a.mmnwith cubic neighbours can be regenerated. Output: aSinglefileDatanodennkp_file.wannierjl.split(SplitCalculation) — splits a Wannier manifold into blocks withWannier.Tools.mrwf, given 1-based index groups. Outputs, under dynamic namespaces: per-blockFolderData(blocks.block_i, containingamn/eig/mmn), the per-block.winfiles (win_files.block_i), and the per-block split U matrices (u_matrices.block_i, the<seedname>_split.amnfiles).
Input files for each CalcJob can be supplied either explicitly as SinglefileData ports or picked up from a parent calculation's remote working directory (parent_folders.* RemoteData), which is how the .chk file — not normally retrieved by upstream wannier90 plugins — is symlinked in from a wannier90 run on the same computer.
workflows extra
Installing the optional workflows extra pulls in aiida-workgraph and aiida-quantumespresso and exposes split_wannierization, an aiida-workgraph @task.graph that orchestrates the full split:
from aiida_wannierjl.workflows import split_wannierization
It runs check_neighbors and, only when the cubic neighbours are missing, generates the cubic.nnkp, regenerates the cubic .mmn with a Pw2wannier90Calculation (forcing write_mmn=.true., write_amn=.false., SCDM off), and then runs split — all in a single invocation, with the cubic branch decided at runtime. Re-wannierization and U-matrix merging are deliberately out of scope and stay in the downstream consumer (koopmans).
Julia environment
The Wannier.jl project environment is created once per machine, never per calculation. A helper builds the pinned project (Pkg.add of Wannier.jl at rev 65245c59 plus JSON) and, by default, a PackageCompiler.jl sysimage so that each calculation loads in ~0.1 s instead of paying the multi-second using Wannier cost on every fresh process. The sysimage path travels on the Code node, and the CalcJobs pick it up automatically (falling back to a plain --project load when no sysimage is known).
See the get started guide for the full setup procedure (setup_julia_environment and get_wannierjl_code in aiida_wannierjl.helpers).
Installation
pip install aiida-wannierjl[workflows] # drop [workflows] if you don't need the workgraph
verdi quicksetup # better to set up a new profile
verdi plugin list aiida.calculations # should list the three wannierjl.* plugins
You also need a Julia >= 1.11 installation and the one-time environment setup described above.
Usage
Once you have registered a Julia code (labelled e.g. wannierjl@localhost), a minimal generate_neighbors run looks like:
verdi daemon start # make sure the daemon is running
cd examples
./example_01.py # generate a cubic.nnkp from a small .win
verdi process list -a # check the record of the calculation
See examples/example_01.py for the corresponding Python.
Development
git clone https://github.com/elinscott/aiida-wannierjl .
cd aiida-wannierjl
pip install --upgrade pip
pip install -e .[pre-commit,workflows] # install extra dependencies
pre-commit install # install pre-commit hooks
pytest -v # discover and run all tests
The test suite mocks the Julia code, so it runs in CI without a real Julia installation. See the developer guide for more information.
Citing
If you use this plugin for your research, please cite the following work:
- J. Qiao, G. Pizzi, and N. Marzari, Automated mixing of maximally localized Wannier functions into target manifolds, npj Comput. Mater. 9, 206 (2023), https://doi.org/10.1038/s41524-023-01147-9.
- J. Qiao, G. Pizzi, and N. Marzari, Projectability disentanglement for accurate and automated electronic-structure Hamiltonians, npj Comput. Mater. 9, 208 (2023), https://doi.org/10.1038/s41524-023-01146-w.
See CITATION.cff (or the GitHub "Cite this repository" button) for how to cite this plugin itself.
License
MIT
Contact
Metadata
Release files for aiida-wannierjl 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aiida_wannierjl-0.1.0.tar.gz | 112.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiida_wannierjl-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 140.0 kB
Release files / aiida_wannierjl-0.1.0.tar.gz
| Download URL | aiida_wannierjl-0.1.0.tar.gz |
|---|---|
| Size | 112.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fbc2b9bcd2eae4698c5a77984e9377e1e5152659027afb28fa5561867d2b31e
|
|
BLAKE2b-256 checksum How to use checksums |
e339859fa64dab3c0e8551b9316f5fb2f882d0ee07aa96dc74163c80e76a8898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / aiida_wannierjl-0.1.0-py3-none-any.whl
| Download URL | aiida_wannierjl-0.1.0-py3-none-any.whl |
|---|---|
| Size | 27.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
443855b657b204e01d94aebb87fbea0cc29b438d04bf9d8081eac6b8ac0243e0
|
|
BLAKE2b-256 checksum How to use checksums |
cc61f00711d1b9bff5c6fded7af2a2f2d9e6a19919d756ea2c5ad36d73b001eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logSecurity for aiida-wannierjl 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for aiida_wannierjl-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.