Application note

Predicting Ionization State at pH 7.4

pKa Solvent ADMET

Whether a drug is absorbed at all comes down to a single, deceptively simple question: charged or neutral? At blood pH 7.4 most acidic and basic drugs are partly ionized, and that fraction decides everything downstream — solubility, permeability, where in the gut it crosses, how much reaches the bloodstream. This post walks through how Hilbeon computes an absolute pKa from first principles, validates it against the lab, and turns it into an ionization fraction for aspirin.

Aspirin in 3D — drag to rotate. The carboxylic acid on the right is the proton this whole story is about.

Why ionization decides absorption

A drug has to do two contradictory things. It has to dissolve — you cannot absorb what you cannot get into solution — and it has to cross a fatty membrane to get from the gut lumen into the blood. The catch: the form that dissolves and the form that permeates are usually not the same molecule. The ionized (charged) fraction is the soluble one; the neutral fraction is the one that slips through a lipid bilayer. Ionization state is the valve that controls the balance, and for a weak acid that valve is set by one number: the pKa, read against the local pH.

That is why an absolute pKa is one of the highest-value quantities in early ADMET work. Get it roughly right for a series of analogues and you can rank which ones will be absorbed, which will be trapped as salts, and which need a prodrug or a formulation trick. The trouble is that pKa is genuinely hard to compute well: it is a small free-energy difference between two charged species in water, and the solvent does most of the work.

How Hilbeon computes an absolute pKa

Hilbeon uses the standard thermodynamic cycle. For a deprotonation HA → A⁻ + H⁺, the aqueous free-energy change is assembled from three legs:

\[ \Delta G_{\text{aq}} = \Delta G_{\text{gas}} + \Delta G_{\text{solv}}(\text{A}^-) + \Delta G_{\text{solv}}(\text{H}^+) - \Delta G_{\text{solv}}(\text{HA}) \]

The gas-phase leg is the electronic-structure deprotonation free energy of HA. The solvation legs come from Hilbeon's C-PCM continuum-solvent model in water, applied to the neutral acid and its conjugate base. A standard-state correction accounts for the 1 atm gas → 1 M solution reference change. The pKa then follows from \( \mathrm{p}K_a = \Delta G_{\text{aq}} / (2.303\,RT) \).

The hardest term in that cycle is the proton's solvation free energy, ΔGsolv(H⁺) — it is experimentally uncertain and dominates the absolute scale. Hilbeon sidesteps it the way the field does: by anchoring to a reference acid. Compute everything relative to acetic acid (experimental pKa 4.76), and the proton term and most systematic errors cancel between the two molecules. What survives is a relative pKa that is far more reliable than any single absolute value.

What "anchored" means in practice. The anchor acid is calibrated to be exact by construction (its predicted pKa is pinned to the experimental value), and every other acid is reported as a shift away from it. Errors that are common to all the molecules — the proton's solvation energy, basis-set incompleteness, the continuum model's offset — subtract out. This is the trustworthy mode: same-class predictions, anchored.

The receipts: Hilbeon pKa vs the lab

Here is the honest scorecard. The calculation is 6-31+G(d) — a basis with diffuse (“+”) functions, essential for the loosely-bound electrons of an anion — in C-PCM water with rigid-rotor/harmonic thermochemistry, anchored to acetic acid. Two carboxylic acids and one alcohol, chosen deliberately: the alcohol is where even this setup still strains, and that residual is worth seeing because it points at the next lever rather than the basis.

Acid Hilbeon pKa Experimental Error
Formic acid (carboxylic) 2.20 3.75 −1.55
Acetic acid (carboxylic, anchor) 4.76 4.76 anchor
Methanol (alcohol) 26.4 15.5 +10.9

Read the top two rows first. Formic acid lands within about a pKa unit and a half of experiment, and acetic acid is exact by anchoring. For carboxylic acids — the same chemical class as the anchor — the cycle is doing real work: it correctly orders formic as the stronger acid and puts it in the right neighbourhood. That is the regime you can trust for ranking analogues. The bigger news is under the hood: switching from a minimal basis to the diffuse 6-31+G(d) collapses the raw, un-anchored offset from roughly +94 to +4.9 pKa units — the gas-phase deprotonation energies are now physically meaningful, not a placeholder held up entirely by the anchor.

