WorksPhysics and Astronomy
Solubility of poorly soluble species in bulk and nanopores from grand-canonical Wang-Landau sampling
Abstract
Poorly soluble species can have mean populations below one in small systems such as nanopores. In this regime, the grand-potential minimum, which identifies the most probable particle number, differs from the ensemble-averaged solute loading. We use grand-canonical Wang-Landau sampling (GCWLS) to calculate the density of states for a binary Lennard-Jones mixture of solute B in solvent A, both in bulk and in slit pores. One set of GCWLS simulations gives ensemble averages over a range of chemical potentials, whereas conventional grand-canonical Monte Carlo (GCMC) simulation requires a separate simulation at each state point. Independent GCMC simulations confirm the GCWLS ensemble averages. The solvent number distribution is nearly Gaussian, whereas the dilute solute distribution is skewed and Poisson-like. The most probable solute number therefore lies below the ensemble-averaged loading and is zero whenever . Reading the solute loading from the grand-potential minimum underestimates it and can falsely indicate that no solute is present. Defining the oversolubility as , where is the solute mole fraction, we find in a pore of 3.5 particle diameters width when both wall interactions are repulsive. Adding wall-solute attraction moderately raises it to , whereas wall-solvent attraction lowers it to . This comparison shows that the wall-solvent interaction controls most of the enhancement. As the pore widens, decreases toward unity. In bulk and in nanopores alike, the solubility of poorly soluble species should be obtained from ensemble averages rather than from grand-potential minima.
Introduction
The dissolution of low soluble gases, such as and , in liquids like is central to environmental applications, such as gas-hydrate formation[1] and capture and storage in brines and water-filled porous media[2, 3, 4, 5, 6, 7]. Accurate predictions of gas solubility, phase behaviour, and molecular transport are needed to design carbon-capture[8, 9], catalysis[10, 11], and gas-storage[12] technologies. Experiments show that gases can dissolve in liquids confined in mesoporous solids up to about twenty times more than in the bulk liquid[13, 14, 15, 16]. Molecular simulations attribute such oversolubility to the interactions of both the gas and the solvent with the pore walls[12, 17, 18, 19]. In water-filled pores, the enhancement is generally strongest at hydrophobic walls, an effect attributed to adsorption and clustering of the gas at the surface[3, 20, 21, 22, 23], while hydrophilic walls, covered by strongly bound water layers, enhance the solubility less or even reduce it[3, 22]. At a hydrophobic wall, however, gas adsorption and weak solvent binding occur together. More generally, changing the gas or the porous solid alters several of these interactions at once, and reported solubilities for the same gas–liquid pair vary widely between studies[7], so the separate contributions of these interactions to the enhancement remain unknown. Gas solubilities in such systems are usually computed with grand-canonical Monte Carlo (GCMC) simulations[24]. For a poorly soluble gas, however, insertions into the dense solvent are rarely accepted, so the few solute molecules are exchanged too seldom for their average to converge[25, 26]. Cavity-biased[25] or configurational-bias[26, 27] insertion, gradual insertion of particles[28, 29], and larger cells reduce these effects at higher cost, but the simulation still visits each particle number in proportion to its probability, so rarely visited states remain poorly sampled. Enhanced-sampling methods have therefore been developed to improve exploration of rarely visited states and transitions between them[30, 31]. Transition-Matrix Monte Carlo[32] (TMMC) and Wang–Landau sampling[33, 34, 35, 36] are two closely related prominent examples: the former reconstructs state probabilities from transition statistics, whereas the latter estimates the density-of-states (DOS) through adaptive biasing. In this manuscript, we use grand-canonical Wang–Landau sampling (GCWLS), which yields the two-dimensional DOS, , and from it the particle-number distribution over a range of chemical potentials, from a single set of simulations. As our analysis relies only on , it is independent of the sampling algorithm.
Grand-potential profiles in the particle number, , are commonly interpreted through their minima, which identify the stable states, for instance the filled and empty states of water in nanopores[37, 38]. For a solute present at only a few molecules, the statistics of small open systems depart from macroscopic expectations[39, 40, 41], and the minimum of need not coincide with the equilibrium uptake. Such low occupancies are common, since they arise from poor solubility, from low gas pressure, and from the small volume of a nanopore.
Here, we determine how the minimum of relates to the equilibrium uptake of a solute present at only a few molecules and how the wall–solvent and wall–solute interactions separately contribute to the oversolubility. We use GCWLS for a binary Lennard-Jones mixture composed of a low-solubility solute B and a solvent A, both in bulk and under slit-pore confinement. For the bulk system, we compare the minimum of with the equilibrium ensemble-average solute loading, . For the confined system, we isolate the role of wall–fluid interactions by switching off the wall attraction for one component at a time: (I) the walls repel both components, (II) the walls repel only the solvent, and (III) the walls repel only the solute. We examine each case at three pore widths that span the range from strong to weak confinement.
Methods
Simulation setup
We perform simulations of a binary mixture of poorly soluble species B (solute) in abundant species A (solvent) in both bulk and confinement, as illustrated in Figure 1(a) and (b), respectively. All particles have the same mass and diameter , which, together with the solvent–solvent well depth , constitute the units of mass, length, and energy. All quantities hereafter are reported in these Lennard-Jones (LJ) reduced units [24]. Particles interact through a truncated and shifted Lennard-Jones (12-6) potential,
Figure 1. The schematic picture of the system is illustrated in bulk (a) and confined (b) conditions, where the both systems are in touch with distinct ideal solvent and solute containers at chemical potentials and , respectively. In panel (b), the dashed black lines denote the wall centre-of-mass.
for and shifted-to-zero beyond, where denotes the distance between particles , and and represent the potential well depth and effective diameter for the – pair of components in the solution. The solute–solute interaction is weaker than that of the solvent–solvent, and . This choice places B in the low-solubility regime. Cross interactions follow the Lorentz-Berthelot rules[42], giving the ordering .
In the bulk simulations, we employ a cubic simulation box with an edge length of and impose periodic boundary conditions in all three spatial directions. In contrast, in the confined geometry, the slit pore is represented by two infinitely extended, parallel walls lying in the – plane and separated by a distance , along the axis (Figure 1(b)). The simulation cell has lateral dimensions identical to the bulk box, , with periodic boundary conditions in the and directions, whereas along the system is confined and non-periodic. The interactions between the confining walls and the fluid particles are described by a Lennard-Jones (9-3) potential, expressed as
Here, denotes the separation between solution particles and the confining walls measured along the surface-normal direction. The two wall types share the same repulsive core and differ only in whether the attractive tail is retained. In the purely repulsive form, the LJ(9-3) potential is truncated at its minimum, , and shifted-to-zero, so that only repulsion remains (the Weeks–Chandler–Andersen construction [43]). In the full Lennard-Jones form, the attractive tail is retained and the potential is truncated and shifted-to-zero at . The energy interaction parameters between the confining walls and the components are taken to be equal to the corresponding self-interaction values, that is, and . The effective pore width is defined for both types of wall–solution interactions as .
Grand-canonical sampling via Wang–Landau method
We study the system primarily with grand-canonical Wang–Landau sampling (GCWLS) and employ grand-canonical Monte-Carlo (GCMC) as an independent cross-check. Both operate in the grand canonical ensemble at fixed temperature (in units of , with the Boltzmann constant) and fixed volume, for the bulk box and for the slit pore with (see Figure 1). We keep the solvent chemical potential at , which places the solvent in the liquid phase away from vapour–liquid coexistence, and vary the solute chemical potential to trace the solubility.
The two methods differ in their treatment of the chemical potential . In GCMC, is prescribed during sampling, requiring a separate simulation for each value. In GCWLS, the density-of-states is sampled independently of , enabling the equilibrium behaviour over the entire range to be recovered through post-processing. Detailed balance fixes the ratio of the exchange (insertion/deletion) acceptance probabilities, common to both methods and differing only in the weight ,
where is the number of particles of the exchanged species with the other held fixed, is the de-Broglie thermal wavelength (set to unity), , and is the configurational (potential) energy of the -particle state. GCWLS estimates the configurational density-of-states, , associated with each particle-number macrostate. The grand partition function is then obtained by weighting these macrostates according to the imposed chemical potentials and summing over all values of and , as described mathematically in Eq. (4),
and the joint particle-number distribution, i.e. the grand-canonical probability of finding solvent and solute particles,
for any set of chemical potentials [34, 35, 44]. Since GCMC spends most of its time in the high-probability states near the grand-potential minimum, the low- and high- tails of the distribution (Eq. (5)) are sampled sparsely. Nevertheless, a sufficiently long Monte Carlo simulation can construct a normalised histogram of states near equilibrium, providing an empirical estimate of in that region. However, GCWLS removes this limitation as, under its flat-histogram bias, it visits every macrostate equally. To build this bias, is refined iteratively: after each attempted exchange, accepted or rejected (Eq. (3)), the density-of-states of the macrostate is updated according to
with the modification factor decreasing toward unity over the simulation stages . A histogram records how often each macrostate is visited. Once every macrostate has been visited at least times, it is reset and the stage advanced, following Zhou and Bhatt [45] (here , ). Once has converged, and (Eqs. (4) and (5)) are evaluated over the full range of chemical potentials.
As in Ref. [36], separate simulations vary either or within a sampling window while the other is held fixed, and the resulting data are combined in post-processing to reconstruct the two-dimensional density of states . The sampled range of macrostates is partitioned into fixed-size windows, each containing five distinct macrostates, with three macrostates shared between adjacent windows. The resulting profiles are subsequently stitched together by minimizing the root-mean-square deviation (RMSD) within the overlapping regions; the corresponding error is defined in Appendix A. An additional uncertainty stems from the modification factor () employed in the Wang–Landau iteration, which induces a statistical error in the estimate of that scales as [45]. To compare this scaling factor with the density of states of our system, after removal of the arbitrary additive offset, the root-mean-square change in over each two successive iterations is calculated, resulting in for the last two iterations (Figure 6). Its definition is given in Appendix A. The error of the density of states associated with each macrostate is then defined as
Figure 6. Root-mean-square variation of the shape of the log-density-of-states profile of the bulk system as a function of the iteration counter . The solid black line shows .
where is the value of at the final iteration and the stitching error measures the residual disagreement among overlapping DOS windows after the global least-squares alignment (Appendix A).
The marginal distribution of species is obtained by summing the joint distribution over the particle number of the other species, , with and . The corresponding marginal grand-potential profile is
Although the grand-potential profile minimum identifies the most probable value, equilibrium composition and particle-number fluctuations are determined by the ensemble average (mean) and variance of , respectively [46]:
with . The solute mole fraction is evaluated for both the bulk and confined systems as
The solute oversolubility is then quantified by the ratio of the confined solute mole fraction to its bulk counterpart:
The errors of and are obtained by first-order propagation of the density-of-states error (Appendix A).
To sample the configurational phase space, both Monte Carlo schemes are interleaved with molecular-dynamics blocks, each comprising integration steps with a time step of , where denotes the characteristic MD time unit. For both GCMC and GCWLS, each Monte Carlo block consists of steps. GCMC simulations are sampled over a total of MC steps, including insertion/deletion. For convergence of the density-of-states in GCWLS resets (iterations) is sufficient. The system temperature is controlled via a Nosé–Hoover thermostat with a damping timescale of . The equations of motion are integrated via the velocity-Verlet scheme. The simulations are run using LAMMPS(29-Aug-2024) [47, 48], modified to implement grand-canonical Wang–Landau sampling [36, 49]. All LAMMPS input files, analysis files are openly available on DaRUS[50].
Results
In this section, we first examine the bulk mixture to quantify how far the most probable particle number departs from the equilibrium one when only a few poorly soluble solute particles are present in the solution. In that case, the solute particle-number distribution is asymmetric and well described by a Poisson distribution, whereas the abundant solvent distribution is effectively continuous, symmetric, and well approximated by a Gaussian. Owing to this asymmetry, the most probable solute number lies below the ensemble average, which gives the equilibrium particle number in the grand-canonical ensemble; independent GCMC simulations confirm the GCWLS averages. With this established, we use GCWLS ensemble averages for the confined mixture to determine the solute mole fraction and oversolubility, and thus the wall–fluid interaction effect.
Bulk solution
Using GCWLS, the density-of-states for the bulk solution is sampled over and . These ranges are chosen to be wide enough that, for the chemical potentials considered here, each particle-number distribution vanishes at its edges (except at the solute’s physical bound ). Figure 2 shows the joint distribution at two solute chemical potentials, (a) and (b), both at the same solvent chemical potential . In both cases, the distribution occupies a single compact region that is broad along but narrow in , spanning tens of solvent particles but only a few solute particles. The two marginal distributions (side panels in Figure 2a,Figure 2b) have distinct forms, and in both cases their expected shapes are governed by the statistics of the ensemble rather than by fitting. A species dilute enough to be effectively ideal has statistically independent insertion events, so its particle number should follow a Poisson distribution[51 Chap 12, Sec. 114].

