PLUGINS/LOCAL POTENTIAL: Difference between revisions
No edit summary |
No edit summary |
||
Line 29: | Line 29: | ||
ion_potential: NDArray[np.float64] | ion_potential: NDArray[np.float64] | ||
dipole_moment: NDArray[np.float64] | dipole_moment: NDArray[np.float64] | ||
{{NB| mind | The dipole moment is provided only if {{TAG|LDIPOL}}{{=}}.TRUE.}} | |||
The <code>additions</code> dataclass consists of the following modifiable outputs | |||
total_energy: float | |||
total_potential: NDArray[np.float64] | |||
==Modifying quantities== | |||
---- | ---- | ||
[[The_VASP_Manual|Contents]] | <!--[[The_VASP_Manual|Contents]]--> | ||
<!-- Link to categories like this: [[Category:INCAR]][[Category:Electronic Minimization]] | <!-- Link to categories like this: [[Category:INCAR]][[Category:Electronic Minimization]] | ||
only comment it out when you want the page to show up on the category page, i.e., not when it is in the Construction namespace.--> | only comment it out when you want the page to show up on the category page, i.e., not when it is in the Construction namespace.--> |
Revision as of 07:33, 11 June 2024
PLUGINS/LOCAL_POTENTIAL = .TRUE. | .FALSE.
Description: PLUGINS/LOCAL_POTENTIAL calls the Python plugin for the local potential interface for each SCF step
When PLUGINS/LOCAL_POTENTIAL=.TRUE., VASP calls the local_potential
Python function.
See here for details on how to setup your Python script such that VASP can recognize it.
The primary use-case of this tag is to add a quantity on the real space grid to the local potential and a scalar quantity to the total energy of a VASP calculation through a Python plugin.
Expected Inputs
The local_potential
Python function expects the following inputs,
def local_potential(constants, additions):
where constants
and additions
and Python dataclasses.
The constants
dataclass consists of the following inputs, listed here with their associated datatypes
ENCUT: float NELECT: float shape_grid: NDArray[np.int32] number_ions: int number_ion_types: int ion_types: NDArray[np.int32] atomic_numbers: NDArray[np.int32] lattice_vectors: NDArray[np.float64] positions: NDArray[np.float64] ZVAL: NDArray[np.float64] charge_density: NDArray[np.float64] hartree_potential: NDArray[np.float64] ion_potential: NDArray[np.float64] dipole_moment: NDArray[np.float64]
Mind: The dipole moment is provided only if LDIPOL=.TRUE. |
The additions
dataclass consists of the following modifiable outputs
total_energy: float total_potential: NDArray[np.float64]
Modifying quantities