Add equation numbers in reference manual
[alexxy/gromacs.git] / docs / reference-manual / algorithms / free-energy-calculations.rst
index d527c12c718546efe36944ce640f4c585c6ff670..383fbef0971f824a30a7c5a6e492081db403dd1f 100644 (file)
@@ -66,6 +66,7 @@ H=H(p,q;\lambda)` in such a way that :math:`\lambda=0` describes system
 A and :math:`\lambda=1` describes system B:
 
 .. math:: H(p,q;0)=H{^{\mathrm{A}}}(p,q);~~~~ H(p,q;1)=H{^{\mathrm{B}}}(p,q).
+          :label: eqnddgHamiltonian
 
 In |Gromacs|, the functional form of the :math:`\lambda`-dependence is
 different for the various force-field contributions and is described in
@@ -79,27 +80,25 @@ related to the partition function :math:`\Delta` of an :math:`N,p,T`
 ensemble, which is assumed to be the equilibrium ensemble generated by a
 MD simulation at constant pressure and temperature:
 
-.. math::
-
-   \begin{aligned}
-    A(\lambda) &=&  -k_BT \ln Q \\
-    Q &=& c \int\!\!\int \exp[-\beta H(p,q;\lambda)]\,dp\,dq \\
-    G(\lambda) &=&  -k_BT \ln \Delta \\
-    \Delta &=& c \int\!\!\int\!\!\int \exp[-\beta H(p,q;\lambda) -\beta
-   pV]\,dp\,dq\,dV \\
-   G &=& A + pV, \end{aligned}
+.. math:: \begin{aligned}
+           A(\lambda) &=&  -k_BT \ln Q \\
+           Q &=& c \int\!\!\int \exp[-\beta H(p,q;\lambda)]\,dp\,dq \\
+           G(\lambda) &=&  -k_BT \ln \Delta \\
+           \Delta &=& c \int\!\!\int\!\!\int \exp[-\beta H(p,q;\lambda) -\beta
+          pV]\,dp\,dq\,dV \\
+          G &=& A + pV, \end{aligned}
+          :label: eqnddgGibs
 
 where :math:`\beta = 1/(k_BT)` and :math:`c = (N! h^{3N})^{-1}`. These
 integrals over phase space cannot be evaluated from a simulation, but it
 is possible to evaluate the derivative with respect to :math:`\lambda`
 as an ensemble average:
 
-.. math::
-
-   \frac{dA}{d\lambda} =  \frac{\int\!\!\int (\partial H/ \partial
-   \lambda) \exp[-\beta H(p,q;\lambda)]\,dp\,dq}{\int\!\!\int \exp[-\beta
-   H(p,q;\lambda)]\,dp\,dq} = 
-   \left\langle \frac{\partial H}{\partial \lambda} \right\rangle_{NVT;\lambda},
+.. math:: \frac{dA}{d\lambda} =  \frac{\int\!\!\int (\partial H/ \partial
+          \lambda) \exp[-\beta H(p,q;\lambda)]\,dp\,dq}{\int\!\!\int \exp[-\beta
+          H(p,q;\lambda)]\,dp\,dq} = 
+          \left\langle \frac{\partial H}{\partial \lambda} \right\rangle_{NVT;\lambda},
+          :label: eqnddgensembleave
 
 with a similar relation for :math:`dG/d\lambda` in the :math:`N,p,T`
 ensemble. The difference in free energy between A and B can be found by
@@ -125,10 +124,9 @@ system A at pressure :math:`p` and volume :math:`V` and ending with
 system B at pressure :math:`p_B`, by applying the following small (but,
 in principle, exact) correction:
 
-.. math::
-
-   G{^{\mathrm{B}}}(p)-G{^{\mathrm{A}}}(p) =
-   A{^{\mathrm{B}}}(V)-A{^{\mathrm{A}}}(V) - \int_p^{p{^{\mathrm{B}}}}[V{^{\mathrm{B}}}(p')-V]\,dp'
+.. math:: G{^{\mathrm{B}}}(p)-G{^{\mathrm{A}}}(p) =
+          A{^{\mathrm{B}}}(V)-A{^{\mathrm{A}}}(V) - \int_p^{p{^{\mathrm{B}}}}[V{^{\mathrm{B}}}(p')-V]\,dp'
+          :label: eqnddgpresscorr
 
 Here we omitted the constant :math:`T` from the notation. This
 correction is roughly equal to