Skip to main content

Collection of code for band unfolding

Project description

build docs codecov PyPI Downloads JOSS

easyunfold

easyunfold is intended for obtaining the effective band structure of a supercell for a certain k-point path of the primitive cell. It was originally based on PyVaspwfc for reading VASP wavefunction outputs, with a notable improvement being that symmetry-breaking is properly accounted for by sampling necessary additional k-points and averaging accordingly. Documentation site here!

Our goal is to implement the band structure unfolding workflow in a robust and user-friendly software package. Typical applications of band structure unfolding are the electronic structure analysis of defects, disorder, alloys, surfaces (and more), as illustrated in the example outputs below and docs examples.

For the methodology of supercell band unfolding, see here.

Example Outputs

Cs₂(Sn/Ti)Br₆ Vacancy-Ordered Perovskite Alloys Oxygen Vacancy (Vₒ⁰) in MgO

See the easyunfold YouTube tutorial for a quick overview of the theory of band structure unfolding, and a walkthrough of the calculation & analysis workflow with easyunfold.

Usage

To generate an unfolded band structure, one typically needs to perform the following steps:

  1. Create a primitive unit cell, and generate a band structure k-point path corresponding to this primitive cell.
  2. Create a supercell (e.g. disordered, defective, surface slab etc.), and obtain its optimised structure.
  3. Generate a series of k-points for the supercell to be calculated.
  4. Perform a band structure calculation with the supercell, and save its wavefunction output to file.
  5. Post-process the supercell wavefunction to obtain the unfolded band structure in the k-point path of the primitive unit cell.

These generation and analysis steps are automated in easyunfold, with only the primitive unit cell and supercell structures required as inputs from the user.

Typically, the supercell comprises some form of symmetry-breaking relative to the primitive cell, such as defects, disorder (e.g. special quasi-random structures (SQS) for site disorder – other forms of disorder such as magnetic, dynamic/vibrational, polar, elastic etc. also possible), or a surface/interface slab. In all cases, the supercell symmetry is lowered compared to the pristine primitive cell. Hence, for a given k-point path in the primitive cell Brillouin Zone, additional k-points are required to be sampled for the supercell, and the extracted spectral weights need to be appropriately averaged to obtain the correct effective band structure (EBS). See the docs Theory page for more details.

Please see the documentation for guides and examples.

Installation

Install from pip

easyunfold can be installed from pip:

pip install easyunfold

This will also install the package dependencies, if any are missing.

After installation, running easyunfold on the command-line should give the following output:

Usage: easyunfold [OPTIONS] COMMAND [ARGS]...

  Tool for performing band unfolding

Options:
  --help  Show this message and exit.

Commands:
  generate  Generate the kpoints for sampling the supercell
  unfold    Perform unfolding and plotting

Developer Installation (from source)

A recent version of pip is needed to do this, due to the new style of the pyproject.toml configuration file. To upgrade your pip, do:

pip install -U pip

Assuming the package is in the easyunfold folder, use the following command to install:

pip install "./easyunfold[test,doc,pre-commit]"

which also installs additional dependencies for building documentation (doc), running tests (test) and dependencies for using pre-commit hooks (pre-commit).

Citation

If you use easyunfold in your work, please cite:

  • B. Zhu, S. R. Kavanagh & D. O. Scanlon, (2024). easyunfold: A Python package for unfolding electronic band structures. Journal of Open Source Software, 9(93), 5974, https://doi.org/10.21105/joss.05974

Studies using easyunfold

