title: Overlapping distribution method
text: # Overlapping distribution method
  
  The Overlapping distribution method was introduced by Charles H. Bennett for estimating chemical potential.
  
  ## Theory
  
  For two N particle systems 0 and 1 with partition function $Q_{0}$ and $Q_{1}$ ,
  
  from $F(N,V,T)=-k_{B}T\ln Q$
  
  get the thermodynamic free energy difference is $\Delta F=-k_{B}T\ln(Q_{1}/Q_{0})=-k_{B}T\ln({\frac {\int ds^{N}\exp[-\beta U_{1}(s^{N})]}{\int ds^{N}\exp[-\beta U_{0}(s^{N})]}})$
  
  For every configuration visited during this sampling of system 1 we can compute the potential energy U as a function of the configuration space, and the potential energy difference is
  
  $\Delta U=U_{1}(s^{N})-U_{0}(s^{N})$
  
  Now construct a probability density of the potential energy from the above equation:
  
  $p_{1}(\Delta U)={\frac {\int ds^{N}\exp(-\beta U_{1})\delta (U_{1}-U_{0}-\Delta U)}{Q_{1}}}$
  
  where in $p_{1}$ is a configurational part of a partition function
  
  $p_{1}(\Delta U)={\frac {\int ds^{N}\exp(-\beta U_{1})\delta (U_{1}-U_{0}-\Delta U)}{Q_{1}}}={\frac {\int ds^{N}\exp[-\beta (U_{0}+\Delta U)]\delta (U_{1}-U_{0}-\Delta U)}{Q_{1}}}$ $={\frac {Q_{0}}{Q_{1}}}\exp(-\beta \Delta U){\frac {\int ds^{N}\exp(-\beta U_{0})\delta (U_{1}-U_{0}-\Delta U)}{Q_{0}}}={\frac {Q_{0}}{Q_{1}}}\exp(-\beta \Delta U)p_{0}(\Delta U)$
  
  since
  
  $\Delta F=-k_{B}T\ln(Q_{1}/Q_{0})$
  
  $\ln p_{1}(\Delta U)=\beta (\Delta F-\Delta U)+\ln p_{0}(\Delta U)$
  
  now define two functions:
  
  $f_{0}(\Delta U)=\ln p_{0}(\Delta U)-{\frac {\beta \Delta U}{2}}f_{1}(\Delta U)=\ln p_{1}(\Delta U)+{\frac {\beta \Delta U}{2}}$
  
  thus that
  
  $f_{1}(\Delta U)=f_{0}(\Delta U)+\beta \Delta F$
  
  and$\Delta F$ can be obtained by fitting $f_{1}$ and $f_{0}$
  
  