Multistate Bennett Acceptance Ratio
|Free Energy Fundamentals|
|Free Energy How-to's|
The Multistate Bennett Acceptance Ratio (MBAR) is a direct extension to BAR as it allows for assessing data from all states, and predicting the free energy at an unsampled state. MBAR reduces to BAR in the limit that only two states are sampled. This equation of free energy calculations can also be seen as a zero-width bin WHAM.
Much like WHAM, the free energies provided by this method are only a statistical estimator, however, MBAR has been shown to have the lowest variance estimator to date.
MBAR is derived from a set of weighting functions, , that minimized the variance during the reweighting across the board. Starting from our core free energy equation, we have
We can also manipulate the same identity Bennett used when starting his derivation and then a one extra bit to come up with the relation
Although this may not seem like much, it does allow us to write out the following:
assuming we use the empirical estimator for the expectation values of
Choosing the optimal can be done by looking through the literature at extended bridge sampling. We then get an of:
After making all the necessary substitutions, we can get an expression for an estimated free energy of:
One of the first things you should notice is that we have a single free energy, not a difference. This is not a typo, but the free energies for a given set of states is only uniquely determined up to an additive constant. Because of this, one free energy must be taken in reference and thus we are once again calculating free energy differences.
It is important to note that the that appears in the MBAR derivation and equation is not only valid for potential energies, but any generalized/reduced potential as a function of pressure, volume, chemical potential, and number of particles. For example, in a general form, we can take some subset of the additive terms in the following to define the reduced potential for thermodynamic state :
The reduced potential function is uniquely defined by some combination of thermodynamic parameters denoting the inverse temperature, denoting the potential energy function, denoting the pressure, and denoting the chemical potential of one or more components of the system. These latter two thermodynamic variables are conjugate to the box volume and particle numbers . Use of the reduced potential simplifies the MBAR equations and generalizes them to the computation of arbitrary reduced free energy differences among states.
In the sum above indicates the th sample from the th state. Interestingly, in this formula, it actually doesn't matter which sample comes from which state, so it can be rewritten as a sum over all , so that we have:
Finally, one can rewrite this as:
Where the ensemble averaged over is the mixture ensemble that consist of samples taken from each state th of the time.
Remember always the free energy will change depending on which reduced potential you use, so please take this into account when working with MBAR.
Estimating Free Energies with MBAR
MBAR provides the direct equation to find free energies as show above assuming you have the energies. This can be rather difficult to implement for beginners since this does require iterative solutions like BAR (note: see the free, Python implementation below). Despite this, MBAR still has the lowest variance of all the other methods listed under the theory section of the fundamentals. Further, MBAR has a direct way to calculate errors (see paper for derivation).
You will need a complete set of for all states for MBAR to work, just like you do in WHAM. Fortunately, you can do most of this in post processing if need be. Once again, you do not need to calculate , but it is still a good self check to ensure the reweighting method is working correctly; all the remaining checks for WHAM hold as well and should be followed when analyzing data.
MBAR may seem like a daunting set of equations to program yourself, so the authors have provided a Python implementation of MBAR for anyone to use, free of charge at http://github.org/choderalab/pymbar, with a number of examples for a variety of situations at http://github.org/choderalab/pymbar-examplesThe software comes with examples and uses cases. Also bundled with it are the tools to compute expectation values and an implementation of BAR.
- Shirts, M. R., and Chodera, J. D. (2008) Statistically optimal analysis of samples from multiple equilibrium states. J. Chem. Phys. 129, 129105. - Find at Cite-U-Like
- Bennett, C. H. (1976) Efficient Estimation of Free Energy differences from Monte Carlo Data. J. Comput. Phys. 22, 245–268. - Find at Cite-U-Like
- Tan, Z. (2004). On a Likelihood Approach for Monte Carlo Integration. J. Am. Stat. Assoc., 99(468), 1027–1036.