symmetrise#

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

Unique vectors symmetrically equivalent to the vectors.

Parameters:
return_multiplicitybool, optional

Whether to return the multiplicity of each vector. Default is False.

return_indexbool, optional

Whether to return the index into the vectors for the returned symmetrically equivalent vectors. Default is False.

Returns:
ReciprocalLatticeVector

Flattened symmetrically equivalent vectors.

multiplicitynumpy.ndarray

Multiplicity of each vector. Returned if return_multiplicity=True.

idxnumpy.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])