VASP-tools
A collection of Python and Bash tools for pre- and post-processing VASP DFT calculations, maintained by the Tonner-Zech Group.
Installation
Install the latest release from PyPI:
pip install tools4vasp
Or clone the repository for the latest development version:
git clone https://github.com/Tonner-Zech-Group/VASP-tools.git
cd VASP-tools
pip install .
Use an editable install to track repository changes without reinstalling:
pip install -e .
Dependencies
| Package | Purpose |
|---|---|
| ASE | Atoms and trajectory handling |
| Pymatgen | CHGCAR/ELFCAR parsing, LOBSTER helper |
| matplotlib | Plotting |
| natsort | Natural-sort for folder discovery |
| numpy | Numerical operations |
| SciPy | Plane fitting for surface/molecule tools |
Optional dependencies (not installed automatically):
- Geodesic Interpolation — required by
mixed_interpolate - VTST tools — used alongside NEB tools
- VMD — required by
plot_neb_movieandvisualize_magnetization
Quick start
All tools are available as command-line scripts after installation. Every tool supports --help:
vaspcheck --help
plotNEB --help
Typical workflows
NEB calculation post-processing
# After your NEB converged, collect images into a movie and plot the barrier
neb2movie --output neb.xyz # creates movie from NEB image dirs
plotNEB --unit eV --file barrier.png # plot spline.dat + neb.dat
Frequency / vibrational analysis
# Extract imaginary mode and prepare for IRC
freq2mode # writes MODECAR and MODECAR.MW
add-MODECAR # preview displaced POSCAR as xyz
# Visualise all modes
freq2jmol # writes vib-NNN.xyz (JMol format)
viewMode --modecar MODECAR # animated ASE GUI preview
# Split large frequency calculation across multiple jobs
split_vasp_freq split 20 # create freq_001/, freq_002/, …
# (run VASP in each subfolder, then)
split_vasp_freq combine # merge results into freq/ cache
split_vasp_freq write_jmol # export JMol xyz
Charge density / ELF
chgcar2cube CHGCAR --output chg # → chg.cube
elf2cube ELFCAR --output elf # → elf.cube (or elf_up/down for spinpol)
Geometry optimisation analysis
vaspcheck ./run # check occupations and convergence
vaspGetEF ./run # plot energy+forces across restart jobs
vaspGetEF ./run --poscar ./run/POSCAR # selective-dynamics aware (forces over free DOF only)
vasp2traj traj.xyz OUTCAR # convert OUTCAR to trajectory
IRC calculation plotting
plotIRC --reactant_dir irc_r/ --product_dir irc_p/ \
--transition_state ts/ --file irc.svg
Pre-processing tools
| Tool | Description | Example |
|---|---|---|
add-MODECAR |
Add MODECAR displacements to a POSCAR, output xyz animation. | add-MODECAR --poscar POSCAR --modecar MODECAR |
freq2mode |
Generate MODECAR and mass-weighted MODECAR from a frequency calculation. | freq2mode -i 0 |
getPOTCAR |
Generate POTCAR with same order of elements as specified in POSCAR. Requires $VASP_PP_PATH. |
getPOTCAR -r |
kgrid2kspacing |
Get KSPACING equivalent for the current POSCAR+KPOINTS. | kgrid2kspacing |
kspacing2kgrid |
Get k-point grid for a given KSPACING and the current POSCAR. | kspacing2kgrid 0.15 |
mixed_interpolate |
Geodesic interpolation for the molecule + IDPP for the surface. | mixed_interpolate |
poscar2nbands |
Compute the recommended NBANDS for LOBSTER from POSCAR/INCAR/POTCAR. | poscar2nbands |
set_vacuum |
Set the total vacuum size in a POSCAR (space below + above the slab). | set_vacuum 15.0 -f POSCAR -o |
split_surf_and_mol |
Split an adsorbate-surface complex into surface and molecule structures. | split_surf_and_mol POSCAR |
xyz2POSCAR |
Insert molecule from .xyz file into a cell from a POSCAR. | xyz2POSCAR mol.xyz POSCAR_with_cell |
Post-processing tools
| Tool | Description | Example |
|---|---|---|
calc-deformation-density |
Calculate deformation density from AB, A and B VASP run folders. | calc-deformation-density |
chgcar2cube |
Convert CHGCAR-like files to cube files (converts units to e⁻/ų). | chgcar2cube CHGCAR --output chg |
elf2cube |
Convert ELFCAR files to cube files. | elf2cube ELFCAR --output elf |
freq2jmol |
Write JMol-compatible xyz files for all vibrational modes. | freq2jmol --directory ./ |
neb2movie |
Convert VASP NEB images to an ASE ext-xyz movie (like nebmovie.pl). |
neb2movie --output neb.xyz |
plotHOMA_withPBC |
Calculate and plot HOMA from coordinates, including pbc. | plotHOMA_withPBC POSCAR |
plotIRC |
Plot VASP IRC calculations in both directions, shift-compatible. | plotIRC -r irc_r/ -p irc_p/ -t ts/ |
plotNEB |
Plot VASP+VTST NEB results (reads spline.dat + neb.dat). |
plotNEB --unit eV --file neb.png |
plot_neb_movie |
Create presentation images for NEB using VMD and plotNEB. | plot_neb_movie |
replace_potcar_symlinks |
Replace POTCARs in subdirectories with symlinks. Use with care. | replace_potcar_symlinks |
split_vasp_freq |
Split a VASP frequency calculation into partial jobs and recombine. | split_vasp_freq split 20 |
vasp2traj |
Convert VASP OUTCAR or XDATCAR to an ext-xyz trajectory. | vasp2traj traj.xyz OUTCAR |
vaspcheck |
Assert proper occupations and SCF+GO convergence using ASE. | vaspcheck ./run |
vaspcheck-outcar |
Check SCF and ionic convergence directly from OUTCAR / OUTCAR.gz (no vasprun.xml needed). | vaspcheck-outcar ./run |
vaspGetEF |
Plot energy and max force across multiple GO restart jobs. When a POSCAR with selective dynamics is found, forces are computed over free (unfrozen) components only — per-component constraints (e.g. T T F) are handled correctly. |
vaspGetEF ./run |
viewMode |
Animated preview of a MODECAR in the ASE GUI. | viewMode --scale 2 |
visualize-magnetization |
Create a VMD visualisation state for the magnetisation density. | visualize-magnetization |
Development
git clone https://github.com/Tonner-Zech-Group/VASP-tools.git
cd VASP-tools
pip install -e .
pip install pytest pytest-cov ruff
pytest
ruff check .
See CLAUDE.md for detailed development guidelines, CI setup, and instructions for adding new tools.
Contributing
- Fork the repository and create a branch:
feat/<description>. - Write tests for new functionality in the
test/directory. - Ensure
ruff check .andpytestboth pass locally before opening a PR. - Open a pull request against
main.
Citing this work
If you use tools4vasp in your research, please cite it using the metadata in CITATION.cff or via the Cite this repository button on GitHub. The DOI is 10.5281/zenodo.15525217.
License
MIT — see LICENSE.
Metadata
Release files for tools4vasp 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tools4vasp-1.3.1.tar.gz | 70.7 kB | With provenance | Details for tools4vasp-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tools4vasp-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for tools4vasp-1.3.1-py3-none-any.whl |
Total release size: 127.9 kB
Release files / tools4vasp-1.3.1.tar.gz
| Download URL | tools4vasp-1.3.1.tar.gz |
|---|---|
| Size | 70.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6729f2d81f98bd72fe68f6559bb62e97243a510f8c1af05ee06acdd8d521fff
|
|
BLAKE2b-256 checksum How to use checksums |
5e3468ecc4a536bb1d3001251dffd60df6268a9974beca0dcf4e99edfd9839e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 11, 2026.
Transparency logRelease files / tools4vasp-1.3.1-py3-none-any.whl
| Download URL | tools4vasp-1.3.1-py3-none-any.whl |
|---|---|
| Size | 57.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cf315fde1a890fa6cbc3d70f98243a2a9fef313685007be3f669c44bc965402
|
|
BLAKE2b-256 checksum How to use checksums |
5f6843d67a279d6bda8c84120920c6df34496eb91e1188e9c7d671efb72187f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 11, 2026.
Transparency logSecurity for tools4vasp 1.3.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for tools4vasp-1.3.1.tar.gz
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 Jun 11, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.