Working on the generic gibbs free energy minimizer