Rapid calculation of partition functions and free energies of fluids

The partition function (Q) is a central quantity in statistical mechanics. All the thermodynamic properties can be derived from it. Here we show how the partition function of fluids can be calculated directly from simulations; this allows us to obtain the Helmholtz free energy (F) via F-kBT ln Q. In our approach, we divide the density of states, assigning half of the configurations found in a simulation to a high-energy partition and half to a low-energy partition. By recursively dividing the low-energy partition into halves, we map out the complete density of states for a continuous system. The result allows free energy to be calculated directly as a function of temperature. We illustrate our method in the context of the free energy of water.