treams.Lattice.permute

Lattice.permute(n=1)

Permute the lattice orientation.

Get a new lattice with the alignment permuted.

Examples

>>> Lattice.hexagonal(1, 2).permute()
Lattice([[0.    1.    0.   ]
         [0.    0.5   0.866]
         [2.    0.    0.   ]], alignment='xyz')
>>> Lattice.hexagonal(1).permute()
Lattice([[1.    0.   ]
         [0.5   0.866]], alignment='yz')
Parameters:

n (int, optional) – Number of repeated permutations. Defaults to 1.

Returns:

Lattice