DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking

Predicting the binding structure of a small molecule ligand to a protein -- a task known as molecular docking -- is critical to drug design. Recent deep learning methods that treat docking as a regression problem have decreased runtime compared to traditional search-based methods but have yet to offer substantial improvements in accuracy. We instead frame molecular docking as a generative modeling problem and develop DiffDock, a diffusion generative model over the non-Euclidean manifold of ligand poses. To do so, we map this manifold to the product space of the degrees of freedom (translational, rotational, and torsional) involved in docking and develop an efficient diffusion process on this space. Empirically, DiffDock obtains a 38% top-1 success rate (RMSD<2A) on PDBBind, significantly outperforming the previous state-of-the-art of traditional docking (23%) and deep learning (20%) methods. Moreover, DiffDock has fast inference times and provides confidence estimates with high selective accuracy.


INTRODUCTION
The biological functions of proteins can be modulated by small molecule ligands (such as drugs) binding to them. Thus, a crucial task in computational drug design is molecular docking-predicting the position, orientation, and conformation of a ligand when bound to a target protein-from which the effect of the ligand (if any) might be inferred. Traditional approaches for docking [Trott & Olson, 2010;Halgren et al., 2004] rely on scoring-functions that estimate the correctness of a proposed structure, or pose, and an optimization algorithm that searches for the global maximum of the scoring function. However, since the search space is vast and the landscape of the scoring functions rugged, these methods tend to be too slow and inaccurate, especially for high-throughput workflows.
Recent works [Stärk et al., 2022;Lu et al., 2022] have developed deep learning models to predict the binding pose in one shot, treating docking as a regression problem. While these methods are much faster than traditional search-based methods, they have yet to demonstrate significant improvements in accuracy. We argue that this may be because the regression-based paradigm corresponds imperfectly with the objectives of molecular docking, which is reflected in the fact that standard accuracy metrics resemble the likelihood of the data under the predictive model rather than a regression loss. We thus frame molecular docking as a generative modeling problem-given a ligand and target protein structure, we learn a distribution over ligand poses.
We therefore develop DIFFDOCK, a diffusion generative model (DGM) over the space of ligand poses for molecular docking. We define a diffusion process over the degrees of freedom involved in docking: the position of the ligand relative to the protein (locating the binding pocket), its orientation in the pocket, and the torsion angles describing its conformation. DIFFDOCK samples poses by running the learned (reverse) diffusion process, which iteratively transforms an uninformed, noisy prior distribution over ligand poses into the learned model distribution (Figure 1). Intuitively, this process can be viewed as the progressive refinement of random poses via updates of their translations, rotations, and torsion angles.
While DGMs have been applied to other problems in molecular machine learning [Xu et al., 2021;Jing et al., 2022;Hoogeboom et al., 2022], existing approaches are ill-suited for molecular docking, where the space of ligand poses is an (m + 6)-dimensional submanifold M ⊂ R 3n , where n and m are, respectively, the number of atoms and torsion angles. To develop DIFFDOCK, we recognize that the docking degrees of freedom define M as the space of poses accessible via a set of allowed ligand pose transformations. We use this idea to map elements in M to the product space of the groups corresponding to those transformations, where a DGM can be developed and trained efficiently.
As applications of docking models often require only a fixed number of predictions and a confidence score over these, we train a confidence model to provide confidence estimates for the poses sampled from the DGM and to pick out the most likely sample. This two-step process can be viewed as an intermediate approach between brute-force search and one-shot prediction: we retain the ability to consider and compare multiple poses without incurring the difficulties of high-dimensional search.
Empirically, on the standard blind docking benchmark PDBBind, DIFFDOCK achieves 38% of top-1 predictions with ligand root mean square distance (RMSD) below 2Å, nearly doubling the performance of the previous state-of-the-art deep learning model (20%). DIFFDOCK significantly outperforms even state-of-the-art search-based methods (23%), while still being 3 to 12 times faster on GPU. Moreover, it provides an accurate confidence score of its predictions, obtaining 83% RMSD<2Å on its most confident third of the previously unseen complexes.
To summarize, the main contributions of this work are: 1. We frame the molecular docking task as a generative problem and highlight the issues with previous deep learning approaches.
2. We formulate a novel diffusion process over ligand poses corresponding to the degrees of freedom involved in molecular docking.
3. We achieve a new state-of-the-art 38% top-1 prediction with RMSD<2Å on PDBBind blind docking benchmark, considerably surpassing the previous best search-based (23%) and deep learning methods (20%).

BACKGROUND AND RELATED WORK
Molecular docking. The molecular docking task is usually divided between known-pocket and blind docking. Known-pocket docking algorithms receive as input the position on the protein where the molecule will bind (the binding pocket) and only have to find the correct orientation and conformation. Blind docking instead does not assume any prior knowledge about the binding pocket; in this work, we will focus on this general setting. Due to the relative rigidity of the protein in the majority of the cases, docking methods typically assume the knowledge of the bound protein structure, and we will follow this assumption [Pagadala et al., 2017]. Methods are normally evaluated by the percentage of hits, or approximately correct predictions, commonly considered to be those where the ligand RMSD error is below 2Å [Alhossary et al., 2015;Hassan et al., 2017;McNutt et al., 2021].
Search-based docking methods. Traditional docking methods [Trott & Olson, 2010;Halgren et al., 2004;Thomsen & Christensen, 2006] consist of a parameterized physics-based scoring function and a search algorithm. The scoring-function takes in 3D structures and returns an estimate of the quality/likelihood of the given pose, while the search stochastically modifies the ligand pose (position, orientation, and torsion angles) with the goal of finding the global optimum of the scoring function.
Recently, machine learning has been applied to parameterize the scoring-function [McNutt et al., 2021;Méndez-Lucio et al., 2021]. These search-based methods have offered relative improvements when docking to a known pocket but are typically very computationally expensive to run and must still grapple with the very large search space that characterizes blind docking.
Machine learning for blind docking. Recently, EquiBind [Stärk et al., 2022] has tried to tackle the blind docking task by directly predicting pocket keypoints on both ligand and protein and aligning them. TANKBind [Lu et al., 2022] improved over this by independently predicting a docking pose (in the form of an interatomic distance matrix) for each possible pocket and then ranking them. Although these one-shot or few-shot regression-based prediction methods are orders of magnitude faster, their performance has not yet reached that of traditional search-based methods.
Diffusion generative models. Let the data distribution be the initial distribution p 0 (x) of a continuous diffusion process described by dx = f (x, t) dt + g(t) dw, where w is the Wiener process. Diffusion generative models (DGMs) 1 model the score 2 ∇ x log p t (x) of the diffusing data distribution in order to generate data via the reverse diffusion Song et al., 2021]. In this work, we always take f (x, t) = 0. Several DGMs have been developed for molecular machine learning tasks, including molecule generation [Hoogeboom et al., 2022], conformer generation [Xu et al., 2021], and protein design [Trippe et al., 2022]. However, these approaches learn distributions over the full Euclidean space R 3n with 3 coordinates per atom, making them ill-suited for molecular docking where the degrees of freedom are much more restricted.

