The alignment scan procedure. In this illustration, the protein is made of 5 residues. The first row of 5 boxes represents the original sequence. The second row of 5 boxes represents the circularly permuted sequence in which the last residue is moved to the front. This box is shaded to indicate the permutation. The initial alignment aligns residues 2, 3, 4 and 5 of the first sequence to the residues 1, 2, 3 and 4 of the second sequence, respectively. The residue 1 of the first sequence and residue 5 of the second sequence is not considered as a part of the initial alignment. This alignment is fed to the RSE routine, which refines it by structure superposition-sequence alignment cycles and produces a new, refined alignment output, indicated as n1. This process is repeated after circularly permuting the sequence by one more position each time. The refined alignment outputs are labeled by the number of positions of the initial permutation. This example shows that the initial alignment for the last cycle has just one pair of residues aligned. In real case, the cycle stops when the number of residue pairs in the initial alignment is less than 3.