Molecular docking vs molecular dynamics

What each method answers, and what a stable pose does not prove

13 min

Line drawing of a C-shaped protein pocket on a construction grid, holding one docked ligand filled in teal at its centre and five dashed outlines of the same ligand at other positions along a dotted path.

Docking vs molecular dynamics

Molecular docking predicts where a small molecule sits in a protein and ranks it against other molecules. Molecular dynamics (MD) simulates how the atoms of a complex move over time. Docking answers "where, and roughly how well" for thousands of compounds at minutes each. MD answers "does it stay, and what moves" for a handful of complexes at hours to days each.

The two are often pitched as one pipeline: dock, then run MD to confirm. The evidence for that is thinner than it sounds.

Guterres and Im ran 100 ns simulations from the top AutoDock Vina pose of 560 ligands, and MD raised the ROC AUC for telling actives from decoys from 0.68 to 0.83.[1] Yet when they tried to repair docked poses that were wrong, poses more than 6 Å off never came back below 5 Å, and the paper states that 100 ns "is not enough to refine significantly incorrect binding poses".[1]

The same result appears from the other side. Liu and colleagues simulated 120 complexes, each with a crystal pose and two decoy poses. About 94% of the native poses stayed stable, but 56 to 62% of the decoys did too.[2] A pose that survives a simulation has passed a test that wrong poses also pass more than half the time.

So the useful question is not which method is better. Docking is a search with a cheap score on a frozen receptor. MD is a physical simulation that is expensive and short compared with real binding. Each fails where the other would help, and the sections below cover the cost, the blind spots, the evidence that MD fixes docking, and one ligand taken through both.

Run a molecular dynamics simulationOpenMM on a protein or protein-ligand complex, with a public 1 ns exampleOpen example

One ligand costs a thousand times more

Docking is fast because it makes two large simplifications: the receptor is rigid, and a pose is scored by a formula instead of by simulating the complex. Guterres and Im report that Vina docked one molecule in about 2 minutes on 4 CPUs. Their 100 ns simulations took 11.9 hours on one RTX 2080 Ti for the smallest system (23,310 atoms) and 26.6 hours for the largest (57,164 atoms).[1]

We converted that into the cost of their whole experiment. Each of the 560 ligands got three 100 ns runs, which is 1,680 runs and 168 µs of simulation, or about 20,000 to 45,000 GPU hours. Docking the same 560 ligands at 2 minutes each takes about 19 hours of wall time. The two ran on different hardware, so the ratio of roughly 1,000 to 2,400 shows the order of magnitude and is not a benchmark.

Figure 1. What the two methods return. Docking gives ranked poses in one receptor structure. MD gives frames of a complex through time. The pocket and ligand are schematic. Timings are from Guterres and Im (2020): about 2 minutes per Vina docking on 4 CPUs, and 11.9 to 26.6 hours per 100 ns on one GPU.

The gap decides where each method sits in a project. Lyu and colleagues docked 138 million molecules against the D4 dopamine receptor in about 1.2 days on 1,500 cores.[9] By our arithmetic that is about 1 core-second per molecule. A library of that size can only be docked. A shortlist of ten can be simulated, three replicas each, in a few days of GPU time, and that is the scale at which MD adds anything.

What docking cannot see

A docking run sees one receptor conformation. If the pocket has to change shape to hold the ligand, docking into the wrong conformation fails quietly. In the GNINA 1.0 benchmark the top Vina pose was within 2 Å of the crystal pose in 58% of redocking cases but only 27% of cross-docking cases, where the receptor came from a complex with a different ligand.[5] That drop is the price of a rigid receptor, and a redocking test hides it.

The score has its own limit. A docking score is not a binding energy, because it leaves out most of the entropy, the water that has to leave the pocket and the strain the protein pays. Scoring functions can rank poses reasonably and still rank affinities poorly, so a good docking score does not say that a ligand stays bound.

What MD cannot reach

An MD step is only a few femtoseconds, so a simulation takes millions to billions of steps. For a system of about 50,000 atoms, one GPU can currently simulate a microsecond in a few days, according to Hollingsworth and Dror.[10] At a 2 fs step a microsecond is 5 × 108 steps, by our arithmetic.

Throughput varies with hardware and settings: OpenMM's published DHFR benchmark (23,558 atoms, 4 fs steps with hydrogen mass repartitioning) reaches 1,336 ns/day on an A100, about seven times the roughly 200 ns/day implied by the 100 ns in 11.9 hours above.[13]

