SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\begin{array}{l} p \left(\mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {M}}\right), \boldsymbol {S} _ {\mathrm {M}} \mid \mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {P}}\right), \boldsymbol {S} _ {\mathrm {P}}\right) \\ = \int p \left(\mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {M}} ^ {T}\right), \boldsymbol {S} _ {\mathrm {M}} ^ {T} \mid \mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {P}}\right), \boldsymbol {S} _ {\mathrm {P}}\right) \prod_ {t = 0} ^ {T - 1} p \left(\mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t - 1}\right), \boldsymbol {S} _ {\mathrm {M}} ^ {t - 1} \mid \mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t}\right), \boldsymbol {S} _ {\mathrm {M}} ^ {t}, \mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {P}}\right), \boldsymbol {S} _ {\mathrm {P}}\right) d \mathcal {M} ^ {0: T - 1} \\ = \int p \left(\boldsymbol {X} _ {\mathrm {M}} ^ {T}, \boldsymbol {S} _ {\mathrm {M}} ^ {T} | \boldsymbol {X} _ {\mathrm {P}}, \boldsymbol {S} _ {\mathrm {P}}\right) \prod_ {t = 0} ^ {T - 1} p \left(\mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t - 1}\right), \boldsymbol {S} _ {\mathrm {M}} ^ {t - 1} | \mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t}\right), \boldsymbol {S} _ {\mathrm {M}} ^ {t}, \mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {P}}\right), \boldsymbol {S} _ {\mathrm {P}}\right) d \mathcal {M} ^ {0: T - 1} \\ = \int p \left(\boldsymbol {X} _ {\mathrm {M}} ^ {T}, \boldsymbol {S} _ {\mathrm {M}} ^ {T} | \boldsymbol {X} _ {\mathrm {P}}, \boldsymbol {S} _ {\mathrm {P}}\right) \prod_ {t = 0} ^ {T - 1} p \left(\mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t - 1}\right) | \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) p \left(\boldsymbol {S} _ {\mathrm {M}} ^ {t - 1} | \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) d \mathcal {M} ^ {0: T - 1} \\ = \int p \left(\boldsymbol {X} _ {\mathrm {M}} ^ {T}, \boldsymbol {S} _ {\mathrm {M}} ^ {T} | \boldsymbol {X} _ {\mathrm {P}}, \boldsymbol {S} _ {\mathrm {P}}\right) \prod_ {t = 0} ^ {T - 1} p \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) p \left(\boldsymbol {S} _ {\mathrm {M}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) d \mathcal {M} ^ {0: T - 1} \\ = \int p \left(\boldsymbol {X} _ {\mathrm {M}} ^ {T}, \boldsymbol {S} _ {\mathrm {M}} ^ {T} | \boldsymbol {X} _ {\mathrm {P}}, \boldsymbol {S} _ {\mathrm {P}}\right) \prod_ {t = 0} ^ {T - 1} p \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t - 1}, \boldsymbol {S} _ {\mathrm {M}} ^ {t - 1} | \boldsymbol {X} _ {\mathrm {M}} ^ {t}, \boldsymbol {S} _ {\mathrm {M}} ^ {t}, \boldsymbol {X} _ {\mathrm {P}}, \boldsymbol {S} _ {\mathrm {P}}\right) d \mathcal {M} ^ {0: T - 1} \\ = p \left(\boldsymbol {X} _ {\mathrm {M}}, \boldsymbol {S} _ {\mathrm {M}} \mid \boldsymbol {X} _ {\mathrm {P}}, \boldsymbol {S} _ {\mathrm {P}}\right) \tag {14} \\ \end{array}
$$
Then, let's consider a single atom's position. We here denote each atom's  $\boldsymbol{x}_{\mathrm{M}}^{t}$  as
$$
\boldsymbol {x} _ {\mathrm {M}} ^ {t} = \boldsymbol {x} _ {\mathrm {C}} ^ {t} + \boldsymbol {x} _ {\mathrm {R}} ^ {t} \boldsymbol {O} _ {c} ^ {t} \tag {15}
$$
where  $\boldsymbol{x}_{\mathrm{C}}^{t}$  is the defined center atom's position in the functional group,  $\boldsymbol{x}_{\mathrm{R}}^{t}$  is the relative position of the atom in the local coordinate system centering at  $\boldsymbol{x}_{\mathrm{C}}^{t}$ ,  $O_{\mathrm{C}}^{t}$  is the rotation matrices of the local coordinate system with respect to the global system. Moreover, because the functional group is regarded as rigid bodies,  $\boldsymbol{x}_{\mathrm{R}}^{t} = \boldsymbol{x}_{\mathrm{R}}$  is constant. To be specific, if  $\boldsymbol{x}_{\mathrm{M}}^{t}$  refers to linker's position,  $O_{\mathrm{C}}^{t} = 0$ .
Proposition A2. If each atom's relative positions in the local coordinate systems are fixed, and  $p(\boldsymbol{x}_{\mathrm{C}}^{t-1}|\mathcal{M}^t,\mathcal{P})$  is  $\mathrm{SE}(3)$ -equivariant and  $p(\boldsymbol{O}_{\mathrm{C}}^{t-1}|\mathcal{M}^t,\mathcal{P})$  is  $\mathrm{SO}(3)$ -equivariant and  $\mathrm{T}(3)$ -invariant, such that  $p\left(\mathrm{T}_g(\boldsymbol{x}_{\mathrm{C}}^{t-1})|\mathrm{T}_g(\mathcal{M}^t,\mathcal{P})\right) = p\left(\boldsymbol{x}_{\mathrm{C}}^{t-1}|\mathcal{M}^t,\mathcal{P}\right)$  and  $p\left(\mathrm{T}_r(\boldsymbol{O}_{\mathrm{C}}^{t-1})|\mathrm{T}_g(\mathcal{M}^t,\mathcal{P})\right) = p\left(\boldsymbol{O}_{\mathrm{C}}^{t-1}|\mathcal{M}^t,\mathcal{P}\right)$ , where  $r \in \mathrm{SO}(3), v \in \mathrm{T}(3), r + v = g \in \mathrm{SE}(3)$ , then  $p(\boldsymbol{x}_{\mathrm{M}}^{t-1}|\mathcal{M}^t,\mathcal{P})$  is  $\mathrm{SO}(3)$ -equivariant.
Proof. According to the convolution formula in probability theory, if  $w = u + v$ , then
$$
p (w) = \int p (u, w - u) d u = \int p (w - v, v) d v \tag {16}
$$
By using the Eq. (16), we can write every single atom's position density function as
$$
\begin{array}{l} p \left(\boldsymbol {x} _ {\mathrm {M}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) \\ = p \left(\boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} + \boldsymbol {x} _ {\mathrm {R}} \boldsymbol {O} _ {\mathrm {C}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) \\ = \int p \left(\boldsymbol {x} _ {\mathrm {C}} ^ {t - 1}, \boldsymbol {x} _ {\mathrm {M}} ^ {t - 1} - \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} \mid \mathcal {M} ^ {t}, \mathcal {P}\right) d \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} \tag {17} \\ = \int p \left(\boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) p \left(\boldsymbol {x} _ {\mathrm {M}} ^ {t - 1} - \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) d \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} \\ \end{array}
$$
$$
p \left(\mathrm {T} _ {g} \left(\boldsymbol {x} _ {\mathrm {C}} ^ {t - 1}\right) \mid \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) = p \left(\boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} \mid \mathcal {M} ^ {t}, \mathcal {P}\right), \tag {18}
$$
$$
p \left(\mathrm {T} _ {r} \left(\boldsymbol {O} _ {\mathrm {C}} ^ {t - 1}\right) \mid \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) = p \left(\boldsymbol {O} _ {\mathrm {C}} ^ {t - 1} \mid \mathcal {M} ^ {t}, \mathcal {P}\right). \tag {19}
$$
We can obtain that
$$
\begin{array}{l} p \left(\mathrm {T} _ {r} \left(\boldsymbol {x} _ {\mathrm {M}} ^ {t - 1} - \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1}\right) \mid \mathrm {T} _ {g} (\mathcal {M} ^ {t}, \mathcal {P})\right) \\ = p \left(\mathrm {T} _ {r} \left(\boldsymbol {x} _ {\mathrm {R}} \boldsymbol {O} _ {\mathrm {C}} ^ {t - 1}\right) | \mathrm {T} _ {g} (\mathcal {M} ^ {t}, \mathcal {P})\right) \\ = \frac {1}{\boldsymbol {x} _ {\mathrm {R}}} p \left(\mathrm {T} _ {r} \left(\boldsymbol {O} _ {\mathrm {C}} ^ {t - 1}\right) \mid \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) \tag {20} \\ = \frac {1}{\boldsymbol {x} _ {\mathrm {R}}} p \left(\boldsymbol {O} _ {\mathrm {C}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) \\ = p \left(x _ {\mathrm {R}} O _ {\mathrm {C}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) \\ = p \left(\boldsymbol {x} _ {\mathrm {M}} ^ {t - 1} - \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) \\ \end{array}
$$
Therefore, according to Eq. (18), (20), and (17)
$$
\begin{array}{l} p \left(\mathrm {T} _ {g} \left(\boldsymbol {x} _ {\mathrm {M}} ^ {t - 1}\right) \mid \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) \\ = \int p \left(\mathrm {T} _ {g} \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1}\right) \left| \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) p \left(\mathrm {T} _ {r + v} \left(\boldsymbol {x} _ {\mathrm {M}} ^ {t - 1} - \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1}\right) \mid \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) d \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} \\ = \int p \left(\mathrm {T} _ {g} \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1}\right) \left| \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) p \left(\mathrm {T} _ {r} \left(\boldsymbol {x} _ {\mathrm {M}} ^ {t - 1} - \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1}\right) \mid \mathrm {T} _ {g} \left(\mathcal {M} ^ {t}, \mathcal {P}\right)\right) d \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} \tag {21} \\ = \int p \left(\boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) p \left(\boldsymbol {x} _ {\mathrm {M}} ^ {t - 1} - \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) d \boldsymbol {x} _ {\mathrm {C}} ^ {t - 1} \\ = p \left(\boldsymbol {x} _ {\mathrm {M}} ^ {t - 1} | \mathcal {M} ^ {t}, \mathcal {P}\right) \\ \end{array}
$$
Proof of Proposition 1. The sufficiency of SE(3)-invariance of  $p(\boldsymbol{s}^{t-1}|\mathcal{M}^t, \mathcal{P})$  and  $p(\boldsymbol{s}^T)$  is given in Lemma A.1, and the sufficiency of SE(3)-equivariance of  $p(\boldsymbol{x}^{t-1}|\mathcal{M}^t, \mathcal{P})$ , and SO(3)-equivariance and T(3)-invariance of  $p(\boldsymbol{O}^{t-1}|\mathcal{M}^t, \mathcal{P})$  is given in Proposition A.2. Besides, it is easy to obtain that if  $p(\boldsymbol{O}^T)$  and  $p(\boldsymbol{x}^T)$  is SE(3)-invariant distribution, then  $p(\boldsymbol{x}_{\mathrm{M}}^T)$  will be invariant.
B Model Comparisons.
With Pocket2Mol and GraphBP. Pocket2Mol and GraphBP are all auto-regressive models, which violate the physical rules from the perspective of energy[15], while the diffusion models which consider the global interactions are a solution to the problem. Besides, to decide which atom will be added a bond with the next atom, Pocket2Mol needs a classifier to predict the focal atom, so that the training and the prediction are not end-to-end. Finally, D3FG is a functional-group- or fragment-based method, while these two models generate molecules at the atom level.
With DiffSBDD and TargetDiff. These two methods are diffusion-based, which considers the global interactions between atoms. In the atom type generation, DiffSBDD uses continuous latent spaces generation, while Targetdiff diffuses the atom types in a uniform distribution. These two models all generate molecules at the atom level, while D3FG generates at the fragment level, and besides the types and positions, the orientations of the functional groups are generated.
With FLAG. It is still an auto-regressive model and does not support end-to-end generation since the focal atom needs to be predicted. Besides, we defined our functional groups as rigid bodies with stable intra-structures, while the motifs in FLAG are 2D smiles, with the structures generated by RDKIT. The 3D structures of functional groups are obtained by the training set in D3FG, thus avoiding the problem of distribution shift of FLAG since the training/test motif substructures may not match the RDKIT's generation.
With DeepFrag. It is a model for fragment-based lead optimization, in which the protein and the parent is used as condition and the fragment type is predicted by the model. In this way, it is more like an elaboration task defined in D3FG. Here we point out several advantages of D3FG(EHot/Cold) over Deepfrag. First, Deepfrag just predicts the fragment type, without 3D structures, so that the problem of equivariance is not included, but D3FG generates 3D positions of the molecules. Second, although the type is the SE(3)-invariant variable, the model uses CNNs as the model backbone rather than EGNN, so the invariance can also not be preserved. Instead, D3FG assures physical symmetries by using EGNN. Finally, D3FG is a generative model with stochasticity, while Deepfrag only gives the probability of the fragment types, as a discriminative model.
C Method Details
Amino acid context encoding. Several geometric or type features are embedded to encode amino acids. For the geometric features including torsion angles/dihedrals, and pairwise distances, they are all roto-translational invariant, since the geometric features are all scalars obtained from relative coordinates. Besides, the local coordinates of atoms in a single amino acid are also invariant because it is always fixed in the local frame established by  $\mathrm{C}_{\alpha}$ ,  $\mathrm{C}$  and  $\mathrm{N}$ . For the type features including amino acid types, sequential relationships, and pair of amino acid types, the translational and rotational operation is unrelated to them. Thus, the encoded amino acid contexts are roto-translational invariant, leading to the invariance of all the follow-up embeddings.
Equivariant neural network for linkers. For the roto-translational equivariance of positions for single atoms, since  $O_{j}^{t} = I$ , Eq. 12 will be written as  $G(\mathcal{M}^t,\mathcal{P})$ $[j] = \mathrm{MLP}_G(h_j')$ , unable to satisfy the equivariance. In this way, we revised it for single atoms by using the EGNN[44] stacked in the final layer for updating the positions, which reads
$$
G \left(\mathcal {M} ^ {t}, \mathcal {P}\right) [ j ] = \boldsymbol {x} _ {j} + \frac {1}{C _ {j}} \sum_ {i \in \mathcal {I} _ {\mathrm {a t}} \cup \mathcal {I} _ {\mathrm {f g}}} \left(\boldsymbol {x} _ {j} - \boldsymbol {x} _ {i}\right) \boldsymbol {h} _ {i} ^ {\prime}, \tag {22}
$$
where we choose  $C_j = \| \pmb{x}_j\| _2 + 1$
D Data Preprocessing
Local frame establishment. In 3D Euclidean space, for a rigid body including more than mass points that are not co-linear, a local frame can be established. We first choose a center node (center point)  $A$  as the origin, and a second node  $B$ , leading to  $\vec{AB}$  as the direction of x-axis. Then, a third node  $C$  is selected. By Schmidt orthogonalization of  $\vec{AC}$  with respect to  $\vec{AB}$ , the direction of y-axis can be computed. And finally, the direction of z-axis is obtained by the cross-product of the unit vectors in the x direction and y direction. By this means, the local frame is established by the three nodes, and the other nodes' local coordinates can be determined in the local frame. Because the local frame requires at least three points to establish, the functional groups including only 2 atoms are divided into two linkers.
Functional group datasets. We give detailed information on the included functional groups, including 2D graph, 3D structure, time of occurrence in the CrossDocked2020, and the center node (node  $A$ ), node  $B$ , and node  $C$  of the functional group in Table. 10.
Note that in benzeze, the symmetric structures lead the frame nodes to be any three consecutive points on the hexagon. Besides, for the functional groups of  $\mathrm{NS(=O) = O}$  and  $\mathrm{O = CNO^{\prime}}$  , two stable conformations exist, so we in practice regard them as four different types.
Table 5: Frequency of the top ten functional groups that occur most frequently in Cross docked2020.
Functional Group	Ref.	Pocket2Mol	TargetDiff	DiffSBDD	D3FG(Joint)	D3FG(Stage)
c1cccccl	0.392	0.491	0.277	0.007	0.372	0.409
NC=O	0.147	0.075	0.142	0.201	0.082	0.107
O=CO	0.119	0.169	0.303	0.579	0.154	0.085
c1ccncc1	0.045	0.072	0.049	0.018	0.027	0.052
c1ncc2nc[nH]c2n1	0.034	0.001	0.000	0.000	0.001	0.020
NS(=O)=O	0.030	0.000	0.000	0.008	0.001	0.001
O=P(O)(O)O	0.022	0.003	0.193	0.000	0.007	0.010
OCO	0.019	0.024	0.091	0.016	0.045	0.050
c1cncnc1	0.017	0.008	0.138	0.000	0.002	0.009
c1cn[nH]c1	0.016	0.011	0.001	0.000	0.003	0.004
JSD	-	0.248	0.301	0.553	0.223	0.201
Table 6: Ratio of the atoms.
Atom	Ref.	Pocket2Mol	TargetDiff	DiffSBDD	D3FG(Joint)	D3FG(Stage)
C	15.866	14.956	17.744	13.526	17.766	15.999
N	2.765	1.956	2.192	2.236	2.157	1.943
O	4.006	2.538	4.389	3.071	3.732	3.353
F	0.309	0.084	0.239	0.160	0.193	0.170
P	0.263	0.024	0.119	0.034	0.969	0.088
S	0.266	0.038	0.104	0.149	0.169	0.153
Cl	0.152	0.016	0.064	0.006	0.145	0.122
MAE	-	0.573	0.471	0.627	0.528	0.294
Platform. We use a single NVIDIA A100(81920MiB) GPU for a trial. The codes are implemented in Python 3.9 mainly with Pytorch 1.12, and run on Ubuntu Linux.
Model Details. In the diffusion of orientation and position, we employ a cosine variance schedule for  $\bar{\alpha}_t$ , which reads
$$
\bar {\alpha} _ {t} = \cos^ {2} \left(\frac {\pi}{2} \left(\frac {t}{T} + s\right) / (1 + s)\right) / \cos^ {2} \left(\frac {\pi}{2} s / (1 + s)\right), \tag {23}
$$
where  $s = 0.01$ . In the diffusion of atom type,  $\beta_{t}$  is set as  $\beta_{t} = \frac{t}{T}$ . For the denoiser, the layer number is set as 6, and the embedding size is set as 256. The model is trained with Adam optimizer in 5000 epochs.
Functional group and Atom type analysis. We give a detailed analysis of functional groups and atom types, in Table. 5, 6 and 7.
Bond Angle and Dihedral analysis. Besides bond distance, a detailed analysis of bond angle and dihedral is shown in Table. 8 and 9. It gives the JSD between the reference and the generated molecules, and demonstrates that D3FG generates more realistic drug molecules in comparison with other baselines.
Table 7: Frequency of the atoms.
Atom	Ref.	Pocket2Mol	TargetDiff	DiffSBDD	D3FG(Joint)	D3FG(Stage)
C	0.672	0.762	0.714	0.702	0.741	0.733
N	0.117	0.100	0.088	0.116	0.124	0.089
O	0.170	0.129	0.176	0.159	0.175	0.154
F	0.013	0.004	0.009	0.008	0.009	0.008
P	0.011	0.001	0.005	0.002	0.002	0.004
S	0.011	0.002	0.004	0.007	0.001	0.007
Cl	0.006	0.001	0.002	0.003	0.001	0.006
JSD	-	0.098	0.059	0.054	0.075	0.056
Table 8: JSD on bond angle distributions.
Angle	Pocket2Mol	TargetDiff	DiffSBDD	D3FG(Stage)	D3FG(Joint)
C-C-C	0.269	0.272	0.304	0.255	0.258
C-C-N	0.254	0.267	0.313	0.256	0.255
C-N-C	0.286	0.241	0.319	0.269	0.277
C-C-O	0.317	0.295	0.345	0.293	0.295
C-O-C	0.308	0.311	0.372	0.310	0.314
C-N-N	0.294	0.276	0.301	0.270	0.281
N-C-O	0.300	0.295	0.326	0.282	0.291
N-C-N	0.304	0.288	0.342	0.282	0.292
Table 9: JSD on dihedral distributions.
Dihedral	Pocket2Mol	TargetDiff	DiffSBDD	D3FG(Stage)	D3FG(Joint)
C-C-C-C	0.151	0.149	0.158	0.141	0.138
C-C-C-N	0.176	0.165	0.224	0.169	0.175
C-C-C-O	0.183	0.159	0.206	0.156	0.164
C-C-O-C	0.180	0.174	0.231	0.167	0.149
C-C-N-C	0.165	0.142	0.223	0.136	0.146
C-C-N-O	0.277	0.270	0.285	0.264	0.293
C-N-C-O	0.453	0.430	0.398	0.358	0.335
N-C-C-O	0.315	0.253	0.303	0.244	0.272
C-N-C-N	0.340	0.317	0.328	0.254	0.263
Table 10: The included functional groups in D3FG. 'T' is the occurrence times of the functional group in the datasets (100,000 ligands).
Smiles	2D graph	3D structures	A	B	C	T
c1cccc1	CH:4-CH:5
CH:3 CH:0
CH:2-CH:1	1	0	2	131148
NC=O	O:2 CH:1 NH2	1	0	2	49023
O=CO	HO:2 CH:1 O:0	1	0	2	39863
c1ccncc1	CH:4-CH:5
N:3 CH:0
CH:2-CH:1	3	2	4	15115
c1ncc2nc[nH]c2n1	CH:2 N-4 CH:0 N-8 CH:5	7	3	6	11369
NS(=O)=O	O:3 2N:0 S-1 O:2	1	0	2	10121
O=P(O)(O)O	HO:4 O-1 OH:2	1	0	2	7451
OCO	HO:2 CH2:1 OH:0	1	0	2	6405
c1cnnc1	N:4-CH:5
CH:3 CH:0
N:2-CH:1	3	2	4	5965
c1cn[nH]c1	N:2 CH:1 NH-3 CH:0	2	3	1	5404
O=P(O)O	OH:3
O:0
CH1OH:	0	1	center(2,3)	5271
c1ccc2cccc2c1	CH2CH4CH2CH3CH6	3	2	4	4742
c1ccsc1	CH2CH1S3CH4	3	2	4	4334
N=CN	H2N:2CH2NH:0	1	0	2	4315
NC(N)=O	H2N:2CH1NH2:0	2	1	3	4167
O=c1cc[nH]c(=O)[nH]1	CH2CH3NH:4CH1CH7CH5O:6	7	1	5	4145
c1ccc2ncccc2c1	CH1CH2CH4N4CH5CH1CH8CH7CH6	3	2	4	3519
c1cscn1	S2CH1CH3N4	2	3	1	3466
c1ccc2[nH]cnc2c1	CH1CH2CH4N4CH1CH8CH5N6	5	4	6	3462
c1c[nH]cn1	NH2CH1CH3N4	3	2	4	2964
O=[N+][O-]	-O:2N+1O:0	1	0	2	2702
O=CNO	HO:3CH2NH2O:0	1	0	2	2477
NC(=O)O	O:2CH1OH:3NH2:C	1	0	2	2438
O=S=O	O:0S3CH2O:2	1	0	2	2375
c1ccc2[nH]ccc2c1	CH1CH2CH3CH2CH6NH4OH:5	3	4	2	2301
Figure 5: Affinity metrics with the change of repository sizes.
Size	5	10	15	20	25
QED	0.489	0.484	0.502	0.496	0.501
SA	0.821	0.814	0.836	0.843	0.840
LogP	2.774	2.795	2.802	2.759	2.821
Lipinski	4.910	4.983	4.937	4.931	4.965
Table 11: Metrics of chemical properties with the change of repository sizes