Knowledge-based potentials are developed to investigate the differentiation of native structures from their decoy sets. This work presents the construction of two different distance-dependent potential energy functions based on two basic assumptions using mathematical modeling. In the first case, according to Anfinsen’s dogma, we assumed that the energy of each model structure should be more positive than the corresponding native type. In the second one, we assumed that the energy difference between the native and decoy structures changes linearly with the root-mean-square deviation of structures. These knowledge-based potentials are expressed by the B-spline basis functions of the pairwise distances between Cα-Cα of inter-residues. The potential function parameters in the above two approaches were optimized using the linear programming algorithm on a large collection of Titan-HRD and tested on the remainder. We found that the potential functions produced by Anfinsen’s dogma detect native structures more accurately than those developed by the root-mean-square deviation. Both linear programming knowledge-based potentials (LPKP) successfully detect the native structures from an ensemble of decoys. However, the LPKP of the first approach is able to correctly identify 130 native structures out of 150 tested cases with an average rank of 1.67. While the second approach LPKP detects 124 native structures from their decoys. We concluded that linear programming optimization is a promising method in generating knowledge-based potential functions. All the high-resolution structures (training and testing) used for this work are available online and can be downloaded from http://titan.princeton.edu/HRDecoys.