Sequence-specific folding mechanisms of peptides