Predicting helical hairpins from sequences by Monte Carlo simulations