The term ‘free energy’ confused me for a long time. One one hand, when we learn thermodynamics, people talk about the Helmholtz free energy, $F = U - TS$, which is somehow ‘minimised’ at constant temperature. On the other hand, in the literature, people seem to describe the logarithm of a partition function to be the ‘free energy’, too. They must be related, but how?