anchor.diff:  
               ! Calculate a randnum for accept/reject
               call random_number(randnum)
  +            randnum = 1.0-randnum
   
               ! Decide whether to reject just based on the energy.
               ! The fit to V(k) cannot be negative, so there is a lower
  
positive.code:                 else
                      ! Based on the random number above, even if del_chi is negative, decide
                      ! whether to accept or not.
                      if(log(1.0-randnum) < -del_chi*beta) then
                          ! Accept move
                          call fem_accept_move()
                          e1 = e2 ! eam
  
negative.code:                 e2 = e1
              endif
  
              ! If the energy is good enough, run FEMSIM and re-evaluate the acceptance
              if(energy_accepted) then
                  call fem_update(m, atom, res, k, vk, scatfact_e, communicator, istat)
  
  