We'll add papers that use easyunfold to this list as they come out!

  • S. Husremović et al. Local interface effects modulate global charge order and optical properties of 1T-TaS2/1H-WSe2 heterostructures arXiv 2025
  • L. Richarz et al. Ferroelectric domain walls for environmental sensors ACS Applied Materials & Interfaces 2025
  • J. M. Domínguez-Vázquez et al. Thermoelectric performance boost by chemical order in epitaxial L21 (100) and (110) oriented undoped Fe2VAl thin films: an experimental and theoretical study Journal of Materials Chemistry A 2025
  • J. Tu et al. Giant switchable ferroelectric photovoltage in double-perovskite epitaxial films through chemical negative strain Science Advances 2025
  • L. F. Leon-Pinzon et al. Observation of Pseudogap in Cr1−xYxN magnetic alloy and its impact on the Seebeck coefficient by ab-initio calculations arXiv 2025
  • C. Zhang & J. Recatala-Gomez & Z. Aabdin & Y. Jiang et al. Direct Joule-Heated Non-Equilibrium Synthesis Enables High Performing Thermoelectrics arXiv 2025
  • W. Feng et al. Unraveling the role of oxygen vacancies in the electronic and optical properties of κ-Ga2O3 ResearchSquare 2025
  • J. J. Plata et al. High-Entropy Skutterudites as Thermoelectrics: Synthesizability and Band Convergence via the Cocktail Effect ChemRxiv 2025
  • P. B. Colominas et al. Giant Thermally Induced Band-Gap Renormalization in Anharmonic Silver Chalcohalide Antiperovskites Journal of Materials Chemistry C 2025
  • L. Zhang et al. Mg doping point defects in Al0.5Ga0.5N by density functional theory Vacuum 2025
  • L. Zhang et al. Impurity point defects in Mg doping Al0.5Ga0.5N: A first principles study Computational Materials Science 2025
  • L. Zhang et al. Study of native point defects in Al0.5Ga0.5N by first principles calculations Computational Materials Science 2024
  • H. Maleki-Ghaleh et al. Visible Light-Sensitive Sustainable Quantum Dot Crystals of Co/Mg Doped Natural Hydroxyapatite Possessing Antimicrobial Activity and Biocompatibility Small 2024
  • K. Eggestad, B. A. D. Williamson, D. Meier and S. M. Selbach Mobile Intrinsic Point Defects for Conductive Neutral Domain Walls in LiNbO3 Journal of Materials Chemistry C 2024
  • Dargahi et al. Synthesis and characterization of zinc-doped hematite nanoparticles for photocatalytic applications and their electronic structure studies by density functional theory Optical Materials 2024
  • S. M. Liga & S. R. Kavanagh, A. Walsh, D. O. Scanlon and G. Konstantatos Mixed-Cation Vacancy-Ordered Perovskites (Cs2Ti1–xSnxX6; X = I or Br): Low-Temperature Miscibility, Additivity, and Tunable Stability Journal of Physical Chemistry C 2023
  • Y. T. Huang & S. R. Kavanagh et al. Strong absorption and ultrafast localisation in NaBiS2 nanocrystals with slow charge-carrier recombination Nature Communications 2022
  • A. T. J. Nicolson et al. Interplay of Static and Dynamic Disorder in the Mixed-Metal Chalcohalide Sn2SbS2I3 Journal of the Americal Chemical Society 2023
  • Y. Wang & S. R. Kavanagh et al. Cation disorder engineering yields AgBiS2 nanocrystals with enhanced optical absorption for efficient ultrathin solar cells Nature Photonics 2022 (early version)

DFT code support

At the moment, easyunfold supports VASP and CASTEP, but most of the routines are abstracted from the code specific details. In principle, support for other plane wave DFT code can be added by:

  • Implementing a subclass of WaveFunction that handles reading the wave function output.
  • Implementing functions for reading/writing k-points.
  • Adding branches for dispatching based on the dft_code attribute of the UnfoldKSet object in various places within the code.

The Atomic Simulation Environment (ASE) is used by easyunfold for reading in structures, so structure file IO is natively supported for essentially all public DFT codes.

Code Compatibility Notes

  • Atom-projected band structures are currently only supported for VASP calculation outputs.
  • Gamma-only and non-collinear spin calculations are not supported for CASTEP.

Contributors

And those who helped in the development:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easyunfold-0.4.0.tar.gz (58.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easyunfold-0.4.0-py3-none-any.whl (58.2 kB view details)

Uploaded Python 3

File details

Details for the file easyunfold-0.4.0.tar.gz.

File metadata

  • Download URL: easyunfold-0.4.0.tar.gz
  • Upload date:
  • Size: 58.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for easyunfold-0.4.0.tar.gz
Algorithm Hash digest
SHA256 43c96127d9c4179a84acbdd85e70d7c895343d57bfd1c8092e0b0e5b1f197d01
MD5 ef25d4da5150a6c2eea3a8697cde8649
BLAKE2b-256 c33a427a6b4f5bc1bf144fd5800dffdfc9fe387ed62cbbfbbaab0270f78b3ac0

See more details on using hashes here.

File details

Details for the file easyunfold-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: easyunfold-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 58.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for easyunfold-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ebe32c9c50212a7c5de43a1b18c8fcb9b6e5e91a4ab74a5e22d0b83514d1e4b
MD5 2a7021d0554d3ac59ce8f2864b7b59fc
BLAKE2b-256 ba6fb138b222c1c7e95e0d6436b47a415084db09562c7037bfe532e262acf484

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page