Fragment and Geometry Aware Tokenization of Molecules for Structure-Based Drug Design Using Language Models

## Abstract

Abstract Structure-based drug design (SBDD) is crucial for developing specific and effective therapeutics against protein targets but remains challenging due to complex protein-ligand interactions and vast chemical space. Although language models (LMs) have excelled in natural language processing, their application in SBDD is underexplored. To bridge this gap, we introduce a method, known as Frag2Seq, to apply LMs to SBDD by generating molecules in a fragment-based manner in which fragments correspond to
functional modules.
We transform 3D molecules into fragment-informed sequences using S ⁢ E ⁢ ( 3 ) 𝑆 𝐸 3 SE(3) italic_S italic_E ( 3 ) -equivariant molecule and fragment local frames, extracting S ⁢ E ⁢ ( 3 ) 𝑆 𝐸 3 SE(3) italic_S italic_E ( 3 ) -invariant sequences that preserve geometric information of 3D fragments. Furthermore, we incorporate protein pocket embeddings obtained from a pre-trained inverse folding model into the LMs via cross-attention to capture protein-ligand interaction, enabling effective target-aware molecule generation.
Benefiting from employing LMs with fragment-based generation and effective protein context encoding, our model achieves the best performance on binding vina score and chemical properties such as QED and Lipinski, which shows our model’s efficacy in generating drug-like ligands with higher binding affinity against target proteins. Moreover, our method also exhibits higher sampling efficiency compared to atom-based autoregressive and diffusion baselines with at most ∼ 300 × \sim 300\times ∼ 300 × speedup.

## 1 Introduction

Structure-based drug design (SBDD) is a critical method in medicinal chemistry that involves the design and optimization of molecules to interact specifically and effectively with biological targets, typically protein pockets []. This approach is fundamental in developing new therapeutic drugs as it allows for more precise interaction with biological systems, potentially reducing side effects and increasing efficacy. Traditionally, SBDD relies heavily on high-throughput virtual screening [, ] and experimental validation. These processes are not only time-consuming and labor-intensive but also require substantial financial resources.

In recent times, machine learning has emerged as a promising approach for advancing scientific endeavors [, , ]. SBDD poses great challenges to machine learning models as it requires the model to capture complicated protein-ligand interaction while improving the drug-likeness of designed molecules. Earlier works have tried to use autoregressive models [, ] and diffusion models [, ] to encode context information and generate molecules. However, these models only consider atom-wise generation, and diffusion models typically need thousands of steps to generate, which results in an inefficient generation. Another line of work chooses to generate molecules based on molecular fragments [, ], but it often requires a complicated pipeline involving several neural networks to choose and link fragments.

Recently, language models (LMs) have demonstrated substantial promise in various fields due to their robust data processing and generative capabilities [, , , ]. These models, especially large language models (LLMs) [, , , ], excel in learning complex patterns and producing coherent outputs, which makes them ideal candidates for advanced tasks in natural language processing and beyond.
Despite these strengths, the application of LMs to SBDD remains largely unexplored.
LMs offer notable advantages, such as handling large datasets with prominent efficiency over diffusion-based methods, learning from massive biological and chemical texts for diverse potential tasks, and generating drug-like molecules with high specificity. However, challenges persist, particularly the need to adapt LMs to process geometric graph structures of molecular data, which are fundamentally different from textual data. Moreover, it’s promising to consider how to apply LMs to perform fragment-based generation, which can generate more realistic substructures and reduce generation steps to improve efficiency. Additionally, ensuring that these models can accurately simulate the physical and chemical properties of molecules remains a significant hurdle, and it’s also crucial to consider how to encode protein context information in LMs to effectively capture protein-ligand interaction in order to generate molecules that can bind to target proteins. Addressing these challenges could unlock the transformative potential of LMs in SBDD, leading to more efficient and effective drug discovery processes.

In this work, we propose to employ LMs to generate molecules in a fragment-based manner for the SBDD task. To achieve this, we developed a novel approach to convert 3D molecules into fragment-informed sequences by constructing $SE(3)$-equivariant molecule and fragment local frames and then extracting $SE(3)$-invariant sequences that contain the $SE(3)$-invariant coordinates and orientations of 3D fragments. To consider protein conditions, we use an existing pre-trained inverse folding model to extract the embedding of protein pockets and incorporate this information into LMs by cross-attention mechanism. In this way, our method enables the usage of powerful LMs in the target-aware molecule generation while keeping geometric information in sequence conversion.
Our experimental results evidence these advantages, outperforming strong baselines in both efficacy and efficiency.

## 2 Related Works

Structure-Based Drug Design. Structure-based drug design aims to generate molecules that can bind to the given protein pocket. LiGAN [] uses an atomic density grid to represent protein-ligand structures. The atom type, positions, and bonds are constructed from generated density grids. Then, the following works [, , ] generate molecules using autoregressive models. For example, GraphBP [] uses normalizing flow to generate each atom’s relative position in an equivariant way by constructing local coordinate systems. Pocket2Mol [] also considers bond generation to improve the structure validity. Compared with autoregressive models, diffusion-based SBDD models [, , ] can generate all atoms of molecules in a one-shot way. For example, DiffSBDD [] denoises all atom positions and types from a Gaussian distribution. To generate more realistic substructures, FLAG [] and DrugGPS [] adopt fragment-based methods to generate molecules motif-by-motif. For those methods using language models, TamGen [] only generates SMILES, and Lingo3DMol [] generates fragment-based SMILES then predicts molecule coordinates. They both need pre-training on millions of SMILES or 3D molecule structures to achieve good results.

Language Models for Chemistry.
Drawing inspiration from the success of LMs in NLP and beyond, chemical language models (CLMs) emerge as a competent way for representing molecules [, , , ].
Variants of LMs have been adapted for molecular science, producing a variety of works including
DrugGPT [], DrugChat [], MoleculeSTM [], ChemGPT [] MolGPT [], MolReGPT [], MolT5 [], MoleculeGPT [], InstructMol [], and many others [, , , ].
CLMs learn the chemical vocabulary
and syntax used to represent molecules.
All inputs including chemical structures and property syntax should be converted into a sequence form and tokenized for compatibility with language models.
Commonly, SMILES [] is used for this sequential representation, although other formats like SELFIES [], atom type strings, and custom strings with positional or property values are also viable options.
To learn representations, CLMs are usually pre-trained on extensive molecular sequences through self-supervised learning. Subsequently, models are fine-tuned
on more focused datasets with desired properties, such as activity against a target protein.
Most existing CLM works consider chemical structures as well as other modalities such as natural language captions [, , , , , , , , , , , ], while some focus on pure text of chemical literature [] or molecule strings [, , , , , , , , , ]. Notably, all these works solely consider 2D molecules for representation learning and downstream tasks, overlooking 3D geometric structures which is crucial in many chemical predictive and generative tasks. In order to use pivotal 3D information, another line of work incorporate geometric models such as GNNs in parallel with the CLM [, , , , , ], which requires additional design and training techniques to mitigate alignment issues. However, no existing work uses LMs to directly generate 3D ligands in structure-based drug design.

## 3 Methods

In this section, we describe how to convert 3D molecules into sequences in a fragment-based manner, which can be effectively processed by language models. In Section 3.1, we formally introduce the problem definition of SBDD. Then, in Section 3.2, we show how to split 3D molecules into 3D fragments. With these 3D fragments, next in Section 3.3, we introduce the way to construct a bijective mapping between 3D fragments and $SE(3)$-invariant sequences by constructing $SE(3)$-equivariant molecule and fragment local frames. Finally, in Section 3.4, we describe how to incorporate conditional information of proteins into the language model and the training and generation strategies.

### 3.1 Problem Definition

Our objective is to design 3D molecules (*i.e.*, ligands) that can effectively bind to a given protein target within its binding pocket while also demonstrating suitable drug-like properties. The 3D geometry of a protein binding pocket is represented as $\mathcal{P}=\{(\bm{s}_{i},\bm{b}_{i})\}_{i=1}^{n}$, where $\bm{s}_{i}\in\mathbb{R}^{3}$ denotes the 3D Cartesian coordinates of the $i$-th atom and $\bm{b}_{i}$ is a one-hot vector that denotes the atom type. Similarly, we represent a ligand as $\mathcal{M}=\{({\bm{v}}_{j},\bm{z}_{j})\}_{i=1}^{m}$, where $\bm{v}_{j}\in\mathbb{R}^{3}$ and $\bm{z}_{j}$ denote coordinates and atom type, respectively. Our goal is to learn a conditional generative model that captures the conditional probability $p(\mathcal{M}|\mathcal{P})$ from the training protein-ligand pairs.

Figure: Figure 1: Illustration of splitting molecules into fragments.
Refer to caption: x1.png

### 3.2 3D Molecule Fragmentation

Since we generate molecules in a 3D fragment-based manner, we first need to decompose molecules in the training set into 3D fragments. Specifically, as shown in Figure 1, we split fragments by cutting rotatable chemical bonds that meet three conditions: (1) the bond is not in a ring, (2) the bond type is single, and (3) the degree of the beginning and end atom on the bond is larger than 1. The third condition prevents breaking the functional groups, such as the hydroxy and carboxyl groups. To maintain a canonical order of splited fragments, we further sort fragments based on the order of their appearance in the canonical SMILES representation. More details of canonical order are described in Section 3.3.1. Formally, for a molecule $\mathcal{M}$, we split it into a set of 3D fragments $\{\mathcal{G}_{i}=(Z_{i},V_{i})\}_{i=1}^{k}$, where $Z_{i}$ denotes atom type matrix and $V_{i}$ denotes Cartesian coordinates.

### 3.3 Fragment-Based 3D Molecule Tokenization

#### 3.3.1 Atom Ordering based on 3D Graph Isomorphism

As the first step in molecule tokenization, we need to transform a molecular (fragment) graph into a 1D sequential representation. Thus we need to establish an order for the atoms of given 3D graphs. To acheive dimension reduction with least information loss, we seek uniqueness in the ordering and resort to canonical SMILES [, ]as a solution.
A key property of canonical SMILES is its ability to provide a unique string representation for a given molecular structure, which is not inherently guaranteed by the basic SMILES algorithm. We refer to a set of (atom) orders with canonical properties as canonical orders [, ].
The canonicalization of SMILES involves a deterministic process where the algorithm selects a unique starting atom and follows a set of predefined rules to traverse the molecule in a systematic way. This results in a consistent and reproducible ordering of atoms and bonds within the SMILES string, irrespective of the initial input format. The canonical form is crucial for database searches and for ensuring consistency in chemical databases, as it prevents duplicates and allows for efficient indexing and retrieval of molecular data, which ensures maximum invariance for atom reordering.

To formally study which molecules the canonical forms can distinguish between and not, we first give the below definition following graph theories.

###### Definition 3.1 .

[3D Molecular Graph Isomorphism]
Let $\mathcal{M}_{1}=(V_{1},Z_{1})$ and $\mathcal{M}_{2}=(V_{2},Z_{2})$ be two 3D molecular graphs, where ${\bm{z}}_{i}$ is the node type vector and ${\bm{v}}_{i}$ is the node coordinates of the molecule $\mathcal{M}_{i}$.
Let $ver(\cdot)$ denote the set of vertices, $attr(\cdot)$ denote node attributes, and no edge exists. Let $\mathcal{M}_{1}\cong\mathcal{M}_{2}$ denote two attributed graphs are isomorphic.
Two 3D molecules $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are 3D isomorphic, denoted as $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$, if there exists a bijection $b:ver(\mathcal{M}_{1})\rightarrow ver(\mathcal{M}_{2})$
such that for every atom in $\mathcal{M}_{1}$ indexed $i$, ${\bm{z}}^{\mathcal{M}_{1}}_{i}={\bm{z}}^{\mathcal{M}_{2}}_{b(i)}$,
and there exists a 3D transformation $\tau\in SE(3)$ such that ${\bm{v}}^{\mathcal{M}_{1}}_{i}=\tau({\bm{v}}^{\mathcal{M}_{2}}_{b(i)})$.
If a small error $\bm{\epsilon}$ is allowed such that $|{\bm{v}}^{\mathcal{M}_{1}}_{i}-\tau({\bm{v}}^{\mathcal{M}_{2}}_{b(i)})|\leq
\bm{\epsilon}$, we call the two 3D graphs $\bm{\epsilon}$-constrained 3D isomorphic.

This leads us to the following guarantee.

###### Lemma 3.2 .

[Canonical Ordering for 3D Molecular Graph Isomorphism]
Let $\mathcal{M}_{1}=(V_{1},Z_{1})$ and $\mathcal{M}_{2}=(V_{2},Z_{2})$ be two 3D molecular graphs following Def. 3.1. Let ${\bm{L}}:\mathcal{M}\rightarrow\mathcal{L}$ be a function that maps a molecule $\mathcal{M}\in\mathcal{M}$, the set of all finite 3D molecular graphs, to its canonical order ${\bm{L}}(\mathcal{M})\in\mathcal{L}$, the set of all possible canonical orders, as produced by the canonical SMILES. Then the following equivalence holds:

