Atoms I and J are chosen such that this expression is minimized, so to say a steepest descent step. After executing this permutation, the atom map f is updated such that the penalty matrix has to be updated as well according to Eq. ( ). This procedure is repeated until there is no permutation left that further reduces the trace, i.e. ∆tr(P) (IJ) ≥ 0 holds true for all I and J. Hence, the connectivity criterion is fulfilled for the optimization of set S p . For all pairs of atoms with ambiguous mapping, i.e. ∆tr(P) (IJ) = 0, the difference of the squared dihedral errors are calculated,