calculation

Provide refinement functions for a the raw data of a VASP calculation run in the current directory.

Usually one is not directly interested in the raw data that is produced but wants to produce either a figure for a publication or some post-processing of the data. This package contains multiple modules that enable these kinds of workflows by extracting the relevant data from the HDF5 file and transforming them into an accessible format. The modules also provide plotting functionality to get a quick insight about the data, which can then be refined either within python or a different tool to obtain publication-quality figures.

Generally, all modules provide a read function that extracts the data from the HDF5 file and puts it into a Python dictionary. Where it makes sense in addition a plot function is available that converts the data into a figure for Jupyter notebooks. In addition, data conversion routines to_X may be available transforming the data into another format or file, which may be useful to generate plots with tools other than Python. For the specifics, please refer to the documentation of the individual modules.

The raw data is read from the current directory. The Calculation class provides a more flexible interface with which you can determine the source directory or file for the VASP calculation manually. That class exposes functions of the modules as methods of attributes, i.e., the two following examples are equivalent:

using calculation module

>>> from py4vasp import calculation
>>> calculation.dos.read()

using Calculation class

>>> from py4vasp import Calculation
>>> calc = Calculation.from_path(".")
>>> calc.dos.read()

In the latter example, you can change the path from which the data is extracted.

Attributes

band

The band structure contains the k point resolved eigenvalues.

bandgap

This class describes the band extrema during the relaxation or MD simulation.

born_effective_charge

The Born effective charge tensors couple electric field and atomic displacement.

CONTCAR

CONTCAR contains structural restart-data after a relaxation or MD simulation.

density

This class accesses various densities (charge, magnetization, ...) of VASP.

dielectric_function

The dielectric function describes the material response to an electric field.

dielectric_tensor

The dielectric tensor is the static limit of the dielectric function.

dos

The density of states (DOS) describes the number of states per energy.

elastic_modulus

The elastic modulus is the second derivative of the energy with respect to strain.

energy

The energy data for one or several steps of a relaxation or MD simulation.

fatband

BSE fatbands illustrate the excitonic properties of materials.

force

The forces determine the path of the atoms in a trajectory.

force_constant

Force constants are the 2nd derivatives of the energy with respect to displacement.

internal_strain

The internal strain is the derivative of energy with respect to displacement and strain.

kpoint

The k-point mesh used in the VASP calculation.

magnetism

The local moments describe the charge and magnetization near an atom.

electronic_minimization

Access the convergence data for each electronic step.

pair_correlation

The pair-correlation function measures the distribution of atoms.

partial_charge

Partial charges describe the fraction of the charge density in a certain energy, band, or k-point range.

phonon_band

The phonon band structure contains the q-resolved phonon eigenvalues.

phonon_dos

The phonon density of states (DOS) describes the number of modes per energy.

piezoelectric_tensor

The piezoelectric tensor is the derivative of the energy with respect to strain and field.

polarization

The static polarization describes the electric dipole moment per unit volume.

potential

The local potential describes the interactions between electrons and ions.

projector

The projectors used for atom and orbital resolved quantities.

stress

The stress describes the force acting on the shape of the unit cell.

structure

The structure contains the unit cell and the position of all ions within.

system

The SYSTEM tag in the INCAR file is a title you choose for a VASP calculation.

topology

The topology of the crystal describes the ions of a crystal and their connectivity.

velocity

The velocities describe the ionic motion during an MD simulation.

workfunction

The workfunction describes the energy required to remove an electron to the vacuum.