$$ ${\bm{L}}(\mathcal{M}_{1})={\bm{L}}(\mathcal{M}_{2})\Leftrightarrow\mathcal{M}_ {1}\cong_{3D}\mathcal{M}_{2}$ $$

where $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$ denotes that $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are 3D isomorphic.

Lemma 3.2 indicates that the established ordering with canonical SMILES is both complete (sufficient to distinguish non-3D-isomorphic molecules) and sound (not distinguishing actually 3D-isomorphic molecules). Detailed proof is provided in Section B.1.

Figure: Figure 2: Overview of Frag2Seq pipeline. Atoms in the small molecule are reordered according to the order in canonical SMILES. Then, we split the 3D molecules into 3D fragments and sort them based on the canonical order. Next, we construct $SE(3)$-equivariant molecule and fragment frames, which are local coordinate systems for molecules and fragments, respectively. Then, we obtain the $SE(3)$-invariant spherical coordinates $(d,\theta,\phi)$ of each fragment center under the molecule frame and $SE(3)$-invariant rotation vector $(m_{x},m_{y},m_{z})$ between fragment and molecule frames. Lastly, we concatenate them into sequences. Protein node embeddings are obtained using the ESM-IF1 model and incorporated into the language model via cross-attention.
Refer to caption: x2.png

###### Definition 3.1 .

###### Lemma 3.2 .

#### 3.3.2 S ⁢ E ⁢ ( 3 ) 𝑆 𝐸 3 SE(3) italic_S italic_E ( 3 ) -Equivariant Molecule and Fragment Frames Construction

To integrate 3D structure information into our sequences, one main challenge is to ensure the $SE(3)$-invariance property. Specifically, given a 3D molecule, if it is rotated or translated in the 3D space, its 3D representation should be unchanged. In order to incorporate invariance, we first need to construct $SE(3)$-equivariant frames for fragments and whole molecules.

Given a 3D molecule $\mathcal{M}$ with atom types $Z$ and atom coordinates $V$, we first build a molecule local coordinate frame $\mathfrak{m}=({\bm{x}},{\bm{y}},{\bm{z}})$ based on the input molecule. For the fragments $\{\mathcal{G}_{i}\}_{i=1}^{k}$ of $\mathcal{M}$, we sort the $k$ fragments based on the canonical order ${\bm{L}}(\mathcal{M})$, specifically by the order of a fragment’s first-ranked atom. We calculate the average atom coordinates as the center of each fragment.
As shown in Figure 2, the frame is built based on the first three non-collinear fragment centers in the canonical order. Let $\ell_{1},\ell_{2}$, and $\ell_{m}$ be the indices of these three fragment centers.
Then the molecule local frame $\mathfrak{m}=({\bm{x}},{\bm{y}},{\bm{z}})$ is calculated as

$$ $\displaystyle{\bm{x}}$ $\displaystyle=\text{normalize}({\bm{v}}_{\ell_{2}}-{\bm{v}}_{\ell_{1}}),\ \ { \bm{y}}=\text{normalize}\left(\left({\bm{v}}_{\ell_{m}}-{\bm{v}}_{\ell_{1}} \right)\times{\bm{x}}\right),\ \ {\bm{z}}={\bm{x}}\times{\bm{y}},$ (1) $$

where $\text{normalize}(\cdot)$ is the function to normalize a vector to unit length. Note that the molecule local frame is equivariant to the rotation and translation of the input molecule.

Given the basis vectors $({\bm{x}},{\bm{y}},{\bm{z}})$ of the molecule local frame, we can construct the transformation between the molecule local frame $\mathfrak{m}$ and the world frame $\mathfrak{w}$, which we denote as $\mathfrak{m}\rightarrow\mathfrak{w}$. Specifically, the transformation involves a rotation matrix $R_{\mathfrak{m}\rightarrow\mathfrak{w}}\in\mathbb{R}^{3\times 3}$ with $|R_{\mathfrak{m}\rightarrow\mathfrak{w}}|=1$ and a translation vector ${\bm{t}}_{\mathfrak{m}\rightarrow\mathfrak{w}}\in\mathbb{R}^{3}$. Since the basis vectors $({\bm{x}},{\bm{y}},{\bm{z}})$ are already normalized and orthogonal to each other, we can directly stack them together to form the rotation matrix, such that $R_{\mathfrak{m}\rightarrow\mathfrak{w}}=[{\bm{x}}^{T},{\bm{y}}^{T},{\bm{z}}^{T}]$. For the translation vector, we can set ${\bm{t}}_{\mathfrak{m}\rightarrow\mathfrak{w}}={\bm{v}}_{\ell_{1}}$ as it represents the displacement between the origins of the two frames.

Next, we need to build the local coordinate system for each 3D fragment. Similar to the building process of the molecule local frame, we use the first three non-collinear atoms in a fragment to construct the fragment local coordinate frame and we denote it as $\mathfrak{g}$. The fragment local frame is also equivariant to the rotation and translation of the input molecule. Similarly, we can obtain the rotation matrix $R_{\mathfrak{g}\rightarrow\mathfrak{w}}$ and translation vector ${\bm{t}}_{\mathfrak{g}\rightarrow\mathfrak{w}}$, which represent the orientation and displacement between the fragment local frame and the world frame, respectively.

Under the fragment local frame, we can obtain the local coordinates of atoms $V_{\mathcal{G}_{i}}\in\mathbb{R}^{q\times 3}$ in the $i$-th fragment, where $q$ denotes the number of atoms in a fragment. Then, we save each splited fragment from the training set into a dictionary with the key to be the canonical SMILES of each fragment and the value to be the atom types and atom local coordinates in each fragment under the associated fragment local frame.

With the transformation from the world frame to the molecule local frame and from the world frame to the fragment local frame, we can derive the transformation between the molecule local frame and the fragment local frame by using homogeneous transformation conversion. Specifically, we construct homogeneous transformation matrices from rotation matrices $R$ and translation vectors $\bm{t}$. Formally, we have

$$ $\displaystyle T_{\mathfrak{m}\rightarrow\mathfrak{w}}=\begin{bmatrix}R_{ \mathfrak{m}\rightarrow\mathfrak{w}}&\bm{t}_{\mathfrak{m}\rightarrow\mathfrak{ w}}\\ \bm{0}&1\\ \end{bmatrix},\ \ T_{\mathfrak{g}\rightarrow\mathfrak{w}}=\begin{bmatrix}R_{ \mathfrak{g}\rightarrow\mathfrak{w}}&\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{ w}}\\ \bm{0}&1\\ \end{bmatrix},$ (2) $$

where $T\in\mathbb{R}^{4\times 4}$ denotes the homogeneous transformation matrix and $\bm{0}\in\mathbb{R}^{3\times 1}$ is a zero vector.

Then, we can use the chain rule of coordinate frame transformations to obtain the homogeneous transformation between molecule and fragment local frames. Formally,

$$ $\displaystyle T_{\mathfrak{g}\rightarrow\mathfrak{m}}=T_{\mathfrak{m} \rightarrow\mathfrak{w}}^{-1}T_{\mathfrak{g}\rightarrow\mathfrak{w}}$ $\displaystyle=\begin{bmatrix}R_{\mathfrak{m}\rightarrow\mathfrak{w}}^{T}&-R_{ \mathfrak{m}\rightarrow\mathfrak{w}}^{T}\bm{t}_{\mathfrak{m}\rightarrow \mathfrak{w}}\\ \bm{0}&1\\ \end{bmatrix}\begin{bmatrix}R_{\mathfrak{g}\rightarrow\mathfrak{w}}&\bm{t}_{ \mathfrak{g}\rightarrow\mathfrak{w}}\\ \bm{0}&1\\ \end{bmatrix}$ (3) $\displaystyle=\begin{bmatrix}R_{\mathfrak{m}\rightarrow\mathfrak{w}}^{T}R_{ \mathfrak{g}\rightarrow\mathfrak{w}}&R_{\mathfrak{m}\rightarrow\mathfrak{w}}^{ T}(\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{w}}-\bm{t}_{\mathfrak{m} \rightarrow\mathfrak{w}})\\ \bm{0}&1\\ \end{bmatrix}.$ $$

From the homogeneous transformation matrix $T_{\mathfrak{g}\rightarrow\mathfrak{m}}$, we can extract the rotation matrix $R_{\mathfrak{g}\rightarrow\mathfrak{m}}$ which will be used to obtain invariant representations as described in Section 3.3.3 and the translation vector $\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{m}}$ such that

$$ $\displaystyle R_{\mathfrak{g}\rightarrow\mathfrak{m}}=R_{\mathfrak{m} \rightarrow\mathfrak{w}}^{T}R_{\mathfrak{g}\rightarrow\mathfrak{w}},\ \ \ \bm{ t}_{\mathfrak{g}\rightarrow\mathfrak{m}}=R_{\mathfrak{m}\rightarrow\mathfrak{w }}^{T}(\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{w}}-\bm{t}_{\mathfrak{m} \rightarrow\mathfrak{w}}).$ (4) $$

For each fragment in the fragment dictionary, apart from atom types and atom local coordinates, we also need to save the displacement $\bm{t}_{\mathfrak{g}\rightarrow c(\mathcal{G})}$ between the origin of the fragment local frame and the fragment center, which can be calculated via

$$ $\displaystyle\bm{t}_{\mathfrak{g}\rightarrow c(\mathcal{G})}=V^{\mathfrak{m}}_ {c(\mathcal{G})}-\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{m}},$ (5) $$

where $c(\mathcal{G})$ denotes the center of any fragment $\mathcal{G}$, and $V^{\mathfrak{m}}_{c(\mathcal{G})}$ represents the coordinates of the fragment center under the molecule local frame. $\bm{t}_{\mathfrak{g}\rightarrow c(\mathcal{G})}$ will be used when converting atom local coordinates from fragment local frame back to the world frame, which is described in Section 3.3.3.

Figure: Figure 3: Illustraions of equivariant local frames. Left: If the molecule is translated and rotated, the molecule and fragment local frames are transformed accordingly. Right: Local frames are constructed using the first three non-collinear points, and the spherical coordinates are obtained under the local frame. More details are shown in Section 3.3.2 and Section 3.3.3.
Refer to caption: x3.png

#### 3.3.3 S ⁢ E ⁢ ( 3 ) 𝑆 𝐸 3 SE(3) italic_S italic_E ( 3 ) -Invariant Fragment Local Representations

After establishing the frames, we use a function $f(\cdot)$ to convert the coordinates of each fragment center to spherical coordinates $d,\theta,\phi$ under the molecule frame $\mathfrak{m}=({\bm{x}},{\bm{y}},{\bm{z}})$.
Specifically, for each fragment center ${\ell_{i}}$ with coordinate ${\bm{v}}_{\ell_{i}}$, the corresponding spherical coordinate is

$$ $\displaystyle d_{\ell_{i}}$ $\displaystyle=||{\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}}||_{2},\ \ \theta_{\ell _{i}}=\arccos\left(\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}}\right)\cdot{ \bm{z}}/d_{\ell_{i}}\right),$ (6) $\displaystyle\phi_{\ell_{i}}$ $\displaystyle=\operatorname{atan2}\left(\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{ \ell_{1}}\right)\cdot{\bm{y}},\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}} \right)\cdot{\bm{x}}\right).$ $$

The spherical coordinates show the relative position of each fragment under the molecule frame $\mathfrak{m}$. As shown in Figure 3, if the molecular coordinates are rotated by a matrix $R$ and translated by a vector ${\bm{t}}$, the transformed spherical coordinates remain the same, so the spherical coordinates are $SE(3)$-invariant.

Compared to Cartesian coordinates, spherical coordinate values are bounded in a smaller region, namely, a range of $[0,\pi]$/$[0,2\pi]$. Given the same numerical constraints, spherical coordinates require a smaller vocabulary size, and given the same vocabulary size, spherical coordinates present less information loss. This makes spherical coordinates advantageous in discretized representations and thus easier to be modeled by LMs. Experiments also show the superiority of invariant spherical coordinates over invariant Cartesian coordinates, as detailed in Appendix C.4

Apart from the spherical coordinates of the fragment center point under the molecule local frame, we also need the orientation of the fragment local frame with respect to the molecule local frame. One option is to directly use the rotation matrix $R_{\mathfrak{g}\rightarrow\mathfrak{m}}$ we derived above. However, the rotation matrix representation has redundant information since 3D rotation in Euclidean space only has three degrees of freedom, and it can also unnecessarily increase the context length for LMs. To have a more compact rotation representation, we use a function $g(\cdot,\cdot)$ that takes in both the molecule and fragment local frames to obtain a rotation vector, which indicates the rotation axis and angle. Specifically, we first calculate the rotation matrix $R_{\mathfrak{g}\rightarrow\mathfrak{m}}$ in $g(\cdot,\cdot)$, as described in Section 3.3.2, then we can obtain the rotation angle $\psi$ and rotation axis $\bm{a}=(a_{x},a_{y},a_{z})$ from the rotation matrix. Next, we can calculate rotation vector $\bm{m}=(m_{x},m_{y},m_{z})$ via $\bm{m}=\psi\bm{a}$. Detailed derivation of $\psi$ and $\bm{a}$ can be found in Appendix A.

