code: def optimize_gibbs_free_energy(self):
          
          temperatures = np.linspace(
              self.temperature_min,  self.temperature_max,
              int(np.ceil((self.temperature_max - self.temperature_min)
              / self.temperature_step) + 1))
  
          for t in temperatures:
              try:
                  G_opt, V_opt = self.optimizer(t)
              except:
                  if len(temperatures) > 1:
                      print("EOS fitting failed, so skipping this data point, {}".
                            format(t))
                      continue
                  else:
                      raise
              self.gibbs_free_energy.append(G_opt)
              self.temperatures.append(t)
              self.optimum_volumes.append(V_opt)
docs: Evaluate the gibbs free energy as a function of V, T and P i.e
          G(V, T, P), minimize G(V, T, P) wrt V for each T and store the
          optimum values.
  
          Note: The data points for which the equation of state fitting fails
              are skipped.