Figure 2. Bulk joint particle–number distribution , shown as a heat map with the solute on the horizontal axis and the solvent on the vertical axis. The solute chemical potential increases from (a) to (b) , at fixed solvent chemical potential . The top and right panels give the solute and solvent marginals, and . The red curves are the reference distributions of Eqs. (13) and (14), Poisson for the solute and Gaussian for the solvent, each constructed from the measured ensemble mean and variance.
whose only parameter is the measured mean . In contrast, fluctuations in the abundant solvent are concentrated around its equilibrium macrostate. In this regime, the distribution is sharply peaked and approaches a Gaussian fluctuation approximation, [51, Chap. 12, Sec. 110].
We find that both Eqs. (13) and (14) agree well with the measured marginals, and , over the whole sampled range (red curves and side panels in Figure 2a,Figure 2b). Increasing from to raises from to and lowers the Poisson skewness accordingly, so the distribution becomes visibly less asymmetric. At these occupancies it nonetheless remains far from the symmetric limit, which is reached only for . In the pore, the same increase in raises further, and the solute distribution ap-
approaches a Gaussian (Figure 7 in Appendix B).

Figure 7. Joint particle-number distribution of solute (horizontal axis) and solvent (vertical axis) for case II in a pore of width , at and (a) , (b) . The top and right panels show the marginal distributions of the solute and the solvent. Red curves: Poisson distribution for the solute and Gaussian distribution for the solvent. Green curve in (b): Gaussian distribution , which the solute distribution approaches at larger .
We validate the GCWLS results against independent GCMC simulations performed at fixed . For the solute, the mean and variance obtained from the two methods agree closely (Table I), providing an independent validation of the GCWLS implementation. An additional consistency check is provided by the particlenumber statistics of the dilute solute. For a Poisson distribution, Eq. (13), the variance is equal to the mean,
| GCMC | GCMC | GCWLS | GCWLS | |
| -3.8 | 0.15 | 0.151 | 0.15 | 0.153 |
| -3.6 | 0.19 | 0.194 | 0.18 | 0.188 |
| -3.4 | 0.22 | 0.224 | 0.22 | 0.232 |
| -3.2 | 0.28 | 0.280 | 0.28 | 0.284 |
| -3.0 | 0.33 | 0.337 | 0.34 | 0.351 |
| -2.8 | 0.42 | 0.419 | 0.42 | 0.431 |
| -2.6 | 0.48 | 0.472 | 0.51 | 0.528 |
Table I. Mean and variance of the solute particle number in the bulk (, ) from GCMC and GCWLS. For a Poisson distribution, .
We indeed find , Table I. This behaviour is expected in the dilute limit, where correlations between solute particles are weak and particle-number fluctuations approach those of statistically independent particles in the grand-canonical ensemble. The simultaneous reproduction of this Poisson-like fluctuation behaviour by both GCWLS and conventional GCMC therefore provides a more stringent validation than agreement of the mean population alone.
The distinction between the grand-potential minimum and the ensemble average of is most apparent in the marginal grand potential, (Figure 3). In the grand-canonical ensemble, the equilibrium particle number is represented by the ensemble average , whereas the minimum of identifies the most probable particle number.