Conversely, given the spherical coordinates of the fragment centers under the molecule local frame and the rotation vector $\bm{m}$ between the fragment and molecule local frames, we can derive the atom coordinates in the world frame. Specifically, we first convert spherical coordinates to Cartesian coordinates $V^{\mathfrak{m}}_{c(\mathcal{G})}$ and transform the rotation vector back to the rotation matrix $R_{\mathfrak{g}\rightarrow\mathfrak{m}}$. Then, we can use coordinate transformation to convert atom coordinates from the fragment local frame to the world frame. Formally,

$$ $\displaystyle\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{m}}=V^{\mathfrak{m}}_{c( \mathcal{G})}-\bm{t}_{\mathfrak{g}\rightarrow c(\mathcal{G})},\ \ V^{\mathfrak {m}}=V^{\mathfrak{g}}R^{T}_{\mathfrak{g}\rightarrow\mathfrak{m}}+\bm{t}_{ \mathfrak{g}\rightarrow\mathfrak{m}},\ \ V^{\mathfrak{w}}=V^{\mathfrak{m}}R^{T }_{\mathfrak{m}\rightarrow\mathfrak{w}}+\bm{t}_{\mathfrak{m}\rightarrow \mathfrak{w}}.$ (7) $$

where $V^{(\cdot)}$ denotes atom coordinates under a certain coordinate frame and $\bm{t}_{\mathfrak{g}\rightarrow c(\mathcal{G})}$ can be retrieved from the fragment dictionary built in Section 3.3.2. As for $R_{\mathfrak{m}\rightarrow\mathfrak{w}}$ and $\bm{t}_{\mathfrak{m}\rightarrow\mathfrak{w}}$, they are associated with the reference molecule for a given protein pocket when we construct the molecule local frame, and we can still use them when we generate new molecules for the same protein pocket.

Formally, with the $SE(3)$-equivariant local frames constructed in Section 3.3.2, we have the following properties of local representations built in this section.

###### Lemma 3.3 .

Let $\mathcal{M}=(V,Z)$ be a 3D molecular graph with node type matrix $Z$ and node coordinate matrix $V$. Let $\mathfrak{m}$ be equivariant local frames of $\mathcal{M}$ built based on the first three non-collinear fragment centers in ${\bm{L}}(\mathcal{M})$ and $\mathfrak{g}$ be equivariant local frames of any fragment $\mathcal{G}_{i}$ built based on the first three non-collinear atoms in ${\bm{L}}(\mathcal{G}_{i})$.
$f(\cdot)$ is our function that maps 3D coordinate matrix $V$ of $\mathcal{M}$ to spherical representations ${\bm{S}}$ under the molecule local frame $\mathfrak{m}$. $g(\cdot,\cdot)$ is the function that maps the molecule local frame $\mathfrak{m}$ and fragment local frame $\mathfrak{g}$ to rotation vectors $\bm{m}$. Then for any 3D transformation $\tau\in SE(3)$, we have $f(V)=f(\tau(V))$ and $g(\mathfrak{m},\mathfrak{g})=g(\tau(\mathfrak{m},\mathfrak{g}))$.
Given spherical representations ${\bm{S}}=f(V)$ and rotation vectors $\bm{m}=g(\mathfrak{m},\mathfrak{g})$, there exist a transformation $\tau\in SE(3)$, such that $f^{-1}({\bm{S}})=\tau(V)$ and $g^{-1}(\bm{m})=\tau(\mathfrak{m},\mathfrak{g})$.

Lemma 3.3 shows that our spherical and rotation vector representations are $SE(3)$-invariant, and we can reconstruct original molecules from those representations, differing only by a $SE(3)$ transformation. Detailed proof is provided in Section B.2.

###### Lemma 3.3 .

#### 3.3.4 Frag2Seq: Fragment and Geometry Aware Tokenization

With ordering that reduces molecule structures to 1D sequences and $SE(3)$-invariant spherical and rotation representations, both ensuring minimum 3D information loss, we develop a reversible transformation from 3D molecular fragments to 1D sequences.
Figure 2 shows an overview of our method, which we term as Frag2Seq.
Specifically, given a molecule $\mathcal{M}$ with $k$ fragments, we concatenate the fragment-position vector $[s_{i},d_{i},\theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}]$ of every fragment $\mathcal{G}_{i}$ in $\mathcal{M}$ into a 1D sequence by its canonical order, $\ell_{1},\cdots,\ell_{k}$, where $s_{i}$ is the canonical SMILES string of $\mathcal{G}_{i}$.
To define the properties of Frag2Seq, we formulate Frag2Seq and our major theoretical derivations below.

###### Theorem 3.4 .

[Bijective Mapping]
Following Def. 3.1, let $\mathcal{M}_{1}=(V_{1},Z_{1})$ and $\mathcal{M}_{2}=(V_{2},Z_{2})$ be two 3D molecular graphs.
Let ${\bm{L}}(\mathcal{M})$ be the canonical order for $\mathcal{M}$ and $f(\cdot)$ and $g(\cdot,\cdot)$ be the functions following Lemma 3.3.
Let the fragment-position vector for a molecule fragment $\mathcal{G}_{i}$ be ${\bm{x}}^{*}_{i}=[s_{i},d_{i},\theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}]$, where the vector elements are derived from $f(\cdot)$ and $g(\cdot,\cdot)$ as predefined.
For the fragments $\{\mathcal{G}_{i}\}_{i=1}^{k}$ of $\mathcal{M}$, we construct canonical order ${\bm{L}}(\mathcal{M})$ for the $k$ fragments, $\ell_{1},\cdots,\ell_{k}$, specifically by the order of a fragment’s first-ranked atom.
We define $\text{Frag2Seq}:\mathcal{M}\rightarrow\mathcal{U}$, which maps a molecule $\mathcal{M}\in\mathcal{M}$ to its sequence representation $U\in\mathcal{U}$, the set of all possible sequence representations, as

$$ $\text{Frag2Seq}(\mathcal{M})=\text{concat}({\bm{x}}^{*}_{\ell_{1}},\cdots,{\bm {x}}^{*}_{\ell_{k}}),$ $$

where $\text{concat}(\cdot)$ concatenates elements as a sequence.
Then $\text{Frag2Seq}(\cdot)$ is a surjective function, and the following equivalence holds:

$$ $\text{Frag2Seq}(\mathcal{M}_{1})=\text{Frag2Seq}(\mathcal{M}_{2}) \Leftrightarrow\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2},$ $$

where $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$ denotes $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are 3D isomorphic.
If we allow rounding up spherical coordinate and rotation vector values to $\geq b$ decimal places, then the surjectivity and equivalence still hold, only molecules $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are $(|10^{-b}|/2)$-constrained 3D isomorphic.

Theorem 3.4 establishes guarantees that we can uniquely construct a 1D sequence given a 3D molecule using Frag2Seq, and uniquely reconstruct a 3D molecule given a sequence output of Frag2Seq. Furthermore, two sequence outputs from Frag2Seq are identical if and only if the two corresponding molecules are 3D isomorphic. This enables sequential tokenization of 3D molecules while preserving structural completeness and geometric invariance. Due to the necessity of discreteness in tokenization for LMs, in reality, numerical values need to be discretized before concatenation. In practice, we round up numerical values to certain decimal places. In this case, Theorem 3.4 also extends guarantees for the practical use of Frag2Seq. If we allow a round-up error below $|10^{-b}|/2$ for coordinates when distinguishing 3D isomorphism, all properties still hold. This implies that the practical Frag2Seq implementation retains near-complete geometric information and invariance, with numerical precision of $\bm{\epsilon}\leq|10^{-b}|/2$.

With discreteness incorporated, we can collect a finite vocabulary covering all accessible fragment samples to enable tokenization for LMs.
Specifically, we use vocabularies consisting of fragment type tokens such as $O,O=C,c1ccccc1,\cdots$, and numerical tokens such as $-8.126$, $0.05^{\circ}$ or $-1.702^{*}$. The numerical tokens range from the smallest to the largest distance, angle, and rotation values with restricted precision of 2 or 3 decimal places.

###### Theorem 3.4 .

### 3.4 Conditional Training and Generation

After we obtain the sequence representation of 3D molecules $U=\{u_{1},\cdots,u_{n}\}$, we need to model the distribution of such 3D geometry-aware sequences. We adopt GPT [] as the base model to learn the distribution. To incorporate the protein pocket condition, we use pre-trained inverse folding model ESM-IF1 [] to obtain node embeddings of the protein backbone. Then, we add cross-attention between protein node embeddings and ligand token embeddings after the multi-head self-attention in each attention block, in which queries are from ligand token embedding and keys and values are from protein node embedding. For training, we use the standard next-token prediction cross-entropy loss to maximize the following likelihood:

$$ $\displaystyle\mathcal{L}(U)=\sum_{i}\log p_{\theta}(u_{i}|u_{i-1},\cdots,u_{1}).$ (8) $$

To generate molecules conditioned on a protein pocket, we first need to sample initial fragment tokens from the first-token distribution in the training set. Then, we can generate the following tokens autoregressively by sampling from the conditional distribution $p_{\theta}(u_{i}|u_{i-1},\cdots,u_{1})$ and we stop the generation when the maximum length is reached or the ending token is sampled.

Figure: Figure 4: Visualization of our generated 3D molecules that have higher binding affinity than the reference molecule in the test set. A higher QED indicates more drug-likeness, and a lower Vina score indicates higher binding affinity.
Refer to caption: x4.png

## 4 Experiments

We empirically show the effectiveness of our method in generating ligands for protein pockets. In Section 4.1, we describe the experimental setup, including dataset, baselines, and evaluation metrics. Then, in Section 4.2, we present our results about binding affinity, chemical properties, efficiency, and structural distribution. Due to the limited space, we conduct ablation studies on several design choices in Section C.4, and more results about efficiency and structural analysis in Sections C.5 and C.6.

### 4.1 Setup

Dataset. Following Schneuing et al. [], we use the CrossDocked dataset [] that is further curated by previous work []. More details about the dataset is provided in Section C.1.

Baselines. We compare with recent state-of-the-art methods in structure-based drug design. 3D-SBDD [], Pocket2Mol [], and GraphBP [] generate atoms in an autoregressive scheme. TargetDiff [], DecompDiff [], and DiffSBDD [] are diffusion-based methods that generate all atoms in one shot. FLAG [] and DrugGPS [] generate molecules motif-by-motif.
Lingo3DMol [] uses a language model to generate fragment-based SMILES and then predict coordinates. The language model is pre-trained on $12$ million 3D molecules using a denoising strategy.

Evaluation Metrics. We adopt commonly-used metrics used in previous work [, ] to evaluate the quality of our generated molecules: (1) Vina Score estimates the binding affinity between generated molecules and given protein pockets; (2) High Affinity measures the percentage of generated molecules that have higher binding affinity than the reference molecule for a certain protein; (3) QED is a measure used to assess the drug-likeness of a molecule based on its molecular properties; (4) SA estimates how easy it would be to synthesize a given chemical compound; (5) Lipinski measures how well a molecule satisfies the Lipinski’s rule of five [], which evaluates the drug-likeness of a molecule; (6) Diversity measures the average pairwise diversity (calculated as $1-\mathrm{Tanimoto\ similarity}$) of generated molecules for a binding pocket; (7) Time is the average time cost to generate 100 molecules for a protein pocket in the test set. All the Vina scores are calculated by QVina [], and the chemical properties are calculated by RDKit [].

