Heats of formation and lattice energies