Figure 3. Marginal grand-potential profiles of the solute (right panels) and solvent (left panels) in the bulk box (), at solvent chemical potential and three solute chemical potentials . Orange plus signs mark the minimum of each profile, and blue dashed vertical lines mark the ensemble-averaged particle number .
For the solvent (left panels), spans a broad range and forms a smooth, nearly parabolic well. Consequently, the particle number associated with the grand-potential minimum closely coincides with the ensemble average . For the dilute solute (right panels), however, only a few discrete values of are appreciably populated and is strongly asymmetric. As a result, the particle number at the grand-potential minimum lies below the equilibrium expectation value for all explored here. For example, at , the minimum occurs at , while ; at , it occurs at , while (see also Figure 7 for the confined case).
The consequence is particularly important in the very dilute regime. When , the grand-potential minimum can remain at even though the equilibrium expectation value is finite. Interpreting the location of this minimum as the equilibrium particle number would therefore incorrectly suggest the absence of dissolved solute. Thus, for low-solubility species, the grand-potential minimum should not in general be identified with the equilibrium particle number; the appropriate quantity is the ensemble average value obtained from the particle-number distribution.
As the solute population increases, the distribution becomes less skewed and the distinction between the grand-potential minimum and progressively diminishes. Consistent with the approximately Poisson solute statistics, whose skewness scales as , the two quantities approach one another as increases. For in case II, for example, the particle number associated with the grand-potential minimum provides a reliable approximation to the equilibrium ensemble average value once (Figure 7b).
| Case | Wall–solvent (A) | Wall–solute (B) |
| I | repulsive | repulsive |
| II | repulsive | attractive |
| III | attractive | repulsive |
Table 2. The three confinement cases. Each wall acts on the solvent (A) and the solute (B) through one of the two forms of Eq. (2), either repulsive (WCA) or attractive (full Lennard-Jones). Cases I and II, whose walls repel the solvent, are termed solvophobic, and case III, whose wall attracts it, solvophilic.
Confined solution
Subsequently, we examine the effects of confinement. For confined geometries, GCWLS is used to compute the density of states in slit pores of widths , 5, and for each of the three interaction scenarios summarized in Table II. An example of the corresponding confined joint distribution is shown in Figure 7, representing case II at a pore of width . The solute particle number in the pore is small, so it follows a skewed Poisson distribution, and the confined mole fractions are obtained from the ensemble averages rather than from the grand-potential minimum. Confinement-enhanced solubility of poorly soluble species has been reported for many nanoporous materials [5, 6, 12, 22], and the three wall cases of Table II isolate the generic wall-affinity mechanisms responsible rather than modelling a specific material.
Figure 4a (top panel) shows the resulting solute mole fraction, , in the pore. Since one GCWLS run yields , its full dependence follows from a single sampling run per pore, whereas GCMC would require a separate run at each . The two solvophobic walls (cases I and II) yield nearly identical (c.f. inset in Figure 4a), strongly enhanced oversolubility with being roughly an order of magnitude above the bulk value at the same , despite their differing wall-solute interactions. In contrast, the solvophilic wall (case III) gives a substantially lower, yet about 3.5 times increased compared to bulk.
Figure 4. (a) Dependence of the solute chemical potential, , on the solute mole fraction (upper sub-panel) and on the solute oversolubility under bulk and confined conditions (Cases I–III) for a pore width of . Bulk results obtained using the grand-canonical Monte-Carlo (GCMC) method are shown by black symbols, whereas the coloured solid curves correspond to grand-canonical Wang–Landau sampling (GCWLS) calculations. (b) Mean solute oversolubility, , as a function of pore width for the three cases listed in Table II. The solvophobic wall cases (I and II) yield substantially higher than the solvophilic wall case (III) across the range of pore widths considered.
The solute oversolubility , Eq. (12), measures the enhancement relative to bulk (Figure 4a, bottom panel). Across the sampled range, is nearly constant, here and in the wider pores (Figure 8), because the near-ideal solute has in both the pore and the bulk (the log-linear curves in Figure 4a, top panels), so the dependence cancels in their ratio. A single -averaged value therefore characterises each wall type and pore width (Figure 4b), reaching and for the solvophobic walls (cases I and II, respectively) and for the solvophilic wall (case III) at . Importantly, the small difference between cases I and II shows that the solute excess in the pore is governed by exclusion of the solvent rather than by solute–wall attraction, so the wall–solvent interaction is the dominant factor controlling confinement-enhanced solubility. A wider pore adds an increasingly bulk-like interior that dilutes this excess, so decreases with and tends to unity as the pore widens (Figure 4b).
Figure 8. Solute mole fraction (top panels) and solute oversolubility (bottom panels) as functions of the solute chemical potential , for pore widths and and the three cases of Table II. The black dashed line marks , where the confined solute mole fraction equals its bulk value.
At the equilibrium condition, the density profiles, shown in Figure 5, identify the spatial origin of the oversolubility, where the density profiles exhibit pronounced oscillations, with the largest amplitude adjacent to each wall. In the widest pore , the solvent density returns to its bulk value at the centre (indicated by a horizontal black dash-dotted line), confirming that the pore interior becomes increasingly bulk-like as increases. In all three cases, the solute accumulates near the wall and is depleted from the interior, so the excess is confined to the near-wall layers. The solvophobic walls (cases I and II) have nearly coincident profiles and the largest solute excess, whereas the solvophilic wall (case III) shows the strongest solvent layering but a lower solute excess, consistent with the behaviour in .
Figure 5. Solvent density profile (top panels) and the solute density profile (bottom panels) along the pore coordinate for three different pore widths. In each panel, the vertical dashed lines represent the centre of mass of the confining walls, and the horizontal dash-dot line represents the bulk solvent density.
Conclusion
The Grand-canonical Wang–Landau sampling method reconstructs the density-of-states of a poorly soluble solute and its solvent from a single set of simulations, so that the full particle-number distribution and the ensemble-averaged composition can be computed for the whole sampled range of chemical potentials, both in bulk and under confinement. Conventional GCMC requires a separate simulation at each state point and converges slowly for such cases.
In bulk, the solute distribution is Poisson-like and strongly skewed, while that of the abundantly present solvent is nearly Gaussian. The grand-potential minimum, which marks the most probable particle number, therefore coincides with the ensemble average for the solvent, but lies systematically below the equilibrium occupancy of the solute and is zero whenever , which would wrongly suggest that no solute is dissolved. This distinction is expected whenever a dilute species has a mean number of order one or less in the volume considered, either because of poor solubility, low reservoir pressure, or a small volume such as a nanopore.
Under slit-pore confinement, the wall–solvent attraction controls the oversolubility at every pore width studied, whereas the wall–solute attraction changes it by about 10% at most. The solute excess builds up where the wall excludes the solvent, regardless of whether the wall attracts the solute, as the nearly coincident density profiles of cases I and II show. Therefore, the wall–solvent interaction sets most of the enhancement, which isolates and quantifies the role of the liquid–solid interaction proposed by Coasne et al. [12, 18].
This dominant wall–solvent contribution is consistent with simulations of CO in water-filled silica and clay nanopores, which find the largest oversolubility for hydrophobic walls [3, 22] and under-solubility for strongly hydrophilic ones [3]. Our results suggest that these trends arise mainly from the affinity of the wall for water (solvent) rather than from the adsorption of CO (solute).
In a forthcoming study, we apply the method to an all-atom model of CO in water confined in carbon slit pores, to test whether the wall–water affinity also governs the oversolubility of CO in real nanopores. The method can also be applied to confined electrolyte solutions, where dissolved ions can increase or decrease the solubility of CO depending on where they adsorb [52]; the same implementation has already been used for electrolytes in inert and conducting nanopores [36]. Together, these developments would provide a route for screening nanoporous materials for carbon capture, catalysis, and gas storage [8, 9, 10, 11].
Acknowledgments
We gratefully acknowledge financial support from the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)—Project-ID 358283783—SFB 1333/2 2022, as well as funding provided under Germany’s Excellence Strategy—EXC 2075-390740016. A.S. acknowledges support from the Stuttgart Center for Simulation Science (SimTech). C.H. further acknowledges computational support from the DFG Compute Cluster funded under Grant No. 261833929 and INST 41/1148-1 Holm 492175459. Additional support was provided by the state of Baden-Württemberg through bwHPC and by DFG under grant INST 35/1597-1 FUGG (bwForCluster Helix). Computational resources and support were also provided by the High Performance and Cloud Computing Group at the Zentrum für Datenverarbeitung, University of Tübingen, with funding from the state of Baden-Württemberg through bwHPC and from the DFG under Project number 455787709 (bwForCluster BinAC2).
Error estimation
Intrinsic error in the density of states
Our implementation estimates directly, so we expect the scaling of Zhou and Bhatt [45] to hold, with a non-universal prefactor set by sampling correlations and implementation details.
Since the exact density of states is unknown, its intrinsic error cannot be evaluated directly. Instead, we monitor the change of the estimated between two successive Wang–Landau iterations and . For a macrostate , with the number of macrostates, we define
so that is the root-mean-square change in the shape of the profile, with the arbitrary additive shift removed. If the finite modification factor dominates the final iterations, is expected to follow
where is a system- and implementation-dependent prefactor and .
For the bulk system (Figure 6), follows up to and then decays faster, as with . This faster decay does not indicate faster convergence. Since compares successive estimates, correlations between consecutive iterations suppress it; the large minimum number of visits per stage () and a saturation of the late-iteration updates can contribute as well. All sampling runs start from the same initial configuration. is therefore used as a convergence diagnostic for , not as a direct measurement of its absolute uncertainty. Under confinement, the late-iteration exponent is unchanged, whereas the crossover moves to earlier iterations as the pore narrows, down to for the narrowest pore studied.
Window-stitching error
A second source of error arises from combining the sampling windows. Each window yields up to an unknown additive shift , where denotes a macrostate. For each sampled macrostate , we set if belongs to window and otherwise, and is the number of windows covering . The stitched density of states is the mean of the shifted window values,
and the shifts minimize the squared deviations of the shifted window values from this mean,
a linear least-squares problem that we solve with SciPy[53]. The stitching error is the sample standard deviation of the shifted window values at each macrostate,
It vanishes when all overlapping windows agree and is undefined for macrostates covered by a single window.
Error of statistical properties
We assign each macrostate an uncertainty of , taken from defined in Sec. II, treat these uncertainties as independent, and regard the chemical potentials as exact. Independence has to be assumed for a single sampling run; repeated runs would give access to the covariances. With , the joint distribution is , and the ensemble average of either species, , where is the particle number of that species in macrostate , changes as
First-order error propagation[54] then gives
The errors of , , and the -averaged follow by the same first-order propagation. We neglect the covariance of and , since the relative error of the abundant solvent is much smaller than that of the solute. Because measures the change between successive iterations and the macrostate errors are treated as independent, the resulting error bars are order-of-magnitude estimates.
Particle-number distributions and oversolubility in wider pores
Figure 7 shows the joint particle-number distribution in a slit pore, and Figure 8 shows the solute mole fraction and oversolubility in the two wider pores.
References
References
- [1]J. Algaba, I. M. Zerón, J. M. Míguez, J. Grabowska, S. Blazquez, E. Sanz, C. Vega, and F. J. Blas, Solubility of carbon dioxide in water: Some useful results for hydrate nucleation, The Journal of Chemical Physics 158, 10.1063/5.0164618 (2023).
- [2]S. Blazquez, M. M. Conde, and C. Vega, Solubility of CO₂ in salty water: adsorption, interfacial tension and salting out effect, Molecular Physics 122, 10.1080/00268976.2024.2306242 (2024).DOI
- [3]W. Li, Y. Nan, Z. Zhang, Q. You, and Z. Jin, Hydrophilicity/hydrophobicity driven CO₂ solubility in kaolinite nanopores in relation to carbon sequestration, Chemical Engineering Journal 398, 125449 (2020).DOI
- [4]J. Du, A. Zhou, Y. Zhong, and S.-L. Shen, Molecular simulation on CO₂ adsorption heterogeneity in montmorillonite nanopores with different surface charges in presence of water, Chemical Engineering Journal 482, 148958 (2024).DOI
- [5]G. Li, Y. Tao, X. Zhu, Y. Gao, P. Shen, B. Yin, R. Dupuis, K. Ioannidou, R. J.-M. Pellenq, and C. S. Poon, Optimal CO₂ intake in metastable water film in mesoporous materials, Nature Communications 15, 10.1038/s41467-024-55125-w (2024).DOI
- [6]G. Li, Y. Tao, Y. Gao, R. J.-M. Pellenq, P. Shen, X. Qian, and C. S. Poon, Surface chemistry-mediated porewater fluctuations boost CO₂ docking in calcium silicate hydrates, Nature Communications 16, 10.1038/s41467-025-62580-6 (2025).DOI
- [7]J. Niu, Z. Pan, and K. Zhang, Nanoconfined water in carbon capture and storage, Academia Nano: Science, Materials, Technology 3, 10.20935/AcadNano8073 (2026).DOI
- [8]A. Mathur, Z. Li, A. Han, K. N. Jayarapu, M. Lim, L. Gupta, J. Parkey, and Y. Liu, Electrochemical direct air capture by local alkalinity generation at three-dimensional interfaces, Nature Communications 10.1038/s41467-026-74879-x (2026).DOI
- [9]M. Micari, K.-J. Hsu, S. Bempeli, and K. V. Agrawal, Energy- and cost-efficient CO₂ capture from dilute emissions by pyridinic-graphene membranes, Nature Sustainability 9, 164–175 (2025).DOI
- [10]W. Zhang, A. Yu, H. Mao, G. Feng, C. Li, G. Wang, J. Chang, D. Halat, Z. Li, W. Yu, Y. Shi, S. Liu, D. W. Fox, H. Zhuang, A. Cai, B. Wu, F. Joshua, J. R. Martinez, L. Zhai, M. D. Gu, X. Shan, J. A. Reimer, Y. Cui, and Y. Yang, Dynamic bubbling balanced proactive CO₂ capture and reduction on a triple-phase interface nanoporous electrocatalyst, Journal of the American Chemical Society 146, 21335–21347 (2024).DOI
- [11]W. Zhang, H. Li, D. Feng, C. Wu, C. Sun, B. Jia, X. Liu, and T. Ma, MOF-derived 1D/3D N-doped porous carbon for spatially confined electrochemical CO₂ reduction to adjustable syngas, Carbon Energy 6, 10.1002/cey2.461 (2024).
- [12]B. Coasne and D. Farrusseng, Gas oversolubility in nanoconfined liquids: Review and perspectives for adsorbent design, Microporous and Mesoporous Materials 288, 109561 (2019).
- [13]S. Miachon, V. V. Syakaev, A. Rakhmatullin, M. Pera-Titus, C. Caldarelli, and J.-A. Dalmon, Higher gas solubility in nanoliquids?, ChemPhysChem 9, 78 (2008).pubmed.ncbi.nlm.nih.gov/18064614
- [14]M. Pera-Titus, R. El-Chahal, V. Rakotovao, C. Daniel, S. Miachon, and J.-A. Dalmon, Direct volumetric measurement of gas oversolubility in nanoliquids: Beyond Henry’s law, ChemPhysChem 10, 2082 (2009).
- [15]E. Soubeyrand-Lenoir, C. Vagner, J. W. Yoon, P. Bazin, F. Ragon, Y. K. Hwang, C. Serre, J.-S. Chang, and P. L. Llewellyn, How water fosters a remarkable 5-fold increase in low-pressure CO₂ uptake within mesoporous MIL-100(Fe), Journal of the American Chemical Society 134, 10174 (2012).DOI
- [16]S. Clauzier, L. N. Ho, M. Pera-Titus, B. Coasne, and D. Farrusseng, Enhanced H₂ uptake in solvents confined in mesoporous metal–organic framework, Journal of the American Chemical Society 134, 17369 (2012).DOI
- [17]L. N. Ho, J. Perez Pellitero, F. Porcheron, and R. J.-M. Pellenq, Enhanced CO₂ solubility in hybrid MCM-41: Molecular simulations and experiments, Langmuir 27, 8187 (2011).DOI
- [18]L. N. Ho, S. Clauzier, Y. Schuurman, D. Farrusseng, and B. Coasne, Gas uptake in solvents confined in mesopores: Adsorption versus enhanced solubility, The Journal of Physical Chemistry Letters 4, 2274 (2013).DOI
- [19]L. N. Ho, Y. Schuurman, D. Farrusseng, and B. Coasne, Solubility of gases in water confined in nanoporous materials: ZSM-5, MCM-41, and MIL-100, The Journal of Physical Chemistry C 119, 21547 (2015).DOI
- [20]A. Luzar and D. Bratko, Gas solubility in hydrophobic confinement, The Journal of Physical Chemistry B 109, 22545 (2005).pubmed.ncbi.nlm.nih.gov/16853936
- [21]G. Gadiakova, B. Dazas, G. Rother, M. C. Cheshire, and I. C. Bourg, Hydrophobic solvation of gases (CO₂, CH₄, H₂, noble gases) in clay interlayer nanopores, The Journal of Physical Chemistry C 121, 26539 (2017).
- [22]M. Xie, M. Zhang, L. Duan, W. Xiong, D. Feng, and Z. Jin, Interfacial water structure effect on CO₂ solubility in water-saturated silica confinements: A molecular perspective, Journal of Colloid and Interface Science 707, 139702 (2026).DOI
- [23]A. Choudhary and T. A. Ho, Confinement-induced clustering of H₂ and CO₂ gas molecules in hydrated nanopores, Physical Chemistry Chemical Physics 26, 10506–10514 (2024).DOI
- [24]D. Frenkel and B. Smit, Understanding molecular simulation: from algorithms to applications (elsevier, 2023).
- [25]M. Mezei, A cavity-biased (T, V, μ) Monte Carlo method for the computer simulation of fluids, Molecular Physics 40, 901–906 (1980).DOI
- [26]B. Smit, Grand canonical Monte Carlo simulations of chain molecules: adsorption isotherms of alkanes in zeolites, Molecular Physics 85, 153–172 (1995).DOI
- [27]J. I. Siepmann and D. Frenkel, Configurational bias Monte Carlo: a new sampling scheme for flexible chains, Molecular Physics 75, 59–70 (1992).DOI
- [28]D. J. Ashton and N. B. Wilding, Grand canonical simulation of phase behaviour in highly size-asymmetrical binary fluids, Molecular Physics 109, 999–1007 (2010).DOI
- [29]A. Rahbari, R. Hens, M. Ramdin, O. A. Moultons, D. Dubbeldam, and T. J. H. Vlugt, Recent advances in the continuous fractional component Monte Carlo methodology, Molecular Simulation 47, 804–823 (2020).
- [30]G. Besold, J. Risbo, and O. G. Mouritsen, Efficient Monte Carlo sampling by direct flattening of free energy barriers, Computational Materials Science 15, 311–340 (1999).DOI
- [31]N. B. Wilding, Critical-point and coexistence-curve properties of the Lennard-Jones fluid: A finite-size scaling study, Physical Review E 52, 602–611 (1995).pubmed.ncbi.nlm.nih.gov/9963461
- [32]V. K. Shen, D. W. Siderius, W. P. Krekelberg, H. W. Hatch, and J. R. Errington, Use of the grand canonical transition-matrix Monte Carlo method to model gas adsorption in porous materials, The Journal of Physical Chemistry C 117, 5861 (2013).DOI
- [33]F. Wang and D. P. Landau, Efficient, multiple-range random walk algorithm to calculate the density of states, Physical Review Letters 86, 2050–2053 (2001).
- [34]M. S. Shell, P. G. De Benedetti, and A. Z. Panagiotopoulos, Generalization of the Wang–Landau method for off-lattice simulations, Physical Review E 66, 10.1103/physreve.66.056703 (2002).pubmed.ncbi.nlm.nih.gov/12513633
- [35]C. Desgranges and J. Delhommelle, Evaluation of the grand-canonical partition function using expanded Wang-Landau simulations. ii. adsorption of atomic and molecular fluids in a porous material, The Journal of Chemical Physics 136, 10.1063/1.4712025 (2012).DOI
- [36]P. Stärk and A. Schlaich, Phase diagram and criticality of the modified primitive electrolyte model in bulk and in inert and conducting confinement, The Journal of Chemical Physics 164, 10.1063/5.0314875 (2026).
- [37]G. Hummer, J. C. Rasaiah, and J. P. Noworyta, Water conduction through the hydrophobic channel of a carbon nanotube, Nature 414, 188 (2001).pubmed.ncbi.nlm.nih.gov/11700553
- [38]J. C. Rasaiah, S. Garde, and G. Hummer, Water in nonpolar confinement: From nanotubes to proteins and beyond, Annual Review of Physical Chemistry 59, 713–879 (2008).pubmed.ncbi.nlm.nih.gov/18092942
- [39]A. V. Neimark and A. Vishnyakov, A simulation method for the calculation of chemical potentials in small, inhomogeneous, and dense systems, The Journal of Chemical Physics 122, 234108 (2005).pubmed.ncbi.nlm.nih.gov/16008431
- [40]P. D. Dixit, A. Bansal, W. G. Chapman, and D. Asht agiri, Mini-grand canonical ensemble: Chemical potential in the solvation shell, The Journal of Chemical Physics 147, 10.1063/1.4993178 (2017).DOI
- [41]N. B. Wilding, Why molecular-scale occupancy fluctuations appear Gaussian without being bulk-like, Chem-Rxiv 10.26434/chemrxiv.15009134/v1 (2026), preprint.DOI
- [42]M. P. Allen and D. J. Tildesley, Introduction, in Computer Simulation of Liquids (Oxford University Press, 2017) 2nd ed., Chap. 1, pp. 1–55.
- [43]J. D. Weeks, D. Chandler, and H. C. Andersen, Role of repulsive forces in determining the equilibrium structure of simple liquids, The Journal of Chemical Physics 54, 5237–5247 (1971).DOI
- [44]G. Ganzenmüller and P. J. Camp, Applications of Wang-Landau sampling to determine phase equilibria in complex fluids, The Journal of Chemical Physics 127, 10.1063/1.2794042 (2007).pubmed.ncbi.nlm.nih.gov/17949170
- [45]C. Zhou and R. N. Bhatt, Understanding and improving the Wang-Landau algorithm, Physical Review E 72, 10.1103/physreve.72.025701 (2005).pubmed.ncbi.nlm.nih.gov/16196637
- [46]C. Desgranges and J. Delhommelle, Evaluation of the grand-canonical partition function using expanded Wang-Landau simulations. I. Thermodynamic properties in the bulk and at the liquid-vapor phase boundary, The Journal of Chemical Physics 136, 184107 (2012).DOI
- [47]A. P. Thompson, H. M. Aktulga, R. Berger, D. S. Bolintineanu, W. M. Brown, P. S. Crozier, P. J. in ’t Veld, A. Kohlmeyer, S. G. Moore, T. D. Nguyen, R. Shan, M. J. Stevens, J. Tranchida, C. Trott, and S. J. Plimpton, LAMMPS - a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales, Comp. Phys. Comm. 271, 108171 (2022).DOI
- [48]S. Plimpton, Fast parallel algorithms for short-range molecular dynamics, Journal of Computational Physics 117, 1–19 (1995).
- [49]P. Stärk and A. Schlaich, Supplementary data for: Phase diagram and criticality of the modified primitive electrolyte model in bulk and inert and conducting confinement (2025).
- [50]U. of Stuttgart, Darus: Data repository of the university of stuttgart, accessed: 2026-10-08.
- [51]L. D. Landau and E. M. Lifshitz, Statistical Physics, Part 1, 3rd ed., Course of Theoretical Physics, Vol. 5 (Pergamon Press, Oxford, 1980).
- [52]A. Ali, A. Striolo, and D. R. Cole, CO₂ solubility in aqueous electrolyte solutions confined in calcite nanopores, The Journal of Physical Chemistry C 125, 12333 (2021).DOI
- [53]P. Virtanen, R. Gommers, T. E. Oliphant, M. Haberland, T. Reddy, D. Cournapeau, E. Burovski, P. Peterson, W. Weckesser, J. Bright, S. J. van der Walt, M. Brett, J. Wilson, K. J. Millman, N. Mayorov, A. R. J. Nelson, E. Jones, R. Kern, E. Larson, C. J. Carey, I. Polat, Y. Feng, E. W. Moore, J. VanderPlas, D. Laxalde, J. Perktold, R. C. Cimmrman, I. Henriksen, E. A. Quintero, C. R. Harris, A. M. Archibald, A. H. Ribeiro, F. Pedregosa, P. van Mulbregt, A. V. Vejikumar, A. P. Bardelli, A. Rothberg, A. Hilboll, A. Kloeckner, A. Scopatz, A. Lee, A. Roken, C. N. Woods, C. Fulton, C. Masson, C. Häggström, C. Fitzgerald, D. A. Nicholson, D. R. Hagen, D. V. Pasechnik, E. Olivetti, E. Martin, E. Wieser, F. Silva, F. Lenders, F. Wilhelm, G. Young, G. A. Price, G.-L. Ingold, G. E. Allen, G. R. Lee, H. Audren, I. Probst, J. P. Dietrich, J. Silterra, J. T. Webber, J. Slavić, J. Nothman, J. Buchner, J. Kulick, J. L. Schönberger, J. V. de Miranda Cardoso, J. Reimer, J. Harrington, J. L. C. Rodríguez, J. Nunez-Iglesias, J. Kuczynski, K. Tritz, M. Thoma, M. Newville, M. Kümmerer, M. Bolingbroke, M. Tartre, M. Pak, N. Smith, N. Nowaczyk, N. Shebanov, O. Pavlyk, P. A. Brodtkorb, P. Lee, R. T. McGibbon, R. Feldbauer, S. Lewis, S. Tygier, S. Sievert, S. Vigna, S. Peterson, S. More, T. Pudlik, T. Oshima, T. J. Pingel, T. P. Robitaille, T. Spura, T. R. Jones, T. Cera, T. Leslie, T. Zito, T. Krauss, U. Upadhyay, Y. O. Halchenko, and Y. Vázquez-Baezа, SciPy 1.0: fundamental algorithms for scientific computing in python, Nature Methods 17, 261–272 (2020).
- [54]P. R. Bevington and D. K. Robinson, Data Reduction and Error Analysis for the Physical Sciences, 3rd ed. (McGraw-Hill, New York, 2003).