**Table 1: Summary of molecular properties for generated molecules by our method and other baselines. * denotes the property results taken from the DiffSBDD paper. $\dagger$ denotes that we re-evaluate the properties of generated molecules of those baselines using the DiffSBDD evaluation code for a fair comparison. The best results are annotated in bold.**
| Methods | Vina Score ($\downarrow$) | High Affinity ($\uparrow$) | QED ($\uparrow$) | SA ($\uparrow$) | Lipinski ($\uparrow$) | Diversity ($\uparrow$) | Time (s, $\downarrow$) |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Test set | $-6.871\pm 2.32$ | $-$ | $0.476\pm 0.20$ | $0.728\pm 0.14$ | $4.340\pm 1.14$ | $-$ | $-$ |
| 3D-SBDD* | $-5.888\pm 1.91$ | $0.364\pm 0.31$ | $0.502\pm 0.17$ | $0.675\pm 0.14$ | $4.787\pm 0.51$ | $0.742\pm 0.09$ | $15986.4\pm 9851.0$ |
| Pocket2Mol* | $-7.058\pm 2.80$ | $0.515\pm 0.31$ | $0.572\pm 0.16$ | $\mathbf{0.752\pm 0.12}$ | $4.936\pm 0.27$ | $0.735\pm 0.15$ | $2827.3\pm 1456.8$ |
| GraphBP* | $-4.719\pm 4.03$ | $0.183\pm 0.21$ | $0.502\pm 0.12$ | $0.307\pm 0.09$ | $4.883\pm 0.37$ | $\mathbf{0.844\pm 0.01}$ | $1162.8\pm 438.5$ |
| TargetDiff* | $-7.318\pm 2.47$ | $0.581\pm 0.31$ | $0.483\pm 0.20$ | $0.584\pm 0.13$ | $4.594\pm 0.83$ | $0.718\pm 0.09$ | $\sim 3428$ |
| DecompDiff$\dagger$ | $-6.607\pm 2.11$ | $0.423\pm 0.25$ | $0.496\pm 0.21$ | $0.659\pm 0.14$ | $4.493\pm 1.02$ | $0.722\pm 0.10$ | $\sim 6189$ |
| DiffSBDD* | $-7.177\pm 3.28$ | $0.499\pm 0.30$ | $0.556\pm 0.20$ | $0.729\pm 0.12$ | $4.742\pm 0.59$ | $0.718\pm 0.07$ | $629.9\pm 277.2$ |
| FLAG$\dagger$ | $-6.389\pm 3.24$ | $0.478\pm 0.34$ | $0.487\pm 0.19$ | $0.702\pm 0.15$ | $4.656\pm 0.74$ | $0.701\pm 0.14$ | $1289.1\pm 378.0$ |
| DrugGPS$\dagger$ | $-6.608\pm 2.38$ | $0.421\pm 0.24$ | $0.467\pm 0.21$ | $0.628\pm 0.15$ | $4.495\pm 0.99$ | $0.738\pm 0.10$ | $1007.8\pm 554.1$ |
| Lingo3DMol$\dagger$ | $-7.257\pm 1.69$ | $0.625\pm 0.36$ | $0.269\pm 0.15$ | $0.656\pm 0.08$ | $3.121\pm 1.25$ | $0.480\pm 0.12$ | $1481.9\pm 1512.8$ |
| Frag2Seq | $\mathbf{-7.366\pm 1.96}$ | $\mathbf{0.653\pm 0.33}$ | $\mathbf{0.645\pm 0.15}$ | $0.642\pm 0.11$ | $\mathbf{4.989\pm 0.11}$ | $0.711\pm 0.07$ | $\mathbf{48.8\pm 14.6}$ |

### 4.2 Results

Figure: Figure 5: Comparison of the distribution of carbon-carbon bond distance. Jensen-Shannon divergence (JSD) between reference molecules and generated molecules is reported.
Refer to caption: x5.png

We show the results of the above metrics for our method and baselines in Table 1. The results show that our method can achieve better or competitive performance with other baseline methods. Specifically,
our method achieves the best result on QED and Lipinski, which indicates that our generated molecules possess better drug characteristics. Additionally, our method obtains the best Vina score and high affinity metric, which shows that our model captures more accurate interactions between ligands and protein pockets to improve the binding affinity. Moreover, our method has much better sampling efficiency than the baselines due to our simple generation pipeline and fragment-based generation strategy.

In Figure 4, we provide several examples of our generated 3D molecules for a certain protein pocket (PDB id 4m7t). The reference molecule is provided in the test set, and our generated molecules exhibit higher binding affinity than the reference molecule. These examples can validate that our method has the capability to capture the complex interaction between proteins and ligands in order to generate novel molecules that have higher binding affinity while retaining similar or even better drug-likeness properties than the reference molecule.
In Figure 5, we plot the empirical distribution of carbon-carbon bond distances of generated molecules and reference molecules. The reference distribution (gray) has two modes, but most methods can only capture one mode due to mode collapse. Even though TargetDiff exhibits two modes in the distribution, it still suffers from the over-smoothness issue. Comparatively, our method can better capture those two modes in the reference distribution. Furthermore, we calculate Jensen-Shannon divergence (JSD) [] between the bond distance distribution of reference and generated molecules for each method to quantitatively evaluate the distribution fitting capability. We can observe that our method outperforms other methods by a clear margin.

## 5 Conclusions, Broader Impacts, and Limitations

In this work, we develop a method to convert molecules into fragment-based $SE(3)$-invariant sequences which can be naturally processed by language models. We use a protein inverse folding model to obtain protein embeddings and integrate them into the language model via cross-attention. Our experiments show the great potential of using language models in structure-based drug design, which can potentially accelerate drug discovery by enhancing the efficiency and accuracy of identifying viable drug candidates. However, our method also has limitations. The chemical bonds are not directly generated by the language model and need to be inferred by OpenBabel [], and real number tokenization requires quantization, leading to some accuracy loss.

## Acknowledgments

This work was supported partially by National Science Foundation grant IIS-2243850 and National Institutes of Health grant U01AG070112 to S.J.,
and by the Molecule Maker Lab Institute to H.J.: an AI research institute program supported by NSF under award No. 2019897. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein.

## Appendix A Derivation of Rotation Vector between Fragment and Molecule Frames

In Section 3.3.2, we obtain the rotation matrix $R_{\mathfrak{g}\rightarrow\mathfrak{m}}$ between fragment and molecule local frames. Then, we can derive the more compact rotation vector representation. Specifically, we can obtain the rotation angle $\psi$ by

$$ $\displaystyle\psi=cos^{-1}(\frac{tr(R_{\mathfrak{g}\rightarrow\mathfrak{m}})-1 }{2}),$ (9) $$

where $tr(\cdot)$ denote the trace of a matrix. Suppose $R_{\mathfrak{g}\rightarrow\mathfrak{m}}$ has the following form

$$ $\displaystyle R_{\mathfrak{g}\rightarrow\mathfrak{m}}=\begin{bmatrix}r_{11}&r_ {12}&r_{13}\\ r_{21}&r_{22}&r_{23}\\ r_{31}&r_{32}&r_{33}\end{bmatrix},$ (10) $$

the rotation axis $\bm{a}=(a_{x},a_{y},a_{z})$ can be obtained by

$$ $\displaystyle a_{x}=(r_{32}-r_{23})/2\sin\psi,$ (11) $\displaystyle a_{y}=(r_{13}-r_{31})/2\sin\psi,$ (12) $\displaystyle a_{z}=(r_{21}-r_{12})/2\sin\psi.$ (13) $$

Then, we can calculate rotation vector $\bm{m}=(m_{x},m_{y},m_{z})$ via $\bm{m}=\psi\bm{a}$.

## Appendix B Proofs

### B.1 Proof of Lemma 3.2

###### Lemma (Canonical Ordering for 3D Molecular Graph Isomorphism) .

Let $\mathcal{M}_{1}=(V_{1},Z_{1})$ and $\mathcal{M}_{2}=(V_{2},Z_{2})$ be two 3D molecular graphs following Def. 3.1. Let ${\bm{L}}:\mathcal{M}\rightarrow\mathcal{L}$ be a function that maps a molecule $\mathcal{M}\in\mathcal{M}$, the set of all finite 3D molecular graphs, to its canonical order ${\bm{L}}(\mathcal{M})\in\mathcal{L}$, the set of all possible canonical orders, as produced by the canonical SMILES. Then the following equivalence holds:

$$ ${\bm{L}}(\mathcal{M}_{1})={\bm{L}}(\mathcal{M}_{2})\Leftrightarrow\mathcal{M}_ {1}\cong_{3D}\mathcal{M}_{2}$ $$

where $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$ denotes that $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are 3D isomorphic.

###### Proof.

We first prove the equivalence from right to left.

Given that $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$, from Def. 3.1, there exists a bijection $b:ver(\mathcal{M}_{1})\rightarrow ver(\mathcal{M}_{2})$
such that for every atom in $\mathcal{M}_{1}$ indexed $i$, ${\bm{z}}^{\mathcal{M}_{1}}_{i}={\bm{z}}^{\mathcal{M}_{2}}_{b(i)}$,
and there exists a 3D transformation $\tau\in SE(3)$ such that ${\bm{v}}^{\mathcal{M}_{1}}_{i}=\tau({\bm{v}}^{\mathcal{M}_{2}}_{b(i)})$.
Therefore, $\mathcal{M}_{2}$ is a rotated and translated instance of $\mathcal{M}_{1}$. In this case, $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ has identical molecular structure.
Canonical SMILES [, ] provides a unique string representation for a given molecular structure. We leave out the proof for the rigor of the canonical SMILES algorithm, which has been provided by O’Boyle []. Thus for the canonical SMILES string of $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$, $s_{1}$ and $s_{2}$, we have $s_{1}=s_{2}$.
Since ${\bm{L}}(\mathcal{M}_{1})$ and ${\bm{L}}(\mathcal{M}_{2})$ are the ordering in $s_{1}$ and $s_{2}$, respectively, we have ${\bm{L}}(\mathcal{M}_{1})={\bm{L}}(\mathcal{M}_{2})$.

Next we prove the equivalence from left to right.
For two 3D molecular graphs ${\bm{L}}(\mathcal{M}_{1})$ and ${\bm{L}}(\mathcal{M}_{2})$, we know ${\bm{L}}(\mathcal{M}_{1})={\bm{L}}(\mathcal{M}_{2})$.
According to the canonical SMILES properties, if two molecules are not identical in structure, they are guaranteed to receive different canonical SMILES strings. Therefore, since ${\bm{L}}(\mathcal{M}_{1})={\bm{L}}(\mathcal{M}_{2})$, $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ must be identical in structure. Then there exists bijection $b:ver(\mathcal{M}_{1})\rightarrow ver(\mathcal{M}_{2})$
such that ${\bm{z}}^{\mathcal{M}_{1}}_{i}={\bm{z}}^{\mathcal{M}_{2}}_{b(i)}$ for every atom in $\mathcal{M}_{1}$ indexed $i$.
Meanwhile, in this case, $\mathcal{M}_{2}$ can be derived from $\mathcal{M}_{1}$ after certain homogeneous 3D transformation under the right-handed Cartesian coordinate system, i.e., $SE(3)$ transformation.
An arbitrary rigid transformation in $SE(3)$ can be separated into two parts, a translation and a rigid rotation.
Let the translation and rotation needed be represented as $\tau_{1},\tau_{2}$.
$SE(3)$ is a Lie group and satisfies the axioms that the set is closed under the binary operation.
$\tau_{1},\tau_{2}\in SE(3)$, thus $\tau_{1}\tau_{2}\in SE(3)$.
Let $\tau^{\prime}=\tau_{1}\tau_{2}\in SE(3)$.
Therefore, there exist a 3D transformation $\tau^{\prime}\in SE(3)$ such that ${\bm{v}}^{\mathcal{M}_{1}}_{i}=\tau^{\prime}({\bm{v}}^{\mathcal{M}_{2}}_{b(i)})$. Consequently, $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$.

This completes the proof.
∎

###### Lemma (Canonical Ordering for 3D Molecular Graph Isomorphism) .

###### Proof.

### B.2 Proof of Lemma 3.3

###### Lemma .

Let $\mathcal{M}=(V,Z)$ be a 3D molecular graph with node type vector ${\bm{z}}$ and node coordinate matrix $V$. Let $\mathfrak{m}$ be equivariant local frames of $\mathcal{M}$ built based on the first three non-collinear fragment centers in ${\bm{L}}(\mathcal{M})$ and $\mathfrak{g}$ be equivariant local frames of any fragment $\mathcal{G}_{i}$ built based on the first three non-collinear atoms in ${\bm{L}}(\mathcal{G}_{i})$.
$f(\cdot)$ is our function that maps 3D coordinate matrix $V$ of $\mathcal{M}$ to spherical representations ${\bm{S}}$ under the molecule local frame $\mathfrak{m}$. $g(\cdot,\cdot)$ is the function that maps the molecule local frame $\mathfrak{m}$ and fragment local frame $\mathfrak{g}$ to rotation vectors $\bm{m}$. Then for any 3D transformation $\tau\in SE(3)$, we have $f(V)=f(\tau(V))$ and $g(\mathfrak{m},\mathfrak{g})=g(\tau(\mathfrak{m},\mathfrak{g}))$.
Given spherical representations ${\bm{S}}=f(V)$ and rotation vectors $\bm{m}=g(\mathfrak{m},\mathfrak{g})$, there exist a transformation $\tau\in SE(3)$, such that $f^{-1}({\bm{S}})=\tau(V)$ and $g^{-1}(\bm{m})=\tau(\mathfrak{m},\mathfrak{g})$.

###### Proof.

We first prove the $SE(3)$-invariance of the spherical representations of fragment center under molecule local frame, then prove the rotation representations between the fragment and molecule local frames are also $SE(3)$-invariant.

To simplify the proof, we assume that the molecule is centered first by moving the first atom to the origin. Let $\ell_{1}$, $\ell_{2}$, and $\ell_{m}$ be the indices of the first three non-collinear fragment centers in $\mathcal{M}$, and the molecule local frame $\mathfrak{m}=({\bm{x}},{\bm{y}},{\bm{z}})$ is calculated as

