  Accurate force fields are essential for reliable molecular simulations. These
models are refined against quantum mechanical calculations and experimental
measurements, which are subject to random and systematic errors. Bayesian
Inference of Conformational Populations (BICePs) is a reweighting algorithm
that reconciles simulated ensembles with sparse or noisy observables by
sampling the full posterior distribution of conformational populations and
experimental uncertainty. In this method, a metric called the BICePs score is
used to perform model selection, by calculating the free energy of "turning on"
the conformational populations under experimental restraints. This approach,
when used with improved likelihood functions to deal with experimental
outliers, can be used for force field validation (Raddi et al. 2023). Here, we
extend the BICePs approach to perform automated force field refinement while
simultaneously sampling the full distribution of uncertainties, using a
variational method to minimize the BICePs score. To demonstrate the utility of
this method, we refine multiple interaction parameters for a 12-mer HP lattice
model using ensemble-averaged distance measurements as restraints. To
illustrate the resilience of BICePs in the presence of unknown random and
systematic errors, we assess the performance of our algorithm through repeated
optimizations and under various extents of experimental error. Our results
suggest that variational optimization of the BICePs score is a promising
direction for robust and automatic parameterization of molecular potentials.
