symmetrise#

ReciprocalLatticeVector.symmetrise(return_multiplicity=False, return_index=False)[source]#

Unique vectors symmetrically equivalent to the vectors.

Parameters:
  • return_multiplicity (bool, optional) – Whether to return the multiplicity of each vector. Default is False.

  • return_index (bool, optional) – Whether to return the index into the vectors for the returned symmetrically equivalent vectors. Default is False.

Returns:

  • ReciprocalLatticeVector – Flattened symmetrically equivalent vectors.

  • multiplicity (numpy.ndarray) – Multiplicity of each vector. Returned if return_multiplicity=True.

  • idx (numpy.ndarray) – Index into the vectors for the symmetrically equivalent vectors. Returned if return_index=True.

Examples

See ReciprocalLatticeVector for the creation of rlv

>>> rlv
ReciprocalLatticeVector (2,), al (m-3m)
[[1. 1. 1.]
 [2. 0. 0.]]
>>> rlv.symmetrise()
ReciprocalLatticeVector (14,), al (m-3m)
[[ 1.  1.  1.]
 [-1.  1.  1.]
 [-1. -1.  1.]
 [ 1. -1.  1.]
 [ 1. -1. -1.]
 [ 1.  1. -1.]
 [-1.  1. -1.]
 [-1. -1. -1.]
 [ 2.  0.  0.]
 [ 0.  2.  0.]
 [-2.  0.  0.]
 [ 0. -2.  0.]
 [ 0.  0.  2.]
 [ 0.  0. -2.]]
>>> _, mult, idx = rlv.symmetrise(
...     return_multiplicity=True, return_index=True
... )
>>> mult
array([8, 6])
>>> idx
array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1])