From 2ae66cc47e568a13a4891ad502503abb326c69d2 Mon Sep 17 00:00:00 2001 From: Michael Shirts Date: Sun, 11 Aug 2024 14:10:34 -0600 Subject: [PATCH 1/2] Updating a number of files. --- .../fundamentals/BennetAcceptanceRatio.ipynb | 10 ++--- .../fundamentals/ExponentialAveraging.ipynb | 36 ++++++++++++++--- .../fundamentals/FreeEnergyFundamentals.ipynb | 20 +++++----- .../fundamentals/ImprovingSampling.ipynb | 2 +- alchemistry/fundamentals/MBAR.ipynb | 40 ++++++++++++++++++- 5 files changed, 85 insertions(+), 23 deletions(-) diff --git a/alchemistry/fundamentals/BennetAcceptanceRatio.ipynb b/alchemistry/fundamentals/BennetAcceptanceRatio.ipynb index 6dd0d2a..e65a6f2 100644 --- a/alchemistry/fundamentals/BennetAcceptanceRatio.ipynb +++ b/alchemistry/fundamentals/BennetAcceptanceRatio.ipynb @@ -29,11 +29,11 @@ "\n", "$\\Delta A_{ij} = -k_{B} T \\ln \\frac{Q_j}{Q_i} = k_{B}T \\ln \\frac{\\left\\langle\\alpha(\\vec{q}) \\exp[-\\beta U_{i}(\\vec{q})]\\right\\rangle_j}{\\left\\langle\\alpha(\\vec{q}) \\exp[-\\beta U_{j}(\\vec{q})]\\right\\rangle_i}$\n", "\n", - "which is true for any $\\alpha(\\vec{q})>0$ for all $\\vec{q}$. This was Bennett's start point and he then used variational calculus to select the value pf $\\alpha(\\vec{q})$ minimizing the variance of the free energy. The end result is an implicit function of the free energy, and the number of samples at each state, $n_i$ and $n_j$, and is\n", + "which is true for any function $\\alpha(\\vec{q})$ as long as $\\alpha(\\vec{q})>0$ for all $\\vec{q}$. This was Bennett's start point and he then used variational calculus to select the value pf $\\alpha(\\vec{q})$ minimizing the variance of the free energy. The end result is an implicit function of the free energy $\\Delta A$ and the number of samples at each state, $n_i$ and $n_j$, and can be written as is\n", "\n", - "$\\sum_{i=1}^{n_i} \\frac{1}{1 + \\exp(\\ln(n_i/n_j) + \\beta \\Delta U_{ij} - \\beta \\Delta A))} - \\sum_{j=1}^{n_j} \\frac{1}{1 + \\exp(\\ln(n_j/n_i) - \\beta \\Delta U_{ji} + \\beta \\Delta A))} = 0$\n", + "$\\sum_{i=1}^{n_i} \\frac{1}{1 + \\exp\\left(\\ln\\left(\\frac{n_i}{n_j}\\right) + \\beta \\Delta U_{ij} - \\beta \\Delta A)\\right)} - \\sum_{j=1}^{n_j} \\frac{1}{1 + \\exp\\left(\\ln\\left(\\frac{n_j}{n_i}\\right) - \\beta \\Delta U_{ji} + \\beta \\Delta A)\\right)} = 0$\n", "\n", - "which must be solved numerically. This is the full BAR equation and its full derivation can be found in Bennett's paper.{cite}`Bennett1976` To get the equation above from Bennett's paper, you will have to take the exponential of both sides of his self-consistent Equation 12, then a bit of algebra to get the end result. This equation can also be derived from a maximum likelihood approach.{cite}`Shirts2003a` There are a number of other equivalent ways to express this implicit equation." + "which must be solved numerically. This is the full BAR equation and its full derivation can be found in Bennett's paper{cite}`Bennett1976`. To get the equation above from Bennett's paper, you will have to take the exponential of both sides of his self-consistent Equation 12, then a bit of algebra to get the end result. This equation can also be derived from a maximum likelihood approach.{cite}`Shirts2003a` There are a number of other equivalent ways to express this implicit equation." ] }, { @@ -57,7 +57,7 @@ "## Estimating Accurate Free Energies with BAR\n", "BAR has a very straightforward method to calculate the free energy difference between two states. It still suffers from the same [general problems](IS_rules) as the other methods do with regards to variance along the pathway, what parameters are changing, sequence of change etc. and must still be treated with care. BAR can estimate free energies between many states, however, it must do this a pair at a time. As such, BAR requires information collected from $k-1$, $k$, and $k+1$ state for each configuration stored.\n", "\n", - "BAR require an iterative solution but all the samples will be correlated since results are taken from adjacent states. Unlike in [TI](TI), however, the results are not so clean to get an error estimate. More indirect methods, such as [Bootstrap Sampling](bootstrap) are required to get variances. Furthermore, subsampling is needed since each state can have different correlation times." + "BAR require an iterative solution but the estimates of free energies between states $1 \\rightarrow 2$, $2 \\rightarrow 3$, $2 \\rightarrow 3$ and so forth will be correlated, because the free energy difference calculated between state $i-1$ to $i$ and the free energy difference between $i$ and $i+1$ both use the same samples from state $i$. Therefore, unlike [TI](TI), it is not so clean to get an error estimate. More indirect methods, such as [Bootstrap Sampling](bootstrap) are required to get variances. Furthermore, subsampling is needed since each state can have different correlation times." ] }, { @@ -86,7 +86,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.3" + "version": "3.11.5" } }, "nbformat": 4, diff --git a/alchemistry/fundamentals/ExponentialAveraging.ipynb b/alchemistry/fundamentals/ExponentialAveraging.ipynb index 33e2a71..eee6a48 100644 --- a/alchemistry/fundamentals/ExponentialAveraging.ipynb +++ b/alchemistry/fundamentals/ExponentialAveraging.ipynb @@ -14,7 +14,7 @@ "id": "303403d9-8584-4d41-bfe7-4d8a4daf4522", "metadata": {}, "source": [ - "Exponential Averaging (EXP) is one of the earliest free energy methods available to researchers. Mostly used to evaluate between only two states of interest, it has an exact solution where as many other methods require approximations. Other names for this technique are the \"Zwanzig Relationship\" (named after the person who first derived it){cite}`Zwanzig1954` and \"free energy perturbation (FEP).\" To avoid confusion, the latter term should be avoided as it can easily be confused with other definitions in the scientific field.\n", + "Exponential Averaging (EXP) is one of the earliest free energy methods available to researchers. Mostly used to evaluate between only two states of interest, it has an exact solution where as many other methods require approximations. Other names for this technique are the \"Zwanzig relationship\" (named after the person who first derived it){cite}`Zwanzig1954` and \"free energy perturbation (FEP).\" To avoid confusion, the latter term should be avoided as it can easily be confused with other definitions in the scientific field.\n", "\n", "## Derivation\n", "Starting from the [statistical relation for free energy](core_eq) of\n", @@ -23,15 +23,39 @@ "\n", "the free energy difference between two states with potentials $U_0(\\vec{q})$ and $U_1(\\vec{q})$ is simply\n", "\n", - "$ \\displaystyle A_1 - A_0 = -\\beta^{-1} \\left[\\mathrm{ln}(Q_1) - \\mathrm{ln}(Q_0)\\right] = -\\beta^{-1} \\mathrm{ln}\\left[\\frac{Q_1}{Q_0}\\right] $.\n", + "$ \\displaystyle \\Delta A_{10} = A_1 - A_0 = -\\beta^{-1} \\left[\\mathrm{ln}(Q_1) - \\mathrm{ln}(Q_0)\\right] = -\\beta^{-1} \\mathrm{ln}\\left[\\frac{Q_1}{Q_0}\\right] $.\n", "\n", - "By then adding and subtracting $e^{-\\beta U_0(\\vec{q})}$ from the integral in the partition function in the numerator, we get\n", + "By then adding and subtracting $e^{-\\beta U_0(\\vec{q})}$ from the integral in the partition function in the numerator, we get:\n", "\n", - ":$ \\Delta A_{10} = -\\beta^{-1} \\mathrm{ln} \\left[\\frac{\\int e^{-\\beta \\left(U_1(\\vec{q})-U_0(\\vec{q})+U_0(\\vec{q})\\right)} d\\vec{q}}{Q_0}\\right] = -\\beta^{-1} \\mathrm{ln} \\left[\\frac{\\int e^{-\\beta \\left(U_1(\\vec{q})-U_0(\\vec{q})\\right)} e^{-\\beta U_0(\\vec{q})} d\\vec{q}}{Q_0}\\right]$\n", + "$ \\Delta A_{10} = -\\beta^{-1} \\mathrm{ln} \\left[\\frac{\\int e^{-\\beta \\left(U_1(\\vec{q})-U_0(\\vec{q})+U_0(\\vec{q})\\right)} d\\vec{q}}{Q_0}\\right] = -\\beta^{-1} \\mathrm{ln} \\left[\\frac{\\int e^{-\\beta \\left(U_1(\\vec{q})-U_0(\\vec{q})\\right)} e^{-\\beta U_0(\\vec{q})} d\\vec{q}}{Q_0}\\right]$\n", "\n", "which gives the final relationship of:\n", "\n", - "$ \\displaystyle \\Delta A_{10} = -\\beta^{-1} \\mathrm{ln} \\left\\langle e^{-\\beta \\left(U_1(\\vec{q})-U_0(\\vec{q})\\right)} \\right\\rangle_0 = -\\beta^{-1} \\mathrm{ln} \\left\\langle e^{-\\beta \\Delta U(\\vec{q})} \\right\\rangle_0 $" + "$ \\displaystyle \\Delta A_{10} = -\\beta^{-1} \\mathrm{ln} \\left\\langle e^{-\\beta \\left(U_1(\\vec{q})-U_0(\\vec{q})\\right)} \\right\\rangle_0 = -\\beta^{-1} \\mathrm{ln} \\left\\langle e^{-\\beta \\Delta U(\\vec{q})} \\right\\rangle_0 $\n", + "\n", + "\n", + "This can also be derived from the technique of importance sampling. \n", + "\n", + "First, the concept of Monte Carlo integration states that if we want to estimate some multidimensional expectation value $\\langle O \\rangle_i = \\int O(\\vec{q})p(\\vec{q}) d\\vec{q}$, where $p(\\vec{q})$ is a normalized distribution, it can be estimated from $N$ samples from the probability distribution $p(\\vec{q})$ as $\\sum_{i=1}^{N} O(q_i)$. Note that this works if we do not know the normalizing constant; we only need to draw samples proportional to $p\\vec{q}$. \n", + "\n", + "Importance sampling states that if we have two distributions $p_1(\\vec{q})$ and $p_2(\\vec{q})$, then we can write the integral as:\n", + "\n", + "$ \\displaystyle \\int O(\\vec{q}) p_1(\\vec{q}) d\\vec{q} = \\int O(\\vec{q}) p_2(\\vec{q}) \\left(\\frac{p_1(\\vec{q})}{p_2(\\vec{q})}\\right) d\\vec{q} $ \n", + "Which can be approximated by the sum $\\sum_{i=1}^{N} O(\\vec{q}_i) \\left(\\frac{p_1(\\vec{q})}{p_2(\\vec{q})}\\right)$, which is a estimate of the expectation value $\\langle O \\rangle_i$, but estimated with samples from $p_2$. \n", + "\n", + "If we now have two normalized Boltzmann distributions $\\rho_1(\\vec{q}) = \\frac{e^{-\\beta U_1(\\vec{q})}}{Q_1} = e^{-\\beta A_1 - \\beta U_1}$ and $\\rho_2(\\vec{q}) = \\frac{e^{\\beta U_2(\n", + "\\vec{q})}}{Q_2} = e^{\\beta A_1 - \\beta U_1}$, then we can write:\n", + "\n", + "$ \\displaystyle \\langle O(\\vec{q}) \\rangle_1 = \n", + "\\left\\langle O(\\vec{q}) \\frac{e^{\\beta A_1 -\\beta U_1(\\vec{q})}}{e^{\\beta A_2 -\\beta U_2(\\vec{q})}} \\right\\rangle_2 = \\left\\langle O(\\vec{q}) e^{\\beta A_1-A_2 -\\beta U_1(\\vec{q})-U_2(\\vec{q})}\\right\\rangle_2$\n", + "\n", + "This is a general formula for estimating the expectation value of $\\langle O(\\vec{q} \\rangle_1$ with samples from $p_2$, but does not tell us how what the value of $\\Delta A = A_1-A_2$ is. However $\\Delta A$ is independent of the position. Let us use the special case of $O(\\vec{q})= 1$ (i.e. the constant 1). Clearly, $\\langle 1 \\rangle_1 =1$ -- the average must be 1 because every single value is 1! We then get: \n", + "\n", + "$ \\displaystyle 1 = \\left \\langle e^{\\beta \\Delta A -\\beta (U_1(\\vec{q})-U_2)(\\vec{q})}\\right\\rangle_2$\n", + "\n", + "$ \\displaystyle e^{-\\beta \\Delta A} = \\left \\langle e^{-\\beta (U_1(\\vec{q})-U_2(\\vec{q})}\\right\\rangle_2 \\approx \\sum_{i=1}^N e^{-\\beta (U_1(\\vec{q})-U_2(\\vec{q}))}$, where the $\\vec{q}$ are sampled from $p_2$. \n", + "\n", + "This is of course symmetric, so $A_2-A_1 = -\\Delta A$ can be computed from samples from $p_1$, but recomputing the energies from state 2. " ] }, { @@ -87,7 +111,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.3" + "version": "3.11.5" } }, "nbformat": 4, diff --git a/alchemistry/fundamentals/FreeEnergyFundamentals.ipynb b/alchemistry/fundamentals/FreeEnergyFundamentals.ipynb index 8c34a0f..f82a4c6 100644 --- a/alchemistry/fundamentals/FreeEnergyFundamentals.ipynb +++ b/alchemistry/fundamentals/FreeEnergyFundamentals.ipynb @@ -46,9 +46,9 @@ " * Harmonic bond angle terms\n", " * Periodic dihedral terms\n", " * Non-bonded terms made up of point charges and Lennard-Jones repulsion/dispersion terms\n", - "* Constant temperature is maintained: (discussed [below](facts_split))\n", - "**Masses do not alchemically change**. If one wishes to do this, substitute all potential energies, $U$, with the more general Hamiltonian, $\\mathcal{H}$.\n", - "* **QM/MM will not be considered** for fundamental; there are number of other more complicated factors to consider that are beyond the scope of this discussion. {cite}`woods2008`" + "* **The temperatur is constant** during the transforamation: (discussed [below](facts_split))\n", + "* **Masses do not alchemically change**. If one wishes to change the masses as well, substitute all potential energies, $U$, with the more general Hamiltonian, $\\mathcal{H}$. Note that in may cases, the free energy differences will be the same regardless of whether or not the masses change. This is because the kinetic energy distribution will be independent of what the masses are. \n", + "* **QM/MM will not be considered** in this description of fundamentals; there are number of other more complicated factors to consider for QM/MM simulations that are beyond the scope of this discussion. {cite}`woods2008`" ] }, { @@ -65,11 +65,11 @@ "id": "442e3abe-9bda-40ce-ae21-4af5c0c28593", "metadata": {}, "source": [ - "Most free energy calculations and methods started from a single core equation derived from statistical mechanics. The free energy difference between two states is directly related to the ratio of probabilities of those states through the partition functions. This free energy difference for an NVT ensemble is\n", + "Most free energy calculations and methods started from a single core equation that defined free energy differences.The free energy difference between two states is directly related to the ratio of probabilities of those states through the partition functions. This free energy difference for an NVT ensemble is\n", "\n", "$\\displaystyle \\Delta A_{ij} = -k_B T \\ln \\frac{Q_j}{Q_i} = -k_B T \\ln \\frac{\\int_{\\Gamma_j} e^{-\\frac{U_j(\\vec{q})}{k_B T}} d\\vec{q}}{\\int_{\\Gamma_i} e^{-\\frac{U_i(\\vec{q})}{k_B T}}d\\vec{q}}$\n", "\n", - "where $\\Delta A_{ij}$ is the Helmholtz free energy difference between state $j$ and state $i$, $k_B$ the Boltzmann constant, $Q$ the canonical partition function, $T$ is the temperature, $U_i$ and $U_j$ are the potential energies as a function of the coordinates and momenta $\\vec{q}$ for two states, and $\\Gamma_i$ and $\\Gamma_j$ are the *phase space volumes* of $\\vec{q}$ over which we sample, or the total set of all allowed positions and momenta of the system.\n", + "where $\\Delta A_{ij}$ is the Helmholtz free energy difference between state $j$ and state $i$, $k_B$ the Boltzmann constant, $Q$ the canonical partition function, $T$ is the temperature, $U_i$ and $U_j$ are the potential energies as a function of the coordinates and momenta $\\vec{q}$ for two states, and $\\Gamma_i$ and $\\Gamma_j$ are the *phase space volumes* of $\\vec{q}$ over which we sample, i.e. the total set of all allowed positions and momenta of the system.\n", "\n", "From this equation, all free energy calculations are derived." ] @@ -90,11 +90,11 @@ "source": [ "There are a number of key notes we can learn from the definition of free energy differences. Each of these can be important in interpreting simulation results.\n", "\n", - "* **Only free energy *differences* are ever calculated.** There is never a calculation where absolute free energies are needed (and rarely can they be calculated at all) as all of the biological or thermodynamical quantities of interest are based on a free energy difference. As such, there must always be a minimum of two defined thermodynamic states.\n", - " * Even *absolute* free energies of binding are still free energy differences between two states: the ligand restricted to the binding site, and the ligand free to explore all other configurations.\n", + "* **Only free energy *differences* are ever calculated.** There is never a calculation where absolute free energies are needed (and rarely can they be calculated at all) as all of the biological or thermodynamical quantities of interest are related to free energy differences. As such, there must always be a minimum of two defined thermodynamic states.\n", + " * Even when we talk about *absolute* free energies of binding, these are actually free energy differences between two states: the ligand restricted to the binding site, and the ligand free to explore all other configurations.\n", "* **Free energy differences between states at different temperatures are usually not what you want to be calculating** for problems of interest. If it did, you would get $\\Delta A_{ij} = -k_B T_j \\ln Q_j + k_B T_i \\ln Q_i$, which is no longer a ratio calculation and not needed for biological systems of interest. Temperature dependence on free energy is more likely to be \"what is $ \\Delta A_{ij} $ change at two different temperatures?\"\n", - "* **There are two different phase space volumes.** $\\Gamma_i$ and $\\Gamma_j$ are often the same, but they are not required to be. The methods presented here almost always assumes that the two phase spaces overlap. However, when the spaces do not overlap, these methods break down and it is difficult to identify this problem without in depth knowledge of your system. Consider the example of a hard sphere solute with radius $\\sigma$ at state $i$ and a Lennard Jones repulsion/dispersion potential, with the same $\\sigma$ at state $j$. Since $\\Gamma _i$ will not have molecules at a distance less than $\\sigma$, but $\\Gamma_j$ will, the two phase spaces are not the same and these methods will either break down or return very error-prone results.\n", - " * The degree to which the phase spaces are shared is called the \"phase space overlap\". Efficient free energy calculations require significant phase space overlap. There are [a number of strategies to address](Intermediate_States) lack of overlap between target spaces, but determining the best way for any given situation is still a research question.\n", + "* **There are two different phase space volumes.** $\\Gamma_i$ and $\\Gamma_j$ are often the same, but they are not required to be. The methods presented here almost always assumes that the two phase spaces overlap. However, when the spaces do not overlap, these methods break down and it is difficult to identify this problem without in depth knowledge of your system. Consider the example of a hard sphere solute with radius $\\sigma$ at state $i$ and a Lennard Jones repulsion/dispersion potential, with the same $\\sigma$ at state $j$. Since $\\Gamma _i$ will not have molecules at a distance less than $\\sigma$, but $\\Gamma_j$ will, the two phase spaces are not the same and these alchemical methods will either break down or return very error-prone results.\n", + " * The degree to which the phase spaces are shared by the two end state Hamiltonians is called the \"phase space overlap\". Efficient free energy calculations require significant phase space overlap. There are [a number of strategies to address](Intermediate_States) lack of overlap between target spaces, but determining the best approach for any given situation is still a research question.\n", " * It should also be noted that \"near zero probability\" and \"always zero probability\" are two distinct things when considering phase space. So long as there is a chance for an observation to be made, no matter how small, it is considered part of the phase space." ] }, @@ -123,7 +123,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.3" + "version": "3.11.5" } }, "nbformat": 4, diff --git a/alchemistry/fundamentals/ImprovingSampling.ipynb b/alchemistry/fundamentals/ImprovingSampling.ipynb index 2bc2b4a..89fe7ff 100644 --- a/alchemistry/fundamentals/ImprovingSampling.ipynb +++ b/alchemistry/fundamentals/ImprovingSampling.ipynb @@ -114,7 +114,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.3" + "version": "3.11.5" } }, "nbformat": 4, diff --git a/alchemistry/fundamentals/MBAR.ipynb b/alchemistry/fundamentals/MBAR.ipynb index dff288e..a6d24c9 100644 --- a/alchemistry/fundamentals/MBAR.ipynb +++ b/alchemistry/fundamentals/MBAR.ipynb @@ -69,6 +69,44 @@ "Remember always **the free energy will change depending on which reduced potential you use,** so please take this into account when working with MBAR." ] }, + { + "cell_type": "markdown", + "id": "ea991ee1", + "metadata": {}, + "source": [ + "### Derivation from importance sampling from the mixture distribution.\n", + "\n", + "This can also be derived from the technique of importance sampling. \n", + "\n", + "First, the concept of Monte Carlo integration states that if we want to estimate some multidimensional expectation value $\\langle O \\rangle_i = \\int O(\\vec{q})p(\\vec{q}) d\\vec{q}$, where $p(\\vec{q})$ is a normalized distribution, it can be estimated from $N$ samples from the probability distribution $p(\\vec{q})$ as $\\sum_{i=1}^{N} O(q_i)$. Note that this works if we do not know the normalizing constant; we only need to draw samples proportional to $p\\vec{q}$. \n", + "\n", + "Importance sampling states that if we have two distributions $p_1(\\vec{q})$ and $p_2(\\vec{q})$, then we can write the integral as:\n", + "\n", + "$ \\displaystyle \\int O(\\vec{q}) p_1(\\vec{q}) d\\vec{q} = \\int O(\\vec{q}) p_2(\\vec{q}) \\left(\\frac{p_1(\\vec{q})}{p_2(\\vec{q})}\\right) d\\vec{q} $ \n", + "Which can be approximated by the sum $\\sum_{i=1}^{N} O(\\vec{q}_i) \\left(\\frac{p_1(\\vec{q})}{p_2(\\vec{q})}\\right)$, which is a estimate of the expectation value $\\langle O \\rangle_i$, but estimated with samples from $p_2$. \n", + "\n", + "Now define the *mixture* distribution of all $k$ states of interest, which we write as $p_m(\\vec{q}) = \\sum_i=1^K \\frac{N_k}{N_k} e^{f_k-u_k}$, where $N_k$ are the number of samples from each state and $N = \\sum_k N_k$ is the total number of samples from all states.\n", + "\n", + "We write the importance sampling estimator of $\\rangle O \\angle_1$ estimated using the mixture distribution, which is: $\\langle O \\rangle_1 = \\langle O \\frac{p_1}{p_m}\\rangle_{m}$. \n", + "\n", + "For statistical mechanical problems, each $p_k(\\vec{q}) = e^{f_k - u_k(\\vec{q})}$, so $p_m = \\sum_{i=1}^K \\frac{N_k}{N} e^{f_k - u_k(\\vec{q})}$. So the importance sampling estimator is \n", + "\n", + "$\\langle O \\rangle_1 = \\left\\langle O \\frac{e^{f_1 - u_1}}{\\sum_{i=1}^K \\frac{N_k}{N} e^{f_k - u_k}}\\right\\rangle_{m}$. \n", + "\n", + "If we now set $O(\\vec{q})=1$, then:\n", + "\n", + "$ \\displaystyle 1 = \\left\\langle \\frac{e^{f_1 - u_1(\\vec{q})}}{\\sum_{i=1}^K \\frac{N_k}{N} e^{f_k - u_k(\\vec{q})}}\\right\\rangle_{m}$. \n", + "\n", + "and we can multiply both sides by $e^{-f_1}$, to get the implicit equation for $f_1$\n", + "\n", + "$ \\displaystyle e^{-f_1} = \\left\\langle \\frac{e^{-u_1(\\vec{q})}}{\\sum_{i=1}^K \\frac{N_k}{N} e^{f_k - u_k(\\vec{q})}}\\right\\rangle_{m}$. \n", + "\n", + "$ \\displaystyle e^{-f_k} \\approx \\sum_{n=1}^N \\frac{e^{-u_k(\\vec{q}_n)}}{\\sum_{i=1}^K \\frac{N_k}{N} e^{f_k - u_k(\\vec{q}_n)}}$. \n", + "\n", + "We can write one of these equations for each $f_k$. This set of implicit equations can clearly be seen as the MBAR equations. \n", + "\n" + ] + }, { "cell_type": "markdown", "id": "7d8bd0bf-4260-484f-9284-0071e2f55aca", @@ -107,7 +145,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.3" + "version": "3.11.5" } }, "nbformat": 4, From 177ecabeb4ed207e7c7bda19857712950d0ad3d8 Mon Sep 17 00:00:00 2001 From: Michael Shirts Date: Sun, 11 Aug 2024 14:13:43 -0600 Subject: [PATCH 2/2] clearning references. --- alchemistry/references.bib | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/alchemistry/references.bib b/alchemistry/references.bib index 3392794..1f0de91 100644 --- a/alchemistry/references.bib +++ b/alchemistry/references.bib @@ -15,7 +15,7 @@ @ARTICLE{woods2008 @article{Zwanzig1954, title={High-temperature equation of state by a perturbation method. I. Nonpolar gases}, author={Zwanzig, Robert W}, - journal={The Journal of Chemical Physics}, + journal={J. Chem. Phys.}, volume={22}, number={8}, pages={1420--1426}, @@ -38,7 +38,7 @@ @article{Shirts2005 @article{Lu2003, author = {Lu, Nandou and Singh, Jayant K. and Kofke, David A.}, title = "{Appropriate methods to combine forward and reverse free-energy perturbation averages}", - journal = {The Journal of Chemical Physics}, + journal = {J. Chem. Phys.}, volume = {118}, number = {7}, pages = {2977-2984}, @@ -52,7 +52,7 @@ @article{Lu2003 @article{Lu1999, author = {Lu, Nandou and Kofke, David A.}, title = "{Optimal intermediates in staged free energy calculations}", - journal = {The Journal of Chemical Physics}, + journal = {J. Chem. Phys.}, volume = {111}, number = {10}, pages = {4414-4423}, @@ -105,7 +105,7 @@ @article{Jarzynski2006 @article{Jorge2010, author = {Jorge, Miguel and Garrido, Nuno M. and Queimada, António J. and Economou, Ioannis G. and Macedo, Eugénia A.}, title = {Effect of the Integration Method on the Accuracy and Computational Efficiency of Free Energy Calculations Using Thermodynamic Integration}, -journal = {Journal of Chemical Theory and Computation}, +journal = {J. Chem. Theory Comput.}, volume = {6}, number = {4}, pages = {1018-1027}, @@ -141,7 +141,7 @@ @article{Crooks2000 } @article{Bennett1976, title = {Efficient estimation of free energy differences from Monte Carlo data}, - journal = {Journal of Computational Physics}, + journal = {J. Comput. Phys.}, volume = {22}, number = {2}, pages = {245-268}, @@ -168,7 +168,7 @@ @article{Shirts2003a @article{Shirts2003b, author = {Shirts, Michael R. and Pitera, Jed W. and Swope, William C. and Pande, Vijay S.}, title = "{Extremely precise free energy calculations of amino acid side chain analogs: Comparison of common molecular mechanics force fields for proteins}", - journal = {The Journal of Chemical Physics}, + journal = {J. Chem. Phys.}, volume = {119}, number = {11}, pages = {5740-5761}, @@ -181,7 +181,7 @@ @article{Shirts2003b @article{Ytreberg2006, author = {Ytreberg, F. Marty and Swendsen, Robert H. and Zuckerman, Daniel M.}, title = "{Comparison of free energy methods for molecular systems}", - journal = {The Journal of Chemical Physics}, + journal = {J. Chem. Phys.}, volume = {125}, number = {18}, pages = {184114}, @@ -257,7 +257,7 @@ @ARTICLE{Wang2006 @article{Shirts2008, author = {Shirts, Michael R. and Chodera, John D.}, title = "{Statistically optimal analysis of samples from multiple equilibrium states}", - journal = {The Journal of Chemical Physics}, + journal = {J. Chem. Phys.}, volume = {129}, number = {12}, pages = {124105}, @@ -311,7 +311,7 @@ @Article{Mezei1986 @article{Mruzik1976, author = {Mruzik, Michael R. and Abraham, Farid F. and Schreiber, Donald E. and Pound, G. M.}, title = "{A Monte Carlo study of ion–water clusters}", - journal = {The Journal of Chemical Physics}, + journal = {J. Chem. Phys.}, volume = {64}, number = {2}, pages = {481-491}, @@ -324,7 +324,7 @@ @article{Mruzik1976 @article{Resat1993, author = {Resat, Haluk and Mezei, Mihaly}, title = "{Studies on free energy calculations. I. Thermodynamic integration using a polynomial path}", - journal = {The Journal of Chemical Physics}, + journal = {J. Chem. Phys.}, volume = {99}, number = {8}, pages = {6052-6061}, @@ -336,8 +336,8 @@ @article{Resat1993 } @article{Zacharias1994, author = {Zacharias, M. and Straatsma, T. P. and McCammon, J. A.}, - title = "{Separation‐shifted scaling, a new scaling method for Lennard‐Jones interactions in thermodynamic integration}", - journal = {The Journal of Chemical Physics}, + title = "{Separation-shifted scaling, a new scaling method for Lennard-Jones interactions in thermodynamic integration}", + journal = {J. Chem. Phys.}, volume = {100}, number = {12}, pages = {9025-9031}, @@ -383,8 +383,8 @@ @Article{Pearlman1995 } @article{Wang1994, author = {Wang, Lu and Hermans, Jan}, - title = "{Change of bond length in free‐energy simulations: Algorithmic improvements, but when is it necessary?}", - journal = {The Journal of Chemical Physics}, + title = "{Change of bond length in free-energy simulations: Algorithmic improvements, but when is it necessary?}", + journal = {J. Chem. Phys.},, volume = {100}, number = {12}, pages = {9129-9139}, @@ -407,7 +407,7 @@ @Article{Pham2011 @article{Boresch1996, author = {Boresch, Stefan and Karplus, Martin}, title = "{The Jacobian factor in free energy simulations}", - journal = {The Journal of Chemical Physics}, + journal = {J. Chem. Phys.}, volume = {105}, number = {12}, pages = {5145-5154}, @@ -810,8 +810,8 @@ @article{Guo1998 } @article{Kong1996, author = {Kong, Xianjun and Brooks, Charles L., III}, - title = "{λ‐dynamics: A new approach to free energy calculations}", - journal = {The Journal of Chemical Physics}, + title = "{λ-dynamics: A new approach to free energy calculations}", + journal = {J. Chem. Phys.},, volume = {105}, number = {6}, pages = {2414-2423},