PPT Slide
old=energy(spins, j, max)
spins(element)=spins(element)*(-1)
new=energy(spins, j, max)
c reject change if new energy is greater and the Boltzmann factor
c is less than another random number
If ((new.GT.old) .AND. (exp((-new+old)/kt).LT.drand48())) Then
spins(element)=spins(element)*(-1)