I am trying to understand the following equation:
$$\Delta G = \Delta G^{\circ} + RT\; ln\frac{[C][D]}{[A][B]}$$$$\Delta G = \Delta G^{\circ} + RT \ln\left(\frac{[C][D]}{[A][B]}\right)$$
for a reversible reaction with reactants A and B and products C and D.
The way I understand it is that the Gibbs free energy change $\Delta G$ is built up by two components. One is the standard Gibbs free energy change $\Delta G^{\circ}$ which is something we can measure in the lab so to say and use as a reference point. The second term accounts for the given conditions such as actual temperature and reactant and product concentrations which deviate from those used to calculate/measure $\Delta G^{\circ}$.
My confusion stems from the following. In the textbook I am reading (Biochemistry by Berg et al) they say that:
"A simple way to determine $\Delta G^{\circ}$ is to measure the concentrations of reactants and products when the reaction has reached equilibrium. At equilibrium, there is no net change in reactants and products; in essence, the reaction has stopped and $\Delta G$ = 0." They then set $\Delta G = 0 $ and solve for $\Delta G^{\circ}$.
So they appear to be doing the backwards process of what I described above. Also why is this allowed at all? Isn't setting $\Delta G = 0 $ akin to enforcing a statement about the spontaneity of the reaction? The way I understood $\Delta G$ was that if it is positive the reaction is not spontaneous and if $\Delta G$ is negative the reaction is spontaneous. By extension if $\Delta G=0$ the reaction is at equilibrium, so I guess this means that $K=1$? Those should be things intrinsic to a given reaction, so how can we just set $\Delta G$=0? Also does $\Delta G$ change throughout a reaction at all? I mean, it clearly does, because it is a process that evolves in time but I thought that when we say $\Delta G$ we always take initial and the final free energy, so in that sense it is a constant and not an evolving quantity.
As you have probably gathered from the question I have no chemistry background so any help would be greatly appreciated.