simulated annealing for md
adding simulated annealing to REX macro