= Solution
For a fixed-$N,V,T$ <canonical ensemble>, sample the normalized <Boltzmann distribution> in <phase space>:
$$
\boxed{\pi(\mathbf r,\mathbf p)=Z^{-1}e^{-\beta H(\mathbf r,\mathbf p)},\qquad\beta=(k_{\rm B}T)^{-1}.}
$$
After integrating out the momenta for an ordinary separable <Hamiltonian mechanics>, configurational sampling uses $\pi(\mathbf r)\propto e^{-\beta U(\mathbf r)}$. The correct equilibrium distribution is ensemble-dependent; the Boltzmann form is the canonical answer, rather than a universal prescription for every possible ensemble.
Back to article page