Theoretical modeling of sodium chloride and related systems. I. The interaction energies