Docking scoring functions explained

What each family models, where it fails and when to combine them

18 min

Line drawing of celecoxib in a shaded binding pocket, surrounded by four small glyphs: weighted term bars, a Lennard-Jones well, a histogram of pair distances and a voxel grid with atom densities.

What is a scoring function in docking?

A scoring function is the formula a molecular docking program uses to turn one pose of a ligand in a protein pocket into a number. The program uses that number twice: to choose the best pose of each compound, and to rank compounds against each other.

The number can look convincing on a wrong answer. Docking the bromodomain inhibitor JQ1 into BRD4 with GNINA gives a top pose scored at −8.957 kcal/mol, a respectable value, yet that pose sits about 5 Å from the crystal ligand, turned around in the pocket. Only one of GNINA's three scores, the one trained to judge poses, flagged it.

Scoring functions fall into four families: force-field, empirical, knowledge-based and machine-learning. Each one sees a different part of binding and misses a different part, and none predicts affinity well. The useful question is which failure you can live with for your task, whether that is choosing a pose, picking compounds from a library or comparing close analogues. Combining families through consensus scoring helps only when their errors differ.

Three jobs, three levels of success

A scoring function is asked to do three things that sound alike: put the correct pose first, separate binders from non-binders, and order binders by strength. Programs are much better at the first than the last. In CASF-2016, a benchmark of 285 complexes, AutoDock Vina put a pose within 2 Å of the crystal structure first for 90.2% of complexes when the native pose was among the candidates, the best of the functions tested.[2]

The same function correlated with measured affinity at only R = 0.604, with a standard deviation of 1.73 pK units.[2] Warren and colleagues saw the same split when they tested 10 docking programs and 37 scoring functions on eight proteins. The programs often generated a pose close to the crystal structure, but the scoring functions were worse at picking it out, no program did well on every target, and none made a useful prediction of affinity.[3]

That gap shapes everything below. A family can be good at pose selection and poor at affinity, so a score that ranks poses well says little about whether the ligand binds. A docking score is not a binding affinity, even when it is printed in kcal/mol.

FamilyWhat it modelsDerived fromExamplesMain weakness
Force fieldVan der Waals and electrostatic interaction energiesPhysics, with weights added laterDOCK grid score, AutoDock4An energy is not a free energy: solvent and entropy are missing or crudely added
EmpiricalWeighted counts of contacts, hydrogen bonds, clashes and rotatable bondsRegression on measured affinitiesAutoDock Vina, ChemScore, GlideScore, ChemPLPRewards size, and inherits the bias of its training complexes
Knowledge-basedHow often atom pairs occur at each distance in known complexesStatistics of crystal structuresPMF, DrugScoreOnly as good as the structures behind the statistics
Machine learningWhatever the model learns from many complexesStructures and measured valuesGNINA, RF-ScoreWeak on targets unlike the training set
Table 1. The four families of scoring function at a glance. Many programs mix families: GlideScore combines empirical and force-field terms, and Vina's authors describe their function as combining knowledge-based and empirical features.[1][8]

Force-field scoring

The oldest idea is to score a pose as a molecular mechanics energy. The DOCK program of Meng, Shoichet and Kuntz precalculated the receptor's van der Waals and electrostatic terms on a three-dimensional grid, so that each pose could be scored by looking up grid values.[4] The function sees the physics of contact: a ligand atom is rewarded for sitting at a good van der Waals distance and for pairing opposite charges, and punished for overlap.

What it does not see is the cost of binding. The ligand has to shed the water around it and give up most of its freedom to move, and an interaction energy counts neither, so its values can run far more negative than any measured binding free energy. AutoDock4 is the best-known fix. Its force field was calibrated on 188 complexes of known binding energy and adds a charge-based desolvation term, which makes it a semiempirical hybrid, not a bare energy.[5][6] AutoDock-GPU runs the same function on a GPU.

Trott and Olson, who wrote Vina, argue that the physics-based look of such terms can mislead. Terms like the 6-12 van der Waals potential and Coulomb energy need heavy empirical weighting to account for the gap between energies and free energies, and so "superficially physics-based" functions do not necessarily beat the alternatives.[1]

Pure force-field scoring is now rare inside docking. The same terms live on after it, in end-point methods such as MM/PBSA and MM/GBSA, which add solvation explicitly.

Empirical scoring

