pwtools.symmetry.spglib_get_spacegroup

pwtools.symmetry.spglib_get_spacegroup(struct, **kwds)[source]

Find spacegroup for given Structure.

Uses spglib.

Parameters:
  • struct (Structure)

  • **kwds (keywords) – passed to spglib.get_spacegroup(), e.g. symprec and angle_tolerance last time I checked

Returns:

  • spg_num, spg_sym

  • spg_num (int) – space group number

  • spg_sym (str) – space group symbol

Notes

The used function spglib.get_spacegroup() returns a string, which we split into spg_num and spg_sym.