Is protein folding hierarchic? I. Local structure and peptide folding