First-principles models and computation of thermodynamic functions in crystalline, quasicrystalline and liquid systems