pKa and property prediction, when ionisation breaks a model
pKa decides which form of a molecule was measured. A model fitted on neutral molecules describes that form only, and ionisation moves logP by whole log units.
Updated November 28, 2026
pKa is the pH at which an ionisable group is half protonated, and it decides which form of a molecule an experiment actually measured. A property model fitted on neutral structures describes the neutral form. When the measurement was made on a mostly ionised species, the model and the data describe different things, and no amount of fitting closes that gap.
Henderson-Hasselbalch and the fraction ionised
For an acid HA, the Henderson-Hasselbalch equation gives pH = pKa + log([A⁻] / [HA]). Rearranged, the fraction of the acid that is ionised at a given pH is 1 / (1 + 10^(pKa − pH)). For a base the exponent flips to pH − pKa, where pKa refers to the conjugate acid.
Take a carboxylic acid with pKa 4.5 in a pH 7.4 buffer. The exponent is 4.5 − 7.4 = −2.9, so 10^(−2.9) = 0.00126, and the fraction ionised is 1 / 1.00126 = 0.9987. Fewer than two molecules in a thousand are in the neutral form. Any property measured in that buffer is a property of the anion with a small neutral admixture, whatever structure is drawn on the datasheet.
What ionisation does to each property
Partitioning. Ions partition poorly into octanol, so the apparent distribution coefficient falls, logD = logP − log(1 + 10^(pH − pKa)) for an acid. For the pKa 4.5 acid at pH 7.4 the correction is log 795 = 2.90, so logD sits 2.9 units below logP. The guide on logP versus logD as QSPR targets explains what a dataset mixing the two does to a fit.
Solubility. The ionised form is far more soluble, so total solubility rises by the same 2.9 log units until the salt reaches its own limit. The aqueous solubility primer treats intrinsic and apparent solubility. A dataset that records the apparent value at an unstated pH has a hidden variable that correlates with the presence of acidic and basic groups, and a model will learn that correlation as if it were chemistry.
Solvation free energy. Ions have hydration free energies many times larger in magnitude than neutral molecules, and they depend on a different standard-state convention. Solvation databases list ionic solutes separately for that reason, and a kernel fitted on neutral molecules should not be applied to them.
Melting point. A salt and its free acid or base are different solids with different lattices, so a dataset entry must say which one melted.
What ionisation does to the descriptors
The nine descriptors that mfsig computes come from one DFT calculation on the molecule as given in the SMILES, in a continuum of dielectric constant 80. Draw the neutral form and the descriptors describe the neutral form. Draw the anion and three things change at once. The reaction-field energy grows by an order of magnitude, because the continuum stabilises a net charge strongly. The surface charge distribution shifts, so the σ moments move. And the dipole moment becomes origin-dependent, since the dipole of a charged species is not a physical observable without a reference point, which the mfsig guide on the dipole moment in solution explains. The guide on the dipole moment as a descriptor covers the consequences for a fit.
A kernel fitted on neutral molecules therefore occupies a descriptor region that a charged input leaves. The guide on the applicability domain for short equations explains how to recognise when an input has left it.
Three ways to keep ionisation from breaking a model
- Model the intrinsic property and correct afterwards. Fit on neutral-form values, then apply the Henderson-Hasselbalch correction with a measured or predicted pKa. The error of the pKa enters the correction one to one.
- Model the apparent property at a fixed pH and include ionisation explicitly. A logD 7.4 model with a pKa or a fraction-ionised input learns a clean relation. Without that input it learns an average over acids, bases and neutrals.
- Filter. Keep only molecules that are at least 90 percent neutral at the experimental pH, and say so in the report.
def fraction_ionised(pka, ph, acid=True):
expo = (pka - ph) if acid else (ph - pka)
return 1.0 / (1.0 + 10 ** expo)
print(round(fraction_ionised(4.5, 7.4), 4)) # acid, 0.9987
print(round(fraction_ionised(9.0, 7.4, acid=False), 4)) # base, 0.9755Whichever route you take, write down the pH of every measurement and the species you believe was measured. A reviewer will ask, and a later analyst will need it.
Where this touches the MolBasis kernels
The logP kernels on the Sangster, Llinas and aqueous cosolvent sets target the neutral-species logP, and the solubility kernel on ESOL targets values compiled without a stated pH. Each kernel page states its held-out Pearson r and the number of molecules behind it, and the kernels page lists them all. None of the kernels takes a pKa input, so even if the coefficients were published, which they are not, a kernel would describe the neutral form only. A value at pH 7.4 would still need the correction above with a pKa from elsewhere.
Key points
- pKa fixes the fraction of a molecule that is ionised at a given pH, and an acid with pKa 4.5 is 99.9 percent ionised at pH 7.4.
- Ionisation lowers logD and raises apparent solubility by
log(1 + 10^(pH − pKa)), 2.9 units in that example. - Descriptors computed on a charged SMILES differ sharply from those of the neutral form, and the dipole becomes origin-dependent.
- Model the intrinsic property and correct, include ionisation explicitly, or filter to neutral molecules, and say which you did.
- MolBasis kernels describe neutral molecules and take no pKa input.
Questions people ask
- How much of an acid with pKa 4.5 is ionised at pH 7.4?
- The fraction ionised is 1 / (1 + 10^(pKa − pH)). With pKa 4.5 and pH 7.4 the exponent is −2.9, so 10^(−2.9) = 0.00126 and the fraction ionised is 0.9987. Fewer than two molecules in a thousand are in the neutral form.
- How does ionisation change logP and solubility?
- For an acid, logD = logP − log(1 + 10^(pH − pKa)) and the apparent solubility rises by the same amount until the salt reaches its own limit. For the pKa 4.5 acid at pH 7.4 the shift is 2.9 log units in each direction. A dataset that does not state the pH hides this variable.
- Can a QSPR model fitted on neutral molecules be applied to an ion?
- Not safely. Descriptors computed on a charged structure differ sharply from those of the neutral form, the dipole moment becomes origin-dependent, and the reaction-field energy grows by an order of magnitude. The ion sits outside the descriptor region the model was fitted in.
Further reading
In practice: Each property here has a kernel page that states the equation shown, its held-out result on the scaffold-blind split and the number of molecules it rests on. The guides explain the property; the kernel page carries the figures and their caveats.
See the kernels themselves
Every kernel is shown with its held-out result, the number of molecules it rests on and what it cannot be trusted for.