The validity and accuracy of a proposed tertiary structure of a protein can be assessed in several ways. Scoring such a structure by a knowledge-based potential is a well-known approach in molecular biophysics, an important task in structure prediction and refinement, and a key step in several experiments on protein structures. Although several parameterizations for such models have been derived over the course of time, improvements in accuracy by explicitly using continuous distance information have not been suggested yet. We close this methodological gap by formulating the parameterization of a protein structure model as a linear program. Optimization of the parameters was performed using amino acid distances calculated for the residues in topology rich 2830 protein structures. We show the capability of our derived model to discriminate between native structures and decoys for a diverse set of proteins. In addition, we discuss the effect of reduced amino acid alphabets on the model. In contrast to studies focusing on binary contact schemes (without considering distance dependencies and proposing five symbols as optimal alphabet size), we find an accurate protein alphabet size to contain at least five symbols, preferably more, to assure a satisfactory fold recognition capability. © 2012 Wiley Periodicals, Inc.