- class py4vasp.Calculation(*args, **kwargs)¶
Manage access to input and output of VASP calculations.
This is the main user interface if you want to simply investigate the results of VASP calculations. Create a Calculation object associated with the VASP calculation that you run. Then you can access the properties of that calculation via the attributes of the object.
>>> calc = Calculation.from_path("path_to_your_calculation") >>> calc.dos.plot() # to plot the density of states >>> calc.magnetism.read() # to read the magnetic moments >>> calc.structure.print() # to print the structure in a POSCAR format
To create new instances, you should use the classmethod
from_file(). This will ensure that the path to your VASP calculation is properly set and all features work as intended.
The electronic band structure. (
The Born effective charge tensors coupling electric field and atomic displacement. (
The charge and magnetization density. (
The dielectric function resulting from electrons and ions. (
The static dielectric tensor obtained from linear response. (
Generic class for all dispersions (electrons, phonons). (
The electronic density of states (DOS). (
The elastic modulus (second derivatives w.r.t. strain) (
The energy data for one or several steps of a relaxation or MD simulation. (
Access data for producing BSE fatband plots. (
The forces acting on the atoms for selected steps of the simulation. (
The force constants (second derivatives of atomic displacement). (
The internal strain (
The k points used in the Vasp calculation. (
The magnetic moments and localized charges for selected ionic steps. (
The pair-correlation function for one or several blocks of an MD simulation. (
The phonon band structure. (
The phonon density of states (DOS). (
The piezoelectric tensor (second derivatives w.r.t. strain and field) (
The static polarization of the structure obtained from linear response. (
The projectors used for atom and orbital resolved quantities. (
The stress acting on the unit cell for selected steps of the simulation. (
The structure of the crystal for selected steps of the simulation. (
Extract the system tag from the INCAR file. (
This class accesses the topology of the crystal. (
The ion velocities for all steps of the calculation. (
- property INCAR¶
The INCAR file of the VASP calculation.
- property KPOINTS¶
The KPOINTS file of the VASP calculation.
- property POSCAR¶
The POSCAR file of the VASP calculation.
- classmethod from_file(file_name)¶
Set up a Calculation from a particular file.
Typically this limits the amount of information, you have access to, so prefer creating the instance with the
file_name (str of pathlib.Path) – Name of the file from which the data is read.
A calculation accessing the data in the given file.
- Return type:
- classmethod from_path(path_name)¶
Set up a Calculation for a particular path and so that all files are opened there.
path_name (str or pathlib.Path) – Name of the path associated with the calculation.
A calculation associated with the given path.
- Return type:
Return the path in which the calculation is run.