vasprun-xml
A python package for quick analysis of vasp calculation
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-xmluv
uv add vasprun-xmlpoetry
poetry add vasprun-xmlInstalling 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
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
atomate2Atomate2 provides a library of pre-built…
permissive · top 15,000 on PyPI
pymatgen-io-validationValidates VASP electronic structure calculation…
permissive · top 15,000 on PyPI
phonopyPhonopy calculates phonon properties and…
permissive · top 15,000 on PyPI
pymatgenPymatgen provides Python classes and analysis…
permissive · top 5,000 on PyPI
dpdatadpdata converts and manipulates atomistic…
copyleft · top 15,000 on PyPI
periodictableProvides a periodic table of the elements with…
permissive · top 15,000 on PyPI
thermoThermo calculates temperature and…
permissive · top 15,000 on PyPI
pyxtalPyXtal generates crystal structures with…
permissive · top 15,000 on PyPI
pymatgen-corepymatgen-core provides core data structures and…
permissive · top 15,000 on PyPI
symfcSymfc computes force constants from atomic…
unclear · top 15,000 on PyPI