Difference between revisions of "Thermodynamic Integration"

From AlchemistryWiki
Jump to navigation Jump to search
Line 5: Line 5:
 
Starting with the identity of free energy
 
Starting with the identity of free energy
  
<math>\displaystyle A = -\beta^{-1} ln Q</math>
+
:<math>\displaystyle A = -\beta^{-1} ln Q</math>
  
 
then taking the derivative with respect to <math>\lambda</math> yields
 
then taking the derivative with respect to <math>\lambda</math> yields
  
<math>\displaystyle dA/d\lambda = -\beta^{-1}\frac{d}{d\lambda} ln \int e^{-\beta U(\lambda,\vec{q})}d\vec{q} = -\beta^{-1} \frac{\frac{d}{d\lambda}\int e^{-\beta U(\lambda,\vec{q})}d\vec{q}}{Q}</math>
+
:<math>\displaystyle dA/d\lambda = -\beta^{-1}\frac{d}{d\lambda} ln \int e^{-\beta U(\lambda,\vec{q})}d\vec{q} = -\beta^{-1} \frac{\frac{d}{d\lambda}\int e^{-\beta U(\lambda,\vec{q})}d\vec{q}}{Q}</math>
  
 
which can then be written as
 
which can then be written as
  
<math>\displaystyle dA/d\lambda = -\beta^{-1}\frac{-\beta\int \frac{dU(\lambda,\vec{q})}{d\lambda} e^{-\beta U(\lambda,\vec{q})}d\vec{q}}{Q} = \left\langle \frac{dU(\lambda,\vec{q})}{d\lambda}\right\rangle_\lambda </math>.
+
:<math>\displaystyle dA/d\lambda = -\beta^{-1}\frac{-\beta\int \frac{dU(\lambda,\vec{q})}{d\lambda} e^{-\beta U(\lambda,\vec{q})}d\vec{q}}{Q} = \left\langle \frac{dU(\lambda,\vec{q})}{d\lambda}\right\rangle_\lambda </math>.
  
 
Finally, one can do integration over the whole range of <math>\lambda</math> to get the final TI equation
 
Finally, one can do integration over the whole range of <math>\lambda</math> to get the final TI equation
  
<math>\displaystyle \Delta A = \int_0^1 \left\langle \frac{dU(\lambda,\vec{q})}{d\lambda}\right\rangle_\lambda d\lambda</math>.
+
:<math>\displaystyle \Delta A = \int_0^1 \left\langle \frac{dU(\lambda,\vec{q})}{d\lambda}\right\rangle_\lambda d\lambda</math>.
 +
 
 +
=Estimating Free Energies with TI=
 +
The above derivation makes it rather simple to estimate free energies from TI as there is no iterative solution needed, and only nearby states are needed to calculate the derivative. Since there is often a finite and discrete number of <math>\lambda</math> states, numeric integration schemes are frequently required. All numeric integration schemes have the form
 +
 
 +
:<math>\displaystyle \Delta A \approx \sum_{k=1}^K w_k \left\langle \frac{dU(\lambda,\vec{q})}{d\lambda}\right\rangle_k </math>
 +
 
 +
where the weights, <math>w_k</math> will depend on which numeric integration style is chosen. It is recommenced to those starting in free energy calculations to integrate with the trapezoid rule as it is very straightforward and maximizes flexibility in choice of <math>\lambda</math>. Under the trapezoid rule, even lambda spacing weights are <math>\displaystyle w_1 = w_k = 1/[2(K-1)]</math> and <math>w_{k \ne 1,K} = 1/(K-1)</math>.
 +
 
 +
==Variance of TI==
 +
 
 +
=Problems with TI=
 +
==Infinite <math>dU/d\lambda</math>==
 +
==Modifying Simulations==

Revision as of 16:02, 12 September 2012



Thermodynamic Integration (TI) is one of the most widespread methods for calculating free energy differences. By taking the derivative of the free energy difference with respect to [math]\displaystyle{ \lambda }[/math], this equation can be easily derived. It is one of the few methods that require calculation of [math]\displaystyle{ \frac{\partial U(\lambda,\vec{q})}{\partial\lambda} }[/math], however, is still one of the easiest free energy calculation to work with. The need to calculate the derivative is also one of its limitations as many simulation packages will not calculate this natively, and can cause problems when numerically evaluating it at [math]\displaystyle{ r = 0 }[/math]. Despite this, it is still one of the most accurate methods if used correctly and it is recommended that those new to the field because of its simplicity and ease of use.

Derivation

Starting with the identity of free energy

[math]\displaystyle{ \displaystyle A = -\beta^{-1} ln Q }[/math]

then taking the derivative with respect to [math]\displaystyle{ \lambda }[/math] yields

[math]\displaystyle{ \displaystyle dA/d\lambda = -\beta^{-1}\frac{d}{d\lambda} ln \int e^{-\beta U(\lambda,\vec{q})}d\vec{q} = -\beta^{-1} \frac{\frac{d}{d\lambda}\int e^{-\beta U(\lambda,\vec{q})}d\vec{q}}{Q} }[/math]

which can then be written as

[math]\displaystyle{ \displaystyle dA/d\lambda = -\beta^{-1}\frac{-\beta\int \frac{dU(\lambda,\vec{q})}{d\lambda} e^{-\beta U(\lambda,\vec{q})}d\vec{q}}{Q} = \left\langle \frac{dU(\lambda,\vec{q})}{d\lambda}\right\rangle_\lambda }[/math].

Finally, one can do integration over the whole range of [math]\displaystyle{ \lambda }[/math] to get the final TI equation

[math]\displaystyle{ \displaystyle \Delta A = \int_0^1 \left\langle \frac{dU(\lambda,\vec{q})}{d\lambda}\right\rangle_\lambda d\lambda }[/math].

Estimating Free Energies with TI

The above derivation makes it rather simple to estimate free energies from TI as there is no iterative solution needed, and only nearby states are needed to calculate the derivative. Since there is often a finite and discrete number of [math]\displaystyle{ \lambda }[/math] states, numeric integration schemes are frequently required. All numeric integration schemes have the form

[math]\displaystyle{ \displaystyle \Delta A \approx \sum_{k=1}^K w_k \left\langle \frac{dU(\lambda,\vec{q})}{d\lambda}\right\rangle_k }[/math]

where the weights, [math]\displaystyle{ w_k }[/math] will depend on which numeric integration style is chosen. It is recommenced to those starting in free energy calculations to integrate with the trapezoid rule as it is very straightforward and maximizes flexibility in choice of [math]\displaystyle{ \lambda }[/math]. Under the trapezoid rule, even lambda spacing weights are [math]\displaystyle{ \displaystyle w_1 = w_k = 1/[2(K-1)] }[/math] and [math]\displaystyle{ w_{k \ne 1,K} = 1/(K-1) }[/math].

Variance of TI

Problems with TI

Infinite [math]\displaystyle{ dU/d\lambda }[/math]

Modifying Simulations