Skip to content

Differentiable Grand-Canonical Monte Carlo with Importance-Sampled Insertions for Gas Adsorption in Porous Materials.

Jul 2026 · Journal of Chemical Theory and Computation · 0 citations · 26 references
Medicine

Abstract

Gas adsorption in porous materials is naturally modeled in the grand-canonical ensemble. We give a compact, self-contained derivation of Metropolis-Hastings acceptance criteria for insertion, deletion, and displacement moves, including nonuniform insertion proposals based on a mixture of Gaussians (MoG) matched to pore geometry. We clarify where indistinguishability and the de Broglie wavelength enter, and show how observables map to adsorption isotherms, isosteric heats, number-fluctuation compressibilities, and the grand potential Ω. Beyond the formulas, we provide a computationally efficient, differentiable reference implementation in JAX and JAX molecular dynamics (JAX-MD), featuring periodic boundaries, cutoff-shifted Lennard-Jones interactions, and static, mask-based arrays amenable to just-in-time compilation (jit) and vectorized mapping (vmap) calculations. We include pragmatic diagnostics (autocorrelation-aware uncertainties, effective sample sizes, acceptance ratios), per-pore and voxel-resolved estimators, visualizations of pores and configurations. The open-source implementation is available online. The full source code, scripts, RASPA2 input files, CIFs, and raw benchmark JSON outputs are accessible at the link above.

View source