Binding is slower than that. Shan and colleagues simulated two kinase inhibitors finding Src from random positions in solution. Dasatinib bound in 1 of 4 simulations, which totalled 35 µs, and it needed 2.3 µs to do it. PP1 bound in 3 of 7 simulations totalling 115 µs.[8] The bound poses came within 2.0 Å of the crystal structures, so the method is accurate when it gets there. Most of the trajectories did not get there.

The slowest steps are slower still.

For imatinib on Abl, Agafonov and colleagues fitted a model with a binding step (kon = 1.3 µM−1 s−1, koff = 23 s−1) followed by a conformational step of 1.3 s−1, which is reversed only at (6 ± 2) × 10−4 s−1.[14] We calculated that the first encounter complex lasts about 40 ms and the relaxed complex about 28 minutes. Those are six to nine orders of magnitude beyond a microsecond.

Even for the binding pathway of imatinib, tens to hundreds of microseconds of simulation found long-lived intermediates and no downhill route, according to Paul and colleagues.[16]

The more productive pairing runs the other way.

Schames and colleagues docked an inhibitor to snapshots of a 2 ns HIV integrase simulation and found a trench next to the active site that opens only intermittently.[11]

Amaro and colleagues later screened against clustered snapshots, which cut the docking cost by 99%, and the best hit rose from fifteenth to first after the reordering. Two of eight compounds tested were inhibitory.[12] Docking into several frames from a trajectory is ensemble docking, and it fixes the rigid receptor with a short simulation instead of asking MD to find the ligand.

Does MD fix a docked pose?

The most direct test is to take docked poses, simulate them and see whether the simulation separates right from wrong. Guterres and Im used 56 DUD-E targets, each with 5 actives and 5 decoys, 560 ligands in all. Each ligand started from its top Vina pose and ran for 3 × 100 ns, and the score was the ligand's RMSD from its docked pose, averaged over the run.[1]

That measure turns out to be a filter for ligands more than for poses. A cutoff of 5.5 Å kept 79% of true positives and 24% of false positives, and the ROC AUC rose from 0.68 for Vina alone to 0.83.[1] Shorter runs did almost as well, with 0.807 at 10 ns and 0.840 at 50 ns (Figure 2). Ten nanoseconds costs a tenth of the GPU time of 100 ns.

Figure 2. MD rescoring improves on the Vina score, and longer runs add little. ROC AUC on 56 DUD-E targets with 5 actives and 5 decoys each, using the top Vina pose and the ligand RMSD from the docked pose averaged over the simulation. Source: Guterres and Im (2020). Reuse under CC BY 4.0.

Pose repair is a different test, and the result there is modest. On a separate cross-docking set of 33 ligands against 7 targets, 64% of docked poses were more than 2 Å from the crystal pose. After MD the average error fell by 0.85 Å, from 5.21 to 4.36 Å. Poses 2 to 5 Å off improved by 0.69 Å on average, and poses already under 2 Å moved by 0.08 Å in the wrong direction.[1]

The catch is that a ligand which drifts is informative and a ligand that stays is not. Liu and colleagues found that 38 to 44% of decoys could be excluded because they moved, while 56 to 62% stayed.[2] In their cross-docking follow-up on thrombin, HSP90α and CDK2, 95% of correct poses were retained when one stable run out of five was enough, and about 25 to 44% of the decoys were excluded. Requiring two or three stable runs excluded about 31 to 56%.[3]

MD can also rank poses by energy.

Hou and colleagues docked 98 complexes with 101 poses each and rescored them with MM/GBSA. The top pose was within 2 Å in 62.2% of complexes at an internal dielectric of 1 and 69.4% at 2, and in 84.7% when the best of three was allowed at dielectric 1.[4]

That beat seven of the docking scoring functions tested, but four others (PLP, F-Score, LigScore and DrugScore) did better. A short 60 to 300 ps simulation of the top three poses moved the correct pose to first in 9 of the 13 complexes where it had been in the top three but not first.[4] The guide to MM/GBSA and MM/PBSA covers what those energies mean.

Imatinib and Abl through both methods

Imatinib on Abl kinase is a case where the two methods meet their limits at once.

In our redocking test, AutoDock Vina put imatinib within 0.75 Å of the crystal pose in the 1IEP structure.[6] Docked into the dasatinib complex of Abl (PDB 2GQG), which captures an activated kinase, the top pose landed 10.03 Å away, none of the five poses came within 2 Å, and the best score was 3 kcal/mol weaker.[7] The redocking guide has the full setup and the other two structures.

