A systematic search approach to the automatic refinement of protein structures could reduce the need for manual intervention. In this approach, possible conformations for a segment of the polypeptide chain are generated systematically and the trial segments are scored for their agreement with the observed diffraction data. The sampling of conformational space is sufficiently exhaustive that reasonable conformations should be included. A number of score functions have been tested, including local electron-density correlations and global structure-factor agreements. The score functions vary in their predictive power as well as in their bias toward the conformation found in the current refined model, but the best score functions have reasonable predictive power. Related functions can be used to indicate which regions of the model fit poorly, reducing the need for manual inspection of models in electron density.