Skip to content

Valyte Logo

Valyte

VASP pre- and post-processing from one command line.

If you run VASP, you know how this goes. The calculation finishes, and then you go looking for the plotting script you wrote six months ago and can't quite remember how to call. Valyte started as a way to stop doing that.

Point it at a finished run and it reads what VASP left behind (vasprun.xml, PROCAR, OSZICAR, OUTCAR, POSCAR) and hands you a figure or a data file. One command per job. The defaults try to give you something you could drop into a paper as-is, and when they don't suit you, almost all of them can be changed.


Quick start

pip install valyte

Then change into a directory with your VASP output and try any of these:

valyte dos                      # density of states
valyte band                     # band structure
valyte converge                 # relaxation convergence table

If you'd rather see the whole thing end to end, the Getting Started guide walks through a calculation from setup to finished figure.


Commands

Setting up a calculation

Command What it does
valyte supercell nx ny nz Build a supercell from a POSCAR
valyte kpt Write a KPOINTS grid (Monkhorst-Pack or Gamma). Runs interactively if you pass no flags
valyte band kpt-gen Write a line-mode KPOINTS along a high-symmetry path, Bradley-Cracknell by default
valyte potcar Concatenate a POTCAR for the species in a POSCAR

Analysing the output

Command What it does
valyte dos Total and projected DOS, orbital resolved, with gradient fills
valyte dos --panels The same DOS split into stacked panels, one per element (--panel-by orbital for orbitals instead)
valyte band Band structure with the VBM placed at 0 eV
valyte band --tricolor s p d Orbital-projected bands colored by three specs. Accepts s, Fe, Fe:d, O(p)
valyte band --spin-resolved Spin-up and spin-down channels in separate colors
valyte band --spin-texture sz Non-collinear spin texture, bands colored by sx, sy or sz
valyte combined Band structure and DOS side by side on a shared energy axis
valyte effmass Carrier effective masses at the VBM and CBM by parabolic fitting
valyte ipr Inverse participation ratio from a PROCAR, for judging localization
valyte bandgap Print the band gap and nothing else
valyte converge Per-step energy, force and pressure table for a structural relaxation
valyte bz First Brillouin zone with the suggested high-symmetry k-path

A couple of these need the right flags set in VASP: --tricolor and --spin-texture read projections out of vasprun.xml, so the run needs LORBIT >= 11, and spin texture needs a non-collinear calculation on top of that. If a plot comes out empty, that's usually why.

Shared options

The four commands that draw figures (dos, band, combined, effmass) all take the same output flags, so once you know them they work everywhere:

Flag Effect
--save-data Also write the plotted numbers to a .dat file
--format {png,pdf,svg} Figure format
--dpi Resolution for raster output (default 400)
--no-bold Lighter type and thinner lines, closer to a journal house style
--style {default,xkcd,legacy,lines,dark,neon,grid} Overall look: hand-drawn xkcd, classic legacy, lines without DOS fills, dark and neon for dark slides, grid with light grid lines

A few small exceptions: valyte effmass only draws its fit if you ask for it with --plot, valyte converge takes --save-data even though it prints a table rather than a figure, and valyte ipr always writes ipr_procar.dat (pass -o to name it something else).


DOS Plot Example Band Structure Example

Left: Orbital-resolved density of states with gradient fills. Right: Color-coded band structure with VBM at 0 eV.


Explore the documentation

  • Getting Started


    Installation, prerequisites, and your first plot.

    Get started

  • Band Structure


    Standard, tricolor, spin-resolved, and spin-texture band plots.

    Band modes

  • Density of States


    Total and projected DOS with orbital resolution and gradient fills.

    DOS plotting

  • Effective Mass


    Carrier effective masses from parabolic fitting at VBM/CBM.

    Effective mass

  • Convergence


    Per-step convergence tables for structural relaxations.

    Convergence

  • CLI Reference


    Every command and flag in one searchable page.

    CLI reference


Acknowledgements

Valyte stands on pymatgen, seekpath, numpy, scipy and matplotlib, and wouldn't be much without them. Thanks to everyone who maintains those, and to sumo and the other open-source VASP tools that worked this out before I did.