pKa and ionisation, why a drug's charge depends on where it is
A drug's pKa sets the fraction that is charged at each pH. Acids ionise above their pKa and bases below it, so the charge shifts between stomach, gut and blood.
pKa is the pH at which an ionisable group is half in its protonated form and half in its deprotonated form. The gap between a drug's pKa and the local pH sets how much of the drug carries a charge. Acids ionise as the pH rises above their pKa, and bases ionise as the pH falls below it. Since pH runs from about 1 to 3 in a fasted stomach to 7.4 in blood, one drug can be neutral in one compartment and charged in the next.
pKa in one equation
The Henderson-Hasselbalch equation links pH, pKa and the ratio of the two forms. For an acid HA it reads pH = pKa + log10([A-]/[HA]). For a base B it reads pH = pKa + log10([B]/[BH+]). The pKa of a base always refers to its protonated form. An amine with a pKa of 9.5 is one whose ammonium ion loses a proton at pH 9.5.
Each pH unit between the pKa and the pH changes the ratio of the two forms tenfold. That gives a rule of thumb worth memorising:
- At a pH equal to the pKa, 50 % is ionised.
- One unit past the pKa, about 91 % is ionised.
- Two units past, about 99 %.
- Three units past, about 99.9 %.
Past means above the pKa for an acid and below it for a base.
Typical pKa ranges for drug functional groups
- Carboxylic acids, about 4 to 5. They are anions at blood pH. Ibuprofen and atorvastatin belong here.
- Phenols, about 10 for phenol itself. They are mostly neutral at blood pH. Paracetamol's phenol has a pKa of about 9.5.
- Aliphatic amines, often 8 to 11 for the protonated form, lower when electron-withdrawing groups sit nearby. They are mostly cations at blood pH. Propranolol's secondary amine has a pKa of about 9.5.
- Pyridines, about 5 for pyridine itself. They are mostly neutral at blood pH.
- Amides, which are not ionised anywhere in the physiological range.
These ranges describe families, not specific molecules. Neighbouring groups can shift a pKa by several units. Caffeine, for example, stays essentially neutral across the whole physiological range despite its four nitrogens.
A worked example across stomach, gut and plasma
Take an acid with a pKa of 4.5, a fair stand-in for ibuprofen, and a base with a pKa of 9.5, close to propranolol. A few lines of numpy give the neutral percentage in three compartments.
import numpy as np
def percent_neutral(pka, ph, kind):
if kind == "acid":
return 100 / (1 + 10 ** (ph - pka))
return 100 / (1 + 10 ** (pka - ph))
ph = np.array([1.5, 6.5, 7.4]) # stomach, small intestine, plasma
print(np.round(percent_neutral(4.5, ph, "acid"), 2))
print(np.round(percent_neutral(9.5, ph, "base"), 2))
# [99.9 0.99 0.13]
# [0. 0.1 0.79]
The acid is almost fully neutral in the stomach and more than 99 % anionic in plasma. The base is a cation everywhere in this range. Its neutral fraction rises from essentially zero in the stomach to under 1 % in plasma. Both drugs are nonetheless absorbed well after oral dosing. The neutral fraction crosses the gut wall, the equilibrium refills it, and the very large surface of the small intestine makes up for the small fraction. That is why most drugs, acids included, are absorbed mainly in the small intestine. The guide to logP and logD turns the same fractions into an effective lipophilicity.
Ion trapping and where drugs accumulate
The neutral form equilibrates across a membrane while the charged form is held back. At equilibrium, a weak base therefore concentrates on the more acidic side, where more of it is protonated. Lysosomes, with an internal pH of about 4.5 to 5, accumulate lipophilic amines in this way. That partly explains why many basic drugs show large volumes of distribution. Acids show the reverse pattern. They tend to stay in plasma, where they also bind albumin, and often have small volumes of distribution.
Clinicians use the same principle. Making the urine alkaline speeds the excretion of salicylate after an aspirin overdose, because more of the acid is ionised and trapped in the urine.
Where pKa matters beyond absorption
- Solubility. The ionised form dissolves far better than the neutral one, which is why many drugs are sold as salts.
- Binding. A protonated amine can form a salt bridge, such as the one aminergic receptors make with a conserved aspartate.
- Docking and modelling. A ligand should be submitted in the protonation state it adopts at the binding site. The guide to ligand preparation for docking covers that choice. Check the state before you dock with AutoDock Vina in Advanced Modeling.
- Databases. Records often store one tautomer and one charge state, and the guide to tautomers and protonation in databases explains how to normalise them.
Molecules with several ionisable groups
Imatinib carries several basic nitrogens, each with its own pKa. Zwitterions carry an acid and a base at once. For such molecules, measured macroscopic pKa values describe the molecule as a whole losing protons in sequence. Microscopic values belong to individual sites and can differ from them. The distribution of charge states then needs a calculation over all microstates, not one equation.
Where to get a pKa
The core RDKit library has no pKa predictor. Measured values come from potentiometric or spectroscopic titration. Predicted values come from empirical rules, quantum chemistry or machine-learned models. Their errors matter most when the pKa lies near the pH you care about, so record the source with every value.
Key points
- pKa is the pH at which a group is half ionised, and for a base it refers to the protonated form.
- Each pH unit past the pKa changes the ratio of forms tenfold, so two units give about 99 % of one form.
- Carboxylic acids are anions and aliphatic amines are cations at blood pH, while phenols, pyridines and amides are mostly neutral.
- Ion trapping concentrates weak bases in acidic compartments such as lysosomes, which shapes distribution and excretion.
- Choose protonation states deliberately for logD, docking and database work, and record where each pKa came from.
Questions people ask
- What does pKa tell you about a drug?
- pKa is the pH at which an ionisable group is half protonated and half deprotonated. Comparing it with the pH of a compartment tells you which form dominates there. An acid is mostly ionised when the pH is above its pKa, and a base is mostly ionised when the pH is below its pKa.
- How do you calculate the fraction ionised at a given pH?
- For an acid, the ionised fraction equals 1 divided by 1 plus 10 raised to pKa minus pH. For a base, where pKa refers to the protonated form, the exponent is pH minus pKa. One pH unit past the pKa gives about 91 % ionised, and two units give about 99 %.
- Why are basic drugs often charged in the blood?
- Many basic drugs carry an aliphatic amine whose protonated form has a pKa well above 7.4. At plasma pH most of such a drug is therefore a cation. A small neutral fraction remains, and that fraction is what crosses membranes by passive diffusion.
- Does RDKit calculate pKa?
- The core RDKit library does not include a pKa predictor. Values come from measurement, by potentiometric or spectroscopic titration, or from dedicated prediction models. Once you have a pKa, a few lines of numpy turn it into charge fractions at any pH.
Further reading
- Wikipedia, Acid dissociation constant
- Wikipedia, Henderson-Hasselbalch equation
- Wikipedia, Partition coefficient
In practice: The ADMET dashboard computes the RDKit property profile and the Lipinski flags for any compound; the numbers in these guides are the ones it shows.