calculation¶
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.
Notes
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.- band¶
The electronic band structure.
- born_effective_charge¶
The Born effective charge tensors coupling electric field and atomic displacement.
- density¶
The charge and magnetization density.
- dielectric_function¶
The dielectric function resulting from electrons and ions.
- dielectric_tensor¶
The static dielectric tensor obtained from linear response.
- dos¶
The electronic density of states (DOS).
- elastic_modulus¶
The elastic modulus (second derivatives w.r.t. strain)
- energy¶
The energy data for one or several steps of a relaxation or MD simulation.
- force¶
The forces acting on the atoms for selected steps of the simulation.
- force_constant¶
The force constants (second derivatives of atomic displacement).
- internal_strain¶
The internal strain
- kpoint¶
The k points used in the Vasp calculation.
- magnetism¶
The magnetic moments and localized charges for selected ionic steps.
- piezoelectric_tensor¶
The piezoelectric tensor (second derivatives w.r.t. strain and field)
- polarization¶
The static polarization of the structure obtained from linear response.
- projector¶
The projectors used for atom and orbital resolved quantities.
- stress¶
The stress acting on the unit cell for selected steps of the simulation.
- structure¶
The structure of the crystal for selected steps of the simulation.
- system¶
Extract the system tag from the INCAR file.
- topology¶
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.
- Parameters
path_name (str or Path) – Name of the path associated with the calculation.
- Returns
A calculation associated with the given path.
- Return type
- path()¶
Return the path in which the calculation is run.