DOCKING AS GENERATIVE MODELING
Although EquiBind and other ML methods have provided strong runtime improvements by avoiding an expensive optimization process over ligand poses, their performance has not yet reached that of search-based methods. As our analysis below argues, this may be caused by the models' uncertainty and the optimization of an objective function that does not correspond to how molecular docking is used and evaluated in practice.
Molecular docking objective. Molecular docking plays a critical role in drug discovery because the prediction of the 3D structure of a bound protein-ligand complex enables further computational and human expert analyses on the strength and properties of the binding interaction. Therefore, a docked prediction is only useful if its deviation from the true structure does not significantly affect the output of such analyses. Concretely, a prediction is considered acceptable when the distance between the structures (measured in terms of ligand RMSD) is below some small tolerance on the order of the length scale of atomic interactions (a fewÅngström). Consequently, the standard evaluation metric used in the field has been the percentage of predictions with a ligand RMSD (to the crystal ligand pose) below some value .
However, the objective of maximizing the proportion of predictions with RMSD within some tolerance is not differentiable and cannot be used for training with stochastic gradient descent. Instead, maximizing the expected proportion of predictions with RMSD < corresponds to maximizing the likelihood of the true structure under the model's output distribution, in the limit as goes to 0. This observation motivates training a generative model to minimize an upper bound on the negative log-likelihood of the observed structures under the model's distribution. Thus, we view molecular docking as the problem of learning a distribution over ligand poses conditioned on the protein structure and develop a diffusion generative model over this space (Section 4).
Confidence model. With a trained diffusion model, it is possible to sample an arbitrary number of ligand poses from the posterior distribution according to the model. However, researchers are often interested in seeing only one or a small number of predicted poses and an associated confidence

