potential¶
- py4vasp.calculation.potential¶
- class py4vasp.calculation._potential.Potential(data_context, **kwargs)¶
The local potential describes the interactions between electrons and ions.
In DFT calculations, the local potential consists of various contributions, each representing different aspects of the electron-electron and electron-ion interactions. The ionic potential arises from the attraction between electrons and the atomic nuclei. The Hartree potential accounts for the repulsion between electrons resulting from the electron density itself. Additionally, the exchange-correlation (xc) potential approximates the effects of electron exchange and correlation. The accuracy of this approximation directly influences the accuracy of the calculated properties.
In VASP, the local potential is defined in real space on the FFT grid. You control which potentials are written with the WRT_POTENTIAL tag. This class provides the methods to read and visualize the potential. If you are interested in the average potential, you may also look at the
workfunction
.- plot(*args, **kwargs)¶
Wrapper around
to_view()
method.This method will visualize the quantity in the structure. Please refer to the
to_view()
method for a documentation of the allowed arguments.- Returns:
A visualization of the quantity within the crystal structure.
- Return type:
View
- print()¶
Print a string representation of this instance.
- read(*args, **kwargs)¶
Convenient wrapper around to_dict. Check that function for examples and optional arguments.
- selections()¶
Returns possible alternatives for this particular quantity VASP can produce.
The returned dictionary contains a single item with the name of the quantity mapping to all possible selections. Each of these selection may be passed to other functions of this quantity to select which output of VASP is used.
- Returns:
The key indicates this quantity and the values possible choices for arguments to other functions of this quantity.
- Return type:
dict
- to_dict()¶
Store all available contributions to the potential in a dictionary.
- Returns:
The dictionary contains the total potential as well as the potential differences between up and down for collinear or the directional potential for noncollinear calculations. If individual contributions to the potential are available, these are returned, too. Structural information is given for reference.
- Return type:
dict
- to_ngl(*args, **kwargs)¶
Convert the view to an NGL widget.
This method wraps the
to_view()
method and converts the resulting View to an NGL widget. Theto_view()
method documents all the possible arguments of this function.- Returns:
A widget to display the structure and other quantities in the unit cell.
- Return type:
NGLWidget
- to_view(selection='total', supercell=None, **user_options)¶
Plot an isosurface of a selected potential.
- Parameters:
selection (str) – Select the kind of potential of which you want the isosurface.
supercell (int or np.ndarray) – If present the data is replicated the specified number of times along each direction.
user_options – Further arguments with keyword that get directly passed on to the visualizer. Most importantly, you can set isolevel (in eV) to adjust the value at which the isosurface is drawn.
- Returns:
A visualization of the potential isosurface within the crystal structure.
- Return type:
View