An empirical function is a weighted sum of a few interpretable terms, with the weights fitted by regression so that the sum reproduces measured affinities of crystal complexes. ChemScore, one of the first, was built to estimate affinity fast enough for docking.[7] GlideScore combines empirical and force-field terms.[8] ChemPLP, from the PLANTS program, placed up to 87% of the Astex diverse set within 2 Å of the crystal pose.[9]

Vina is the version most readers meet. It sums five distance-dependent terms over ligand and receptor atom pairs and divides by a rotatable-bond factor, with weights tuned on the PDBbind set.[1] Because the weights were fitted to affinities, the output comes out in kcal/mol. Other empirical functions, such as GOLD's fitness functions, report dimensionless values.

The fit explains both the strength and the weakness. A function with a few parameters is hard to overfit and runs in milliseconds, which is why empirical functions dominate large screens. But it counts contacts, so a ligand with more atoms in contact scores better whether or not it binds better, and the weights carry whatever bias the training complexes had. Vina's standard error against measured free energies was 2.85 kcal/mol on 190 complexes, and about 2.4 kcal/mol (1.73 pK) on CASF-2016.[1][2] That is a factor of more than 50 in Kd.

Variants share a skeleton. Vinardo is built on Vina with different terms and weights, and smina is a fork of Vina that accepts custom terms.[20][21] Running all three on one pose repeats one set of assumptions three times, which matters for consensus scoring below.

Knowledge-based scoring

A knowledge-based function takes its parameters from structures, not from affinities. Take thousands of protein-ligand complexes, count how often each ligand atom type sits at each distance from each protein atom type, and convert the frequencies into potentials. Pairs that appear more often than chance become favorable.

Muegge and Martin called theirs a potential of mean force, and it needed no measured affinities to build.[10] DrugScore turns pair preferences from known complexes into potentials and adds a term that depends on solvent-accessible surface.[11]

The appeal is that solvation and entropy come along for free. They shaped the real complexes that were counted, so the statistics carry them implicitly, as Muegge and Martin put it. Their potential predicted affinities for 77 complexes with a standard deviation of 1.8 log Ki units and an R² of 0.61, and did better on 16 serine protease complexes, at 1.0 log unit and R² 0.86.[10] DrugScore, rescoring FlexX poses on two test sets of 91 and 68 complexes, ranked a pose within 2 Å first in three quarters of cases.[11]

The weaknesses sit in the inputs. Both papers call the choice of reference state, the "no interaction" baseline that frequencies are compared against, essential for performance.[10][11] And the function can only reflect the structures that were counted, so a pocket type or ligand chemistry that is rare in the Protein Data Bank has thin statistics behind it. Pure knowledge-based functions are less common than blends; Vina's authors describe their function as combining the advantages of knowledge-based and empirical scoring.[1]

Machine-learning scoring

A machine-learning function drops the assumed form. Instead of choosing terms and fitting weights, it takes a description of the complex and learns the mapping to a pose label or an affinity. RF-Score used a random forest to capture binding effects that are hard to write down, and its authors reported that its accuracy improved with the size of the training set.[12] Convolutional neural networks went further and read the complex as a three-dimensional grid of atom densities, trained to separate correct from incorrect poses and binders from non-binders.[13]

The payoff shows up in pose selection. When GNINA rescored Vina's poses with a CNN ensemble, the share of targets whose top pose was within 2 Å rose from 58% to 73% in redocking and from 27% to 37% in cross-docking.[14] GNINA reports that judgment as a CNN pose score between 0 and 1, alongside a predicted affinity.

The limit is generalization. For the affinity output, GNINA's best ensemble had a root-mean-square error of 1.42 pK units on clustered CrossDocked2020 data, and Pearson R fell from 0.78 to 0.56 on splits that kept similar proteins out of the test set.[15]

Volkov and colleagues found that simple models inferring a test affinity from the closest ligands or proteins in the training set already performed well, and concluded that memorization largely dominates true learning.[16] A learned score deserves more trust on a target that resembles its training data and less on one that does not.

DiffDock and Boltz-2 extend the idea from scoring to generation. They propose poses or whole complexes themselves, and Boltz-2 adds an affinity prediction. Those outputs are on their own scales and cannot be mixed with kcal/mol values without calibration.

Consensus scoring

