In this video I'll give a brief introduction to the interface pinning method. This is a method for computing Gibbs-free energy differences between phases. I'll also discuss how the method can be used to construct phase diagrams. The method is based on a molecular dynamics simulation in an elongated periodic box containing a crystal phase, and a liquid phase, and two interfaces. In the simulation, the pressure and the temperature are kept constant. This is a typical phase diagram with a crystal phase, a liquid, a gas phase, a triple point, and a gas liquid critical point. Assume that the two phase simulation is done at a temperature and a pressure where the liquid is thermodynamic stable while the crystal is meter stable. Then the crystal would melt, the interfaces would move towards each other, and finally the entire system would end up in the liquid state. In this particular simulation, this is avoided by adding a harmonic field that bias the system towards two phase configurations. In other words, the interfaces are pinned. Here, Q is a measure of the crystallinity of the system. The difference in chemical potential between the two phases can now be determined by the average force that the applied field exerts on the system. To construct phase diagrams, we have to determine where the crystal and the liquid have the same chemical potential. This can be done by using Newton's root-finding method. The required derivatives are given by standard thermodynamic relations. We can either follow an isotherm or an isobar. Along an isotherm, the next pressure in a series of iterations is given by the upper equation. The lower equation gives the temperatures along an isobar. Details on the method and the discussion of its advantages and drawbacks are published in 2013 in the Journal of Chemical Physics. Thanks for watching. .