The nonempirical linear-muffin-tin-orbitalatomic-sphere approximation method is used to obtain the effective interaction potential for tungsten. This potential is applied to calculate the second moment of phonon spectrum 2». We study the convergency of 2» in real space and find that the main contribution to 2» is given by the first coordination shell. The presented first-principle approach allows us to obtain correct spherically symmetric potentials. We show that these nonempirically calculated effective potentials may be successfully applied to the calculations of integral spectral characteristics. The obtained cohesive energy, equilibrium lattice parameter, and bulk modulus are well correlated with the measurements. The Gibbs-Bogoliubov inequality and the variational procedure of Ross are used to calculate the temperature dependence of free energy in liquid tungsten. The obtained thermodynamic functions of solid and liquid phases are employed to determine the melting temperature, which is found to be 3530 K whereas the experimental value is 3680 K.