Obtaining the E flip i (a, b) for all atoms of a NP also allows to identify the optimal permutation step, which involves an atom from each element with the respective lowest flip energies. The selection of atom pairs corresponding to the optimal permutation based on sorted flip energies is illustrated in Fig. . Consecutive executions of such optimal permutations constitute a deterministic local relaxation of the chemical ordering, reaching a minimum when further energy decrease by exchanging two atoms is no longer possible.