The Boltzman distribution law and partition function