Honesty check — the methanol row. Methanol still comes out +10.9 too high, but the cause has moved. With diffuse functions in the basis, the alkoxide CH₃O⁻ is now described properly — the old “minimal-basis-on-an-anion” failure is gone (that alone pulled the error from +19 down to +11). What remains is solvation: a small localized anion like methoxide is stabilized in water largely by short-range, non-electrostatic effects (cavitation, first-shell hydrogen bonding) that a pure C-PCM continuum does not carry. The standard fix is a solvation model with those terms — SMD — which is the next lever on our engine roadmap. The rule still holds: trust anchored, same-class predictions (carboxylic-to-carboxylic here); treat a cross-class jump to an alkoxide as the place to reach for SMD. The absolute scale also carries a systematic ±1.5 pKa from the proton solvation term — another reason the relative, anchored reading is the one to use.

Running the carboxylic-acid set is a single command — Hilbeon builds each molecule, runs the C-PCM legs, and reports the anchored pKa:

python tools/experiments/pka.py --acids formic,acetic --anchor acetic --basis "6-31+G(d)"

Try it on your series

Point the same thermodynamic cycle at your own acids — rank them by ionization before anyone touches a titration.

From pKa to ionization fraction: aspirin at pH 7.4

Now apply it to the molecule from our aspirin portrait. Aspirin's carboxylic acid has a pKa of 3.49. To turn that into the fraction ionized at a given pH, use the Henderson–Hasselbalch relation, which for a weak acid reads:

\[ \mathrm{pH} = \mathrm{p}K_a + \log_{10}\!\frac{[\text{A}^-]}{[\text{HA}]} \]

Rearranging gives the ratio of charged to neutral directly:

\[ \frac{[\text{A}^-]}{[\text{HA}]} = 10^{\,\mathrm{pH} - \mathrm{p}K_a} = 10^{\,7.4 - 3.49} = 10^{\,3.91} \approx 8\,100 \]

At blood pH 7.4 the charged form outnumbers the neutral form by more than eight thousand to one. Converted to a fraction, that is 99.99% ionized — only about 0.012% neutral. The neutral, membrane-permeant form is vanishingly rare in the bloodstream, which is exactly why aspirin is absorbed mainly in the acidic stomach: drop the pH well below the pKa and the equilibrium swings back toward the un-ionized acid that can cross the gastric lining. That single ratio is the solubility-versus-permeability gate in one number.

Scope of these numbers. Level of theory for the pKa cycle: RHF/6-31+G(d) (diffuse), C-PCM(water), RRHO thermochemistry, anchored to acetic acid. The aspirin geometries used elsewhere in this portrait are RDKit ETKDG + MMFF conformers with single-point Hilbeon electronic structure — they are not QM-reoptimized geometries. The pKa of 3.49 used in the Henderson–Hasselbalch step is the measured literature value for aspirin; the Hilbeon cycle is what we validate above on the formic/acetic/methanol set. Treat absolute pKa as a calibrated ranking tool, not a replacement for a measured value when a single number is decision-critical.

The takeaway

Ionization state is the first gate every oral drug has to pass, and it is set by a free-energy difference that a continuum-solvent thermodynamic cycle can capture — provided you read it correctly. Anchored, same-class pKa predictions (carboxylic acid to carboxylic acid) land within about a pKa unit or so and rank analogues reliably; a cross-class jump to an alkoxide still runs ~11 units high, and that residual is a feature, not a bug — with diffuse functions in place it is no longer the basis but the continuum solvent, telling you exactly when to reach for an SMD-class model. With the pKa in hand, Henderson–Hasselbalch does the rest: aspirin is 99.99% ionized at blood pH, 0.012% neutral, and now you know why it is absorbed where it is. Point the same cycle at your own series and rank them before the assay.

Run your own acids

Start a guided pilot — every method, your GPU — and compute the ionization state of the compounds on your bench.

References