skillfed

vasprun-xml

A python package for quick analysis of vasp calculation

vasprun-xml v1.0.4 563.0K downloads/30d#5,984 on PyPI38
Permissive license MIT DORMANT released

What it is and what it does

vasprun-xml is a Python package for extracting and analyzing results from VASP (Vienna Ab initio Simulation Package) calculations directly from the vasprun.xml output file. It wraps common post-processing tasks—band gap extraction, density-of-states plotting, band structure visualization with color mapping, and eigenvalue analysis—into a single interface, eliminating the need to write custom parsing code for each calculation.

The package depends on standard scientific Python libraries: numpy for numerical operations, scipy for advanced calculations, matplotlib for plotting, pandas for data handling, lxml for XML parsing, and tabulate for formatted output. It targets researchers and computational materials scientists who run VASP simulations and need quick, reproducible analysis without learning VASP's native tools or writing boilerplate parsing scripts.

Use it for:

  • Extract band gap values and electronic structure properties from completed VASP calculations for high-throughput screening.
  • Generate publication-quality density-of-states and band structure plots with color-mapped orbital contributions.
  • Analyze force vectors and dynamical matrices to study phonon properties and structural stability.
  • Parse INCAR, POTCAR, and POSCAR files for workflow automation and calculation reproducibility.
  • Calculate dielectric constants and polarization from VASP output for ferroelectric or optical property studies.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses VASP calculation output from vasprun.xml files and generates plots, eigenvalue analyses, and material property calculations including band gaps, density of states, and band structures.

Yes, if you actively run VASP calculations and need quick post-processing. The package is stable (no known vulnerabilities), has low install friction, and covers common analysis tasks. However, maintenance is dormant since early 2022—expect no updates for bugs or new VASP features. If you need active support or cutting-edge VASP compatibility, consider whether the feature set meets your needs before committing.

Install

vasprun-xml on PyPI

pip

pip install vasprun-xml

uv

uv add vasprun-xml

poetry

poetry add vasprun-xml

Installing vasprun-xml

Before you install

Low friction installation with standard scientific Python dependencies (numpy, scipy, matplotlib, pandas, lxml). Maintenance is dormant—last release was 2022-02-14 and no commits since 2024-06-07—so expect no active bug fixes or feature updates.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install vasprun-xml

from vasprun_xml import Vasprun

vr = Vasprun('vasprun.xml')
bandgap = vr.bandgap
print(f'Band gap: {bandgap} eV')

Requires a valid vasprun.xml file from a completed VASP calculation; Python >= 3.6.1.

Verify before relying

  • Whether elastic constants feature mentioned in description is actually implemented (marked 'to add').
  • Current state of the readthedocs documentation and whether all listed features are fully functional.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6.1)
Install friction low — pure-Python wheel
Runtime dependencies 6 — lxml, pandas, numpy, scipy, matplotlib, tabulate
Maintenance dormant — 1,642 days since the last release
Last repo commit
First released
Downloads 562,960/month — #5,984 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: vasprun_xml-1.0.4-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

vasp output analysisband structure plottingdensity of states calculationvasprun.xml parservasp band gapvasp dos visualizationcomputational materials analysis
vasp-analysismaterials-sciencecomputational-chemistry

More Information Analysis packages