Skip to main content

pyVASPlot

📡 Python toolkit for VASP electronic-structure analysis and visualization.


CI License: MIT Linter: ruff Package manager: uv

⚠️ Work in progress

pyVASPlot is currently under active development and the API is not yet stable. Interfaces and functionality may change between releases.

Description

pyVASPlot is a Python package for loading, manipulating, and visualizing electronic-structure data from VASP calculations.

The package provides a convenient data container, PyVASP, built around loaders from pymatgen. It is designed primarily for use in Jupyter notebooks, where VASP results can be loaded and further analyzed interactively.

A particular focus of the package is the visualization of orbital- and ion-projected electronic structure, with the aim of facilitating comparison between DFT calculations and ARPES (angle-resolved photoemission spectroscopy) measurements.

In addition to the core data structures and VASP loaders, pyVASPlot provides plotting and selection utilities for electronic-structure data, including band structures, k-space paths, PROCAR projections, and projected k-space maps.

The package can also handle calculations performed along custom k-space planes, such as a kx–ky plane, and can generate projected constant-energy maps suitable for comparison with experimental ARPES maps.

Features

  • Load VASP calculations from directories or ZIP archives.

  • Parse data from common VASP output files, including:

    • PROCAR
    • CONTCAR
    • OUTCAR
    • KPOINTS
  • Load different types of electronic-structure calculations, including:

    • band structures along k-paths
    • spin-orbit coupling calculations
    • HSE calculations
    • custom k-space scans and kx–ky data
  • Use pymatgen-based loaders for parsing VASP output.

  • Store calculation data in a convenient PyVASP container.

  • Plot band structures and reciprocal-space k-paths.

  • Visualize orbital- and ion-projected data from PROCAR.

  • Generate projected k-space maps.

  • Select ions and orbitals for projection plots.

  • Cache parsed data locally to speed up subsequent loads.

  • Designed for interactive use in Jupyter notebooks.

Installation

pyVASPlot currently requires Python 3.12 or newer.

The package is currently under development and is not yet available as a stable PyPI release.

For development, clone the repository and install it in editable mode:

git clone <repository-url>
cd pyvasplot
pip install -e ".[dev]"

Example

A typical workflow starts by loading a VASP calculation into a PyVASP object.

from pyvasplot import PyVASP
from pyvasplot.plotting import plot_bands, plot_kpath

dft = PyVASP(
    "path/to/Sb_111_GGA_0014",
    calculation_type="BS_KPATH",
    sub_path="BS_MGKM",
)

dft.load()

# Plot the reciprocal-space calculation path
plot_kpath(dft)

# Plot the band structure
plot_bands(dft)

Projection maps can be generated by selecting specific ions and orbitals from the PROCAR data:

from pyvasplot.select.ions import by_name
from pyvasplot.plotting import plot_procar_map

orbitals = ("s", "py", "pz", "px")
ions = by_name(dft, "Sb")

# Parameters defining the k-space section
sec_MGM = {
    "k_section": 0,
    "k_mirror": True,
    "k_flip": True,
}

# Plot the projection onto the selected ions and orbitals
plot_procar_map(
    dft,
    ions=ions,
    orbitals=orbitals,
    **sec_MGM,
)

More examples and detailed documentation will be added as the package develops.

Documentation

Documentation is currently under development.

The full documentation will be hosted on Read the Docs once the package reaches a more stable stage.

Development status

pyVASPlot is currently under heavy development.

The API should be considered unstable, and breaking changes may occur without following a strict backwards-compatibility policy.

Contributions, bug reports, and suggestions are welcome.

Dependencies and acknowledgements

pyVASPlot builds heavily on several excellent open-source scientific Python packages:

  • pymatgen — VASP file parsing and electronic-structure data handling
  • ASE — atomic structures and structure visualization
  • NumPy — numerical data processing and array operations
  • Matplotlib — plotting and visualization

We are grateful to the developers and contributors of these projects for making their software available to the scientific community. Please see the respective projects for their licensing information and citation guidelines.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Release files for pyvasplot 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyvasplot 0.4.0
File Size Uploaded
pyvasplot-0.4.0.tar.gz 16.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyvasplot 0.4.0
File Interpreter ABI Platform
pyvasplot-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 MB

Release files / pyvasplot-0.4.0.tar.gz

Download URL pyvasplot-0.4.0.tar.gz
Size 16.3 MB
Tags Source
SHA-256 checksum
How to use checksums
4010bf43304ffc97157e6265dd70f4b1bc9ad2d30f7f6e8a0b978a1e9cf56fb2
BLAKE2b-256 checksum
How to use checksums
9d98df5e735107e8b57b346c89f317683b3c0825173f5e98357839793506392b
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 Sep 25, 2026.

Transparency log

Release files / pyvasplot-0.4.0-py3-none-any.whl

Download URL pyvasplot-0.4.0-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
127cbbc8075e44cefeadde988875012cbaf6d1d96fa4dca8a559e7b01190ba8c
BLAKE2b-256 checksum
How to use checksums
3185de14fee7153d22a2d386f6ed5a3eb8115dc538e984a9bb8b36df26400344
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 Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page