Permutation map

The purpose of this example is to demonstrate how to extract a permutation map.

Import modules

To extract permutation maps, only a single icet function is required, namely permutation_matrix_from_atoms. Additionally, the ASE function ase.build.bulk() will be needed to generate a structure.

Generate prototype Al unit cell

The next step is to build a prototype ASE Atoms object, here an aluminum fcc unit cell.

Obtain a permutation map

Next, the permutation_matrix_from_atoms function is called with the ASE Atoms object that was defined above and a neighbor cutoff of 2.0 Å as arguments. The resulting output is a list that contains three elements, namely a PermutationMap, a primitive Structure and a NeighborList.

Since the verbosity was set to \(\geq 3\), the following extra information should be printed by permutation_matrix_from_atoms:

size of atoms_prim 1
number of positions: 19

Extract permuted positions

The permuted as well as the indexed and unique positions can be extracted from the PermutationMap object, generated earlier, using the methods PermutationMap.get_permuted_positions() and PermutationMap.get_indiced_positions(), respectively.

Source code

The complete source code is available in examples/get_permutation_matrix.py