Provide the tools to manage 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. For example you may use
>>> 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
- class py4vasp.calculation.Calculation(*args, **kwargs)¶
Manage access to input and output of VASP calculations.
To create new instances, you should use the classmethod
from_path(). 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.
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.
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 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.
This class accesses the topology of the crystal.
- 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_path(path_name)¶
Set up a Calculation for a particular path and so that all files are opened there.
path_name (str or 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.