call iterate_nrg for each temperature but caluclate lattice in kernel, moved calc_energy code to iterate_nrg