where p i is the probability of the state i, E i and E j are the energy of the state i and j, respectively, k B the Boltzmann constant (1.9872041 × 10 3 kcal/mol/K), T the temperature in Kelvin, and M the total number possible states. A state i is first randomly selected based on its probability p i , then accepted or rejected by evaluating its energy E i with a modified Metropolis criterion (eq.2):