exciton.density¶
(
- data_context,
- **kwargs
)
This class accesses exciton charge densities of VASP.
The exciton charge densities can be calculated via the BSE/TDHF algorithm in VASP. With this class you can extract these charge densities.
path
plot
View
read
selections
dict
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. Some quantities provide additional elements which can be passed as selection for other routines.
Returns
dict- The key indicates this quantity and the values possible choices for arguments to other functions of this quantity.
to_dict
dict
Read the exciton density into a dictionary.
Returns
dict- Contains the supercell structure information as well as the exciton charge density represented on a grid in the supercell.
to_ngl
NGLWidget
to_numpy
np.ndarray
Convert the exciton charge density to a numpy array.
Returns
np.ndarray- Charge density of all excitons.
to_vasp_viewer
VASPViewerWidget
Convert the view to a VASP Viewer widget.
This method wraps the to_view() method and converts the resulting View
to a VASP Viewer widget. The to_view() method documents all the possible
arguments of this function.
Returns
VASPViewerWidget- A widget to display the structure and other quantities in the unit cell.
to_view
(
- selection:
str= None, - supercell:
int | np.ndarray= None, - center:
bool= False, - **user_options
) → View
Plot the selected exciton density as a 3d isosurface within the structure.
Parameters
- selection:
str= None - Can be exciton index or a combination, i.e., “1” or “1+2+3”
- supercell:
int | np.ndarray= None - If present the data is replicated the specified number of times along each direction.
- center:
bool= False - Shift the origin of the unit cell to the center. This is helpful if you the exciton is at the corner of the cell.
- **user_options
- Further arguments with keyword that get directly passed on to the visualizer. Most importantly, you can set isolevel to adjust the value at which the isosurface is drawn.
Returns
View- Visualize an isosurface of the exciton density within the 3d structure.
Examples
>>> calculation = py4vasp.Calculation.from_path(".")
Plot an isosurface of the first exciton charge density
>>> calculation.exciton.density.plot()
Plot an isosurface of the third exciton charge density
>>> calculation.exciton.density.plot("3")
Plot an isosurface of the sum of first and second exciton charge
densities
>>> calculation.exciton.density.plot("1+2")