$$ $\displaystyle{\bm{x}}$ $\displaystyle=\text{normalize}({\bm{v}}_{\ell_{2}}-{\bm{v}}_{\ell_{1}}),$ (14) $\displaystyle{\bm{y}}$ $\displaystyle=\text{normalize}\left(\left({\bm{v}}_{\ell_{m}}-{\bm{v}}_{\ell_{ 1}}\right)\times{\bm{x}}\right),$ $\displaystyle{\bm{z}}$ $\displaystyle={\bm{x}}\times{\bm{y}},$ $$

where $\text{normalize}(\cdot)$ denotes normalizing input vectors into unit vectors.
Given any $SE(3)$ transformation $\tau$ containing rotation matrix $R$ and translation vector ${\bm{t}}$, we have transformed coordinate ${\bm{v}}^{\prime}_{i}=\tau({\bm{v}}_{i})=R{\bm{v}}_{i}+{\bm{t}}$. Then, we can apply this transformation to the vectors in Equation 14 to obtain the transformed basis vectors for the molecule local frame. Specifically,

$$ $\displaystyle{\bm{x}}^{\prime}$ $\displaystyle=\text{normalize}(R{\bm{v}}_{\ell_{2}}+{\bm{t}}-(R{\bm{v}}_{\ell_ {1}}+{\bm{t}}))=R(\text{normalize}({\bm{v}}_{\ell_{2}}-{\bm{v}}_{\ell_{1}}))=R {\bm{x}},$ (15) $\displaystyle{\bm{y}}^{\prime}$ $\displaystyle=\text{normalize}\left(\left(R{\bm{v}}_{\ell_{m}}+{\bm{t}}-\left( R{\bm{v}}_{\ell_{1}}+{\bm{t}}\right)\right)\times{\bm{x}}^{\prime}\right),$ $\displaystyle=\text{normalize}\left(R\left(\left({\bm{v}}_{\ell_{m}}-{\bm{v}}_ {\ell_{1}}\right)\times{\bm{x}}\right)\right),$ $\displaystyle=R(\text{normalize}\left(\left({\bm{v}}_{\ell_{m}}-{\bm{v}}_{\ell _{1}}\right)\times{\bm{x}}\right)),$ $\displaystyle=R{\bm{y}},$ $\displaystyle{\bm{z}}^{\prime}$ $\displaystyle={\bm{x}}^{\prime}\times{\bm{y}}^{\prime}=R{\bm{x}}\times R{\bm{y }}=R({\bm{x}}\times{\bm{y}})=R{\bm{z}}.$ $$

So, the new molecule local frame is subject to the same transformation. Then, for spherical coordinates of any fragment center $f(V)_{\ell_{i}}$ that is represented as

$$ $\displaystyle d_{\ell_{i}}$ $\displaystyle=||{\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}}||_{2},$ (16) $\displaystyle\theta_{\ell_{i}}$ $\displaystyle=\arccos\left(\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}}\right )\cdot{\bm{z}}/d_{\ell_{i}}\right),$ $\displaystyle\phi_{\ell_{i}}$ $\displaystyle=\operatorname{atan2}\left(\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{ \ell_{1}}\right)\cdot{\bm{y}},\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}} \right)\cdot{\bm{x}}\right),$ $$

we can derive the transformed spherical coordinate as

$$ $\displaystyle d^{\prime}_{\ell_{i}}$ $\displaystyle=||R{\bm{v}}_{\ell_{i}}+{\bm{t}}-(R{\bm{v}}_{\ell_{1}}+{\bm{t}})| |_{2}=||R({\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}})||_{2}=||{\bm{v}}_{\ell_{i}} -{\bm{v}}_{\ell_{1}}||_{2}=d_{\ell_{i}},$ (17) $\displaystyle\theta^{\prime}_{\ell_{i}}$ $\displaystyle=\arccos\left(\left(R{\bm{v}}_{\ell_{i}}+{\bm{t}}-(R{\bm{v}}_{ \ell_{1}}+{\bm{t}})\right)\cdot{\bm{z}}^{\prime}/d^{\prime}_{\ell_{i}}\right)= \arccos\left(R\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}}\right)\cdot R{\bm{ z}}/d_{\ell_{i}}\right)=\theta_{\ell_{i}},$ $\displaystyle\phi^{\prime}_{\ell_{i}}$ $\displaystyle=\operatorname{atan2}\left(\left(R{\bm{v}}_{\ell_{i}}+{\bm{t}}-(R {\bm{v}}_{\ell_{1}}+{\bm{t}})\right)\cdot{\bm{y}}^{\prime},\left(R{\bm{v}}_{ \ell_{i}}+{\bm{t}}-(R{\bm{v}}_{\ell_{1}}+{\bm{t}})\right)\cdot{\bm{x}}^{\prime }\right),$ $\displaystyle=\operatorname{atan2}\left(R\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{ \ell_{1}}\right)\cdot R{\bm{y}},R\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}} \right)\cdot R{\bm{x}}\right),$ $\displaystyle=\operatorname{atan2}\left(\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{ \ell_{1}}\right)\cdot{\bm{y}},\left({\bm{v}}_{\ell_{i}}-{\bm{v}}_{\ell_{1}} \right)\cdot{\bm{x}}\right),$ $\displaystyle=\phi_{\ell_{i}}.$ $$

Thus, we show that $f(V)=f(\tau(V))$. Conversely, given spherical coordinates $(d_{\ell_{i}},\theta_{\ell_{i}},\phi_{\ell_{i}})$ for fragment center $\ell_{i}$, we can obtain local Cartesian coordinates through the inverse function $f^{-1}(\cdot)$ as

$$ . (18) $$

Then, we can reconstruct the original coordinates of fragment centers by applying the $SE(3)$ transformation $(R_{\mathfrak{m}\rightarrow\mathfrak{w}},\bm{t}_{\mathfrak{m}\rightarrow
\mathfrak{w}})$ between the molecule local frame and the world frame, which is derived in Section 3.3.2. Formally,

$$ $\displaystyle{\bm{v}}_{\ell_{i}}=R_{\mathfrak{m}\rightarrow\mathfrak{w}}f^{-1} ({\bm{S}})^{T}+\bm{t}_{\mathfrak{m}\rightarrow\mathfrak{w}}.$ (19) $$

So, there exist a transformation $\tau\in SE(3)$, such that $f^{-1}({\bm{S}})=\tau(V)$.

Next, we prove that the rotation vector ${\bm{m}}$ between the molecule local frame and the fragment local frame is also $SE(3)$-invariant. Suppose we have the transformation $(R_{\mathfrak{m}\rightarrow\mathfrak{w}},\bm{t}_{\mathfrak{m}\rightarrow
\mathfrak{w}})$ between the molecule local frame $\mathfrak{m}$ and the world frame $\mathfrak{w}$, and the transformation $(R_{\mathfrak{g}\rightarrow\mathfrak{w}},\bm{t}_{\mathfrak{g}\rightarrow
\mathfrak{w}})$ between the fragment local frame $\mathfrak{g}$ and the world frame. In Section 3.3.2, we derive the transformation $(R_{\mathfrak{g}\rightarrow\mathfrak{m}},\bm{t}_{\mathfrak{g}\rightarrow
\mathfrak{m}})$ between the fragment local frame and the molecule local frame, such that

$$ $\displaystyle R_{\mathfrak{g}\rightarrow\mathfrak{m}}=R_{\mathfrak{m} \rightarrow\mathfrak{w}}^{T}R_{\mathfrak{g}\rightarrow\mathfrak{w}},\ \ \ \bm{ t}_{\mathfrak{g}\rightarrow\mathfrak{m}}=R_{\mathfrak{m}\rightarrow\mathfrak{w }}^{T}(\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{w}}-\bm{t}_{\mathfrak{m} \rightarrow\mathfrak{w}}).$ (20) $$

Given any $SE(3)$ transformation $\tau$ containing rotation matrix $R$ and translation vector ${\bm{t}}$, we have

$$ $\displaystyle R_{\mathfrak{g}\rightarrow\mathfrak{m}}$ $\displaystyle=(RR_{\mathfrak{m}\rightarrow\mathfrak{w}})^{T}(RR_{\mathfrak{g} \rightarrow\mathfrak{w}}),$ (21) $\displaystyle=R_{\mathfrak{m}\rightarrow\mathfrak{w}}^{T}R^{T}RR_{\mathfrak{g} \rightarrow\mathfrak{w}},$ (22) $\displaystyle=R_{\mathfrak{m}\rightarrow\mathfrak{w}}^{T}IR_{\mathfrak{g} \rightarrow\mathfrak{w}},$ (23) $\displaystyle=R_{\mathfrak{g}\rightarrow\mathfrak{m}}.$ (24) $$

So we have $R_{\mathfrak{g}\rightarrow\mathfrak{m}}=\tau(R_{\mathfrak{g}\rightarrow
\mathfrak{m}})$. Since ${\bm{m}}=g(\mathfrak{m},\mathfrak{g})$ is derived from $R_{\mathfrak{g}\rightarrow\mathfrak{m}}$, as described in Section 3.3.3, we also have $g(\mathfrak{m},\mathfrak{g})=g(\tau(\mathfrak{m},\mathfrak{g}))$.

Conversely, given a rotation vector ${\bm{m}}$, we can convert it back to a rotation matrix. Specifically, let ${\bm{m}}=\theta{\bm{a}}$, where $\theta$ is the rotation angle and ${\bm{a}}=(a_{x},a_{y},a_{z})$ is the unit rotation axis. Then, we can construct the skew-symmetric matrix $K$ from ${\bm{a}}$ such that

$$ $\displaystyle K=\begin{bmatrix}0&-a_{z}&a_{y}\\ a_{z}&0&-a_{x}\\ -a_{y}&a_{x}&0\end{bmatrix}.$ (25) $$

Then, we apply Rodrigues’ rotation formula to obtain rotation matrix $R_{\mathfrak{g}\rightarrow\mathfrak{m}}$ such that

$$ $\displaystyle R_{\mathfrak{g}\rightarrow\mathfrak{m}}=I+\sin(\theta)K+(1-\cos( \theta))K^{2}.$ (26) $$

Then, we have $R_{\mathfrak{g}\rightarrow\mathfrak{w}}=R_{\mathfrak{m}\rightarrow\mathfrak{w}
}R_{\mathfrak{g}\rightarrow\mathfrak{m}}$. From Equation 7, we can obtain $\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{m}}$ and then we can have $\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{w}}=R_{\mathfrak{m}\rightarrow
\mathfrak{w}}\bm{t}_{\mathfrak{g}\rightarrow\mathfrak{m}}+\bm{t}_{\mathfrak{m}
\rightarrow\mathfrak{w}}$. So, we show that there exist a $SE(3)$ transformation $\tau=(R_{\mathfrak{m}\rightarrow\mathfrak{w}},{\bm{t}}_{\mathfrak{m}
\rightarrow\mathfrak{w}})$, such that $g^{-1}(\bm{m})=\tau(\mathfrak{m},\mathfrak{g})$.

∎

###### Lemma .

###### Proof.

### B.3 Proof of Theorem 3.4

First we establish a lemma and provide its proof.

###### Lemma B.1 .

Let $\mathcal{M}_{1}=(V_{1},Z_{1})$ and $\mathcal{M}_{2}=(V_{2},Z_{2})$ be two 3D molecular graphs, where ${\bm{z}}_{i}$ is the node type vector and ${\bm{v}}_{i}$ is the node coordinates of the molecule $\mathcal{M}_{i}$.
There exists a bijection $b:ver(\mathcal{M}_{1})\rightarrow ver(\mathcal{M}_{2})$
such that for every atom in $\mathcal{M}_{1}$ indexed $i$, ${\bm{z}}^{\mathcal{M}_{1}}_{i}={\bm{z}}^{\mathcal{M}_{2}}_{b(i)}$.
Let ${\bm{L}}(\mathcal{M})$ be the canonical order of molecule $\mathcal{M}$.
For the fragments $\{\mathcal{G}_{i}\}_{i=1}^{k}$ of $\mathcal{M}$, we construct canonical order ${\bm{L}}(\mathcal{M})$ for the $k$ fragments, $\ell_{1},\cdots,\ell_{k}$, specifically by the order of a fragment’s first-ranked atom.
Let $\ell_{i}$ and $\ell^{\prime}_{i}$ denote the indexes of the fragment labeled $i$ correspondingly in ${\bm{L}}(\mathcal{M}_{1})$ and ${\bm{L}}(\mathcal{M}_{2})$, respectively.
Let $f\circ g$ be a surjective function that maps a 3D molecule $\mathcal{M}$ to its spherical representation and rotation vector $({\bm{S}},\bm{m})$ under the equivariant molecule local frame, and between molecule local frame and fragment local frame, respectively, following Lemma 3.3.
Then the following equivalence holds:

$$ $\text{for }i=1,\cdots,k,f\circ g(\mathcal{M}_{1})_{\ell_{i}}=f\circ g(\mathcal {M}_{2})_{\ell^{\prime}_{i}}\iff\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$ $$