TANKBind Crystal
EquiBind DiffDock samples DiffDock top-1 Figure 2: "DIFFDOCK top-1" refers to the sample with the highest confidence. "DIFFDOCK samples" to the other diffusion model samples. Left: Visual diagram of the advantage of generative models over regression models. Given uncertainty in the correct pose (represented by the orange distribution), regression models tend to predict the mean of the distribution, which may lie in a region of low density. Center: when there is a global symmetry in the protein (aleatoric uncertainty), EquiBind places the molecule in the center while DIFFDOCK is able to sample all the true poses. Right: even in the absence of strong aleatoric uncertainty, the epistemic uncertainty causes EquiBind's prediction to have steric clashes and TANKBind's to have many self-intersections. measure 3 for downstream analysis. Thus, we train a confidence model over the poses sampled by the diffusion model and rank them based on its confidence that they are within the error tolerance. The top-ranked ligand pose and the associated confidence are then taken as DIFFDOCK's top-1 prediction and confidence score.
Problem with regression-based methods. The difficulty with the development of deep learning models for molecular docking lies in the data inherent (aleatoric) uncertainty on the pose (multiple poses could be correct) and the complexity of the task compared with the limited model capacity and data available (epistemic uncertainty). Therefore, given the available co-variate information (only protein structure and ligand identity), any method will exhibit uncertainty about the correct binding pose among many viable alternatives. Any regression-style method that is forced to select a single configuration that minimizes the expected square error would learn to predict the (weighted) mean of such alternatives. In contrast, a generative model with the same co-variate information would instead aim to capture the distribution over the alternatives, populating all/most of the significant modes even if similarly unable to distinguish the correct target. This behavior, illustrated in Figure 2, causes the regression-based models to produce significantly more physically implausible poses than our method. In particular, we observe frequent steric clashes (e.g., 26% of EquiBind's predictions) and self-intersections in EquiBind's and TANKBind's predictions ( Figures 5 and 9). We found no intersections in DIFFDOCK's predictions. Visualizations and quantitative evidence of these phenomena are in Appendix E.1.

OVERVIEW
A ligand pose is an assignment of atomic positions in R 3 , so in principle, we can regard a pose x as an element in R 3n , where n is the number of atoms. However, this encompasses far more degrees of freedom than are relevant in molecular docking. In particular, bond lengths, angles, and small rings in the ligand are essentially rigid, such that the ligand flexibility lies almost entirely in the torsion angles at rotatable bonds. Traditional docking methods, as well as most ML ones, take as input a seed conformation c ∈ R 3n of the ligand in isolation and change only the relative position and the torsion degrees of freedom in the final bound conformation. 4 The space of ligand poses consistent with c is, therefore, an (m + 6)-dimensional submanifold M c ⊂ R 3n , where m is the number of rotatable bonds, and the six additional degrees of freedom come from rototranslations relative to the fixed protein. We follow this paradigm of taking as input a seed conformation c, and formulate molecular docking as learning a probability distribution p c (x | y) over the manifold M c , conditioned on a protein structure y.
DGMs on submanifolds have been formulated by De Bortoli et al. [2022] in terms of projecting a diffusion in ambient space onto the submanifold. However, the kernel p(x t | x 0 ) of such a diffusion is not available in closed form and must be sampled numerically with a geodesic random walk, making training very inefficient. We instead define a one-to-one mapping to another, "nicer" manifold where the diffusion kernel can be sampled directly and develop a DGM in that manifold.
To start, we restate the discussion in the last paragraph as follows: Any ligand pose consistent with a seed conformation can be reached by a combination of (1) ligand translations, (2) ligand rotations, and (3) changes to torsion angles.
This can be viewed as an informal definition of the manifold M c . Simultaneously, it suggests that given a continuous family of ligand pose transformations corresponding to the m + 6 degrees of freedom, a distribution on M c can be lifted to a distribution on the product space of the corresponding groups-which is itself a manifold. We will then show how to sample the diffusion kernel on this product space and train a DGM over it.

LIGAND POSE TRANSFORMATIONS
We associate translations of ligand position with the 3D translation group T(3), rigid rotations of the ligand with the 3D rotation group SO(3), and changes in torsion angles at each rotatable bond with a copy of the 2D rotation group SO(2). More formally, we define operations of each of these groups on a ligand pose c ∈ R 3n . The translation A tr : x i , corresponding to rotations around the (unweighted) center of mass of the ligand.
Many valid definitions of a change in torsion angles are possible, as the torsion angle around any bond (a i , b i ) can be updated by rotating the a i side, the b i side, or both. However, we can specify changes of torsion angles to be disentangled from rotations or translations. One way of doing so is to identify a central motif in the molecule, such as a ring, and change torsion angles in a way that keeps the motif fixed. However, this special treatment of the central motif introduces an arbitrary asymmetry into the problem and could be difficult for a score model to reason about. Thus, we instead define the operation of elements of SO(2) m such that it causes a minimal perturbation (in an RMSD sense) to the structure: 5 Definition. Let B k,θ k (x) ∈ R 3n be any valid torsion update by θ k around the kth rotatable bond (a k , b k ). We define A tor : RMSDAlign(x, x ) = arg min This means that we apply all the m torsion updates in any order and then perform a global RMSD alignment with the unmodified pose. The definition is motivated by ensuring that the infinitesimal effect of a torsion is orthogonal to any rototranslation, i.e., it induces no linear or angular momentum. These properties can be stated more formally as follows (proof in Appendix A): Proposition 1. Let x(t) := A tor (tθ, x) for some θ and where tθ = (tθ 1 , . . . tθ m ). Then the linear and angular momentum are zero: Now consider the product space 6 P = T 3 × SO(3) × SO(2) m and define A : P × R 3n → R 3n as A((r, R, θ), x) = A tr (r, A rot (R, A tor (θ, x))) These definitions collectively provide the sought-after product space corresponding to the docking degrees of freedom. Indeed, for a seed ligand conformation c, we can formally define the space of ligand poses M c = {A(g, c) | g ∈ P}. This corresponds precisely to the intuitive notion of the space of ligand poses that can be reached by rigid-body motion plus torsion angle flexibility.

DIFFUSION ON THE PRODUCT SPACE
We now proceed to show how the product space can be used to learn a DGM over ligand poses in M c . First, we need a theoretical result (proof in Appendix A): Proposition 2. For a given seed conformation c, the map A(·, c) : P → M c is a bijection.
which means that the inverse A −1 c : M c → P given by A(g, c) → g maps ligand poses x ∈ M c to points on the product space P. We are now ready to develop a diffusion process on P.
De Bortoli et al. [2022] established that the DGM framework transfers straightforwardly to Riemannian manifolds with the score and score model as elements of the tangent space and with the geodesic random walk as the reverse SDE solver. Further, the score model can be trained in the standard manner with denoising score matching [Song & Ermon, 2019]. Thus, to implement a diffusion model on P, it suffices to develop a method for sampling from and computing the score of the diffusion kernel on P. Furthermore, since P is a product manifold, the forward diffusion proceeds independently in each manifold [Rodolà et al., 2019], and the tangent space is a direct sum: . Thus, it suffices to sample from the diffusion kernel and regress against its score in each group independently.
In all three groups, we define the forward SDE as dx = dσ 2 (t)/dt dw where σ 2 = σ 2 tr , σ 2 rot , or σ 2 tor for T(3), SO(3), and SO(2) m respectively and where w is the corresponding Brownian motion. Since T(3) ∼ = R 3 , the translational case is trivial and involves sampling and computing the score of a standard Gaussian with variance σ 2 (t). The diffusion kernel on SO(3) is given by the IGSO(3) distribution [Nikolayev & Savyolov, 1970;Leach et al., 2022], which can be sampled in the axis-angle parameterization by sampling a unit vectorω ∈ so(3) uniformly 7 and random angle ω ∈ [0, π] according to (2l + 1) exp(−l(l + 1)σ 2 ) sin((l + 1/2)ω) sin(ω/2) Further, the score of the diffusion kernel is ∇ ln p t (R | R) = ( d dω log f (ω))ω ∈ T R SO(3), where R = R(ωω)R is the result of applying Euler vector ωω to R. The score computation and sampling can be accomplished efficiently by precomputing the truncated infinite series and interpolating the CDF of p(ω), respectively. Finally, the SO(2) m group is diffeomorphic to the torus T m , on which the diffusion kernel is a wrapped normal distribution with variance σ 2 (t). This can be sampled directly, and the score can be precomputed as a truncated infinite series [Jing et al., 2022].

TRAINING AND INFERENCE
Diffusion model. Although we have defined the diffusion kernel and score matching objectives on P, we nevertheless develop the training and inference procedures to operate on ligand poses in 3D coordinates directly. Providing the full 3D structure, rather than abstract elements of the product space, to the score model allows it to reason about physical interactions using SE(3) equivariant models, not be dependent on arbitrary definitions of torsion angles [Jing et al., 2022], and better generalize to unseen complexes.
The training and inference procedures technically depend on the choice of seed conformation c used to define the mapping between M c and the product space. However, providing a definite choice of c to the score model introduces an arbitrary inference-time parameter that may affect the final predicted distribution, which is undesirable. In other words, while c defines the manifold of ligand poses, the precise location of c within that manifold should not affect the predicted distribution. Thus, we develop approximate training and inference procedures that remove the dependence on the c; intuitively, these assume that updates to points in the product space P can be applied to ligand poses in M c directly, without referencing the origin conformer c. While these are only an approximation of the theoretically correct procedures, we find that they work well in practice. In Appendix B, we present the training and inference procedures in more detail and further discussion on this point.
Confidence model. In order to collect training data for the confidence model d(x, y), we run the trained diffusion model to obtain a set of candidate poses for every training example and generate labels by testing whether or not each pose has RMSD below 2Å. The confidence model is then trained with cross-entropy loss to correctly predict the binary label for each pose. During inference, the diffusion model is run to generate N poses in parallel, which are passed to the confidence model that ranks them based on its confidence that they have RMSD below 2Å.

MODEL ARCHITECTURE
We construct the score model s(x, y, t) and the confidence model d(x, y) to take as input the current ligand pose x and protein structure y in 3D space. The output of the confidence model is a single scalar that is SE(3)-invariant (with respect to joint rototranslations of x, y) as ligand pose distributions are defined relative to the protein structure, which can have arbitrary location and orientation. On the other hand, the output of the score model must be in the tangent (2) m corresponds to scores on SE(3)-invariant quantities (torsion angles). Thus, the score model must predict two SE(3)-equivariant vectors for the ligand as a whole and an SE(3)-invariant scalar at each of the m freely rotatable bonds.
The score model and confidence model have similar architectures based on SE(3)-equivariant convolutional networks over point clouds [Thomas et al., 2018;Geiger et al., 2020]. The fundamental difference between them is the scale at which they operate: while the score model only considers a coarse-grained representation of the protein with only its α-carbon atoms, the confidence model has access to the full atomic structure of the protein. This multiscale setup yields improved performance and a significant speed-up w.r.t. doing the whole process at the atomic scale. The architectural components are summarized below and detailed in Appendix C.
Structures are represented as heterogeneous geometric graphs formed by ligand atoms, protein residues, and protein atoms (the latter only for the confidence model). Residue nodes receive as initial features language model embeddings trained on protein sequences [Lin et al., 2022]. Nodes are sparsely connected based on distance cutoffs that depend on the types of nodes being linked and on the diffusion time. Intuitively, nodes are connected with the range of elements that they might be closely interacting with; this range may span widely at the start of the diffusion but is narrow at the end. Convolutional layers simultaneously operate with different sets of weights for different connection types (so 9 sets of weights for the confidence model and 4 for the score at every layer) and generate scalar and vector representations for each node.
The ligand atom representations after the final interaction layer are then used to produce the different outputs. To produce the two R 3 vectors representing the translational and rotational scores, we convolve the node representations with a tensor product filter placed at the center of mass. For the torsional score, we use a pseudotorque convolution to obtain a scalar at each rotatable bond of the ligand analogously to Jing et al. [2022], with the distinction that, since the score model operates on coarse-grained representations, the output is not a pseudoscalar (its parity is neither odd nor even). Finally, the confidence model's output is produced by mean-pooling the ligand atoms' scalar representations followed by a fully connected layer.

EXPERIMENTS
Experimental setup. We evaluate our method on the complexes from PDBBind [Liu et al., 2017], a large collection of protein-ligand structures collected from PDB [Berman et al., 2003], which was used with time-based splits to benchmark many previous works [Stärk et al., 2022;Volkov et al., 2022;Lu et al., 2022]. We compare DIFFDOCK with state-of-the-art search-based methods SMINA [Koes et al., 2013], QuickVina-W [Hassan et al., 2017], GLIDE [Halgren et al., 2004], and GNINA [McNutt et al., 2021] and the recent deep learning methods EquiBind and TANKBind presented above. Extensive details about the experimental setup, data, baselines, and implementation are in Appendix D.3 and all code is available at https://github.com/gcorso/DiffDock. The repository also contains videos of the reverse diffusion process (images of the same are in Figure 11).
As we are evaluating blind docking, the methods receive two inputs: the ligand with a predicted seed conformation (e.g., from RDKit) and the crystal structure of the protein. Since search-based methods work best when given a starting binding pocket to restrict the search space, we also test the combination of using an ML-based method, such as P2Rank [Krivák & Hoksza, 2018] (also used by TANKBind) or EquiBind to find an initial binding pocket, followed by a search-based method to predict the exact pose in the pocket.
To evaluate the generated complexes, we compute the heavy-atom RMSD (permutation symmetry corrected) between the predicted and the ground-truth ligand atoms when the protein structures are aligned. All methods except for EquiBind are able to generate multiple structures and rank them. We report the metrics for the highest ranked prediction as the top-1; top-5 refers to selecting the most accurate pose out of the 5 highest ranked predictions, which is a useful metric when multiple predictions are used for downstream tasks. Table 1: PDBBind blind docking. All methods receive a small molecule and are tasked to find its binding location, orientation, and conformation. Shown is the percentage of predictions with RMSD < 2Å and the median RMSD. The top half contains methods that directly find the pose; the bottom half those that use a pocket prediction method. The last two lines show our method's performance (with standard deviation). In parenthesis we specify the number of poses sampled from the generative model. * indicates that the method runs exclusively on CPU, "-" means not applicable; some cells are empty due to infrastructure constraints. For TANKBind, the runtimes for the top-1 and top-5 predictions are different. Further evaluation details are in Appendix D.3. Docking accuracy. DIFFDOCK significantly outperforms all previous methods (Table 1). In particular, DIFFDOCK obtains an impressive 38.2% top-1 success rate (i.e., percentage of predictions with RMSD <2Å 8 ) when sampling 40 poses and 35.0% when sampling just 10. This performance vastly surpasses that of state-of-the-art commercial software such as GLIDE (21.8%) and the previous state-of-the-art deep learning method TANKBind (20.4%). The use of ML-based pocket prediction in combination with search-based docking methods improves over the baseline performances, but even the best of these (P2Rank+GNINA) reaches a success rate of only 28.8%. Inference runtime. DIFFDOCK holds its superior accuracy while being (on GPU) 3 to 12 times faster than the best search-based method, GNINA (Table 1). This high speed is critical for applications such as high throughput virtual screening for drug candidates or reverse screening for protein targets, where one often searches over a vast number of complexes. As a diffusion model, DIFF-DOCK is inevitably slower than the one-shot deep learning method EQUIBIND, but as shown in Figure 3-right and Appendix E.3, it can be significantly sped up without significant loss of accuracy. Selective accuracy of confidence score. As the top-1 results show, DIFFDOCK's confidence model is very accurate in ranking the sampled poses for a given complex and picking the best one. We also investigate the selective accuracy of the confidence model across different complexes by evaluating how DIFFDOCK's accuracy increases if it only makes predictions when the confidence is above a certain threshold, known as selective prediction. In Figure 4, we plot the success rate as we decrease the percentage of complexes for which we make predictions, i.e., increase the confidence threshold. When only making predictions for the top one-third of complexes in terms of model confidence, the success rate improves from 38% to 83%. Additionally, there is a high Spearman correlation of 0.68 between DIFFDOCK's confidence and the negative RMSD. Thus, the confidence score is a good indicator of the quality of DIFFDOCK's top-ranked sampled pose and provides a highly valuable confidence measure for downstream applications.

CONCLUSION
We presented DIFFDOCK, a diffusion generative model tailored to the task of molecular docking. This represents a paradigm shift from previous deep learning approaches, which use regressionbased frameworks, to a generative modeling approach that is better aligned with the objective of molecular docking. To produce a fast and accurate generative model, we designed a diffusion process over the manifold describing the main degrees of freedom of the task via ligand pose transformations spanning the manifold.
Empirically, DIFFDOCK outperforms the state-of-the-art by very large margins on PDBBind, has fast inference times, and provides confidence estimates with high selective accuracy. Thus, DIFF-DOCK can offer great value for many existing real-world pipelines and opens up new avenues of research on how to best integrate downstream tasks, such as affinity prediction, into the framework and apply similar ideas to protein-protein and protein-nucleic acid docking.

ACKNOWLEDGMENTS
We pay tribute to Octavian-Eugen Ganea (1987-2022, dear colleague, mentor, and friend without whom this work would have never been possible. where B(tθ, ·) = B 1,tθ1 • · · · B m,tθm and R(t), p(t) are the rotation (aroundx 0 :=x (0)) and translation associated with the optimal alignment between B(tθ, x) and x. By definition of RMSD, we have which, in the limit of t → 0, becomes The derivative in the LHS of Equation 5 at t = 0 is and represents the instantaneous velocity of the points x i at t = 0. Denoting r i = x i −x 0 , our objective is to minimize i ||r i || 2 . Then, if we describe R (t)(x −x 0 ) = R (t)r by an angular velocity ω and abbreviate B (tθ, x(0)) i := b i and p = v, we have (7) where we have used the fact that i r i = 0 and where I(r) = ( i r i · r i ) I − i r i r T i is the 3 × 3 inertia tensor. Then setting gradients with respect to v, ω gives which is zero by direct substitution of v. Similarly, we evaluate the angular momentum which is zero by direct substitution of ω. Thus, the linear and angular momentum are zero at t = 0 for arbitrary x(0).
Note that since we did not use the particular form of B(tθ, x) in the above proof, we have shown that RMSD alignment can be used to disentangle rotations and translations from the infinitesimal action of any arbitrary function.

A.2 PROOF OF PROPOSITION 2
Proposition 2. For a given seed conformation c, the map A(·, c) : P → M c is a bijection.
Proof. Since we defined M c = {A(g, c) | g ∈ P}, A(·, c) is automatically surjective. We now show that it is injective. Assume for the sake of contradiction that A(·, c) is not injective, so that there exist elements of the product space g 1 , g 2 ∈ P with g 1 = g 2 but with A(g 1 , c) = A(g 2 , c) = c . That is, A tr (r 1 , A rot (R 1 , A tor (θ 1 , c))) = A tr (r 2 , A rot (R 2 , A tor (θ 2 , c))) which we abbreviate as c (1) = c (2) . Since only A tr changes the center of mass i c i /n, we have i c i /n = i c i /n + r 1 and i c i /n = i c i /n + r 2 . However, since c (1) = c (2) , this implies r 1 = r 2 . Next, consider the torsion angles τ 1 = (τ for all i and therefore θ 1 = θ 2 (as elements of SO(2) m ). Now denote c = A tor (θ 1 , c) = A tor (θ 2 , c) and apply A tr (−r 1 , ·) = A tr (−r 2 , ·) to both sides of Equation 11. We then have which further leads to In general, this does not imply that R 1 = R 2 . However, R 1 = R 2 is possible only if c is degenerate, in the sense that all points are collinear along the shared axis of rotation of R 1 , R 2 . However, in practice, conformers never consist of a collinear set of points, so we can safely assume R 1 = R 2 . We now have (r 1 , R 1 , θ 1 ) = (r 2 , R 2 , θ 2 ), or g 1 = g 2 , contradicting our initial assumption. We thus conclude that A(·, c) is injective, completing the proof.

B TRAINING AND INFERENCE
In this section we present the training and inference procedures of the diffusion generative model. First, however, there are a few subtleties of the generative approach to molecular docking that are worth mentioning. Unlike the standard generative modeling setting where the dataset consists of many samples drawn from the data distribution, each training example (x , y) of protein structure y and ground-truth ligand pose x is the only sample from the corresponding conditional distribution p x (· | y) defined over M x . Thus, the innermost training loop iterates over distinct conditional distributions p x (· | y), along with a single sample from that distribution, rather than over samples from a common data distribution p data (x).
As discussed in Section 4, during inference, c is the ligand structure generated with a method such as RDKit. However, during training we require M c = M x in order to define a bijection between c ∈ M x and P. If we take c ∈ M x , there will be a distribution shift between the manifolds M c considered at training time and those considered at inference time. To circumvent this issue, at training time we predict c with RDKit and replace x with arg min x † ∈Mc RMSD(x , x † ) using the conformer matching procedure described in Jing et al. [2022].
The above paragraph may be rephrased more intuitively as follows: during inference, the generative model docks a ligand structure generated by RDKit, keeping its non-torsional degrees of freedom (e.g., local structures) fixed. At training time, however, if we train the score model with the local structures of the ground truth pose, this will not correspond to the local structures seen at inference time. Thus, at training time, we replace the ground truth pose by generating a ligand structure with RDKit and aligning it to the ground truth pose while keeping the local structures fixed.
With these preliminaries, we now continue to the full procedures (Algorithms 1 and 2). The training and inference procedures of a score-based diffusion generative model on a Riemannian manifold consist of (1) sampling and regressing against the score of the diffusion kernel during training; and (2) sampling a geodesic random walk with the score as a drift term during inference [De Bortoli et al., 2022]. Because we have developed the diffusion process on P but continue to provide the score model with elements in M c ⊂ R 3n , the full training and inference procedures involve repeatedly interconverting between the two spaces using the bijection given by the seed conformation c.
Algorithm 1: Training procedure (single epoch) Algorithm 2: Inference procedure Input: RDKit prediction c, protein structure y (both centered at origin) Let t = n/N and ∆σ 2 tr = σ 2 tr (n/N ) − σ 2 tr ((n − 1)/N ) and similarly for ∆σ 2 rot , ∆σ 2 tor ; Predict scores α ∈ R 3 , β ∈ R 3 , γ ∈ R m ← s(x n , c, y, t); Sample z tr , z rot , z tor from N (0, ∆σ 2 tr ), N (0, ∆σ 2 rot ), N (0, ∆σ 2 tor ) respectively; Set r n−1 ← r 0 + ∆σ 2 tr α + z tr ; Set R n−1 ← R(∆σ 2 rot β + z rot )R n ); Set θ n−1 ← θ n + (∆σ 2 tor γ + z tor ) mod 2π; Compute x n−1 ← A((r n−1 , R n−1 , θ n−1 ), c); Return x 0 ; However, as noted in the main text, the dependence of these procedures on the exact choice of c is potentially problematic, as it suggests that at inference time, the model distribution may be different depending on the orientation and torsion angles of c. Simply removing the dependence of the score model on c is not sufficient since the update steps themselves still occur on P and require a choice of c to be mapped to M c . However, notice that the update steps-in both training and inferenceconsist of (1) sampling the diffusion kernels at the origin; (2) applying these updates to the point on P; and (3) transferring the point on P to M c via A(·, c). Might it instead be possible to apply the updates to 3D ligand poses x ∈ M c directly?
It turns out that the notion of applying these steps to ligand poses "directly" corresponds to the formal notion of group action. The operations A tr , A rot , A tor that we have already defined are formally group actions if they satisfy A (·) (g 1 g 2 , x) = A(g 1 , A(g 2 , x)). While true for A tr , A rot , this is not generally true for A tor if we take SO(2) m to be the direct product group; however, the approximation is increasingly good as the magnitude of the torsion angle updates decreases. If we then define P to be the direct product group of its constituent groups, A is a group action of P on M c , as the operations of A tr , A rot , A tor commute and are (under the approximation) individually group actions.
The implication of A being a group action can be seen as follows. Let δ = g b g −1 a be the update which brings g a ∈ P to g b ∈ P via left multiplication, and let x a , x b be the corresponding ligand poses A(g a , c), A(g b , c). Then which means that the updates δ can be applied directly to x a using the operation A. The training and inference procedures then become Algorithm 3 and 4 below. The initial conformer c is no longer used, except in the initial steps to define the manifold-to find the closest point to x in training, and to sample x N from the prior over M c in inference.
Conceptually speaking, this procedure corresponds to "forgetting" the location of the origin element on M c , which is permissible because a change of the origin to some equivalent seed c ∈ M c merely translates-via right multiplication by A −1 c (c )-the original and diffused data distributions on P, but does not cause any changes on M c itself. The training and inference routines involve updates-formally left multiplications-to group elements, but as left multiplication on the group corresponds to group actions on M c , the updates can act on M c directly, without referencing the origin c.
We find that the approximation of A as a group action works quite well in practice and use Algorithms 3 and 4 for all training and experiments discussed in the paper. Of course, disentangling the torsion updates from rotations in a way that makes A tor exactly a group action would justify the procedure further, and we regard this as a possible direction for future work.

C.1 EMBEDDING LAYER
Geometric heterogeneous graph. Structures are represented as heterogeneous geometric graphs with nodes representing ligand (heavy) atoms, receptor residues (located in the position of the αcarbon atom), and receptor (heavy) atoms (only for the confidence model). Because of the high number of nodes involved, it is necessary for the graph to be sparsely connected for runtime and memory constraints. Moreover, sparsity can act as a useful inductive bias for the model, however, it is critical for the model to find the right pose that nodes that might have a strong interaction in the final pose to be connected during the diffusion process. Therefore, to build the radius graph, we connect nodes using cutoffs that are dependent on the types of nodes they are connecting: 1. Ligand atoms-ligand atoms, receptor atoms-receptor atoms, and ligand atoms-receptor atoms interactions all use a cutoff of 5Å, standard practice for atomic interactions. For the ligand atoms-ligand atoms interactions we also preserve the covalent bonds as separate edges with some initial embedding representing the bond type (single, double, triple and aromatic). For receptor atoms-receptor atoms interactions, we limit at 8 the maximum number of neighbors of each atom. Note that the ligand atoms-receptor atoms only appear in the confidence model where the final structure is already set.
2. Receptor residues-receptor residues use a cutoff of 15Å with 24 as the maximum number of neighbors for each residue.
3. Receptor residues-ligand atoms use a cutoff of 20 + 3 * σ trÅ where σ tr represents the current standard deviation of the diffusion translational noise present in each dimension (zero for the confidence model). Intuitively this guarantees that with high probability, any of the ligands and receptors that will be interacting in the final pose the diffusion model converges to are connected in the message passing at every step.
4. Finally, receptor residues are connected to the receptor atoms that form the corresponding amino-acid.
Node and edge featurization. For the receptor residues, we use the residue type as a feature as well as a language model embedding obtained from ESM2 [Lin et al., 2022]. The ligand atoms have the following features: atomic number; chirality; degree; formal charge; implicit valence; the number of connected hydrogens; the number of radical electrons; hybridization type; whether or not it is in an aromatic ring; in how many rings it is; and finally, 6 features for whether or not it is in a ring of size 3, 4, 5, 6, 7, or 8. These are concatenated with sinusoidal embeddings of the diffusion time [Vaswani et al., 2017] and, in the case of edges, radial basis embeddings of edge length [Schütt et al., 2017]. These scalar features of each node and edge are then transformed with learnable two-layer MLPs (different for each node and edge type) into a set of scalar features that are used as initial representations by the interaction layers.
Notation Let (V, E) represent the heterogeneous graph, with V = (V , V r ) respectively ligand atoms and receptor residues (receptor atoms V a , present in the confidence model, are for simplicity not included here), and similarly E = (E , E r , E r , E rr ). Let h a be the node embeddings (initially only scalar channels) of node a, e ab the edge embeddings of (a, b), and µ(r ab ) radial basis embeddings of the edge length. Let σ 2 tr , σ 2 rot , and σ 2 tor represent the variance of the diffusion kernel in each of the three components: translational, rotational and torsional.

C.2 INTERACTION LAYERS
At each layer, for every pair of nodes in the graph, we construct messages using tensor products of the current node features with the spherical harmonic representations of the edge vector. The weights of this tensor product are computed based on the edge embeddings and the scalar features-denoted h 0 a -of the outgoing and incoming nodes. The messages are then aggregated at each node and used to update the current node features. For every node a of type t a : Here, t indicates an arbitrary node type, N (t) a = {b | (a, b) ∈ E tat } the neighbors of a of type t, Y are the spherical harmonics up to = 2, and BN the (equivariant) batch normalisation. The orders of the output are restricted to a maximum of = 1. All learnable weights are contained in Ψ, a dictionary of MLPs, which uses different sets of weights for different edge types (as an ordered pair so four types for the score model and nine for the confidence) and different rotational orders.

C.3 OUTPUT LAYER
The ligand atom representations after the final interaction layer are used in the output layer to produce the required outputs. This is where the score and confidence architecture differ significantly. On one hand, the score model's output is in the tangent space T r T 3 ⊕ T R SO(3) ⊕ T θ SO(2) m . This corresponds to having two SE(3)-equivariant output vectors representing the translational and rotational score predictions and m SE(3)-invariant output scalars representing the torsional score. For each of these, we design final tensor-product convolutions inspired by classical mechanics. On the other hand, the confidence model outputs a single SE(3)-invariant scalar representing the confidence score. Below we detail how each of these outputs is generated.
Translational and rotational scores. The translational and rotational score intuitively represent, respectively, the linear acceleration of the center of mass of the ligand and the angular acceleration of the rest of the molecule around the center. Considering the ligand as a rigid object and given a set of forces and masses at each ligand, a tensor product convolution between the atoms and the center of mass would be capable of computing the desired quantities. Therefore, for each of the two outputs, we perform a convolution of each of the ligand atoms with the (unweighted) center of mass c. v We restrict the output of v to a single odd and a single even vectors (for each of the two scores).
Since we are using coarse-grained representations of the protein, the score will neither be even nor odd; therefore, we sum the even and odd vector representations of v. Finally, the magnitude (but not direction) of these vectors is adjusted with an MLP taking as input the current magnitude and the sinusoidal embeddings of the diffusion time. Finally, we (revert the normalization) by multiplying the outputs by 1/σ tr for the translational score and by the expected magnitude of a score in SO (3) with diffusion parameter σ rot (precomputed numerically).
Torsional score. To predict the m SE(3)-invariant scalar describing the torsional score, we use a pseudotorque layer similar to that of Jing et al. [2022]. This predicts a scalar score δτ for each rotatable bond from the per-node outputs of the atomic convolution layers. For rotatable bond g = (g 0 , g 1 ) and b ∈ V , let r gb andr gb be the magnitude and direction of the vector connecting the center of bond g and b. We construct a convolutional filter T g for each bond g from the tensor product of the spherical harmonics with a = 2 representation of the bond axisr g : 10 ⊗ is the full (i.e., unweighted) tensor product as described in Geiger & Smidt [2022], and the second term contains the spherical harmonics up to = 2 (as usual). This filter (which contains orders up to = 3) is then used to convolve with the representations of every neighbor on a radius graph: Here, N g = {b | (g, b) ∈ E τ } and Υ (τ ) and Γ are MLPs with learnable parameters. Since unlike Jing et al.
[2022], we use coarse-grained representations the parity also here is neither even nor odd, the irreps in the output are restricted to arrays both even h g and odd h g scalars. Finally, we produce a single scalar prediction for each bond: where Π is a two-layer MLP with tanh nonlinearity and no biases. This is also "denormalized" by multiplying by the expected magnitude of a score in SO(2) with diffusion parameter σ tor .
Confidence output. The single SE(3)-invariant scalar representing the confidence score output is instead obtained by concatenating the even and odd final scalar representation of each ligand atom, averaging these feature vectors among the different atoms, and finally applying a three layers MLP (with batch normalization).

D EXPERIMENTAL DETAILS
In general, all our code is available at https://github.com/gcorso/DiffDock. This includes running the baselines, runtime calculations, training and inference scripts for DIFFDOCK, the PDB files of DIFFDOCK's predictions for all 363 complexes of the test set, and visualization videos of the reverse diffusion. [2022] who favor temporal splits over artificial splits based on molecular scaffolds or protein sequence/structure similarity. For completeness, we also report the results on protein sequence similarity splits in Appendix E.
Metrics. To evaluate the generated complexes, we compute the heavy-atom RMSD between the predicted and the crystal ligand atoms when the protein structures are aligned. To account for permutation symmetries in the ligand, we use the symmetry-corrected RMSD of sPyRMSD [Meli & Biggin, 2020]. For these RMSD values, we report the percentage of predictions that have an RMSD that is less than 2Å. We choose 2Å since much prior work considers poses with an RMSD less that 2Å as "good" or successful [Alhossary et al., 2015;Hassan et al., 2017;McNutt et al., 2021]. This is a chemically relevant metric, unlike the mean RMSD as detailed in Section 3 since for further downstream analyses such as determining function changes, a prediction is only useful below a certain RMSD error threshold. Less relevant metrics such as the mean RMSD are provided in Appendix E.
D.2 IMPLEMENTATION DETAILS: HYPERPARAMETERS, TRAINING, AND RUNTIME MEASUREMENT Training Details. We use Adam [Kingma & Ba, 2014] as optimizer for the diffusion and the confidence model. The diffusion model with which we run inference uses the exponential moving average of the weights during training, and we update the moving average after every optimization step with a decay factor of 0.999. The batch size is 16. We run inference with 20 denoising steps on 500 validation complexes every 5 epochs and use the set of weights with the highest percentage of RMSDs less than 2Å as the final diffusion model. We trained our final score model on four 48GB RTX A6000 GPUs for 850 epochs (around 18 days). The confidence model is trained on a single 48GB GPU. For inference, only a single GPU is required. Scaling up the model size seems to improve performance and future work could explore whether this trend continues further. For the confidence model uses the validation cross-entropy loss is used for early stopping and training only takes 75 epochs. Code to reproduce all results including running the baselines or to perform docking calculations for new complexes is available at https://github.com/gcorso/DiffDock.
Hyperparameters. For determining the hyperparameters of DIFFDOCK's score model, we trained smaller models (3.97 million parameters) that fit into 48GB of GPU RAM before scaling it up to the final model (20.24 million parameters) that was trained on four 48GB GPUs. The smaller models were only trained for 250 or 300 epochs, and we used the fraction of predictions with an RMSD below 2Å on the validation set to choose the hyperparameters. Table 2 shows the main hyperparameters we tested and the final parameters of the large model we use to obtain our results. We only did little tuning for the minimum and maximum noise levels of the three components of the diffusion. For the translation, the maximum standard deviation is 19Å. We also experimented with second-order features for the Tensor Field Network but did not find them to help. The complete set of hyperparameters next to the main ones we describe here can be found in our repository. From the start we have divided the inference schedule in 20 time steps, the effect of using more or less steps for inference is discussed in Appendix E.3. As we found that the large-scale diffusion models overfit the training data on low-levels of noise we stop the diffusion early after 18 steps. At the last diffusion steps no noise is added.
The confidence model has 4.77 million parameters and the parameters we tried are in Table 3. We generate 28 different training poses for the confidence model (for which it predicts whether or not they have an RMSD below 2Å) with a small score model. The score model used to generate the training samples for the confidence model does not need to be the same one that the model will be applied to at inference time.  Runtime. Similar to all the baselines, the preprocessing times are not included in the reported runtimes. For DIFFDOCK the preprocessing time is negligible compared to the rest of the inference time where multiple reverse diffusion steps are performed. Preprocessing mainly consists of a forward pass of ESM2 to generate the protein language model embeddings, RDKit's conformer generation, and the conversion of the protein into a radius graph. We measured the inference time when running on an RTX A100 40GB GPU when generating 10 samples. The runtimes we report for generating 40 samples and ranking them are extrapolations where we multiply the runtime for 10 samples by 4. In practice, this only gives an upper bound on the runtime with 40 samples, and the actual runtime should be faster.

D.3 BASELINES: IMPLEMENTATION, USED SCRIPTS, AND RUNTIME DETAILS
Our scripts to run the baselines are available at https://github.com/gcorso/DiffDock. For obtaining the runtimes of the different methods, we always used 16 CPUs except for GLIDE as explained below. The runtimes do not include any preprocessing time for any of the methods. For instance, the time that it takes to run P2Rank is not included for TANKBind, and P2Rank + SMINA/GNINA since this receptor preparation only needs to be run once when docking many ligands to the same protein. In applications where different receptors are processed (such as reverse screening), the experienced runtimes for TANKBind and P2Rank + SMINA/GNINA will thus be higher.
We note that for all these baselines we have used the default hyperparameters unless specified differently below. Modifying some of these hyperparameters (for example the scoring method's exhaustiveness) will change the runtime and performance tradeoffs (e.g., if the searching routine is left running for longer then better poses are likely to be found), however, we leave these analyses to future work.   Stärk et al. [2022], the very high runtime of GLIDE with 1405 seconds per complex is partially explained by the fact that GLIDE only uses a single thread when processing a complex. This fact and the parallelization options of GLIDE are explained here https://www.schrodinger.com/kb/1165. With GLIDE, it is possible to start dataparallel processes that compute the docking results for a different complex in parallel. However, each process also requires a separate software license.
EquiBind [Stärk et al., 2022], we reuse the numbers reported in their paper and generate the predictions that we visualize with their code at https://github.com/HannesStark/EquiBind.
TANKBind [Lu et al., 2022], we use the code associated with the paper at https://github. com/luwei0917/TankBind. The runtimes do not include the runtime of P2Rank or any preprocessing steps. In Table 1 we report two runtimes (0.72/2.5 sec). The first is the runtime when making only the top-1 prediction and the second is for producing the top-5 predictions. Producing only the top-1 predictions is faster since TANKBind produces distance predictions that need to be converted to coordinates with a gradient descent algorithm and this step only needs to be run once for the top-1 prediction, while it needs to be run 5 times for producing 5 outputs. To obtain our runtimes we run the forward pass of TANKBind on GPU (0.28 seconds) with the default batch size of 5 that is used in their GitHub repository. To compute the time the distances-to-coordinates con-version step takes, we run the file baseline run tankbind parallel.sh in our repository, which parallelizes the computation across 16 processes which we also run on an Intel Xeon Gold 6230 CPU. This way, we obtain 0.44 seconds runtime for the conversion step of the top-1 prediction (averaged over the 363 complexes of the testset).
P2Rank [Krivák & Hoksza, 2018], is a tool that predicts multiple binding pockets and ranks them. We use it for running TANKBind and P2Rank + SMINA/GNINA. We download the program from https://github.com/rdk/p2rank and run it with its default parameters.
EquiBind + SMINA/GNINA [Stärk et al., 2022], the bounding box in which GNINA/SMINA searches for binding poses is constructed around the prediction of EquiBind with the --autobox ligand option of GNINA/SMINA. EquiBind is thus used to find the binding pocket and SMINA/GNINA to find the exact final binding pose. We use --autobox add 10 to add an additional 10Å on all 6 sides of the bounding box following [Stärk et al., 2022].
P2Rank + SMINA/GNINA. The bounding box in which GNINA/SMINA searches for binding poses is constructed around the pocket center that P2Rank predicts as the most likely binding pocket. P2Rank is thus used to find the binding pocket and SMINA/GNINA to find the exact final binding pose. The diameter of the search box is the diameter of a ligand conformer generated by RDKit with an additional 10Å on all 6 sides of the bounding box. Due to the averaging phenomenon of regression-based methods such as TANKBind and EquiBind, they make predictions at the mean of the distribution. If aleatoric uncertainty is present, such as in case of symmetric complexes, this leads to predicting the ligand to be at an un-physical state in the middle of the possible binding pockets as visualized in Figure 10. The Figure also illustrates how DIFFDOCK does not suffer from this issue and is able to accurately sample from the modes.

E.1 PHYSICALLY PLAUSIBLE PREDICTIONS
In the scenario when epistemic uncertainty about the correct ligand conformation is present, this often results in "squashed-up" predictions of the regression-based methods as visualized in Figure 5.
If there is uncertainty about the correct conformer, the square error minimizing option is to put all atoms close to the mean.
These averaging phenomena in the presence of either aleatoric or epistemic uncertainty cause the regression-based methods to often generate steric clashes and self intersections. To investigate this quantitatively, we determine the fraction of test complexes for which the methods exhibit steric clashes. We define a ligand as exhibiting a steric clash if one of its heavy atoms is within 0.4Å of a heavy receptor atom. This cutoff is used by protein quality assessment tools and in previous literature [Ramachandran et al., 2011]. Table 4 shows that DIFFDOCK, as a generative model, produces fewer steric clashes than the regression-based baselines. We generally observe no unphysical predictions from DIFFDOCK unlike the self intersections that, e.g., TANKBind produces ( Figure 5) or its incorrect local structures ( Figure 6). This is also visible in the randomly chosen examples of Figure 9 and can be examined in our repository, where we provide all predictions of DIFFDOCK for the test set. Figure 5: Ligand self-intersections. TANKBind (blue), EquiBind (cyan), DIFFDOCK (red), and crystal structure (green). Due to the averaging phenomenon that occurs when epistemic uncertainty is present, the regression-based deep learning models tend to produce ligands with atoms that are close together, leading to self-intersections. DIFFDOCK, as a generative model, does not suffer from this averaging phenomenon, and we never found a self-intersection in any of the investigated results of DIFFDOCK. Figure 6: Chemically plausible local structures. TANKBind (blue), EquiBind (cyan), and DIFF-DOCK (red) structures for complex 6g2f. EquiBind (without their correction step) produces very unrealistic local structures and TANKBind, e.g., produces non-planar aromatic rings. DIFFDOCK's local structures are the realistic local structures of RDKit.

E.2 FURTHER RESULTS AND METRICS
In this section, we present further evaluation metrics on the results presented in Table 1. In particular, for both top-1 (Table 5) and top-5 (Table 6) we report: 25th, 50th and 75th percentiles, the proportion below 2Å and below 5Å of both ligand RMSD and centroid distance. Moreover, while Volkov et al. [2022] advocated against artificial protein set splits and for time-based splits, for completeness, in Table 7 and Figure 7, we report the performances of the different methods when evaluated exclusively on the portion of the test set where the UniProt IDs of the proteins are not contained in the data that is seen by DIFFDOCK in its training and validation.

E.3 ABLATION STUDIES
Below we report the performance of our method over different hyperparameter settings. In particular, we highlight the different ways in which it is possible to control the tradeoff between runtime and accuracy in our method. These mainly are: (1) model size, (2) diffusion time, and (3) diffusion samples.
Model size. The final DIFFDOCK score model has 20.24 million parameters from its 6 convolution layers with 48 scalar and 10 vector features. In Table 8 we show the results for a smaller score model with 5 convolutions, 24 scalar, and 6 vector features resulting in 3.97 million parameters that can be trained on a single 48GB GPU. The confidence model used is the same for both score models. We find that scaling up the model size helped improve performance which we did as far as possible using four 48GB GPUs for training. Scaling the model size further is a promising avenue for future work.
Diffusion steps. Another hyperparameter determining the runtime of the method during inference is the number of steps we take during the reverse diffusion. Since these are applied sequentially DIFFDOCK's runtime scales approximately linearly with the number of diffusion steps. In the rest  Table 7: PDBBind docking on unseen receptors. Percentage of predictions for which the RMSD to the crystal structure is below 2Å and the median RMSD. "*" indicates the method run exclusively on CPU, "-" means not applicable; some cells are empty due to infrastructure constraints. of the paper, we always use 20 steps, but in Figure 8 we show how the performance of the model varies with the number of steps. We note that the model reaches nearly the full performance even with just 10 steps, suggesting that the model can be sped up 2x with a small drop in accuracy.
Diffusion samples. Given a score-based model and a number of steps for the diffusion model, it remains to be determined how many independent samples N to query from the diffusion model and then feed to the confidence model. As expected the more samples the confidence model receives the more likely it is that it will find a pose that it is confident about and, therefore, the higher the performance. The runtime of DIFFDOCK on GPU scales sublinearly until the different samples fit in Table 8: Model size comparison. All methods receive a small molecule and are tasked to find its binding location, orientation, and conformation. Shown is the percentage of predictions for which the RMSD to the crystal structure is below 2Å and the median RMSD. parallel in the model (depends on the protein size and the GPU memory) and approximately linearly for larger sample sizes (however it can be easily parallelized across different GPUs). In Figure 3 we show how the success rate for the top-1, top-5, and top-10 prediction change as a function of N . For example, for the top-1 prediction, the proportion of the prediction with RMSD below 2Å varies between 22% of a random sample of the diffusion model (N = 1) to 38% when the confidence model is allowed to choose between 40 samples. Figure 9: Randomly picked examples. The predictions of TANKBind (blue), EquiBind (cyan), GNINA (magenta), DIFFDOCK (red), and crystal structure (green). Shown are the predictions once with the protein and without it below. The complexes were chosen with a random number generator from the test set. TANKBind often produces self intersections (examples at the top-right; middlemiddle; middle-right; bottom-right). DIFFDOCK and GNINA sometimes almost perfectly predict the bound structure (e.g., top-middle). The complexes in reading order are: 6p8y, 6mo8, 6pya, 6t6a, 6e30, 6hld, 6qzh, 6hhg, 6qln. Figure 10: Symmetric complexes and multiple modes. EquiBind (cyan), DIFFDOCK highest confidence sample (red), all other DIFFDOCK samples (orange), and the crystal structure (green). We see that, since it is a generative model, DIFFDOCK is able to produce multiple correct modes and to sample around them. Meanwhile, as a regression-based model, EquiBind is only able to predict a structure at the mean of the modes. The complexes are unseen during training. The PDB IDs in reading order: 6agt, 6gdy, 6ckl, 6dz3. Figure 11: Reverse Diffusion. Reverse diffusion of a randomly picked complex from the test set. Shown are DIFFDOCK highest confidence sample (red), all other DIFFDOCK samples (orange), and the crystal structure (green). Shown are the 20 steps of the reverse diffusion process (in reading order) of DIFFDOCK for the complex 6oxx. Videos of the reverse diffusion are available at https: //github.com/gcorso/DiffDock/visualizations/README.md.