xnn.common.models.electrostatics.reciprocal_lattice#

xnn.common.models.electrostatics.reciprocal_lattice(cell, k_cutoff)[source]#

The reciprocal lattice vectors k != 0 with |k| <= k_cutoff.

k = m_1 b_1 + m_2 b_2 + m_3 b_3 over the integer triples m of the enclosing box |m_i| <= ceil(k_c |a_i| / 2 pi), both k and -k (the full space).

Parameters:
  • cell (Tensor) – Lattice vectors as rows (3, 3).

  • k_cutoff (float) – Spherical cutoff in 1/Angstrom.

Returns:

grid the integer triples (N_k, 3) (long), kvec the vectors (N_k, 3) and k2 their squared norms (N_k,) (both differentiable in cell).

Return type:

tuple of Tensor