Skip to main content

vasprunrs

A fast parser for VASP vasprun.xml files, written in Rust with Python bindings.

vasprunrs is a drop-in replacement for pymatgen.io.vasp.outputs.Vasprun that parses the same files 5–10x faster using a streaming Rust XML parser. It returns native pymatgen objects (Structure, CompleteDos, BandStructure, etc.) so existing code needs only a one-line import change.

Installation

pip install vasprunrs

# with pymatgen compatibility shim (recommended)
pip install "vasprunrs[pymatgen]"

Usage

Drop-in replacement for pymatgen

# Before
from pymatgen.io.vasp import Vasprun

# After
from vasprunrs.pymatgen import Vasprunrs as Vasprun
vr = Vasprun("vasprun.xml")

structure      = vr.final_structure       # pymatgen Structure
dos            = vr.complete_dos          # pymatgen CompleteDos
band_structure = vr.get_band_structure()  # pymatgin BandStructure
eigenvalues    = vr.eigenvalues           # {Spin.up: ndarray, ...}

Native API (no pymatgen required)

from vasprunrs import Vasprun

vr = Vasprun("vasprun.xml", parse_dos=True, parse_eigen=True)

print(vr.version)           # "6.4.2"
print(vr.efermi)            # 4.123 (eV)
print(vr.final_structure)   # dict with lattice, positions, species
print(vr.eigenvalues.shape) # (nspins, nkpts, nbands, 2)
print(vr.dos)               # dict with efermi, total, partial

Features

Feature Status
INCAR parameters (typed) supported
Atomic info (mass, valence, pseudopotential) supported
K-points (mesh, weights, labels) supported
Initial and final structures supported
Ionic steps (forces, stress, energies) supported
Eigenvalues and occupancies supported
Projected eigenvalues (LORBIT ≥ 10) supported (opt-in)
Total DOS supported
Partial DOS (site + orbital) supported
Dielectric function supported
Fermi level supported
Spin-polarized calculations supported
Non-collinear / SOC supported
Line-mode k-points (band structure) supported
GW post-processing supported
Overflow values (NaN) handled
Magnetic moments (per-atom, collinear + non-collinear) supported
Force constants / phonons not yet implemented
Born effective charges not yet implemented

Performance

vasprunrs uses a streaming XML parser that does not load the entire file into memory. Parse times are typically 5–10x faster than pymatgen's Python parser.

Parse options

Both the native Vasprun and the compatibility Vasprunrs accept the same options:

Option Default Description
parse_dos True Parse density of states
parse_eigen True Parse eigenvalues
parse_projected_eigen False Parse projected eigenvalues (can be large)
ionic_step_skip None Parse every Nth ionic step
ionic_step_offset 0 Skip the first N ionic steps

Known limitations

  • converged_electronic and converged_ionic are not tracked separately (both reflect the same value)
  • Epsilon static/ionic tensors (epsilon_static, epsilon_ionic) are not parsed from the DFPT block
  • Force constants / phonons and Born effective charges are not yet implemented

Note on per-atom magnetic moments: Vasprunrs.magnetization reads the <varray name="magnetization"> block from each ionic step. This block is written by VASP 5.x but is absent in VASP 6.x output, so magnetization will return None for all VASP 6.x files regardless of whether the calculation is magnetic. Per-atom moments for VASP 6.x can be recovered by integrating the partial DOS up to the Fermi energy (spin-up minus spin-down per atom), which requires parse_dos=True and LORBIT ≥ 11 in the INCAR.

Requirements

  • Python 3.9+
  • numpy
  • pymatgen (optional, for vasprunrs[pymatgen])

License

MIT

Metadata

Release files for vasprunrs 0.1.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 vasprunrs 0.1.0
File Size Uploaded Provenance
vasprunrs-0.1.0.tar.gz 7.0 MB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for vasprunrs 0.1.0
File
vasprunrs-0.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
vasprunrs-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
vasprunrs-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details
vasprunrs-0.1.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
vasprunrs-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details
vasprunrs-0.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
vasprunrs-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
vasprunrs-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
vasprunrs-0.1.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
vasprunrs-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
vasprunrs-0.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
vasprunrs-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
vasprunrs-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
vasprunrs-0.1.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
vasprunrs-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details

Total release size: 15.8 MB

Release files / vasprunrs-0.1.0.tar.gz

Download URL vasprunrs-0.1.0.tar.gz
Size 7.0 MB
Tags Source
SHA-256 checksum
How to use checksums
809bd01b8a3517ea178287a95f70426465c1694566e9b6ed5f1e26a9cfa00cdc
BLAKE2b-256 checksum
How to use checksums
9a98a635fc03adcd7b5b97caa8eb02d31d951df10423eddb9830f539c3763add
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp313-cp313-win_amd64.whl

