1.. _fepmf:
2
3Calculating a PMF using the free-energy code
4--------------------------------------------
5
6The free-energy coupling-parameter approach (see sec. :ref:`fecalc`)
7provides several ways to calculate potentials of mean force. A potential
8of mean force between two atoms can be calculated by connecting them
9with a harmonic potential or a constraint. For this purpose there are
10special potentials that avoid the generation of extra exclusions,
11see sec. :ref:`excl`. When the position of the minimum or the constraint
12length is 1 nm more in state B than in state A, the restraint or
13constraint force is given by :math:`\partial H/\partial \lambda`. The
14distance between the atoms can be changed as a function of
15:math:`\lambda` and time by setting delta-lambda in the :ref:`mdp` file. The
16results should be identical (although not numerically due to the
17different implementations) to the results of the pull code with umbrella
18sampling and constraint pulling. Unlike the pull code, the free energy
19code can also handle atoms that are connected by constraints.
20
21Potentials of mean force can also be calculated using position
22restraints. With position restraints, atoms can be linked to a position
23in space with a harmonic potential (see :ref:`positionrestraint`).
24These positions can be made a function of the coupling parameter
25:math:`\lambda`. The positions for the A and the B states are supplied
26to :ref:`grompp <gmx grompp>` with the ``-r`` and ``-rb`` options, respectively. One could use this
27approach to do targeted MD; note that we do not encourage the use of
28targeted MD for proteins. A protein can be forced from one conformation
29to another by using these conformations as position restraint
30coordinates for state A and B. One can then slowly change
31:math:`\lambda` from 0 to 1. The main drawback of this approach is that
32the conformational freedom of the protein is severely limited by the
33position restraints, independent of the change from state A to B. Also,
34the protein is forced from state A to B in an almost straight line,
35whereas the real pathway might be very different. An example of a more
36fruitful application is a solid system or a liquid confined between
37walls where one wants to measure the force required to change the
38separation between the boundaries or walls. Because the boundaries (or
39walls) already need to be fixed, the position restraints do not limit
40the system in its sampling.
41