xnn.common.models.pme.mesh_wavevectors#

xnn.common.models.pme.mesh_wavevectors(cell, mesh)[source]#

The wave vectors of a mesh in FFT order: 2 pi times the Miller indices dotted with the reciprocal vectors.

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

  • mesh (list of int) – Mesh dimensions (K_1, K_2, K_3).

Returns:

k of shape (K_1, K_2, K_3, 3) and |k|^2 of shape (K_1, K_2, K_3), in 1/Angstrom.

Return type:

tuple of Tensor