Boresch-style restraints also require the selection of three reference protein atoms; for these, our algorithm initially considers all protein atoms, and then progressively filters out undesirable atoms (Figure ). In this filtering process, the algorithm retains protein backbone atoms (as well as C-beta atoms) that are in the middle of an alpha helix or beta sheet since those are typically the most stable secondary structure elements. A trivial approach from here would be to select alpha helices only. However, this fails for proteins like galectin which do not have any helices. Therefore, we find that a more rigorous approach is to include backbone atoms in alpha helices if those are the dominant secondary structure and if not, include both backbone atoms from helices and beta sheets. The algorithm picks atoms from central residues in those helices/sheets since outer residues can be more flexible and less stable. As mentioned above, only protein atoms with a RMSF < 0.1 Å are retained. In addition to this, atoms have to be at least 10 Å and no more than 30 Å away from the ligand. The rationale for the 10 Å minimum distance is that binding site residues can undergo conformational changes upon ligand binding and therefore might be less stable as an anchor point.