# Free-energy perturbation

Free-energy perturbation (FEP) is a method based on statistical mechanics that is used in computational chemistry for computing free-energy differences from molecular dynamics or Metropolis Monte Carlo simulations.
The FEP method was introduced by Robert W. Zwanzig in 1954. According to the free-energy perturbation method, the free-energy difference for going from state A to state B is obtained from the following equation, known as the Zwanzig equation:
    $\Delta F(\mathbf {A} \to \mathbf {B} )=F_{\mathbf {B} }-F_{\mathbf {A} }=-k_{\text{B}}T\ln \left\langle \exp \left(-{\frac {E_{\text{B}}-E_{\mathbf {A} }}{k_{\text{B}}T}}\right)\right\rangle _{\mathbf {A} },$
where T is the temperature, k$_B$ is the Boltzmann constant, and the angular brackets denote an average over a simulation run for state A. In practice, one runs a normal simulation for state A, but each time a new configuration is accepted, the energy for state B is also computed. The difference between states A and B may be in the atom types involved, in which case the ΔF obtained is for "mutating" one molecule onto another, or it may be a difference of geometry, in which case one obtains a free-energy map along one or more reaction coordinates. This free-energy map is also known as a potential of mean force (PMF).
Free-energy perturbation calculations only converge properly when the difference between the two states is small enough; therefore it is usually necessary to divide a perturbation into a series of smaller "windows", which are computed independently. Since there is no need for constant communication between the simulation for one window and the next, the process can be trivially parallelized by running each window on a different CPU, in what is known as an "embarrassingly parallel" setup.

## Application

FEP calculations have been used for studying host–guest binding energetics, pKa predictions, solvent effects on reactions, and enzymatic reactions. Other applications are the virtual screening of ligands in drug discovery, in silico mutagenesis studies and antibody affinity maturation. For the study of reactions it is often necessary to involve a quantum-mechanical (QM) representation of the reaction center because the molecular mechanics (MM) force fields used for FEP simulations cannot handle breaking bonds. A hybrid method that has the advantages of both QM and MM calculations is called QM/MM.
Umbrella sampling is another free-energy calculation technique that is typically used for calculating the free-energy change associated with a change in "position" coordinates as opposed to "chemical" coordinates, although umbrella sampling can also be used for a chemical transformation when the "chemical" coordinate is treated as a dynamic variable (as in the case of the Lambda dynamics approach of Kong and Brooks). An alternative to free-energy perturbation for computing potentials of mean force in chemical space is thermodynamic integration. Another alternative, which is probably more efficient, is the Bennett acceptance ratio method. Adaptations to FEP exist which attempt to apportion free-energy changes to subsections of the chemical structure.

## Software

FEP methods have been implemented in several molecular dynamics software packages. Below is a short list of some of the most common programs:
* Flare FEP
* FEP+
* AMBER
* BOSS
* CHARMM
* Desmond
* GROMACS
* MacroModel
* MOLARIS
* NAMD
* Tinker
* Q
* QUELO