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
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
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