How?
For $n$ complexation reactions:
$$
XL_i + L \rightleftharpoons XL_{i+1}, k_i = \frac{XL_{i+1}}{XL_i \cdot L}
$$
We can prodeed as follow:
- Write the sum of all complex species
- Highlight a specific species concentration you want to have the partition
- Rewrite concentration ratios as product of constants and ligand concentration
- Rework the expression to have a single fraction
For a 4-ligand complex, for the third specie from five it gives:
$$
\begin{align}
C_t =& X + XL + XL_2 + XL_3 + XL_4 \\
C_t =& XL_2 \left[ \frac{X}{XL_2} + \frac{XL}{XL_2} + 1 + \frac{XL_3}{XL_2} + \frac{XL_4}{XL_2} \right] \\
C_t =& XL_2 \left[ \frac{1}{k_1k_2L^2} + \frac{1}{k_2L} + 1 + k_3L + k_3k_4L^2 \right] \\
\alpha_2 = \frac{XL_2}{C_t} =&\frac{k_1k_2L^2}{1 + k_1L + k_1k_2L^2 + k_1k_2k_3L^3 + k_1k_2k_3k_4L^4}
\end{align}
$$
This operation can be generalized for each specie, giving the following formula:
$$
\alpha_i = \frac{M_i(L)}{P(L)} = \frac{L^i\prod\limits_{j=0}^{i}k_i}{\sum\limits_{i=0}^n L^i\prod\limits_{j=0}^{i}k_i}
$$
Where each ratio $\alpha_i \in [0,1]$ and $\sum\limits_{i=0}^n\alpha_i = 1$.
Notice all monomials $M_i(L) \geq 0$ because $L_i \geq 0$ and $k_i > 0$ which implies $P(L) \geq 1$. The Descarte's rule of sign also ensure $P(L)$ has no positive real root (they are only negative or complex). Ensuring each rational function $a_i$ well behaves over the concentration range.
The key point is the powerfulness of the technique that allows us to write the function wrt only constants $k_i$ and free ligand concentration $L$.
At this stage we can draw the first diagram:
If we desire the second, it sufficient to compute the total ligand concentration:
$$
L_t = \sum\limits_{i=0}^{n} i XL_i
$$
Which allow us to draw the second diagram:
Both being useful to better visualize the complexation process with respect to experimental setup.
Additionally, determining specie partitions is a useful operation and can be rescaled simply by adjusting curves wrt $C_t$. It actually rationalize the complexation process.
Why?
I recently answered a question on Stack Overflow, and I wanted to share the knowledge with the Chemistry Stack community. If you are looking for code rendering such a diagrams, see the Python implementation.