Enhanced sampling and applications in protein folding