Computing Gibbs free energy differences by interface pinning