Gradients

A most fundamental feature of this framework is its ability to rapidly compute the gradients of physical properties with respect to the force field parameters used to estimate them.

Theory

The framework currently employs the central finite difference approach to computing gradients:

\[\dfrac {d \left<X \left( \theta \right) \right>}{d \theta_i} = \dfrac { \left<X \left( \theta_i + h \right) \right> - \left<X \left( \theta_i - h \right) \right> }{ 2 h}\]

where \(\left<X\right>\) is used to denote the ensemble average of an observable \(X\), \(\theta_i\) is the force field parameter of interest, and by default \(h = 1 \times 10^{-4} \times \theta_i\). Although more expensive than computing either the forward or backwards derivative, the central difference method should give a more accurate estimate of the gradient at the minima, maxima and transition points.

Rather than running an entirely new simulation to compute the values of \(\left<X \left( \theta_i + h \right) \right>\) and \(\left<X \left( \theta_i - h \right) \right>\), these values are directly estimated using the MBAR reweighting method [1], [2]. This approach has several advantages:

  • there is a convenient cancellation of errors when computing the finite difference as the average value of the observables at the perturbed parameters are computed from the same set of configurations and hence have errors which are highly correlated. This thus avoids the need to run prohibitively long simulations to compute the average observables to within a low enough error to produce meaningful differences between similar numbers.

  • the reduced potentials of the configurations that the observable of interest was computed from can be rapidly re-evaluated by only re-computing the energy terms which have changed upon perturbing the parameters (see the OpenMMGradientPotentials protocol).

References

1

Michael R Shirts and John D Chodera. Statistically optimal analysis of samples from multiple equilibrium states. The Journal of chemical physics, 129(12):124105, 2008.

2

Richard A Messerly, S Mostafa Razavi, and Michael R Shirts. Configuration-sampling-based surrogate models for rapid parameterization of non-bonded interactions. Journal of Chemical Theory and Computation, 14(6):3144–3162, 2018.