# Multistate Bennett Acceptance Ratio

Free Energy Fundamentals |
---|

Methods of Free Energy Simulations |

Free Energy How-to's |
---|

The Multistate Bennett Acceptance Ratio (MBAR)^{[1]} 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.

## Contents

# Derivation

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^{[2]} 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.^{[3]} 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.

## Reduced potential

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 **Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): u_i(x)**

for thermodynamic state :

**Failed to parse (syntax error): \displaystyle u_i(x) \equiv \beta_i [ U_i(x) + p_i V(x) + {\bf \mu}_i^\mathrm{T} {\bf N}(x) ]**

The reduced potential function is uniquely defined by some combination of thermodynamic parameters **Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \beta_i**

denoting the inverse temperature,Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): U_i(x)denoting the potential energy function,Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): p_idenoting the pressure, andFailed to parse (syntax error): {\bf \mu}_idenoting the chemical potential of one or more components of the system.

These latter two thermodynamic variables are conjugate to the box volume **Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): V(x)**

and particle numbersFailed to parse (syntax error): {\bf N}(x)

.
Use of the reduced potential simplifies the MBAR equations and generalizes them to the computation of arbitrary reduced free energy differences **Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \Delta f_{ij} \equiv \beta_j A_j - \beta_i A_i**

among states.

**Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \displaystyle \hat{f_i} = -\ln \sum\limits_{j=1}^K \sum\limits_{n=1}^{N_j} \frac{\exp\left[-u_i(x_{nj})\right]}{\sum_{k=1}^K N_k \exp\left[\hat{f_k} - u_k(x_{nj})\right]}**

.

In the sum above **Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): x_{nj}**

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 allFailed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): N = \sum_{j=1}^K N_j

, so that we have:
**Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \displaystyle \hat{f_i} = -\ln \sum\limits_{n=1}^{N} \frac{\exp\left[-u_i(x_{n})\right]}{\sum_{k=1}^K N_k \exp\left[\hat{f_k} - u_k(x_{n})\right]}**

Finally, one can rewrite this as:
**Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \displaystyle \hat{f_i} = -\ln \left\langle \frac{\exp\left[-u_i(x_{n})\right]}{\sum_{k=1}^K \frac{N_k}{N} \exp\left[\hat{f_k} - u_k(x_{n})\right]}\right\rangle **

Where the ensemble averaged over is the **mixture ensemble** that consist of samples taken from each state **Failed to parse (PNG conversion failed; check for correct installation of latex and dvipng (or dvips + gs + convert)): \frac{N_i}{N}**
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^{[1]} 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.

# Download MBAR

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.

# References

- ↑
^{1.0}^{1.1}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.