The method as implemented
Notation follows Invernizzi and Parrinello. \(\beta = 1/k_BT\), \(\gamma\) is the bias factor, and \(\mathbf{s}\) the collective variables.
The probability estimate
OPES estimates the unbiased distribution by weighted kernel density estimation,
with Gaussian kernels of fixed height \(h = \prod_i (\sigma_i\sqrt{2\pi})^{-1}\).
This is OnlineKDE.getLogPDF(); the weight is the bias energy read from the
OPES force group before the new kernel is deposited, so it really is
\(V_{k-1}\).
Bandwidth
Bandwidths shrink as the effective sample size \(N_{\text{eff}} = (\sum_k w_k)^2 / \sum_k w_k^2\) grows, by Silverman's rule:
Normalization
\(Z_n\) normalizes over the CV space explored so far, and is approximated by a
sum over the compressed kernel centers — OnlineKDE.getLogMeanDensity().
The bias
with \(\epsilon = e^{-\beta\Delta E/(1-1/\gamma)}\) limiting the bias to the
barrier \(\Delta E\). This is OPES.getBias().
OPES-explore
The explore variant estimates the sampled distribution instead, with uniform weights,
It explores faster and converges more slowly. getBias() reads the unweighted
estimate in explore mode and the reweighted one otherwise. Because
\(p^{\text{WT}}\) is about \(\sqrt{\gamma}\) times wider than \(P\), explore kernels
start at \(\sqrt{\gamma}\,\sigma^{(0)}\), with a fixed biasWidth still read as
the unbiased \(\sigma^{(0)}\).
Free energy
getFreeEnergy() always uses the importance-sampling estimate,
\(F_n = -\beta^{-1}\log P_n\). In standard OPES the direct and reweighted routes
are equivalent; in explore mode they differ until convergence, and the
reweighted one converges better.
Kernel compression
Rather than storing a bias grid, kernels closer than compressionThreshold in
Mahalanobis distance are merged, preserving total weight, mean and second
moment. The number of compressed kernels is what makes \(|\Omega_n|\) estimable.
Warm-up bandwidth estimation
Both papers prescribe measuring \(\sigma^{(0)}\) from a short unbiased run.
Passing warmupSteps automates this: no kernels are deposited until that
many steps have elapsed, so the CV variance measured over that span is
genuinely unbiased, and it is frozen (scaled by \(\gamma\), since kernels are
built from a sampled-distribution variance by convention) once warm-up ends.