Simulation of alloy thermodynamics: From an atomic to a mesoscale Hamiltonian