Metadynamics enables the reconstruction of free-energy surfaces from molecular dynamics; however, its application is often challenging because numerous methodological choices can influence the results. Here, we focus on how geometric confinement reshapes reactant and product basins and thereby contributes to catalytic effects. Our analysis is based on two prototypical reactions: a symmetric SN2 fluorine-substitution reaction, CH3F + F–⇌ F– + CH3F and a Diels–Alder cycloaddition. We compare several metadynamics approaches: well-tempered metadynamics, on-the-fly probability-enhanced sampling (OPES), OPES-Explore, and a hybrid OPES + OPES-Explore scheme, and we examine two types of confinements: First, we analyze the influence of methodological confinement introduced by restraining walls, a commonly used but seldom assessed component of enhanced sampling simulations. Second, we examine chemical confinement inside carbon nanotubes of varying diameters. We find that the restraining wall does not alter the activation free energy of the studied reactions but significantly affects the widths of the reactant and product basins. In contrast, confinement inside carbon nanotubes changes the barrier height by enforcing axial alignment of the reactants in the SN2 reaction and by restricting the transition-state and product geometries in the Diels–Alder case. Concerning the metadynamics methods, we found different convergence behavior and sampling quality, even for these simple reactions. The results highlight how both physical and methodological confinement can influence the outcome of enhanced-sampling simulations, and they underscore the need for careful choice of metadynamics methods for reactions in restricted environments.
Ernst et al. (2026) studied this question.