Exploring the mechanisms of protein folding