auto_kappa.calculators.kmesh_int module

auto_kappa.calculators.kmesh_int.get_kmesh_interpolate(mat_p2s, *, tol=1e-08)

Decide KMESH_INTERPOLATE from primitive_matrix (unit->prim) and supercell_matrix (unit->scell).

Strategy:
  1. M_p2s = inv(P) @ S (primitive->supercell) must be (almost) integer

  2. KMESH_INTERPOLATE[i] = gcd of column i of M_p2s (0 ignored)

  3. (optional) ensure kmesh_scph is a multiple of kmesh_interpolate

Parameters:
  • mat_p2s (ndarray)

  • tol (float)

Return type:

list[int]