sphgrid#

torchspin.sphgrid(symmetry, N)[source]#

Return a spherical powder-averaging grid.

Parameters:
  • symmetry (str) – EasySpin point-group symmetry string, e.g. 'Dinfh', 'D2h', 'Ci', 'C1'.

  • N (int) – Number of grid knots along a quarter meridian (GridSize). Must be at least 2.

Returns:

  • phi – Azimuthal angles in radians, shape (M,).

  • theta – Polar angles in radians, shape (M,).

  • weights – Solid-angle weights, shape (M,). Sum is 4π.

  • vecs – Unit vectors on the sphere, shape (3, M); rows are x, y, z.

Return type:

tuple[Tensor, Tensor, Tensor, Tensor]