In this paper we present a new residue contact potantial derived by st
atistical analysis of protein crystal structures. This gives mean hydr
ophobic and pairwise contact energies as a function of residue type an
d distance interval. To test the accuracy of this potential we generat
e model structures by ''threading'' different sequences through backbo
ne folding motifs found in the structural data base. We find that conf
ormational energies calculated by summing contact potentials show perf
ect specificity in matching the correct sequences with each globular f
olding motif in a 161-protein data set. They also identify correct mod
els with the core folding motifs of hemerythrin and immunoglobulin McP
C603 V1-domain, among millions of alternatives possible when we align
subsequences with alpha-helices and beta-strands, and allow for variat
ion in the lengths of intervening loops. We suggest that contact poten
tials reflect important constraints on non-bonded interaction in nativ
e proteins, and that ''threading'' may be useful for structure predict
ion by recognition of folding motif.