aim2dat.utils.space_groups

Module containing functions to parse space groups and to get information on the lattice.

Module Contents

Functions

get_crystal_system(space_group)

Return the crystal system of a space group given by a string or number.

get_lattice_type(space_group)

Return the crystal system of a space group given by a string or number.

get_space_group_details(space_group[, ...])

Return space group details from name or international number using spglib.

transform_to_nr(space_group)

Parse the space group into the corresponding number (if necessary) using the ase library.

transform_to_str(space_group)

Parse the space group from its number to the symbol using the ase library.

aim2dat.utils.space_groups.get_crystal_system(space_group)[source]

Return the crystal system of a space group given by a string or number.

Parameters:

space_group (int or str) – Space group of the crystal.

Returns:

crystal_system (str) – The crystal system of the space group, e.g. ‘tetragonal’.

aim2dat.utils.space_groups.get_lattice_type(space_group)[source]

Return the crystal system of a space group given by a string or number.

aim2dat.utils.space_groups.get_space_group_details(space_group: str | int, return_sym_operations: bool = False)[source]

Return space group details from name or international number using spglib.

Parameters:
  • space_group (str or int) – Space group name or international number.

  • return_sym_operations (bool (optional)) – Whether to return the symmetry operations as well.

Returns:

dict

  • numberint

    International number of the space group.

  • international_shortstr

    International short symbol of the space group.

  • international_fullstr

    International full symbol of the space group.

  • internationalstr

    International symbol of the space group.

  • schoenfliesstr

    Schoenflies symbol of the space group.

  • hall_numberint

    Hall number of the space group.

  • hall_symbolstr

    Hall symbol of the space group.

  • choicestr

    Centring, origin, basis vector setting.

  • pointgroup_internationalstr

    International symbol of the crystallographic point group.

  • pointgroup_schoenfliesstr

    Schoenflies symbol of the crystallographic point group.

  • arithmetic_crystal_class_numberint

    Arithmetic crystal class number.

  • arithmetic_crystal_class_symbolstr

    Arithmetic crystal class symbol.

  • symmetry_operationslist

    List of tuples containing the rotation matrix and translation as lists if return_sym_operations is set to True.

aim2dat.utils.space_groups.transform_to_nr(space_group)[source]

Parse the space group into the corresponding number (if necessary) using the ase library.

Parameters:

space_group (int or str) – Space group of the crystal.

Returns:

sg_num (int) – Number of the space group.

aim2dat.utils.space_groups.transform_to_str(space_group)[source]

Parse the space group from its number to the symbol using the ase library.

Parameters:

space_group (int or str) – Space group of the crystal.

Returns:

sg_str (str) – Symbol of the space group.