local#

Local potential functions for plane waves.

jrystal.pseudopotential.local._energy_local(reciprocal_density_grid: Complex[Array, 'spin kpt band x y z'], v_local_reciprocal: Complex[Array, 'x y z'], vol: Float) Float[source]#

The local potential energy in reciprocal space.

Note

This function is for split the potential and density from energy calculation such that it is differentiable with respect to the density, and can be jitted.

Parameters:
  • reciprocal_density_grid (Complex[Array, "spin kpt band x y z"]) – The reciprocal density grid.

  • v_local_reciprocal (Complex[Array, "x y z"]) – The local potential in reciprocal space.

  • vol (Float) – The volume of the unit cell.

Returns:

The local potential energy in reciprocal space.

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]#

The local potential hamiltonian in real space.

Note

This function is for split the potential and density from energy calculation such that it is differentiable with respect to the density, and can be jitted.

Parameters:
  • wave_grid (Complex[Array, "spin kpt band x y z"]) – The wave function in real space.

  • potential_local_grid_reciprocal (Complex[Array, "x y z"]) – The local potential in reciprocal space.

  • vol (Float) – The volume of the unit cell.

Returns:

The local potential hamiltonian in real space.

Return type:

Complex[Array, “spin kpt band band”]

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) Complex[Array, 'x y z'][source]#

Calculate the local potential in reciprocal space.

Note

This function is for split the potential and density from energy calculation such that it is differentiable with respect to the density, and can be jitted.

Parameters:
  • positions (Float[Array, "atom 3"]) – The positions of the atoms.

  • g_vector_grid (Float[Array, "x y z 3"]) – The grid of the reciprocal vectors.

  • r_grid (List[Float[Array, "r"]]) – The grid of the real space.

  • local_potential_grid (List[Float[Array, "r"]]) – The local potential in real space.

  • local_potential_charge (List[int]) – The charge of the local potential.

  • vol (float) – The volume of the unit cell.

Returns:

The local potential in reciprocal space.

Return type:

Complex[Array, “x y z”]

jrystal.pseudopotential.local.energy_local(reciprocal_density_grid: Complex[Array, 'spin kpt band x y z'], positions: Float[Array, 'atom 3'], g_vector_grid: Float[Array, 'x y z 3'], r_grid: Float[Array, 'r'], local_potential_grid: Float[Array, 'r'], local_potential_charge: Float[Array, 'atom'], vol: Float) Float[source]#

The local potential energy in reciprocal space.

Parameters:
  • reciprocal_density_grid (Complex[Array, "spin kpt band x y z"]) – The reciprocal density grid.

  • positions (Float[Array, "atom 3"]) – The positions of the atoms.

  • g_vector_grid (Float[Array, "x y z 3"]) – The grid of the reciprocal vectors.

Returns:

The local potential energy in reciprocal space.

Return type:

Float

jrystal.pseudopotential.local.hamiltonian_local(wave_grid: Complex[Array, 'spin kpt band x y z'], positions: Float[Array, 'atom 3'], g_vector_grid: Float[Array, 'x y z 3'], r_grid: Float[Array, 'r'], local_potential_grid: Float[Array, 'r'], local_potential_charge: Float[Array, 'atom'], vol: Float) Complex[Array, 'spin kpt band band'][source]#

The local potential hamiltonian in reciprocal space.

Parameters:
  • wave_grid (Complex[Array, "spin kpt band x y z"]) – The wave function in real space.

  • positions (Float[Array, "atom 3"]) – The positions of the atoms.

  • g_vector_grid (Float[Array, "x y z 3"]) – The grid of the reciprocal vectors.

  • r_grid (Float[Array, "r"]) – The grid of the real space.

  • local_potential_grid (Float[Array, "r"]) – The local potential in real space.

  • local_potential_charge (Float[Array, "atom"]) – The charge of the local potential.

  • vol (Float) – The volume of the unit cell.

Returns:

The local potential hamiltonian in reciprocal space.

Return type:

Complex[Array, “spin kpt band band”]