Gibbs energy from mass action ratio and equlibrium constant