Different protein architectures show strong similarities regardless of their amino acid composition: the backbone folds of the different secondary structural elements exhibit nearly identical geometries. To investigate the principles of folding and stability properties, oligopeptide models (that is, HCO-(NH-L-CHR-CO)n-NH2) have been studied. Previously, ab initio structure determinations have provided a small amount of information on the conformational building units of di- and tripeptides. A maximum of nine differently folded backbone types is available for any natural α-amino acid residue, with the exception of proline. All of these conformers have different relative energies. The present study compiles an ab inito database of optimized HCO-(L-Xxx)n-NH2 structures, where 1≤n≤8 and Xxx=Ala or Gly. All homoconformers (α helix, β sheet, collagen helix, etc.) of the different backbone folds were optimized, along with additional β-turn-type heteroconformers. The comprehensive analysis of more than 150 fully optimized polyalanine and polyglycine structures reveals the same energy-preference profile of major secondary structures as is found in globular proteins. The analysis of relative energies at three different levels of theory (RHF/3-21G, RHF/6-311++G(d,p)//RHF/3-21G, and RHF/6-311++G(d,p)) for the above-mentioned achiral (Xxx=Gly) and chiral (Xxx=Ala) molecular structures shows how these common secondary structure elements gradually become more and more stable folds in the oligopeptides as the length of the peptide chain increases. This indicates that stability (local energy preference) of conformational building units seems to be a major driving force in peptide and protein folding. Furthermore, the preferred conformers of the gas phase are rather similar to those observed in proteins crystallized from aqueous media. Indeed, the relative energies for the different computed conformers show remarkable agreement with the frequency of occurrence of the same structural motifs retrieved from a nonhomologous X-ray crystallography database.