Grand Canonical Generators
Abstract
Boltzmann generators are generative models that are trained to sample from canonical equilibrium distributions. However, existing methods assume a fixed particle number and cannot represent open molecular systems, whose particle number fluctuate and depend on a chemical potential. We present Grand Canonical Generators (GCG), a framework that extends equilibrium generative modelling beyond fixed particle numbers and generates configurations without the insertion moves that limit grand canonical Monte Carlo (GCMC). We instantiate GCG using a natural factorization of the grand canonical ensemble into a particle-number distribution and the corresponding Boltzmann density at that particle number. This choice has two advantages. First, it allows us to parametrize a particle-number model that enforces the linear dependence on chemical potential required by the grand canonical ensemble. Second, it enables a tractable joint likelihood that supports a version of self-normalized importance sampling (SNIS) over particle number and coordinates. We evaluate on three established systems from the GCMC community: an ideal gas, a Lennard--Jones fluid, and methane adsorption in MFI crystal.