where $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$ denotes that $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are 3D isomorphic.

###### Proof.

From Def. 3.1, we know

$$ $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}\iff\begin{cases}&\text{there exists bijection }b:ver(\mathcal{M}_{1})\rightarrow ver(\mathcal{M}_{2})\text{ }s.t. \forall i,{\bm{z}}^{\mathcal{M}_{1}}_{i}={\bm{z}}^{\mathcal{M}_{2}}_{b(i)} \text{, and}\\ &\text{there exists 3D transformation }\tau\in SE(3)\text{ such that }{\bm{v}} ^{\mathcal{M}_{2}}_{\ell^{\prime}_{i}}=\tau({\bm{v}}^{\mathcal{M}_{1}}_{\ell_{ i}}),\end{cases}$ $$

$\text{for all }i$. Note that since the fragmentation process is unique, deterministic, and linear, for fragments $\{\mathcal{G}_{i}\}_{i=1}^{k}$ of $\mathcal{M}$, $\{\mathcal{G}_{i}\}_{i=1}^{k}\equiv\mathcal{M}$. Thus fragmentation does not affect any properties.
Thus it’s sufficient to prove the equivalence of the two statements on right side with

$$ $\text{for }i=1,\cdots,k,f\circ g(\mathcal{M}_{1})_{\ell_{i}}=f\circ g(\mathcal {M}_{2})_{\ell^{\prime}_{i}}.$ $$

Here, the first statement on the right holds by definition. For the second condition,
we establish $\tau({\bm{v}}_{\ell_{i}})=R{\bm{v}}_{\ell_{i}}+{\bm{t}}$. Here $R$ is a rotation matrix, and ${\bm{t}}$ is a translation vector.

Following the proof of Lemma 3.3 in Appendix B.2, for any 3D transformation $\tau\in SE(3)$, we have $f(V)=f(\tau(V))$ and $g(\mathfrak{m},\mathfrak{g})=g(\tau(\mathfrak{m},\mathfrak{g}))$. Thus if $\text{there exists 3D transformation }\tau\in SE(3)\text{ such that }{\bm{v}}^
{\mathcal{M}_{2}}_{\ell^{\prime}_{i}}=\tau({\bm{v}}^{\mathcal{M}_{1}}_{\ell_{i
}})$, $\text{there exists 3D transformation }\tau\in SE(3)\text{ such that }{\bm{v}}^
{\mathcal{G},\mathcal{M}_{2}}_{\ell^{\prime}_{i}}=\tau({\bm{v}}^{\mathcal{G},
\mathcal{M}_{1}}_{\ell_{i}})$ for $i=1,\cdots,k$, and then

$$ $f\circ g(\mathcal{M}_{1})_{\ell_{i}}=({\bm{S}}_{1},\bm{m}_{1})=({\bm{S}}_{2}, \bm{m}_{2})=f\circ g(\mathcal{M}_{2})_{\ell^{\prime}_{i}}$ $$

for $i=1,\cdots,k$. This proves one direction of the equivalence.

Also following the proof of Lemma 3.3 in Appendix B.2, given spherical representations ${\bm{S}}=f(V)$ and rotation vectors $\bm{m}=g(\mathfrak{m},\mathfrak{g})$, there exist a transformation $\tau\in SE(3)$, such that $f^{-1}({\bm{S}})=\tau(V)$ and $g^{-1}(\bm{m})=\tau(\mathfrak{m},\mathfrak{g})$. For $i=1,\cdots,k$, if we have $f\circ g(\mathcal{M}_{1})_{\ell_{i}}=({\bm{S}}_{1},\bm{m}_{1})=({\bm{S}}_{2},
\bm{m}_{2})=f\circ g(\mathcal{M}_{2})_{\ell^{\prime}_{i}}$, there exist a transformation $\tau\in SE(3)$, such that $f^{-1}({\bm{S}}_{2})=\tau({\bm{v}}_{2})$ and $g^{-1}(\bm{m})=\tau(\mathfrak{m}_{2},\mathfrak{g}_{2})$. Similarly, $f^{-1}({\bm{S}}_{1})=\tau^{\prime}({\bm{v}}_{1})$ for $\tau^{\prime}\in SE(3)$, and thus $\tau^{\prime}({\bm{v}}_{1})=f^{-1}({\bm{S}}_{1})=f^{-1}({\bm{S}}_{2})=\tau({
\bm{v}}_{2})$. Since $SE(3)$ is a Lie group satisfying the axioms that the set is closed under the binary operation, and that for every element in $SE(3)$, there is an identity inverse. Let the inverse identity of $\tau$ be $\tau^{-1}$. Then $\tau^{-1}\tau({\bm{v}}_{2})=\tau^{-1}\tau^{\prime}({\bm{v}}_{1})$, and thus ${\bm{v}}_{2}=\tau^{\prime\prime}({\bm{v}}_{1})$ with $\tau^{\prime\prime}=\tau^{-1}\tau^{\prime}\in SE(3)$ for $i=1,\cdots,k$. This proves the other direction of the equivalence.

Therefore, we show that $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}\iff\forall i,f\circ g(\mathcal{M}_{1}
)_{\ell_{i}}=f\circ g(\mathcal{M}_{2})_{\ell^{\prime}_{i}}$ holds.
∎

Then we prove Theorem 3.4.

###### Theorem (Bijective mapping) .

Following Def. 3.1, let $\mathcal{M}_{1}=(V_{1},Z_{1})$ and $\mathcal{M}_{2}=(V_{2},Z_{2})$ be two 3D molecular graphs.
Let ${\bm{L}}(\mathcal{M})$ be the canonical order for $\mathcal{M}$ and $f(\cdot)$ and $g(\cdot,\cdot)$ be the functions following Lemma 3.3.
Let the fragment-position vector for a molecule fragment $\mathcal{G}_{i}$ be ${\bm{x}}^{*}_{i}=[s_{i},d_{i},\theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}]$, where the vector elements are derived from $f(\cdot)$ and $g(\cdot,\cdot)$ as predefined.
For the fragments $\{\mathcal{G}_{i}\}_{i=1}^{k}$ of $\mathcal{M}$, we construct canonical order ${\bm{L}}(\mathcal{M})$ for the $k$ fragments, $\ell_{1},\cdots,\ell_{k}$, specifically by the order of a fragment’s first-ranked atom.
We define $\text{Frag2Seq}:\mathcal{M}\rightarrow\mathcal{U}$, which maps a molecule $\mathcal{M}\in\mathcal{M}$ to its sequence representation $U\in\mathcal{U}$, the set of all possible sequence representations, as

$$ $\text{Frag2Seq}(\mathcal{M})=\text{concat}({\bm{x}}^{*}_{\ell_{1}},\cdots,{\bm {x}}^{*}_{\ell_{k}}),$ $$

where $\text{concat}(\cdot)$ concatenates elements as a sequence.
Then $\text{Frag2Seq}(\cdot)$ is a surjective function, and the following equivalence holds:

$$ $\text{Frag2Seq}(\mathcal{M}_{1})=\text{Frag2Seq}(\mathcal{M}_{2}) \Leftrightarrow\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2},$ $$

where $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$ denotes $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are 3D isomorphic.
If we allow rounding up spherical coordinate and rotation vector values to $\geq b$ decimal places, then the surjectivity and equivalence still hold, only molecules $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are $(|10^{-b}|/2)$-constrained 3D isomorphic.

###### Proof.

First, we prove that $\text{Frag2Seq}:\mathcal{M}\rightarrow\mathcal{U}$ is a surjective function.
Given the definition

$$ $\text{Frag2Seq}(\mathcal{M})=\text{concat}({\bm{x}}^{*}_{\ell_{1}},\cdots,{\bm {x}}^{*}_{\ell_{k}}),$ $$

where ${\bm{x}}^{*}_{i}=[s_{i},d_{i},\theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}]$,
we need to prove that all operations are deterministic.
$\text{concat}(\cdot)$ and $s_{i}$ are defined to be deterministic, and following Lemma B.1, $d_{i},\theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}$ are derived from $f\circ g$, which is a function.
${\bm{L}}(\mathcal{M})$ outputs $\mathcal{M}$’s canonical order, which is deterministic from the canonical SMILES algorithm.
Therefore, $\text{Frag2Seq}:\mathcal{M}\rightarrow\mathcal{U}$ is a well-defined function; given a 3D molecule, we can uniquely construct a 1D sequence from Frag2Seq.

Next we prove Frag2Seq’s surjectivity. Given any output sequence $q\in\mathcal{U}$ of Frag2Seq, the sequence is in the format

$$ $q=concat([s_{1},d_{1},\theta_{1},\phi_{1},m_{x1},m_{y1},m_{z1}],...,[s_{k},d_{ k},\theta_{k},\phi_{k},m_{xk},m_{yk},m_{zk}]).$ $$

For each fragment in $q$ and its vector $[d_{i},\theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}]$, we follow Lemma 3.3’s derivations. Given the surjectivity of the spherical representation function $f$, rotation vector function $g$, and the defined $f^{-1},g^{-1}$, there must be a unique $\mathcal{M}=(V,Z)\in\mathcal{M}$ where

$$ $[d_{1},\theta_{1},\phi_{1},m_{x1},m_{y1},m_{z1}],...,[d_{k},\theta_{k},\phi_{k },m_{xk},m_{yk},m_{zk}]=f\circ g(\mathcal{M}).$ $$

Therefore, $\forall$ output sequence $q\in\mathcal{U}$ there exists

$$ $\mathcal{M}=(V,Z)\in\mathcal{M}\quad\textit{s.t.}\quad q=\text{Frag2Seq}( \mathcal{M}),$ $$

i.e., Frag2Seq is surjective; given a sequence output of Frag2Seq, we can uniquely reconstruct a 3D molecule.

Since all the above proof does not involve numerical comparisons and 3D isomorphic, they also hold if we allow rounding up spherical coordinate and rotation vector values to $\geq b$ decimal places.

Now we prove the equivalence $\text{Frag2Seq}(\mathcal{M}_{1})=\text{Frag2Seq}(\mathcal{M}_{2})
\Leftrightarrow\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$, starting from right to left. We also cover the constrained case where we allow rounding up values to $\geq b$ decimal places.
When a number is truncated after $b$ decimal places, according to the rounding principle, the maximum error caused is $\bm{\epsilon}\leq\frac{|10^{-b}|}{2}$.
If $\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2}$ (or $\mathcal{M}_{1}\cong_{3D-\frac{|10^{-b}|}{2}}\mathcal{M}_{2}$), i.e., molecules $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are 3D isomorphic (or $(|10^{-b}|/2)$-constrained 3D isomorphic), then from Lemma 3.2 we know the canonical forms ${\bm{L}}(\mathcal{M}_{1})={\bm{L}}(\mathcal{M}_{2})$.
For the fragments $\{\mathcal{G}_{i}\}_{i=1}^{k}$ of $\mathcal{M}$, we construct canonical order ${\bm{L}}(\mathcal{M})$ for the $k$ fragments, $\ell_{1},\cdots,\ell_{k}$, specifically by the order of a fragment’s first-ranked atom.
Let $\ell_{i}$ and $\ell^{\prime}_{i}$ denote the indexes of the fragment labeled $i$ correspondingly in ${\bm{L}}(\mathcal{M}_{1})$ and ${\bm{L}}(\mathcal{M}_{2})$, respectively.
Since molecules $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are 3D isomorphic (or $(|10^{-b}|/2)$-constrained 3D isomorphic), from Def.3.1 we know $\forall i$ of $\{\mathcal{G}_{i}\}_{i=1}^{k},s_{\ell_{i}}=s_{\ell^{\prime}_{i}}$;
and from Lemma B.1 we know $\text{for }i=1,\cdots,k,f\circ g(\mathcal{M}_{1})_{\ell_{i}}=f\circ g(\mathcal
{M}_{2})_{\ell^{\prime}_{i}}$ (or satisfies with $\frac{|10^{-b}|}{2}$ error range allowed for each numerical value). Thus, we have

$$ $\displaystyle\text{Frag2Seq}(\mathcal{M}_{1})$ (27) $\displaystyle=\text{concat}({\bm{x}}^{*}_{\ell_{1}},\cdots,{\bm{x}}^{*}_{\ell_ {k}})$ $\displaystyle=\text{concat}_{s_{i}(\mathcal{G}_{i}),\mathcal{G}_{i}\in\mathcal {M}_{1},d_{i},\theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}\in f\circ g(\mathcal{M} _{1}),i=1,...k}([s_{\ell_{i}},d_{\ell_{i}},\theta_{\ell_{i}},\phi_{\ell_{i}},m _{x{\ell_{i}}},m_{y{\ell_{i}}},m_{z{\ell_{i}}}])$ $\displaystyle=\text{concat}_{s_{i}(\mathcal{G}_{i}),\mathcal{G}_{i}\in\mathcal {M}_{2},d_{i},\theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}\in f\circ g(\mathcal{M} _{2}),i=1,...k}([s_{\ell^{\prime}_{i}},d_{\ell^{\prime}_{i}},\theta_{\ell^{ \prime}_{i}},\phi_{\ell^{\prime}_{i}},m_{x{\ell^{\prime}_{i}}},m_{y{\ell^{ \prime}_{i}}},m_{z{\ell^{\prime}_{i}}}])$ $\displaystyle=\text{concat}({\bm{x}}^{*}_{\ell^{\prime}_{1}},\cdots,{\bm{x}}^{ *}_{\ell^{\prime}_{k}})$ $\displaystyle=\text{Frag2Seq}(\mathcal{M}_{2}),$ $$

