PKB is a computer program system that combines a data base of three-dimensional protein structures with a series of algorithms for pattern recognition, data analysis, and graphics. By typing relatively simple commands the user may search the data base for instances of a structural motif and analyze in detail the set of individual structures that are found. The application of PKB to the study of protein folding is illustrated in three examples. The first analysis compares the conformations observed for a short sequential motif, sequences similar to the cell-attachment signal Arg-Gly-Asp. The second compares sequences observed for a conformational motif, a 16-residue beta alpha beta unit. The third analysis considers a population of substructures containing ion-pair interactions, examining the relationship of frequency of occurrence to calculated electrostatic energy.