local#
Local potential functions for plane waves.
This module provides functions for calculating local pseudopotential contributions in plane wave basis sets, including reciprocal space transformations and Hamiltonian matrix elements.
- jrystal.pseudopotential.local.energy_local(reciprocal_density_grid: Complex[Array, 'spin kpt band x y z'], potential_local_grid_reciprocal: Complex[Array, 'x y z'], vol: Float) Float[source]#
Compute the local potential energy in reciprocal space.
This function calculates the energy contribution from the local potential by computing the inner product between the potential and density in reciprocal space.
- Parameters:
reciprocal_density_grid (Complex[Array, "spin kpt band x y z"]) – Electron
space. (density in reciprocal)
potential_local_grid_reciprocal (Complex[Array, "x y z"]) – Local potential
potential_local_reciprocal. (in reciprocal space. Can be obtained from)
vol (Float) – Unit cell volume.
- Returns:
Local potential energy contribution.
- Return type:
Float
- jrystal.pseudopotential.local.hamiltonian_local(wave_grid: Complex[Array, 'spin kpt band x y z'], potential_local_grid_reciprocal: Complex[Array, 'x y z'], vol: Float) Complex[Array, 'spin kpt band band'][source]#
Compute the local potential Hamiltonian matrix elements.
This function calculates the matrix elements of the local potential operator in the basis of wave functions. The potential is transformed from reciprocal to real space before computing the matrix elements.
- Parameters:
wave_grid – Wave functions in real space grid.
potential_local_grid_reciprocal – Local potential in reciprocal space. Can be obtained from
potential_local_reciprocal().vol – Unit cell volume.
- Returns:
Local potential Hamiltonian matrix elements.
- jrystal.pseudopotential.local.potential_local_reciprocal(positions: Float[Array, 'atom 3'], g_vector_grid: Float[Array, 'x y z 3'], r_grid: List[Float[Array, 'r']], local_potential_grid: List[Float[Array, 'r']], local_potential_charge: List[int], vol: float, fourier_transform_method: str = 'sbt') Float[Array, 'x y z'][source]#
Calculate the local potential in reciprocal space.
This function computes the local pseudopotential contribution in reciprocal space by transforming the real-space local potentials and applying structure factors.
\[< v_loc | G >\]- Parameters:
positions (Float[Array, "atom 3"]) – Atomic positions in Cartesian
coordinates.
g_vector_grid (Float[Array, "x y z 3"]) – Reciprocal space grid vectors.
r_grid (List[Float[Array, "r"]]) – Real-space radial grids for each atom
type.
local_potential_grid (List[Float[Array, "r"]]) – Local potential values on
grids. (radial)
local_potential_charge (List[int]) – Nuclear charges for each atom type.
vol (float) – Unit cell volume.
fourier_transform (str) – Fourier transform method. Can be either “sbt” or
"fft".
- Returns:
Local potential in reciprocal space grid.
- Return type:
Float[Array, “x y z”]