Consensus scoring runs several scoring functions on the same poses and combines the answers, by averaging scores, averaging ranks or keeping only compounds that every function places near the top. Charifson and colleagues tested an intersection-based consensus with two docking methods and thirteen scoring functions on p38 MAP kinase, inosine monophosphate dehydrogenase and HIV protease. Combining functions sharply cut the false positives of any single function and raised hit rates.[17]

Why it works is mostly statistics. Wang and Wang built an idealized library of 5000 compounds, gave every scoring function a random, normally distributed error, and showed that consensus beats a single function because the mean of repeated samples lands closer to the true value. Three or four functions were enough, and ranking by averaged score or rank worked better than ranking by votes.[18]

The catch is that the experiment gave each function an independent error, and real functions are not independent. Vina, Vinardo and smina share a form and reward the same contacts. Many are fitted to overlapping sets of PDB complexes, and most dock into a rigid receptor. When errors are shared, averaging cancels only the part that differs.

We simulated how much that costs. Figure 1 starts with one function that correlates with true affinity at R = 0.604, the Vina value in CASF-2016, and averages up to eight equally good functions. With independent errors, four functions reach 0.835. With an error correlation of 0.6 between functions, four reach only 0.671, and the curve flattens toward a ceiling of 0.699 however many are added. At 0.9, a fourth function adds almost nothing.

Figure 1. Consensus helps in proportion to how different the errors are. Idealized simulation, not a measurement. 20,000 compounds; every function scores true affinity plus Gaussian error, all functions are equally good, and a single function has R = 0.604 (Vina in CASF-2016). Every pair of functions has the same error correlation ρ. Lines show the closed form R = 1 / sqrt(1 + s² (ρ + (1 − ρ) / n)), which a Monte Carlo run agrees with to within 0.004. Source: our simulation, script in the data folder; design after Wang and Wang (2001). Reuse under CC BY 4.0.

The practical rule follows from the ceiling: combine functions from different families, whose blind spots differ, and do not add another variant of a function you already have. An empirical score, a learned pose score and a physics-based rescoring disagree for different reasons, so their agreement carries information. Three Vina-family scores that agree have mostly shown you the same thing three times.

Consensus applies to poses as well as to scores. Houston and Walkinshaw found that single programs reproduced the crystal pose in 55% of cases for AutoDock, 58% for DOCK and 64% for Vina, and that using more than one program raised the rate at which correct poses were identified to 82% or more.[19] The consensus docking use case sets out how to define agreement between poses.

Consensus has a second limit that no averaging fixes: it can only rank what the search produced. If no member found the right pose, agreement only makes a wrong pose look more certain.

When scoring families disagree: JQ1 in BRD4

The public GNINA example for JQ1 and the BRD4 bromodomain puts three families' outputs side by side on one pose (Figure 2). Pose 1 has an empirical score of −8.957 kcal/mol and a predicted affinity of 6.306 pK, a nominal Kd of about 500 nM, and a CNN pose score of 0.469. Two of those three numbers look encouraging.

Figure 2. One pose, three scoring outputs. The public GNINA example for JQ1 in BRD4 bromodomain 1 (PDB 3MXF) lists each pose's CNN score and shows the selected pose's CNN affinity (a pK, 6.306) and empirical score (a Vina-style value, −8.957 kcal/mol). The CNN score of 0.469 is the learned model's doubt about the pose itself.

The doubt was justified. We measured all eight poses of this run against the crystal ligand, and every one sat 4.7 to 5.3 Å from it. The empirical score and the predicted affinity described a binding mode the search had not found, while the pose score, the only output trained to ask whether the pose is right, stayed below 0.53 throughout.

Average the three outputs and you get a confident answer about a wrong pose. Read them as answers to three different questions and the disagreement tells you where to look. Settle the pose first: PoseBusters checks its geometry, PLIP lists the contacts it makes, and the RMSD Calculator measures it against a reference ligand where one exists.

Where each family fails

Each family fails where its model of binding stops, and each failure has a cheap check (Table 2).

