How optimization of potential functions affects protein folding.