Computation of a pairwise similarity matrix A. (A) For each residue (k, blue) of our dataset, all neighbors with a distance of at most 5 Å measured between the centers of heavy atoms were determined. Here, it is one residue l marked red. (B) Residue positions k, l were linked with the corresponding columns of the MSA and transition frequencies were deduced from a comparison of the residue pairs. (C) In this illustrative example, we observe one transition from AA to AC, two transitions from AA to CA and one transition from AA to CC. Transition frequencies were used to construct the 400 × 400 matrix A of substitution frequencies for residue pairs.