It is very important to note that pKb = 14 - pKa. But if a predictor gives us
a doinor pKa, we just accept it as a pKa.
For hydrogen donor sites, a hydrogen is present in the molecule that can be
donated to the solution if the concentration of hydrogens gets low enough.
This causes the molecule to become more negatively charged. This is an acid.
For hydrogen acceptor suits a location exist in the molecule that can accept
an additional history if the concentration of hydrogens gets sufficiently
high. This causes the molecule to become more positively charged. This is a
base.
We make several assumptions about ionization in order to make our calculations.
First, we assume ionization is either due to either "donating" (losing) a
hydrogen ion (a positively charge proton) to the solution or by "accepting"
(gaining) a hydrogen ion from the solution. Generally, acids are hydrogen
donors
and bases are hydrogen acceptors. Second, pH is the negative log10
concentration
of hydrogen atoms. The lower the pH, the more hydrogen atoms. So, acids
donate
their hydrogen atoms as pH of the solution increases. Bases accept their
hydrogen
atoms as pH decreases. Third, each predicted pKa is a prediction that a
specific
location (or site) on molecule X can either donate or accept a hydrogen.
Fourth, the pKa
value indicates the pH at which half of the molecules of X have ionized at
the site, and half have not. The concentration of the two forms are equal.
Fifth, if there are N pKa's for molecule X, then there are N sites that can
ionize. Technically this means that there are 2^N different ionization states
for molecule X (where each site is or is not ionized). However, pKa
predictors
give the equlibrium only for pairs of ionization states. So, we only consider
N + 1 ionizations states for X -- the state immediately above and below each
pKa.
To understand the different charge states we annotate the nonionizable
backbone
of a molecule as "X". For each site on X that is capable of donating a
hydrogen
we add a "D" to the right of "X". For each site on X that has accepted a
hydrogen,
we add a "A" to the right of "X". We read the A's and D's from left to right,
with the one occuring at the lowest pH first. So a typical acid ionization
would be:
XD -> X- and a typical base ionization would be XA+ -> X. Where things get
complicated
is if there are multiple donor and acceptor states. In particular, it is
possible
for a compound to have a net zero charge, but be simultaneously positively
and
negatively charged. Such a state is called a Zwitter ion. For example:
XDAA++ -> XAA+ -> XA -> X-.
The state XA is technically neutral
because' X has donated one hydrogen, but also accepted one hydrogen. XA is a Zwitter
ion.
Each pKa gives the equlibrium ratio of two states pH - pKa = log10[X/XD] for
donation or pOH - pka = log10[X/XA] for accepting. pOH = 14 - pH. Separating the
logarithm into log10[X] - log10[XD] lets us see that Cn = Xn - Xn-1 where
Cn = pH -pKa for donor pKa's and Cn = 14 - pH - pKa for acceptor pKa's.
We can rewrite log10Xn = Sum_i=1:n Ci + log10X1. So we can calculate each Xn
by summing all the ratios between Xn and the lowest state (X1).
Then, by requiring that all Xi sum to 1, we have:
1 = Sum_i=1:N 10^Xi = Sum_i=1:N 10^(Sum_j=1:i (Cj + log10X1)) = X1 * Sum_i=1:N 10^(Sum_j=1:i Cj)
so that X1 = 1 / Sum_i=1:N 10^(Sum_j=1:i Cj)
The sum im the denominator is the ratio from X1 to each state (including X1).
We use a table called "charge_matrix" to keep track of all N + 1 ionization
states and the ratio of each state to the next.