where $s_{i}(\cdot)$ is the canonical SMILES string.
Therefore, we have shown that if two molecules are 3D isomorphic (or within the round-up error range $\frac{|10^{-b}|}{2}$), their sequences resulting from Frag2Seq must be identical.

Finally, we prove the equivalence from left to right. We provide proof by contradiction.
Given that $\text{Frag2Seq}(\mathcal{M}_{1})=\text{Frag2Seq}(\mathcal{M}_{2})$, we assume that the molecules $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are not 3D isomorphic (or not $\frac{|10^{-b}|}{2}$-constrained 3D isomorphic).
We denote with $\mathcal{M}_{1}=(V_{1},Z_{1})$ and $\mathcal{M}_{2}=(V_{2},Z_{2})$.
If $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are not even isomorphic for $Z_{i}$, then from Def.3.1, there does not exist a node-to-node mapping from $\mathcal{M}_{1}$ to $\mathcal{M}_{2}$, where each atom is identical in atom number. Then from Lemma 3.2, we know the canonical forms ${\bm{L}}(\mathcal{M}_{1})\neq{\bm{L}}(\mathcal{M}_{2})$. Thus for $\text{Frag2Seq}(\mathcal{M}_{1})=$

$$ $\text{concat}_{s_{i}(\mathcal{G}_{i}),\mathcal{G}_{i}\in\mathcal{M}_{1},d_{i}, \theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}\in f\circ g(\mathcal{M}_{1}),i=1,...k }([s_{\ell_{i}},d_{\ell_{i}},\theta_{\ell_{i}},\phi_{\ell_{i}},m_{x{\ell_{i}}} ,m_{y{\ell_{i}}},m_{z{\ell_{i}}}]),$ $$

and $\text{Frag2Seq}(\mathcal{M}_{2})=$

$$ $\text{concat}_{s_{i}(\mathcal{G}_{i}),\mathcal{G}_{i}\in\mathcal{M}_{2},d_{i}, \theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}\in f\circ g(\mathcal{M}_{2}),i=1,...k }([s_{\ell^{\prime}_{i}},d_{\ell^{\prime}_{i}},\theta_{\ell^{\prime}_{i}},\phi _{\ell^{\prime}_{i}},m_{x{\ell^{\prime}_{i}}},m_{y{\ell^{\prime}_{i}}},m_{z{ \ell^{\prime}_{i}}}]),$ $$

there must be at least one pair of $s_{\ell_{i}},s_{\ell^{\prime}_{i}}$ where $s_{\ell_{i}}\neq s_{\ell^{\prime}_{i}}$. Therefore, $\text{Frag2Seq}(\mathcal{M}_{1})\neq\text{Frag2Seq}(\mathcal{M}_{2})$, which is a contradiction to the initial condition
and ends the proof.

If $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are isomorphic for $Z_{i}$, we continue with the following analyses.
Let $\ell_{i}$ and $\ell^{\prime}_{i}$ denote the indexes of the fragment labeled $i$ correspondingly in ${\bm{L}}(\mathcal{M}_{1})$ and ${\bm{L}}(\mathcal{M}_{2})$, respectively.
Let $f\circ g$ be the surjective function mapping a 3D graph to its spherical and rotation representations.
Since $\mathcal{M}_{1}$ and $\mathcal{M}_{2}$ are not 3D isomorphic (or not even $\frac{|10^{-b}|}{2}$-constrained 3D isomorphic), from Lemma B.1, we know there exists at least one

$$ $i\in\{1,\cdots,k\},s.t.f\circ g(\mathcal{M}_{1})_{\ell_{i}}\neq f(\mathcal{M}_ {2})_{\ell^{\prime}_{i}},$ $$

(or even with error range $\frac{|10^{-b}|}{2}$ allowed),
otherwise, we would have

$$ $\forall i\in\{1,\cdots,k\},f(\mathcal{M}_{1})_{\ell_{i}}=f(\mathcal{M}_{2})_{ \ell^{\prime}_{i}}\Rightarrow\mathcal{M}_{1}\cong_{3D}\mathcal{M}_{2},$ $$

contradicting the above condition.
Thus for $\text{Frag2Seq}(\mathcal{M}_{1})=$

$$ $\text{concat}_{s_{i}(\mathcal{G}_{i}),\mathcal{G}_{i}\in\mathcal{M}_{1},d_{i}, \theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}\in f\circ g(\mathcal{M}_{1}),i=1,...k }([s_{\ell_{i}},d_{\ell_{i}},\theta_{\ell_{i}},\phi_{\ell_{i}},m_{x{\ell_{i}}} ,m_{y{\ell_{i}}},m_{z{\ell_{i}}}]),$ $$

and $\text{Frag2Seq}(\mathcal{M}_{2})=$

$$ $\text{concat}_{s_{i}(\mathcal{G}_{i}),\mathcal{G}_{i}\in\mathcal{M}_{2},d_{i}, \theta_{i},\phi_{i},m_{xi},m_{yi},m_{zi}\in f\circ g(\mathcal{M}_{2}),i=1,...k }([s_{\ell^{\prime}_{i}},d_{\ell^{\prime}_{i}},\theta_{\ell^{\prime}_{i}},\phi _{\ell^{\prime}_{i}},m_{x{\ell^{\prime}_{i}}},m_{y{\ell^{\prime}_{i}}},m_{z{ \ell^{\prime}_{i}}}]),$ $$

at least one pair of spherical coordinates does not correspond, so there must be at least one pair of $(d_{\ell_{i}},\theta_{\ell_{i}},\phi_{\ell_{i}},m_{x{\ell_{i}}},m_{y{\ell_{i}}
},m_{z{\ell_{i}}})$ and $(d_{\ell^{\prime}_{i}},\theta_{\ell^{\prime}_{i}},\phi_{\ell^{\prime}_{i}},m_{
x{\ell^{\prime}_{i}}},m_{y{\ell^{\prime}_{i}}},m_{z{\ell^{\prime}_{i}}})$ where

$$ $(d_{\ell_{i}},\theta_{\ell_{i}},\phi_{\ell_{i}},m_{x{\ell_{i}}},m_{y{\ell_{i}} },m_{z{\ell_{i}}})\neq(d_{\ell^{\prime}_{i}},\theta_{\ell^{\prime}_{i}},\phi_{ \ell^{\prime}_{i}},m_{x{\ell^{\prime}_{i}}},m_{y{\ell^{\prime}_{i}}},m_{z{\ell ^{\prime}_{i}}})$ $$

(or

$$ $\min(|d_{\ell_{i}},\theta_{\ell_{i}},\phi_{\ell_{i}},m_{x{\ell_{i}}},m_{y{\ell _{i}}},m_{z{\ell_{i}}}|-|d_{\ell^{\prime}_{i}},\theta_{\ell^{\prime}_{i}},\phi _{\ell^{\prime}_{i}},m_{x{\ell^{\prime}_{i}}},m_{y{\ell^{\prime}_{i}}},m_{z{ \ell^{\prime}_{i}}}|)>\frac{|10^{-b}|}{2}).$ $$

Thus, $\text{Frag2Seq}(\mathcal{M}_{1})\neq\text{Frag2Seq}(\mathcal{M}_{2})$, which contradicts the initial condition.
Therefore, we have shown that if two constructed sequences from Frag2Seq are identical, their corresponding molecules must be 3D isomorphic.
This ends the proof.

∎

###### Lemma B.1 .

###### Proof.

###### Theorem (Bijective mapping) .

###### Proof.

## Appendix C Experimental Details and Additional Results

### C.1 Dataset Details