Download URL vasprunrs-0.1.0-cp313-cp313-win_amd64.whl
Size 482.5 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
48bc9c6dc7cb578e99b99b5c2df744a7c56f027eae0043b4087a24b4219f2ebf
BLAKE2b-256 checksum
How to use checksums
29104944fa03e61b5d8fc24332d3ee1476e775b0bfe2a8433eed0bea34b62e35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL vasprunrs-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 643.0 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
7b40f2e945bbe8ceb768c346e953f5df17f408a36eaa8e98537390ed31599b6a
BLAKE2b-256 checksum
How to use checksums
ecf1b9dd5e1e7844128919be4a61f40ff76a16fe34cdf0964d9b9b0e406e4d6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL vasprunrs-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 632.0 kB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
a40cf46f0a0dd8c9bf8979f5461d5e9583c9bfeeb332bad88ae562d4bb7a8fed
BLAKE2b-256 checksum
How to use checksums
0982742ea8cea405fba02e22ec0cf7fda033b57c2baae291839cd5f1a0db55bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL vasprunrs-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Size 584.0 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
57f4fdfa2e51eb4097a034bba00ccee1a3c8d453ab2597815e33188621d04c49
BLAKE2b-256 checksum
How to use checksums
8951ea07414a2f81127dc0606bec08ab5ab7bfbf338a91ee454bf02f6ec75d01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl

Download URL vasprunrs-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl
Size 594.1 kB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7cb46ad99f64abb20ed656eec6e01f100dd75b30fffbf2c4d092cab6f833027f
BLAKE2b-256 checksum
How to use checksums
fe47421aab877823a396f6ec2a9d66533ce1e0b5b8c9e8a3f72847758143916f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp312-cp312-win_amd64.whl

Download URL vasprunrs-0.1.0-cp312-cp312-win_amd64.whl
Size 483.0 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6e190f1fc8abd60a14f782721176e3ef7a8beb8e89f69c71ebb8ce9ec18996c0
BLAKE2b-256 checksum
How to use checksums
aeb29f487a183492fcc4d2d639a6bba7ae28e5febcc1e8613e2cf45dead52bcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL vasprunrs-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 643.6 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
65a7910a27749848c070d96a6af7173815dc570a546ed2720e4124c1326bcbf7
BLAKE2b-256 checksum
How to use checksums
dd62560572dbff10957ac5fb873386455aa004801fb1400c43a7a39a4f9ce3cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL vasprunrs-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 633.2 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
e7b73b00fe1ec58b885ba35f60eb82c3bbcd93fdc04564cf0e014a8c5000975e
BLAKE2b-256 checksum
How to use checksums
ea20e5297fd6cba5e3d9deff67dfd2c33f2deab6f6f483ffc63067c21bb30dd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL vasprunrs-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Size 584.3 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
49cd3901d55906113d712145ff260da4ebd4f466bf92d1e01381a45bbb4edb4a
BLAKE2b-256 checksum
How to use checksums
c37bf4e11912ae1b29d4d607bfcccd5ea6648a13c05020a927a4e91890938a70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl

Download URL vasprunrs-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 594.4 kB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ae3c9eb5a4f63d7e6a50bf3b80a9c632b3815973079817fd710c4dac7ee4a9c1
BLAKE2b-256 checksum
How to use checksums
3f098a03b5afb61da3697ab75d7d70affa0dc7edd04d255c35123967437d89c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp311-cp311-win_amd64.whl

Download URL vasprunrs-0.1.0-cp311-cp311-win_amd64.whl
Size 481.6 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
7b760df70165f05a6bb35b211c6005846482b693cb0b630981df7820b22d4c2f
BLAKE2b-256 checksum
How to use checksums
cc64425250ea9bc6de8a0aa10c49c27ae422b42d1f97d7003d2b569574e0166b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL vasprunrs-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 641.9 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
a5a91c839ba7a12383f502234f4301f4533b17215d2bfac9c4cb7c1c6c200044
BLAKE2b-256 checksum
How to use checksums
d03a58d0c8a88dda10ac1a5fa31de4fefd7917eefa234412b36d1ceb1cb145a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL vasprunrs-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 631.3 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
9b456596cf924acdb044e38c04e2712375476c43690814ac26f4453ddcbc4071
BLAKE2b-256 checksum
How to use checksums
247c00aaad693c623c49e6eebced8f13b17c34ee38e6e7122438192eb35014b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL vasprunrs-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Size 585.4 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
73dcd2a9a07f9f40a1a535ba7d7528b00cf50d59d66ec366d42e9dbdfafc4c0a
BLAKE2b-256 checksum
How to use checksums
5f6e7ad22151afddcdca14a2d33584d77f690b4acfb21587fdb6956d7d61d092
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Release files / vasprunrs-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl

Download URL vasprunrs-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl
Size 595.7 kB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e3d38cd7330d8cfd9f1abcdd81b5bcb5e04a7b4da7bedbcd429096a446494fad
BLAKE2b-256 checksum
How to use checksums
1321f8e424fa90df6fbd1dd9faac93c148da8154acfb64b17a4ae704ee728e84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.12.6

Security for vasprunrs 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

16 release files No provenance

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