Skip to main content

Various specialized tools for working with the input and output of VASP

Project description

Solid-State-Physics Tools (ssptools)


This package contains classes and scripts developed by the author for his work in solid state physics, mainly for working with the input and output of the Vienna Ab initio Simulation Package. These tools are very specific in their use. The primary purpose of having them on GitHub and the PyPI is to enable easier editing of scripts while working on multiple devices. However you may still find some scipts to be of use to you.


Uses read and write from ase to convert a file containing a crystal structure to POSCAR or any other file-type acceptable to ase. <input-filename> <output-filename (optional)>

Appends kpoints specified in a json file to KPOINTS input of vasp.
To perform electronic band structure calculations with vasp it is sometimes required to use a combined KPOINTS file that contains both a $\Gamma$-centered grid and the bandpaths along which the dispersion should be calculated. The kpoints along the bandpaths will be appended to an existing KPOINTS files which already contains the grid-points in multiples of the reciprocal lattice vectors as a list. So far only "type": reciprocal is implemented. To get the list you can run vasp with a "normal" grid-KPOINTS and immediately abort it. This will create IBZKPT, which contains the list. The json file containing the bandpath-kpoints should be formulated like this:

    "type": "reciprocal",
    "straights": [
                "endpoint": [0, 0, 0],
                "npoints": 1,
                "name": "$\Gamma$"
                "endpoint": [0.333333, 0.333333, 0.],
                "npoints": 40,
                "name": "K"
                "endpoint": [0.333333, 0.333333, 0.5],
                "npoints": 40,
                "name": "K"


The band path is given in straights. They are defined by an endpoint, its name and the number of points along it. The startpoint of a straight is the endpoint of the previous straight in the list. Therefore the first straight must have "npoints": 1. "name" is the label given to the xticks when plotted using\ <QPOINTS.json> <KPOINTS>

Compares the eigenvalues of all kpoints between two vasprun.xml files. Let n1 be the number of kpoints in the first file. The first n1 kpoints in the second file have to be exactly the same as those in the first. <vasprun1.xml> <vasprun2.xml>

Be warned that the output is extremely lazy.

Plots the bandstructure from vasprun.xml files that used KPOINTS files created with along the paths defined in the json file.
If you split your vasp calculation along different segments you can plot them in one graph by giving the files in the order which they appear in the graph as command line arguments. <vasprun1.xml> <QPOINTS1.json> <vasprun2.xml> <QPOINTS2.json> ...

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssptools-0.4.0.tar.gz (9.4 kB view hashes)

Uploaded source

Built Distribution

ssptools-0.4.0-py3-none-any.whl (10.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page