Potential, free energy and equilibrium