Transformation#

spgrep.transform.transform_symmetry_and_kpoint(transformation_matrix, rotations, translations, kpoint)[source]#

Return symmetry and k-vector coefficients in transformed coordinates.

This function does not unique duplicated symmetry operations after applying transformation_matrix.

Let a given transformation_matrix be \(\mathbf{P}\). Symmetry operation \((\mathbf{R}, \mathbf{v})\) is transformed to \((\mathbf{P}, 0)^{-1} (\mathbf{R}, \mathbf{v}) (\mathbf{P}, 0) = (\mathbf{P}^{-1} \mathbf{R} \mathbf{P}, \mathbf{P}^{-1} \mathbf{v})\). Coefficients of k-vector \(\mathbf{k}\) are transformed to \(\mathbf{P}^{T} \mathbf{k}\).

Parameters:
  • transformation_matrix (array, (3, 3))

  • rotations (array, (num_sym, 3, 3))

  • translations (array, (num_sym, 3))

  • kpoint (array, (3, ))

Returns:

  • transformed_rotations (array, (num_sym, 3, 3))

  • transformed_translations (array, (num_sym, 3))

  • transformed_kpoint (array, (3, ))

spgrep.transform.get_primitive_transformation_matrix(hall_number)[source]#

Return transformation matrix from standard unit cell specified with hall_number into a primitive cell. The transformation matrix is consistent with Spglib’s convention [1,2] and KVEC’s convention [3].