FamilyWhat it cannot seeSign of troubleCheck
Force fieldEntropy and solvent, unless added by handScores far more negative than measured valuesCompare against known ligands; rescore with solvation
EmpiricalAnything outside its few terms; ligand size is a free rewardThe largest compounds top the listDivide by heavy atoms; compare with a redocked native ligand
Knowledge-basedChemistry rare in the structures it countedOdd scores for unusual scaffolds or pocketsTest on known actives and decoys of your target
Machine learningTargets and chemotypes unlike its training dataLow pose scores on every compound; confident wrong posesCheck similarity to training targets; repeat with a different model
ConsensusPoses no member produced; errors the members shareMembers that agree because they are relatedCombine different families; check the poses
Table 2. What each family cannot see, and how to catch it.

Choosing and combining scoring functions

Start from the question, not the function. Table 3 pairs four common questions with a first choice, an addition and a check.

QuestionStart withAddThen check
Is this the binding mode?A learned pose score, such as GNINA's CNN scoreAn empirical score and a second program's poseGeometry, contacts and RMSD to a reference ligand
Which compounds from a large library to keep?An empirical function, for speedCNN rescoring of the top fraction; average ranks across familiesKnown actives and decoys docked with the same protocol
Which of a few close analogues binds best?One function for all, scores per heavy atomEnd-point energies, then free energy perturbationMeasure the top few
What is the Kd?None of the aboveFree energy perturbation, or a predicted affinity as a rough guideAn assay
Table 3. Choosing scoring functions by question.

Four habits cover most of the table. Settle the pose before reading any affinity. Combine functions from different families, and check that a candidate's agreement is not just shared bias. Use one protocol for every compound in a comparison, since scores from different docking programs or settings are not on the same scale. And set cutoffs from your own target, using the redocked native ligand or known actives against decoys.

Affinity is the one job where escalation beats averaging. Free energy perturbation reached a pairwise RMSE of 1.25 kcal/mol across 1,237 ligands, against 2 to 3 kcal/mol for docking scores.[22] It costs orders of magnitude more compute per ligand, so it is reserved for the few close analogues that survive docking and rescoring.

Docking scoring tools on ProteinIQ

ProteinIQ runs functions from every family except knowledge-based scoring, plus the checks that settle a pose before its score is trusted (Table 4). A typical structure-based virtual screening run docks with an empirical function, rescores the top fraction with a learned model, checks the surviving poses and only then spends compute on end-point energies.

TaskTool
Docking with the Vina, Vinardo or AutoDock4 scoring functionAutoDock Vina
Force-field docking with the AutoDock4 function on a GPUAutoDock-GPU
Vina-family docking with custom terms and minimizationsmina
Empirical docking with CNN pose and affinity rescoringGNINA
Learned pose generation with its own confidence scoreDiffDock
Co-folded complexes with a predicted affinityBoltz-2
Check that a pose is physically plausiblePoseBusters
List the interactions in a docked complexPLIP
Measure pose distance from a reference ligandRMSD Calculator
End-point binding energies from simulation snapshotsgmx_MMPBSA
Table 4. Scoring, rescoring and checking tools on ProteinIQ, by family.

Frequently asked questions

What is a scoring function in molecular docking?

It is the function a docking program uses to estimate how favorable a pose is. The program uses it to choose the best pose for each compound and to rank compounds. Its output is a score, not a measured affinity, and its units differ between programs.[1]

What are the types of scoring functions?

Four families are in common use: force-field, empirical, knowledge-based and machine-learning functions. They differ in what they model and what they are derived from. Many programs blend families, so the labels describe ingredients more than boxes.[1][8]

What is consensus scoring?

Consensus scoring combines the results of several scoring functions on the same poses, by averaging scores, averaging ranks or keeping only compounds that all functions rank highly. It can cut false positives, but its benefit depends on the functions making different errors.[17][18]

Does consensus scoring work?

It does when the functions' errors are partly independent. In studies on three enzymes it raised hit rates over single functions, and in an idealized experiment three or four functions were enough.[17][18] If the functions share biases, as variants of one function do, the gain is small.

Which scoring function is the most accurate?

None is best everywhere. Vina chose a near-native pose first for 90.2% of CASF-2016 complexes but correlated with affinity at only R = 0.604, and a broader assessment found that no program did well on every target.[2][3] The best function depends on the target and on whether you need poses or ranks.

Is machine-learning scoring better than Vina?

For choosing among poses, GNINA's CNN rescoring raised top-pose success from 58% to 73% in redocking.[14] For affinity, accuracy falls on targets unlike the training data, and some of the apparent skill comes from memorized neighbors.[15][16] Use it as a second opinion, not a replacement.