Following previous work in SBDD [, , , , ], we use the CrossDocked2020 dataset to train and test our model. The dataset was originally created by Francoeur et al. []. We adopt the version that is further filtered in the previous work []. To increase the data quality, they filter out data points that have binding pose RMSD greater than 1Å. The data split is performed according to 30% sequence identity using MMseqs2 []. Finally, there are 100000 protein-ligand training pairs and 100 proteins in the test set. The dataset curated by Luo et al. [] is publicly available at [https://github.com/luost26/3D-Generative-SBDD/blob/main/data/README.md](https://github.com/luost26/3D-Generative-SBDD/blob/main/data/README.md) under the MIT license.

### C.2 Protein Encoder Details

We use the pre-trained ESM-IF1 model to obtain protein node embeddings. ESM-IF1 model is also known as GVP-Transformer that is developed by Hsu et al. []. It is an inverse folding model that is used to design protein amino acid sequences given 3D backbone structures. The ESM-IF1 model uses a modified Geometric Vector Perceptron (GVP) layers [] to extract rotational and translational invariant features, followed by an autoregressive encoder-decoder Transformer [].
The model weights of ESM-IF1 are publicly available at [https://github.com/facebookresearch/esm](https://github.com/facebookresearch/esm) under the MIT license.

### C.3 Network and Training Details

For the language model, we use the GPT-1 architecture [] with 12 layers, $12$ attention heads, and a hidden embedding size of $768$. Cross-attention is added after self-attention in each layer. The protein embedding size generated by the ESM-IF1 model is $512$ and is increased to $768$ by an MLP layer before the protein embeddings are fed into the cross-attention. The architecture of the cross-attentions is the same as the self-attention, except that the key and value are from the protein embeddings.
The initial learning rate is set as $4e^{-4}$, and the batch size is 64.
We implement our methods using PyTorch [] and we adopt the AdamW optimizer [] with $\beta_{1}=0.9$, $\beta_{2}=0.95$. We adopt linear warm up and cosine scheduler to adaptively adjust the learning rate. Specifically, during the first $10\%$ of total training tokens, we increase the learning rate from 0 0 to the initial learning rate. Then, the learning rate decreases to $4e^{-5}$ by using a cosine decay scheduler. We use a single NVIDIA A100 GPU to train our model. We set the maximum context length as $512$ for all the experiments except for the ablation study on converting proteins into sequences. In that case, the maximum context length is increased to $850$ to accommodate the preappended protein sequences.

### C.4 Ablation Study

In this section, we conduct ablations studies on the 3D representation, fragmentation, and protein embedding in order to show how these factors affect the performance of the language model on the SBDD task.

First, we compare the effect of different 3D representations of fragment center under $SE(3)$-equivariant molecule local frame proposed in Section 3.3.2. We explore the use of $SE(3)$-invariant Cartesian coordinates instead of $SE(3)$-invariant spherical coordinates used in Section 3.3.3. From the result in Table 2, we can see that using spherical coordinates can achieve better binding affinity and chemical properties. By using spherical coordinates, the distances and angles are constrained to a smaller region, which makes the language model easier to learn structure correlations.

Then, we show that fragment-based tokenization is crucial to achieving better generation results. Specifically, we try to generate molecules atom-by-atom instead of using fragments. In this setting, we do not need to build fragment local frames, and rotation vectors do not exist in converted sequences. Results in Table 3 show that fragment-based generation can achieve much better performance on binding affinity and most drug-likeness properties, which validates the significance of fragmentation.

Finally, we compare different ways to incorporate protein pocket information into the model. Specifically, we convert protein structures to sequences in the same way as atom-based tokenization of small molecules. Then, we preappend the tokenized protein sequence to the corresponding ligand sequence and feed it into the language model. Results in Table 4 show that extracting protein node embeddings and integrating them into the language model via cross-attention can more effectively capture the interaction between proteins and ligands.

**Table 2: Generation performance between using invariant Cartesian coordinates and spherical coordinates representations of fragment centers.**
| Methods | Vina Score ($\downarrow$) | QED ($\uparrow$) | SA ($\uparrow$) | Lipinski ($\uparrow$) | Diversity ($\uparrow$) |
| --- | --- | --- | --- | --- | --- |
| Frag2Seq-Invariant Coordinates | $-7.242\pm 2.11$ | $0.636\pm 0.16$ | $0.637\pm 0.10$ | $4.974\pm 0.17$ | $\mathbf{0.714\pm 0.09}$ |
| Frag2Seq-Spherical Coordinates | $\mathbf{-7.366\pm 1.96}$ | $\mathbf{0.645\pm 0.15}$ | $\mathbf{0.642\pm 0.11}$ | $\mathbf{4.989\pm 0.11}$ | $0.711\pm 0.07$ |

**Table 3: Generation performance between using atom-by-atom and fragment-by-fragment manners.**
| Methods | Vina Score ($\downarrow$) | QED ($\uparrow$) | SA ($\uparrow$) | Lipinski ($\uparrow$) | Diversity ($\uparrow$) |
| --- | --- | --- | --- | --- | --- |
| Frag2Seq-Atom | $-6.895\pm 1.42$ | $0.484\pm 0.22$ | $\mathbf{0.683\pm 0.11}$ | $4.677\pm 0.50$ | $\mathbf{0.737\pm 0.19}$ |
| Frag2Seq-Fragment | $\mathbf{-7.366\pm 1.96}$ | $\mathbf{0.645\pm 0.15}$ | $0.642\pm 0.11$ | $\mathbf{4.989\pm 0.11}$ | $0.711\pm 0.07$ |

**Table 4: Generation performance between different ways to incorporate protein information.**
| Methods | Vina Score ($\downarrow$) | QED ($\uparrow$) | SA ($\uparrow$) | Lipinski ($\uparrow$) | Diversity ($\uparrow$) |
| --- | --- | --- | --- | --- | --- |
| Frag2Seq-Protein Seq | $-6.646\pm 1.64$ | $0.605\pm 0.17$ | $\mathbf{0.691\pm 0.13}$ | $4.968\pm 0.18$ | $0.493\pm 0.39$ |
| Frag2Seq-ESM-IF1 | $\mathbf{-7.366\pm 1.96}$ | $\mathbf{0.645\pm 0.15}$ | $0.642\pm 0.11$ | $\mathbf{4.989\pm 0.11}$ | $\mathbf{0.711\pm 0.07}$ |

### C.5 Generation Efficiency Analysis

In this section, we compare the generation efficiency of our method and other representative baseline methods. We use a single NVIDIA 2080Ti GPU and a batch size of $10$. The results in Table 5 show that our method exhibits better sampling efficiency than other autoregressive and diffusion-based models.

**Table 5: Generation efficiency comparison among autoregressive methods, diffusion methods, and our fragment-based LM method.**
| Methods | Parameters | Memory | Sample/second |
| --- | --- | --- | --- |
| 3D-SBDD | $1.2$M | $3.4$GB | $0.005$ |
| Pocket2Mol | $3.7$M | $1.2$GB | $0.008$ |
| DrugGPS | $5.1$M | $2.5$GB | $0.73$ |
| TargetDiff | $2.8$M | $1.8$GB | $0.01$ |
| Frag2Seq | $134.3$M | $2.2$GB | $2.0$ |

### C.6 More Structural Analysis

To further evaluate the structures of generated molecules, we calculate the Kullback-Leibler (KL) divergence of bond angles and dihedral angles between generated molecules and reference molecules in the test set. The results in Table 6 show that our method achieves better KL divergence than other representative baselines in most cases, which demonstrates that Frag2Seq can well capture the structural distribution of the data and generate more valid substructures.

**Table 6: The KL divergence of the distribution of the bond and dihedral angles between generated molecules and reference molecules. The lower letters indicate the atoms in the aromatic rings.**
| Angles | liGAN | 3D-SBDD | Pocket2Mol | TargetDiff | FLAG | Frag2Seq |
| --- | --- | --- | --- | --- | --- | --- |
| CCC | $1.266$ | $0.465$ | $0.770$ | $0.507$ | $0.497$ | $\mathbf{0.263}$ |
| CCO | $1.475$ | $0.618$ | $1.104$ | $0.713$ | $0.768$ | $\mathbf{0.306}$ |
| NCC | $1.312$ | $0.619$ | $0.754$ | $0.585$ | $\mathbf{0.427}$ | $0.578$ |
| CCCC | $0.197$ | $0.250$ | $0.215$ | $0.170$ | $0.164$ | $\mathbf{0.113}$ |
| cccc | $0.786$ | $1.044$ | $-$ | $0.229$ | $0.516$ | $\mathbf{0.041}$ |
| CCCO | $0.206$ | $0.263$ | $0.245$ | $0.191$ | $\mathbf{0.180}$ | $0.198$ |
| Cccc | $0.725$ | $0.939$ | $-$ | $0.397$ | $0.311$ | $\mathbf{0.109}$ |
| CC=CC | $0.526$ | $0.655$ | $0.296$ | $0.301$ | $0.345$ | $\mathbf{0.133}$ |

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: 1. How robust and adaptable are the fragmentation rules in Section 3.2 when applied to structurally complex molecules? Could this fragmentation style lead to a loss of important molecular interactions?
2. The authors should consider providing an attention map visualization highlighting the interactions between protein pocket features and small molecule. This could  help enhance interpretability, and improve practical usability in drug discovery applications
soundness: 3
strengths: 1. Frag2Seq effectively incorporates protein context through cross-attention with pre-trained protein embeddings, allowing it to generate target-specific molecules. This approach addresses a common limitation in SBDD by aligning molecular generation more closely with real-world drug discovery where small molecule and protein interactions play a vital role in binding.
2. The SE(3)-invariant tokenization method preserves important 3D geometric information, offering a promising way to leverage the generative capabilities of LLMs. This geometric awareness could enhance accuracy in predicting drug-like properties, such as binding affinity and drug-likeness.
3.  Frag2Seq demonstrates strong performance on metrics like binding affinity and drug-likeness while achieving up to 300x speedup over atom-based approaches.
summary: The paper presents Frag2Seq, a method for structure-based drug design using language models (LMs) to generate drug-like molecules based on 3D fragments. By transforming 3D molecules into SE(3)-invariant sequences which can used with LMs, Frag2Seq captures essential geometric information. Additionally, it incorporates protein context through cross-attention with pre-trained protein embeddings, enabling effective target-aware molecule generation. Experiments show that Frag2Seq shows competitive performance against baselines in binding affinity, drug-likeness (QED), and synthesis accessibility, with sampling speeds up to 300 times faster than atom-based generative models.
weaknesses: 1. For the models to be practically usable in applications like drug discovery, the scoring mechanism for generated molecules needs greater clarity on how specific molecular characteristics (e.g., fragment size, functional groups) influence metrics like vina scores. In other words the paper can focus a bit more on model interpretability.
2. The fragment-based generation approach, which splits molecules by rotatable bonds while preserving rigid functional groups (e.g., hydroxy, carboxyl), may limit flexibility in positioning critical binding groups, potentially affecting target-specific binding. How robust are the fragmentation rules in Section 3.2?

---

confidence: 5
contribution: 2
initial_rating: 3
presentation: 2
questions: 1. Could the authors provide more detailed experimental results, especially in terms of binding affinity and molecular quality, to further validate the model’s effectiveness?
2. How does this model perform on CrossDocked2020, in comparison with IPDiff?
3. Is it possible to consider integrating an interaction prior mechanism similar to IPDiff within the diffusion model to enhance generation accuracy and practical applicability?
soundness: 2
strengths: 1. Innovation in fragment-based generation: The model’s use of fragment-based generation reduces the computational complexity of molecule generation.
2. Incorporation of protein embeddings: The use of protein pocket embeddings to enhance the targeting of drug molecule generation demonstrates a promising attempt at capturing protein-ligand interactions.
3. Generation efficiency: The method improves generation speed over traditional atom-level generation approaches.
summary: This paper proposes Frag2Seq, which leverages fragment and geometric information to enhance structure-based drug design. By transforming 3D molecules into fragment sequences and using SE(3)-equivariant frames to preserve the geometry of fragments, this model aims to improve the efficiency of molecule generation. The paper also incorporates protein pocket embeddings using cross-attention to capture protein-ligand interactions and demonstrates some performance improvements.
weaknesses: 1. Lack of innovation: The model structure closely resembles that of IPDiff, with the only significant change being the replacement of the diffusion mechanism with a language model, limiting the novelty of the approach.
2. Insufficient binding affinity accuracy: The model underperforms in binding affinity compared to IPDiff, which achieves higher Vina scores.
3. Lack of critical comparative analysis: There are no direct accuracy comparisons with state-of-the-art models, like IPDiff, preventing a full evaluation of the model's advantages.
4. Limited practicality and scalability: Although fragment generation improves computational efficiency, it is limited in producing high-accuracy molecules and binding affinity, which reduces its practicality.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: - In lines 248-249, the authors write "...with the key to be the canonical SMILES of each fragment and the value to be the atom types and atom local coordinates in each fragment under the associated fragment local frame." => why is the key only the canonical SMILES? Would different conformations of the same fragment be represented by the same key?
soundness: 3
strengths: - The proposed sequence representation respects structural completeness and geometric invariance, and the authors provide rigorous proofs for the claims.
- The SBDD baselines are comprehensive, with the method achieving superior results in efficacy and efficiency
- The authors include sufficient ablations and analysis for the design choices of their method.
summary: The authors propose a fragment-based bijective mapping between 3D molecules and canonical SE(3)-invariant sequences. They do so by combining molecule and fragment local frames and representing fragments as spherical coordinates w.r.t to the molecule frame. They prove that the representation preserves structural completeness and geometric invariance. They adopt the representation for LM-based conditional generation of ligands for protein pockets, demonstrating competitive results with a wide set of baselines.
weaknesses: - The approach is not entirely novel (though its application to SBDD is)
- It's unclear why this text-based representation and LM-based generation is needed for SBDD
- Alternate strategies for incorporating protein context should be compared with

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: 1. Since the language model does not directly generate chemical bond information, how reliable is the subsequent model used for bond inference, and how is its performance validated? Do baseline models also require bond inference, and if so, do they use the same model? Please elaborate more on the rationality behind the experimental design to ensure that the performance of drug design is accurately assessed.
2. Could you explain why a language model was chosen over other methods, such as 3D atom-based diffusion models, for the task of structure-based drug design? What are the theoretical and practical benefits?
3. Is the direct use of cross-attention between the entire protein and molecule sequences a simplistic approach, or can experiments demonstrate that it effectively captures key information about the binding pocket?
soundness: 2
strengths: 1. The method proposed in the paper significantly outperforms recent state-of-the-art methods in terms of drug-likeness and high binding affinity of the generated molecules, demonstrating its superiority in generating drug candidates.
2. The sample efficiency of Frag2Seq is markedly higher than that of existing methods, offering substantial speedup in the generation process. This efficiency is crucial for accelerating the drug discovery pipeline and reducing computational costs.
3. The paper innovatively leverages the established ordering with canonical SMILES for 3D-isomorphic molecules, which is of paramount importance for sequence models. This approach ensures that the fragments of molecules  are accurately represented and compared in a sequence format.
summary: This paper introduces Frag2Seq, a fragment and geometry-aware language model designed for structure-based drug design. The model employs a SE(3)-equivariant approach to decompose 3D molecular structures into fragments and represents these fragments as sequences while preserving their geometric information. Protein embeddings are extracted using the pre-trained inverse folding model ESM-IF1. To effectively capture protein-ligand interactions, Frag2Seq incorporates cross-attention mechanisms between the molecule embeddings and the protein embeddings within the language model. Experiments on the CrossDocked dataset show that Frag2Seq outperforms the baselines on  metrics such as Vina Score, QED, and Lipinski The method also exhibits superior sampling efficiency, with up to approximately 300 times faster generation compared to atom-based autoregressive and diffusion baselines.
weaknesses: 1. The use of SE(3)-invariant frames to encode the 3D structure of molecules, while effective, is a common approach in  protein structure design and thus does not introduce a significant innovation in this paper. The methodology primarily leverages the canonical ordering of SMILES strings to concatenate fragment sequences, which is a straightforward application. Similarly, the use of cross-attention to directly integrate protein and small molecule information is also quite direct. As a result, this work is more incremental in nature rather than presenting a breakthrough in methodology.
2. In terms of input processing, the quantization of continuous structural information into discrete tokens results in a loss of precision. This could potentially affect the model's ability to capture fine-grained details of molecular structures. On the output side, the language model is unable to directly generate information about chemical bonds, which necessitates the use of additional models to infer this critical information. This dependency on secondary models for bond inference introduces an extra step in the generation process and may impact the overall coherence and accuracy of the generated molecules.

Meta-review: This paper proposes a method to generate molecules in SE(3) equivariant way using SE(3) invariant tokenization of molecular fragments. The tokenization is based on canonicalized ordering of atoms (and fragments) and serialization based on fragments and relative rotations between the fragment-wise local frames. 

The paper is promising as a way to use language models for 3D generation of molecules. 

From my perspective, the proposed idea is not entirely novel, since the idea to decompose a molecule into 3D fragments and learn a generative model to choose the 3D fragments and assemble them has been considered before. The main novelty lies in using a language model instead of diffusion model for the generation. The current presentation of the paper is not crystal clear about this connection, which could be improved. The authors should also provide more thorough empirical evaluation clearly explaining why and how the language model perform better than the diffusion models. 

Despite the weakness, I recommend acceptance for this paper. The authors provide convincing argument that the proposed idea is useful. While I am not entirely convinced that the proposed method is SOTA, the work may lead to future follow-ups that use autoregressive generation for 3D molecules, which I believe to be an underexplored area.

Decision: Accept (Poster)