The docking failure has a plain cause: the pocket in 2GQG is the wrong shape for imatinib.

Simulating that complex would not cure it quickly. Imatinib binds an inactive conformation of the kinase,[6] and the kinetics above put the slow conformational step of the complex at seconds to minutes. Shan and colleagues did watch the DFG flip of Abl in long simulations and found that protonation of the DFG aspartate controls it, but that took specialised simulations of the protein, not a short run of a docked pose.[15]

We did not simulate this system; the MD evidence here comes from those papers.

In practice the example points to the cheaper fix. Dock into several crystal structures of the target, including the conformation the ligand class is known to bind, and use the score gap as a warning, as the 3 kcal/mol deficit was here. Save simulation for the question docking cannot answer: whether the winning pose holds up when the protein moves.

Which method for which question

Table 1 turns the evidence into a starting point for each question. The last column matters most, because it names the check that catches each method's own failure.

QuestionStart withAddCheck
Which of a million compounds might bind?DockingRescoring with a second scoring functionEnrichment against known actives and decoys
Where does this ligand sit?Docking, ideally into several receptor structuresShort MD from the top posesRedocking and cross-docking; ligand RMSD in replicas
Is this pose stable?MD, three or more replicasContact analysis along the trajectoryRun a known wrong pose the same way
Does the pocket change shape?MD of the apo and holo proteinEnsemble docking into trajectory framesCompare with other crystal structures of the target
Which of two close analogues binds tighter?Free energy perturbationMM/GBSA as a cheaper screenError against measured affinities of the series
Table 1. Choosing between docking and molecular dynamics. The checks follow the failures described above.

Run the wrong pose through the same simulation as the right one. If both stay, stability tells you nothing about which is correct, and the decision rests on the docking evidence, crystal structures of related ligands and any mutagenesis data you have. For the last row, free energy perturbation is the rigorous option.

Docking and MD tools on ProteinIQ

Dock first, check the pose, then simulate the few complexes that matter. AutoDock Vina and GNINA dock, PoseBusters checks that a pose is physically plausible, and OpenMM and GROMACS simulate the complex. The molecular dynamics software comparison helps choose between engines.

  • AutoDock Vina: dock a ligand and rank poses
  • GNINA: dock with a neural-network pose score
  • PoseBusters: check that a pose is physically plausible
  • OpenMM and GROMACS: simulate a protein or protein-ligand complex
  • MD trajectory analysis: measure RMSD, contacts and other properties along a trajectory
  • gmx_MMPBSA: rescore frames with MM/GBSA or MM/PBSA
  • OpenFE: relative binding free energies for close analogues
Dock imatinib into c-AblA public AutoDock Vina job to compare against a simulationOpen example

Frequently asked questions

Is molecular dynamics better than docking?

Neither is better; they answer different questions. Docking places and ranks ligands in minutes on a rigid receptor, and MD follows a complex through time at about 12 to 27 hours per 100 ns on one GPU.[1] MD rescoring raised the ROC AUC for actives versus decoys from 0.68 to 0.83 in one 560-ligand test, but it did not repair poses more than 6 Å wrong.[1]

Should I run MD after docking?

Run it on a shortlist, in replicas, and run a known wrong pose alongside. Stability alone is weak evidence, since 56 to 62% of decoy poses stayed stable in one study of 120 complexes.[2] A ligand that leaves the pocket is the useful result, because it flags a pose that was probably wrong.

How long should the simulation be?

In Guterres and Im's test, 10 ns reached a ROC AUC of 0.807 against 0.83 for 100 ns, so short runs are enough for screening poses.[1] Longer runs matter for questions about the protein, such as whether a pocket opens, and not for confirming a docked pose.

Can MD replace docking for virtual screening?

Not at library scale. Docking 560 ligands took about 19 hours of wall time, while three 100 ns simulations of each took about 20,000 to 45,000 GPU hours by our conversion of the paper's timings.[1] MD fits a shortlist.

What is the difference between docking and MM/GBSA?

Docking scores one pose with a fast empirical or knowledge-based function. MM/GBSA rescored poses with a force field and an implicit solvent model, and put the top pose within 2 Å in 62.2 to 69.4% of 98 complexes, better than seven of the docking scoring functions tested but not the best of them.[4]