EnzymeFlow: Generating Reaction-specific Enzyme Catalytic Pockets through Flow Matching and Co-Evolutionary Dynamics

## Abstract

Abstract Enzyme design is a critical area in biotechnology, with applications ranging from drug development to synthetic biology. Traditional methods for enzyme function prediction or protein binding pocket design often fall short in capturing the dynamic and complex nature of enzyme-substrate interactions, particularly in catalytic processes. To address the challenges, we introduce EnzymeFlow, a generative model that employs flow matching with hierarchical pre-training and enzyme-reaction co-evolution to generate catalytic pockets for specific substrates and catalytic reactions. Additionally, we introduce a large-scale, curated, and validated dataset of enzyme-reaction pairs, specifically designed for the catalytic pocket generation task, comprising a total of 328 , 192 328 192 328,192 328 , 192 pairs. By incorporating evolutionary dynamics and reaction-specific adaptations, EnzymeFlow becomes a powerful model for designing enzyme pockets, which is capable of catalyzing a wide range of biochemical reactions. Experiments on the new dataset demonstrate the model’s effectiveness in designing high-quality, functional enzyme catalytic pockets, paving the way for advancements in enzyme engineering and synthetic biology. We provide EnzymeFlow code at https://github.com/WillHua127/EnzymeFlow with notebook demonstration at https://github.com/WillHua127/EnzymeFlow/blob/main/enzymeflow_demo.ipynb .

## 1 Introduction

Proteins are fundamental to life, participating in many essential interactions for biological processes (Whitford, ).

Figure: Figure 1: Enzyme-substrate Mechanism.
Refer to caption: x1.png

Among proteins, enzymes stand out as a specialized class that serves as catalysts, driving and regulating nearly all chemical reactions and metabolic pathways across living organisms, from simple bacteria to complex mammals (Kraut, ; Murakami et al., ; Copeland, ) (visualized in Fig. 1).
Their catalytic power is central to biological functions, enabling the efficient production of complex organic molecules in biosynthesis (Ferrer et al., ; Liu & Wang, ) and the creation of novel biological pathways in synthetic biology (Girvan & Munro, ; Keasling, ; Hodgman & Jewett, ). Examining enzyme functions across the tree of life deepens our understanding of the evolutionary processes that shape metabolic networks and enable organisms to adapt to their environments (Jensen, ; Glasner et al., ; Campbell et al., ; Pinto et al., ). Consequently, studying enzyme-substrate interactions is essential for comprehending biological processes and designing effective products.

Traditional methods have primarily focused on enzyme function prediction, annotation (Gligorijević et al., ; Yu et al., ), or enzyme-reaction retrieval (Mikhael et al., ; Hua et al., ; Yang et al., ). These approaches lack the ability to design new enzymes that catalyze specific biological processes. Recent studies suggest that current function prediction models struggle to generalize to unseen enzyme reaction data (de Crecy-Lagard et al., ; Kroll et al., ), limiting their utility in enzyme design. To effectively design enzymes, it is crucial not only to predict protein functions but also to identify and generate enzyme catalytic pockets specific to particular substrates, thereby enabling potentially valuable biological processes.

On the other hand, recent advances in deep generative models have significantly improved pocket design for protein-ligand complexes (Stärk et al., ; Zhang et al., ; ; Krishna et al., ), generating diverse and functional binding pockets for ligand molecules.
However, these models cannot generalize directly to the design of enzyme catalytic pockets for substrates involved in catalytic processes. Unlike protein-ligand complexes, where ligand binding typically does not lead to a chemical transformation, enzyme-substrate interactions result in a chemical change where the substrate is converted into a product, which has significantly different underlying mechanisms. More specifically, in protein-ligand binding, the ligand may induce a conformational change in the protein, affect its interactions with other molecules, or modulate its activity; in contrast, the formation of an enzyme-substrate complex is a precursor to a catalytic reaction, where the enzyme lowers the activation energy, facilitating the transformation of the substrate into a product. After the reaction, the enzyme is free to bind another substrate molecule. Therefore, current generative models for pocket design are restricted and limited to static ligand-binding interactions, failing to describe such dynamic transformations and the complex nature of enzyme-substrate interactions.

To address these limitations, we propose EnzymeFlow (demonstrated in Fig. 3), a flow matching model (Lipman et al., ; Liu et al., ; Albergo & Vanden-Eijnden, )
with enzyme-reaction co-evolution and structure-based pre-training for enzyme catalytic pocket generation. Our major contributions follow: (1) EnzymeFlow—Flow Model for Enzyme Catalytic Pocket Design: We define conditional flows for enzyme catalytic pocket generation based on backbone frames, amino acid types, and Enzyme Commission (EC) class. The generative flow process is conditioned on specific substrates and products, enabling potential catalytic processes.
(2) Enzyme-Reaction Co-Evolution: Since enzyme-substrate interactions involve dynamic chemical transformations of substrate molecules, which is distinct from static protein-ligand interactions, we propose enzyme-reaction co-evolution with a new co-evolutionary transformer (coEvoFormer). The co-evolution is used to capture substrate-specificity in catalytic reactions. It encodes how enzymes and reactions evolve together, allowing the model to operate on evolutionary dynamics, which naturally comprehends the catalytic process.
(3) Structure-Based Hierarchical Pre-Training: To leverage the vast data of geometric structures from existing proteins and protein-ligand complexes, we propose a structure-based hierarchical pre-training. This method progressively learns from protein backbones to protein binding pockets, and finally to enzyme catalytic pockets. This hierarchical learning of protein structures enhances geometric awareness within the model.
(4) EnzymeFill—Large-scale Pocket-specific Enzyme-Reaction Dataset with Pocket Structures: Current enzyme-reaction datasets are based on full enzyme sequences or structures and lack precise geometry for how enzyme pockets catalyze the substrates. To address this, we construct a structure-based, curated, and validated enzyme catalytic pocket-substrate dataset, specifically designed for the catalytic pocket generation task.

## 2 Related Work

### 2.1 Protein Evolution

Protein evolution learns how proteins change over time through processes such as mutation, selection, and genetic drift (Pál et al., ; Bloom & Arnold, ), which influence protein functions. Studies on protein evolution focus on understanding the molecular mechanisms driving changes in protein sequences and structures. Zuckerkandl & Pauling () introduce the concept of the molecular clock, which postulates that proteins evolve at a relatively constant rate over time, providing a framework for estimating divergence times between species. DePristo et al. () show that evolutionary rates are influenced by functional constraints, with regions critical to protein function (e.g., active sites, binding interfaces) evolving more slowly due to purifying selection. This understanding leads to the development of methods for detecting functionally important residues based on evolutionary conservation.
Understanding protein evolution has practical applications in protein engineering. By studying how natural proteins evolve to acquire new functions, researchers design synthetic proteins with desired properties (Xia & Levitt, ; Jäckel et al., ). Additionally, deep learning models increasingly integrate evolutionary principles to predict protein function and stability, design novel enzymes, and guide protein engineering (Yang et al., ; AlQuraishi, ; Jumper et al., ).

### 2.2 Generative Models for Protein and Pocket Design

Recent advancements in generative models have advanced the field of protein design and binding pocket design, enabling the creation of proteins or binding pockets with desired properties and functions (Yim et al., ; ; Chu et al., ; Hua et al., ; Abramson et al., ). For example, RFDiffusion (Watson et al., ) employs denoising diffusion in conjunction with RoseTTAFold (Baek et al., ) for de novo protein structure design, achieving wet-lab-level generated structures that can be extended to binding pocket design. RFDiffusionAA (Krishna et al., ) extends RFDiffusion for joint modeling of protein and ligand structures, generating ligand-binding proteins and further leveraging MPNNs for sequence design. Additionally, FAIR (Zhang et al., ) and PocketGen (Zhang et al., ) use a two-stage coarse-to-fine refinement approach to co-design pocket structures and sequences. Recent models leveraging flow matching frameworks have shown promising results in these tasks. For instance, FoldFlow (Bose et al., ) introduces a series of flow models for protein backbone design, improving training stability and efficiency. FrameFlow (Yim et al., ) further enhances sampling efficiency and demonstrates success in motif-scaffolding tasks using flow matching, while MultiFlow (Campbell et al., ) advances to structure and sequence co-design. These flow models, initially applied to protein backbones, have been further generalized to binding pockets. For example, PocketFlow (Zhang et al., ) combines flow matching with physical priors to explicitly learn protein-ligand interactions in binding pocket design, achieving stronger results compared to RFDiffusionAA.
While these models excel in protein and binding pocket design, they primarily focus on static protein(-ligand) interactions and lack the ability to model the chemical transformations involved in enzyme-catalyzed reactions. This limitation may reduce their accuracy and generalizability in designing enzyme pockets for catalytic reactions. In EnzymeFlow, we aim to address these current limitations. An extended discussion of related works on AI-driven protein engineering can be found in App. C.

Discussion regarding PocketFlow.
PocketFlow (Zhang et al., ) has demonstrated strong performance in protein-ligand design, showing generalizability across various protein pocket categories. However, it falls short when applied to the design of enzyme catalytic pocket with specific substrates. One key limitation is that protein-ligand interactions are static, meaning that the training data and model design do not capture or describe the chemical transformations, such as the conversion or production of new molecules, that occur during enzyme-catalyzed reactions. This dynamic aspect of enzyme-substrate interactions is missing in current models. Another limitation is that PocketFlow fixes the overall protein backbone structure before designing the binding pocket, treating the pocket as a missing element to be filled in. This approach may not align with practical needs, as the overall protein backbone structure is often unknown before pocket design. Ideally, the design process should be reversed: the pocket should be designed first, influencing the overall protein structure.
Despite these challenges, PocketFlow remains a good and leading work in pocket design. With EnzymeFlow, we aim to address these limitations, particularly in the context of catalytic pocket design.

## 3 EnzymeFill: Large-scale Enzyme Pocket-Reaction Dataset

A key limitation of current datasets, such as ESP (Kroll et al., ), EnzymeMap (Heid et al., ), CARE (Yang et al., ), or ReactZyme (Hua et al., ), is the lack of precise pocket information. These datasets typically provide enzyme-reaction data, including protein sequences and SMILES representations, which is used to predict EC numbers in practice. To address it, we introduce a new synthetic dataset, EnzymeFill, which includes precise pocket structures with substrate conformations. EnzymeFill is specifically introduced for enzyme catalytic pocket design.

Data Source.
We construct a curated and validated dataset of enzyme-reaction pairs by collecting data from the Rhea (Bansal et al., ), MetaCyc (Caspi et al., ), and Brenda (Schomburg et al., ) databases. For enzymes in these databases, we exclude entries missing UniProt IDs or protein sequences. For reactions, we apply the following procedures: (1) remove cofactors, small ion groups, and molecules that appear in both substrates and products within a single reaction; (2) exclude reactions with more than five substrates or products; and (3) apply OpenBabel (O’Boyle et al., ) to standardize canonical SMILES. Ultimately, we obatin a total of $328,192$ enzyme-reaction pairs, comprising $145,782$ unique enzymes and $17,868$ unique reactions; we name it EnzymeFill.

Catalytic Pocket with AlphaFill.
We identify all enzyme catalytic pockets using AlphaFill (Hekkelman et al., ), an AF-based algorithm that uses sequence and structure similarity to transplant ligand molecules from experimentally determined structures to predicted protein models. We download the AlphaFold structures for all enzymes and apply AlphaFill to extract the enzyme pockets. Simultaneously, we determine the reaction center by using atom-atom mapping of the reactions.
During the pocket extraction process, AlphaFill first identifies homologous proteins of the target enzyme in the PDB-REDO database, along with their complexes with ligands (van Beusekom et al., ). It then transplants the ligands from the homologous protein complexes to the target enzyme through structural alignment (illustrated in Fig. 2(a)). After transplantation, we select the appropriate ligand molecule based on the number of atoms and its frequency of occurrence, and extract the pocket using a pre-defined radius of $10\mathring{\text{A}}$ . We also perform clustering analysis on the extracted pockets using Foldseek (van Kempen et al., ), which reveals that enzyme catalytic pockets capture functional information more effectively than full structures (illustrated in Fig. 2(b)).
For the extraction of reaction centers, we first apply RXNMapper to extract atom-atom mappings (Schwaller et al., ), which maps the atoms between the substrates and products. We then identify atoms where changes occurred in chemical bonds, charges, and chirality, labeling these atoms as reaction centers.

Figure: Figure 2: (a) Enzyme pocket extraction workflow with AlphaFill. (b) Quality analysis of clustering between enzyme pockets and full structures; good clusters have high functional concentration.
Refer to caption: x2.png

Data Debiasing for Generation.
To ensure the quality of catalytic pocket data for the design task, we exclude pockets with fewer than $32$ residues(^1^11$32$ residues are chosen based on LigandMPNN (Dauparas et al., ), ensuring high-quality interactions.), resulting in $232,520$ enzyme-reaction pairs.
Additionally, enzymes and their catalytic pockets can exhibit significant sequence similarity. When enzymes that are highly similar in sequence appear too frequently in the dataset, they tend to belong to the same cluster or homologous group, which can introduce substantial biases during model training. To mitigate this issue and ensure a more balanced dataset, it is important to reduce the number of homologous enzymes by clustering and selectively removing enzymes from the same clusters. This helps to debias the data and improve the model’s generalizability. We perform sequence alignment to cluster enzymes and identify homologous ones (Steinegger & Söding, ).
We then revise the dataset into five major categories based on enzyme sequence similarity, resulting in: (1) $19,379$ pairs with at most $40\%$ homology, (2) $34,750$ pairs with at most $50\%$ homology, (3) $53,483$ pairs with at most $60\%$ homology, (4) $100,925$ pairs with at most $80\%$ homology, and (5) $132,047$ pairs with at most $90\%$ homology. In EnzymeFlow, we choose to use the clustered data with at most $60\%$ homology with $53,483$ samples for training.
We provide more dataset statistics in App. H

## 4 EnzymeFlow

We introduce EnzymeFlow, a flow matching model with hierarchical pre-training and enzyme-reaction co-evolution to generate enzyme catalytic pockets for specific substrates and catalytic reactions. We demonstrate the pipeline in Fig. 3, discuss the EnzymeFlow with co-evolutionary dynamics in Sec. 4.1, further introduce the structure-based hierarchical pre-training for generalizability in Sec. 4.2

### 4.1 Enzyme Catalytic Pocket Generation with Flow Matching

EnzymeFlow on Catalytic Pocket.
Following Yim et al. (), we refer to the protein structure as the backbone atomic coordinates of each residue. A pocket with number of residues $N_{r}$ can be parameterized into SE(3) residue frames $\{(x^{i},r^{i},c^{i})\}_{i=1}^{N_{r}}$, where $x^{i}\in\mathbb{R}^{3}$ represents the position (translation) of the $C_{\alpha}$ atom of the $i$-th residue, $r^{i}\in\text{SO(3)}$ is a rotation matrix defining the local frame relative to a global reference frame, and $c^{i}\in\{1,\dots,20\}\cup\{\text{\char 53}\}$ denotes the amino acid type, with an additional ✕ indicating a masking state of the amino acid type. We refer to the residue block as $T^{i}=(x^{i},r^{i},c^{i})$, and the entire pocket is described by a set of residues $\mathbf{T}=\{T^{i}\}_{i=1}^{N_{r}}$ . Additionally, we denote the graph representations of substrate and product molecules in the catalytic reaction as $l_{s}$ and $l_{p}$, respectively. An enzyme-reaction pair can therefore be described as $(\mathbf{T},l_{s},l_{p})$.

Following flow matching literature (Yim et al., ; Campbell et al., ), we use time $t=1$ to denote the source data.
The conditional flow on the enzyme catalytic pocket $p_{t}(\mathbf{T}_{t}|\mathbf{T}_{1})$ for a time step $t\in(0,1]$ can be factorized into the probability density over continuous variables (translations and rotations) and the probability mass function over discrete variables (amino acid types) as:

$$ $\vspace{-0.1cm}p_{t}(\mathbf{T}_{t}|\mathbf{T}_{1})=\prod_{i=1}^{N_{r}}p_{t}(x ^{i}_{t}|x^{i}_{1})\ p_{t}(r^{i}_{t}|r^{i}_{1})\ p_{t}(c^{i}_{t}|c^{i}_{1}),$ (1) $$

where the translation, rotation, and amino acid type at time $t$ are derived as:

$$ $\vspace{-0.1cm}\begin{split}x^{i}_{t}&=(1-t)x^{i}_{0}+tx^{i}_{1},\ x^{i}_{0} \sim\mathcal{N}(0,I);\ \ r^{i}_{t}=\exp_{r^{i}_{0}}(t\log_{r^{i}_{0}}r^{i}_{1} ),\ r^{i}_{0}\sim\mathcal{U}_{\text{SO(3)}};\\ c^{i}_{t}&\sim p_{t}(c^{i}_{t}|c^{i}_{1})=\text{Cat}(t\ \delta(c^{i}_{1},c^{i} _{t})+(1-t)\ \delta(\text{\char 53},c^{i}_{t})),\end{split}$ (2) $$

where $\delta(\text{a},\text{b})$ is the Kronecker delta, which equals to $1$ if $\text{a}=\text{b}$ and 0 0 if $\text{a}\neq\text{b}$; Cat is a categorical distribution for the sampling of discrete amino acid type, with probabilities $t\delta(c^{i}_{1},c^{i}_{t})+(1-t)\delta(\text{\char 53},c^{i}_{t})$. The discrete flow interpolates from the masking state ✕ at $t=0$ to the actual amino acid type $c^{i}_{1}$ at $t=1$ (Campbell et al., ). In a catalytic process, enzymes interact with substrates to produce specific products. In practical enzyme design, we typically know the substrates $l_{s}$ (as 3D atom point clouds) and the desired products $l_{p}$ (as 2D molecular graphs or SMILES). Therefore, the formation of the enzyme catalytic pocket should be conditioned on both substrates and products. Our enzyme flow matching model is conditioned on these two ligand molecules $l_{s},l_{p}$, ensuring that the predictions of vector fields ${v}_{\theta}(\cdot)$ and loss functions account for the substrate and product molecules:

$$ $\vspace{-0.1cm}\begin{split}\mathcal{L}_{\text{trans}}&=\sum_{i=1}^{N_{r}}\|{v }_{\theta}^{i}(x^{i}_{t},t,l_{s},l_{p})-(x^{i}_{1}-x^{i}_{0})\|^{2}_{2};\ \mathcal{L}_{\text{rot}}=\sum_{i=1}^{N_{r}}\|{v}_{\theta}^{i}(r^{i}_{t},t,l_{s },l_{p})-\frac{\log_{r^{i}_{t}}r_{1}^{i}}{1-t}\|^{2}_{\text{SO(3)}};\\ \mathcal{L}_{\text{aa}}&=-\sum_{i=1}^{N_{r}}\log p_{\theta}(c^{i}_{1}|{v}^{i}_ {\theta}(c^{i}_{t},t,l_{s},l_{p})).\end{split}$ (3) $$

To design the enzyme pocket and model protein-ligand interactions, we implement 3D and 2D GNNs to encode the substrate and product, respectively (implemented in App. E). The main vector field network applies cross-attention to model protein-ligand interactions and incorporates Invariant Point Attention (IPA) (Jumper et al., ) to encode protein features and make predictions. Following tricks in Yim et al. (); Campbell et al. (), we let the the model predict the final structure at $t=1$ and interpolates to compute the vector fields (discussed in App. F).

EnzymeFlow on EC-Class.
The Enzyme Commission (EC) classification is crucial for categorizing enzymes based on the reactions they catalyze. Understanding the EC-class of an enzyme-reaction pair can help predict its function in various biochemical pathways (Bansal et al., ).
Given its importance, EnzymeFlow leverages EC-class to enhance its generalizability across various enzymes and catalytic reactions. Therefore, our model incorporates EC-class, $y_{\text{ec}}\in\{1,\dots,7\}\cup\{\text{\char 53}\}$ , as a discrete factor in the design process.
The EC-class is sampled from a Categorical distribution with probabilities $t\delta(y_{\text{ec}_{1}},y_{\text{ec}_{t}})+(1-t)\delta(\text{\char 53},y_{
\text{ec}_{t}})$ . The discrete flow on EC-class interpolates from the masking state ✕ at $t=0$ to the actual EC-class $y_{\text{ec}_{1}}$ at $t=1$. The prediction and loss function are conditioned on the pocket frames and the substrate and product molecules:

$$ $\vspace{-0.1cm}\mathcal{L}_{\text{ec}}=-\log p_{\theta}(y_{\text{ec}_{1}}|{v}_ {\theta}(\mathbf{T}_{t},t,l_{s},l_{p},y_{\text{ec}_{t}})).$ (4) $$

The model predicts the final EC-class at $t=1$ and interpolates to compute its vector field. For EC-class prediction, we first employ a EC-class embedding network to encode $y_{\text{ec}_{t}}$. The final predicted EC-class is obtained by pooling cross-attention between the encoded enzyme and EC-class features.

Figure: Figure 3: Overview of EnzymeFlow with hierarchical pre-training and enzyme-reaction co-evolution. (1) Flow model pre-trained on protein backbones and amino acid types. (2) Flow model further pre-trained on protein binding pockets, conditioned on ligand molecules with geometry-specific optimization. (3) Flow model fine-tuned on enzyme catalytic pockets, and conditioned on substrate and product molecules, with enzyme-reaction co-evolution and EC-class generation.
Refer to caption: x3.png

#### 4.1.1 EnzymeFlow with Enzyme-reaction co-Evolution

Enzyme (protein) evolution refers to the process by which enzyme structures and functions change over time due to genetic variations, such as mutations, duplications, and recombinations. These changes can lead to alterations in amino acids, potentially affecting the enzyme structure, function, stability, and interactions (Pál et al., ; Sikosek & Chan, ).
Reaction evolution, on the other hand, refers to the process by which chemical reactions or substrates, particularly those catalyzed by enzymes, change and diversify within biological systems over time (illustrated in Fig. 3(3)(d)).

Co-Evolutionary Dynamics.
Enzymes can co-evolve with the metabolic or biochemical pathways they are part of, adapting to changes in substrate availability, the introduction of new reaction steps, or the need for more efficient flux through the pathway. As pathways evolve, enzymes within them may develop new catalytic functions or refine existing ones to better accommodate these changes (Noda-Garcia et al., ). This process frequently involves the co-evolution of enzymes and their substrates. As substrates change—whether due to the introduction of new compounds in the environment or mutations in other metabolic pathways—enzymes may adapt to catalyze reactions with these new substrates, leading to the emergence of entirely new reactions.
Understanding enzyme-substrate interactions, therefore, requires considering their evolutionary dynamics, as these interactions are shaped by the evolutionary history and adaptations of both enzymes and their substrates. This co-evolutionary process is crucial for explaining how enzymes develop new functions and maintain efficiency in response to ongoing changes in their biochemical environment.

To capture the evolutionary dynamics, we introduce the concept of enzyme-reaction co-evolution into EnzymeFlow. We compute the enzyme and reaction evolution by applying multiple sequence alignment (MSA) to enzyme sequences and reaction SMILES, respectively (Steinegger & Söding, ). The co-evolution of an enzyme-reaction pair is represented by a matrix $U\in\mathbb{R}^{N_{\text{MSA}}\times N_{\text{token}}}$, which combines the MSA results of enzyme sequences and reaction SMILES (illustrated in Fig. 3(3)(d) & Fig. 9), where $N_{\text{MSA}}$ denotes the number of MSA sequences and $N_{\text{token}}$ denotes the length of the MSA alignment preserved. And each element $u^{mn}\in\{1,\dots,64\}\cup\{\text{\char 53}\}$ in $U$ denotes a tokenized character from our co-evolution vocabulary, with additional ✕ indicating the masking state.

EnzymeFlow on Co-Evolution.
The flow for co-evolution follows a similar approach to that used for amino acid types and EC-class, treating it as a discrete factor in the design process. The co-evolution is sampled from a Categorical distribution, where each element has probabilities $t\delta(u^{mn}_{1},u^{mn}_{t})+(1-t)\delta(\text{\char 53},u^{mn}_{t})$. Each element flows independently, reflecting the natural independence of amino acid mutations (Boyko et al., ). The discrete flow on co-evolution interpolates from the masking state ✕ at $t=0$ to the actual character $u^{mn}_{1}$ at $t=1$. The prediction and loss function are conditioned on the pocket frames and the substrate and product molecules:

$$ $\vspace{-0.1cm}\mathcal{L}_{\text{coevo}}=-\sum_{m=1}^{N_{\text{MSA}}}\sum_{n= 1}^{N_{\text{token}}}\log p_{\theta}(u^{mn}_{1}|{v}_{\theta}(\mathbf{T}_{t},t, l_{s},l_{p},u^{mn}_{t})).$ (5) $$

The model predicts the final co-evolution at $t=1$ and interpolates to compute its vector field. For co-evolution prediction, we first introduce a co-evolutionary MSA transformer (coEvoFormer) to encode $U_{t}$ (implemented in App. D). The final predicted co-evolution is obtained by computing cross-attention between the encoded enzyme and ligand, and the encoded co-evolution features.

We can therefore express EnzymeFlow with co-evolutionary dynamics for catalytic pocket design as:

$$ $\vspace{-0.1cm}p_{t}(\mathbf{T}_{t},U_{t},y_{\text{ec}_{t}}|\mathbf{T}_{1},U_{ 1},y_{\text{ec}_{1}},l_{s},l_{p})=p_{t}(y_{\text{ec}_{t}}|y_{\text{ec}_{1}}, \mathbf{T}_{t})\ p_{t}(U_{t}|U_{1},\mathbf{T}_{t})\ p_{t}(\mathbf{T}_{t}| \mathbf{T}_{1},l_{s},l_{p}).$ (6) $$

The final EnzymeFlow model performs flows on protein backbones, amino acid types, EC-class, and enzyme-reaction co-evolution.
Given the SE(3)-invariant prior and the main SE(3)-equivariant network in EnzymeFlow, the pocket generation process is also SE(3)-equivariant (proven in App. G).

Figure: Figure 4: Catalytic pocket design example using EnzymeFlow (UniProt: Q7U4P2). The pocket generation is conditioned on reaction CN[C@H](C(=O)C)CS.C/C=C$\backslash\backslash$1/C(=C/c2[nH]c(c(c2C)CCC(=O)O)/C=C/2$\backslash\backslash$N=C(C(=C2CCC (=O)O)C)C[C@H]2NC(=O)C(=C2C)C=C)/NC(=O)[C@@H]1C $\rightarrow$ CN[C@H](C(=O)C)CSC(C1=C(C)C(=O)N[C@H]1Cc1[nH]c(c(c1C)CCC(=O) O)/C=C/1$\backslash\backslash$N=C(C(=C1CCC(=O)O)C)C[C@H]1NC(=O)C(=C1C)C=C)C of EC4 (ligase enzyme), from $t=0$ to $t=1$.
Refer to caption: x4.png

### 4.2 Structure-based Hierarchical Pre-training

In addition to the standard EnzymeFlow for enzyme pocket design, we propose a hierarchical pre-training strategy to enhance the generalizability of the model across different enzyme categories. The term hierarchical pre-training is used because the approach first involves training the flow model to understand protein backbone generation, followed by training it to learn the geometric relationships between proteins and ligand molecules, which form protein binding pockets. After the flow model learns these prior knowledge, we fine-tune it specifically on an enzyme-reaction dataset to generate enzyme catalytic pockets. The term hierarchical reflects the progression from protein backbone generation, to protein binding pocket formation, and finally to enzyme catalytic pocket generation.

Specifically, we begin by pre-training the flow model on a protein backbones. Once the model learns it, we proceed to post-train it on a protein-ligands, with the objective of generating binding pockets conditioned on the ligand molecules. Finally, the model is fine-tuned on our EnzymeFlow dataset to generate valid enzyme catalytic pockets for specific substrates and catalytic reactions.

#### 4.2.1 Protein Backbone Pre-training

The initial step involves pre-training the model on a protein backbone dataset (illustrated in Fig. 3(1)). We use the backbone dataset discussed in FrameFlow (Yim et al., ). This pre-training focuses solely on SE(3) backbone frames and discrete amino acid types, allowing the flow model to acquire foundational knowledge of protein backbone geometry and structure.

#### 4.2.2 Protein-Ligand Pre-training

Following the protein backbone pre-training, we proceed to pre-train the flow model on a protein-ligand dataset (illustrated in Fig. 3(2)). Specifically, we use PDBBind2020 (Wang et al., ). This pre-training focuses on binding pocket frames, with the flow model conditioned on the 3D representations of ligand molecules $l$ consisting of $N_{l}$ atoms. Additionally, binding affinity $y_{\text{kd}}\in\mathbb{R}$ and atomic-level pocket-ligand distance $D^{i}\in\mathbb{R}^{4\times N_{l}}$ for the $i$-th residue frame serve as optimization factors. The parametrization is similar to Eq. 6, with conditioning on the ligand molecule as follows:

$$ $\vspace{-0.1cm}p_{t}(\mathbf{T}_{t},y_{\text{kd}}|\mathbf{T}_{1},l)=p_{t}(y_{ \text{kd}}|\mathbf{T}_{t},l)\ p_{t}(\mathbf{T}_{t}|\mathbf{T}_{1},l).$ (7) $$

In addition to the flow matching losses in Eq. 3, we introduce a protein-ligand interaction loss to prevent intersection during the binding generation process. Conceptually, this ensures that the generated pocket atoms do not come into contact with the surface of the ligand molecule. Following previous work on protein-ligand binding (Lin et al., ), the surface of a ligand
$\{a_{j}|j\in\mathbb{N}(N_{l})\}$is defined as
$\{a\in\mathbb{R}^{3}|S(a)=\gamma\}$, where
$S(a)=-\rho\log(\sum_{j=1}^{N_{l}}\exp(-|a-a_{j}|^{2}/\rho))$.
The interior of the ligand molecule is thus defined by
$\{a\in\mathbb{R}^{3}|S(a)<\gamma\}$, and the binding pocket atoms are constrained to lie within
$\{a\in\mathbb{R}^{3}|S(a)>\gamma\}$.
We also introduce a protein-ligand distance loss to regularize pairwise atomic distances, along with a binding affinity loss to enforce the generation of more valid protein-ligand pairs. These objectives are defined as follows:

$$ $\vspace{-0.1cm}\begin{split}\mathcal{L}_{\text{inter}}=\sum_{i=1}^{N_{r}}\max( 0,\gamma-S(\hat{A}^{i}_{t})),\ \mathcal{L}_{\text{dist}}&=\sum_{i=1}^{N_{r}} \frac{\|\mathbf{1}\{D^{i}_{1}<8\mathring{\text{A}}\}(D^{i}_{1}-\hat{D}^{i}_{t} )\|^{2}_{2}}{\sum\mathbf{1}_{D^{i}_{1}<8\mathring{\text{A}}}},\ \mathcal{L}_{ \text{kd}}=\|y_{\text{kd}}-\hat{y}_{\text{kd}}\|^{2},\end{split}$ (8) $$

where $\hat{A}^{i}\in\mathbb{R}^{4\times 3}$ denotes the predicted atomic positions of $i$-th residue frame, $\gamma=6$ and $\rho=2$ are hyperparameters, and $\hat{y}_{\text{kd}}$ is the predicted binding affinity for a generated pair. $\hat{D}^{i}\in\mathbb{R}^{4\times N_{l}}$ is defined similarly to $D^{i}$ , based on the distance between the predicted atomic positions and ligand positions for the $i$-th residue frame. The predicted affinity $\hat{y}_{\text{kd}}$ is obtained by pooling the encoded protein and ligand features.
These additional losses are incorporated to improve the model’s generalizability, enforcing more constrained geometries for more valid protein pocket design.

## 5 Experiment — Generating Catalytic Pocket conditioned on Reactions and Substrates

EnzymeFlow is essentially a function-based protein design model, where the intended function is defined by the reaction the enzyme will catalyze. Here, we demonstrate that EnzymeFlow outperforms current structure-based substrate-conditioned protein design models in both the structural and functional aspects, showing its capability and advantage in enzyme catalytic pocket design.

We compare EnzymeFlow with state-of-the-arts representative baselines, including template-matching method DEPACT (Chen et al., ), deep equivariant and iterative refinement model PocketGen (Zhang et al., ), golden-standard diffusion model RFDiffusionAA (Krishna et al., ), and the most recent PocketFlow(^2^22PocketFlow is not open-sourced yet, we implement and train it on EnzymeFill without fixing the backbones.) (Zhang et al., ). For RFDiffusionAA-designed pockets, we apply LigandMPNN (Dauparas et al., ) to inverse fold and predict the sequences post-hoc.
We provide the code of EnzymeFlow at [https://github.com/WillHua127/EnzymeFlow](https://github.com/WillHua127/EnzymeFlow).

**Table 1: EnzymeFlow Evaluation Data Statistics.**
| Data | Pair | Enzyme | Substrate | Product | Enzyme Commision |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| #pair | #enzyme | #substrate | #avg atom | #product | #avg atom | EC1 | EC2 | EC3 | EC4 | EC5 | EC6 | EC7 |  |
| Raw | 232520 | 97912 | 7259 | 30.81 | 7664 | 30.34 | 44881 (19.30) | 75944 (32.66) | 37728 (16.23) | 47242 (20.32) | 8315 (3.58) | 18281 (7.86) | 129 (0.06) |
| Train | 53483 | 22350 | 6112 | 30.95 | 6331 | 30.34 | 11674 (21.83) | 18419 (34.44) | 11394 (21.30) | 5555 (10.39) | 2194 (4.10) | 4200 (7.85) | 47 (0.09) |
| Eval | 100 | 100 | 100 | 30.7 | 94 | 28.84 | 17 (17.00) | 17 (17.00) | 17 (17.00) | 17 (17.00) | 16 (16.00) | 16 (16.00) | 0 (0.00) |

Evaluation Data.
We use MMseqs2 to perform clustering with a $10\%$ homology threshold, selecting the center of each cluster as the initial dataset, resulting in a total of $3,417$ pairs. After de-duplicating both repeated substrates and UniProt entries, we are left with $839$ unique enzyme-reaction pairs. We then uniformly sample data across different EC classes, selecting $17$ pairs from EC1 to EC4 classes and $16$ pairs from EC5 and EC6 classes, respectively, resulting in a total of $100$ unique catalytic pockets and $100$ unique reactions. Each enzyme-reaction pair is labeled with a ground-truth EC-class from EC1 to EC6. We present the EC-class distribution in the evaluation set in Tab. 1.

Reaction-conditioned Generation.
For pocket design and model sampling, we perform conditional generation on each reaction (or substrate), generating 100 catalytic pockets for each reaction in the evaluation set. We evaluate the generated pockets for their structures and functions (i.e., EC-class).

EnzymeFlow Scope.
In EnzymeFlow, we adhere to the philosophy that enzyme function dictates its structure. This means that an enzyme folds into a specific 3D shape to fulfill its catalytic role, and the resulting structure can then be inversely folded into a sequence—essentially, function $\rightarrow$ structure $\rightarrow$ sequence. In EnzymeFlow, the enzyme function is defined by the reaction that the enzyme will catalyze (discussed in App. B). We evaluate the structures and functions of the designed pockets.

### 5.1 Catalytic Pocket Structure Evaluation

We begin by assessing the structural validity of generated catalytic pockets. While enzyme function determines whether the designed pocket can catalyze a specific reaction, the structure determines whether the substrate conformation can properly bind to the catalytic pocket.
We provide some visual examples of designed pockets in Fig. 5 and Fig. 14.

**Table 2: Evaluation of structural validity of EnzymeFlow- and baseline-generated catalytic pockets. The binding affinities (Kd) and structural confidence (chai) are computed by performing docking on the catalytic pocket and substrate conformation using Vina (Trott & Olson, ) and Chai (Chai, ), respectively. We highlight top three results in bold, underline, and italic, respectively.**
| Model | cRMSD ($\downarrow$) | TM-score ($\uparrow$) | Kd ($\downarrow$) | chai ($\uparrow$) | AAR ($\uparrow$) | ECacc ($\uparrow$) |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Top1 | Top10 | Median | Top1 | Top10 | Median |  |  |  |  |  |
| Eval Data |  | - |  |  | - |  | -4.65 | - | - | - |
| DEPACT | 9.25 | 9.75 | 11.16 | 0.238 | 0.206 | 0.149 | -5.46 | 0.125 | 0.112 | 0.149 |
| PocketGen | 7.65 | 8.14 | 10.45 | 0.260 | 0.233 | 0.193 | -5.01 | 0.121 | 0.176 | 0.152 |
| RFDiffusionAA | 9.13 | 9.77 | 11.92 | 0.269 | 0.245 | 0.198 | -12.71 | 0.232 | 0.153 | 0.170 |
| PocketFlow | 7.42 | 8.09 | 10.01 | 0.268 | 0.260 | 0.197 | -4.93 | 0.123 | 0.207 | 0.166 |
| EnzymeFlow (T=50) | 6.94 | 7.57 | 9.04 | 0.290 | 0.262 | 0.209 | -5.03 | 0.129 | 0.216 | 0.280 |
| w/o coevo | 7.02 | 7.60 | 9.15 | 0.288 | 0.260 | 0.205 | -4.86 | 0.123 | 0.196 | 0.246 |
| w/o pretraining | 7.01 | 7.69 | 9.29 | 0.286 | 0.261 | 0.207 | -4.33 | 0.134 | 0.202 | 0.255 |
| w/o coevo+pretraining | 7.05 | 7.81 | 9.43 | 0.278 | 0.255 | 0.204 | -4.72 | 0.125 | 0.154 | 0.221 |
| EnzymeFlow (T=100) | 6.97 | 7.57 | 9.02 | 0.283 | 0.258 | 0.207 | -5.31 | 0.135 | 0.215 | 0.273 |

Metrics.
We use the following metrics to evaluate and compare the structural validity of the generated pocket.
Constrained-site RMSD (cRMSD): The structural distance between the ground-truth and generated pockets, as proposed in Hayes et al. (). TM-score: The topological similarity between the generated and ground-truth pockets in local deviations.
Aggregated Chai Score (chai): The confidence and structural validity of the designed pockets by running Chai (Chai, ). It is calculated as $0.2\times\textit{pTM}+0.8\times\textit{ipTM}-100\times\textit{clash}$, where pTM is the predicted template modeling score, ipTM is the interface predicted template modeling score (as used in Jumper et al. ()), and the definition of chai is proposed by Chai ().
Binding Affinity (Kd): The binding affinity between the generated catalytic pocket and the substrate conformation is computed using AutoDock Vina (Trott & Olson, ).
Amino Acid Recovery (AAR): The overlap ratio between the predicted and ground-truth amino acid types in the generated pocket.
Enzyme Commission Accuracy (ECacc): The accuracy of matching the EC-class of generated pockets with the ground-truth EC-class.

Results.
We compare the structural validity between EnzymeFlow- and baseline-generated catalytic pockets in Tab. 2. EnzymeFlow and its ablation models outperform baseline models, including leading models like RFDiffusionAA and PocketFlow, with significant improvements in cRMSD, TM-score, and ECacc, and competitive performance in AAR. This demonstrates that EnzymeFlow is capable of generating more structurally valid catalytic pockets, aligning with the enzyme function analysis presented in Fig. 6. The average improvements over RFDiffusionAA in cRMSD, TM-score, AAR, and EC-Acc are $23.9\%$, $7.8\%$, $41.1\%$, and $64.7\%$, respectively. Additionally, EnzymeFlow slightly outperforms PocketFlow in catalytic-substrate binding, showing improved affinity scores (Kd) and structural confidence (chai) by $2.1\%$ and $9.8\%$, respectively.

However, EnzymeFlow underperforms RFDiffusionAA in binding scores, reflected by lower affinities and structural confidence. However, considering that the affinities of EnzymeFlow-generated catalytic pockets (-5.03) are close to those of enzyme-reaction pairs in the evaluation set (-4.65), the binding of EnzymeFlow remains acceptable, as enzymes and substrates do not always require tight binding to catalyze reactions because of the kinetic mechanism (Cleland, ; Arcus & Mulholland, ).

Figure: Figure 5: Case study of catalytic pocket design (UniProt: B8MXP5). We show the reference and designed pockets of different models. The pocket generation is conditioned on reaction OC[C@H]1O[C@@H](Oc2ccccc2/C=C$\backslash\backslash$C(=O)O)[C@@H]([C@H]([C@@H]1O)O)O $\rightarrow$ OC(=O)/C=C$\backslash\backslash$c1ccccc1O of EC3.
Refer to caption: x5.png

### 5.2 Quantitative Analysis of Enzyme Function

The key question is how we can quantitatively assess enzyme functions, i.e., catalytic ability, of the generated pockets for a given reaction. To answer this, we perform enzyme function analysis on the designed catalytic pockets. Accurate annotated enzyme function is important for catalytic pocket design because it helps identify the functionality and the active sites that should be preserved or modified to improve catalytic efficiency (Rost, ; Barglow & Cravatt, ; Yu et al., ).

Figure: Figure 6: Quantitative comparison of annotated enzyme functions between EnzymeFlow- and baseline-generated catalytic pockets across all EC classes, using four multi-label accuracy metrics. Light color represents EnzymeFlow and its ablation models, blue color represents baseline pocket design models.
Refer to caption: x6.png

Enzyme Function Comparison.
In EnzymeFlow, we co-annotate the enzyme function alongside the catalytic pocket design, allowing their functions to directly influence the structure generation. This integration of enzyme function annotation into EnzymeFlow ensures functionality control throughout the design. For baselines that design general proteins rather than enzyme-specific pockets, we perform enzyme function annotation post-hoc using CLEAN (Yu et al., ) to classify and annotate the EC-class of the generated pockets. After labeling each generated pocket with a EC-class, we compare it to the ground-truth EC-class associated with the actual reaction to compute EC-class accuracy, which quantifies how well the generated pockets align with the intended enzyme functions.

Results.
We quantitatively compare the annotated enzyme functions between EnzymeFlow- and baseline-generated catalytic pockets across all EC classes in Fig. 6, and compare the per-class performance in Fig. 7. These figures allow us to interpret the functions of enzyme catalytic pockets designed by different models. From Fig. 6, EnzymeFlow and its ablation models achieve the highest values across various multi-label accuracy metrics, including accuracy ($0.2809$), precision ($0.2600$), recall ($0.2722$), and F1 score ($0.2504$), outperforming models like RFDiffusionAA and PocketFlow.
Additionally, Fig. 7 illustrates per-class enzyme function accuracy, where EnzymeFlow demonstrates strong performance in EC2, EC4, EC5, and EC6, competitive performance in EC3, but slightly weaker performance in EC1 compared to baseline models. Baseline models tend to perform poorly in EC5 and EC6, with per-class occurrence and accuracy showing values close to 0 0. In contrast, EnzymeFlow generates more functionally diverse and accurate catalytic pockets, maintaining higher accuracy across different EC classes.

Figure: Figure 7: Quantitative comparison of annotated enzyme functions between EnzymeFlow- and baseline-generated catalytic pockets per EC-class, using accuracy, recall, and F1 score. Light color represents EnzymeFlow and ablation models, blue color represents baseline pocket design models.
Refer to caption: x7.png

Figure: Figure 8: Quantitative comparison of annotated enzyme functions between EnzymeFlow- and baseline-generated catalytic pockets across all EC classes, using four multi-label accuracy metrics. Light color represents EnzymeFlow with enzyme function co-annotation, gray color represents EnzymeFlow with enzyme functions annotated by CLEAN post hoc, blue color represents baseline pocket design models with enzyme functions annotated by CLEAN post hoc.
Refer to caption: x8.png

Additionally, for a fairer comparison, in Fig. 8, we compare EnzymeFlow with co-generated enzyme functions, EnzymeFlow with functions annotated post hoc by CLEAN, and baseline models with functions also annotated post hoc by CLEAN. This comparison aims to evaluate the enzyme functions of generated catalytic pockets of different pocket design models using post-hoc function annotation via CLEAN. We observe that EnzymeFlow outperforms the baselines in multi-label accuracy metrics, even when functions are annotated post hoc.

In conclusion, EnzymeFlow generates catalytic pockets that are better compared to other pocket design models, providing more accurate and diverse enzyme functions, which suggests enhanced catalytic potential.
From both functional and structural perspectives, the function-based, reaction-conditioned EnzymeFlow outperforms current structure-based, substrate-conditioned protein design models in both structural validity and intended function design (catalytic ability). EnzymeFlow leverages enzyme-reaction co-evolution to effectively capture the dynamic changes in catalytic reactions as substrates are transformed into products. This approach enables function-based enzyme design, resulting in the generation of more functionally and structurally valid catalytic pockets for specific reactions.

## 6 Limitation and Future Work

EnzymeFlow addresses key challenges in designing enzyme catalytic pockets for specific reactions, but several limitations remain.
The first limitation is that EnzymeFlow currently generates only the catalytic pocket residues, rather than the entire enzyme structure. Ideally, the catalytic pocket should be designed first, followed by the design or reconstruction of the full enzyme structure based on the pocket. While we are developing to use ESM3 (Hayes et al., ) to reconstruct the full enzyme structure based on the designed catalytic pocket (discussed in App. I), this is not the most ideal solution. ESM3 is not specifically trained for enzyme-related tasks, which may limit its performance in enzyme design. In future versions of EnzymeFlow, we are working to fine-tune large biological models like ESM3 (Hayes et al., ), RFDiffusionAA (Krishna et al., ), or Genie2 (Lin et al., ) to specialize them for enzyme-related tasks, particularly for inpainting functional motifs of enzymes (enzyme catalytic motif scaffolding). Additionally, we aim to create an end-to-end model that combines EnzymeFlow with these large models, enabling catalytic pocket generation and functional motif inpainting in a single step, rather than in a two-step process.
The second limitation, though minor, is that EnzymeFlow currently operates only on enzyme backbones and does not model or generate enzyme side chains. In future work, we plan to incorporate models like DiffPack (Zhang et al., ) or develop a full-atom model to address this.

### 6.1 Ongoing Work and Broader Impact

We introduce EnzymeFlow ongoing work in App. A and I.
Furthermore, we discuss the scope of EnzymeFlow from structure-based to function-based protein design in greater depth in App. B.

## Acknowledgement

This research was supported by the FACS-Acuity Project (No. 10242) and Aureka Bio.

## Reproducibility Statement

We provide our code and data examples with demonstrations at [https://github.com/WillHua127/EnzymeFlow](https://github.com/WillHua127/EnzymeFlow). In particular, a Jupyter notebook demonstrating the de novo design of enzyme catalytic pockets conditioned on specific reactions is available at [https://github.com/WillHua127/EnzymeFlow/blob/main/enzymeflow_demo.ipynb](https://github.com/WillHua127/EnzymeFlow/blob/main/enzymeflow_demo.ipynb). For those who prefer not to dive into the full codebase, we have also open-sourced key model components in App. E, App. D, and other appendix sections.

## Collaboration Statement

We welcome collaborations, inquiries, questions, and many discussions. Please do not hesitate to reach out to [chenqing.hua@mail.mcgill.ca](chenqing.hua@mail.mcgill.ca) and [shuangjia.zheng@sjtu.edu.cn](shuangjia.zheng@sjtu.edu.cn). Stay tuned for EnzymeFlow future work!

## Appendix A Future Work in Progress: AI-driven Enzyme Design Platform

As discussed in Sec. 6, there are several limitations in the current version of EnzymeFlow. Here, we briefly outline the next steps and improvements we are actively working on for the upcoming version. Currently, EnzymeFlow generates only catalytic pocket residues rather than full enzyme structures. Ideally, the catalytic pocket should be designed first, followed by the reconstruction of the full enzyme structure based on the pocket. While we currently use ESM3 (Hayes et al., ) for this reconstruction, this approach is not ideal. Fine-tuning ESM3 or RFDiffusionAA (Krishna et al., ) would be preferable, but unfortunately, training scripts for these wonderful models are not provided, making it impossible to directly fine-tune them on our EnzymeFill dataset.

To address this, we are borrowing concepts from Wang et al. () and Lin et al. (), which focuses on inpainting proteins and scaffolding functional motifs. We are working to integrate this concept into EnzymeFlow’s pipeline, as part of our primary design. Our goal is to develop an end-to-end automated AI-driven enzyme discovery system that works as follows:

- •
1. Catalytic Pocket Design: The system will first design enzyme catalytic pockets.
- •
2. Scaffolding Functional Motifs: Next, it will scaffold the functional motifs to generate full enzyme structures.
- •
3. Substrate Docking: Using methods like DiffDock (Corso et al., ), DynamicBind (Lu et al., ), or fine-tuned Chai (Chai, ) on EnzymeFill, the system will bind substrates to the catalytic pockets.
- •
4. Inverse Folding: The enzyme-substrate complex will undergo inverse folding using LigandMPNN (Dauparas et al., ).
- •
5. Computational Screening: Finally, the system will perform computational screening to select the best-generated enzymes.

This entire process is being developed into an integrated, end-to-end solution for AI-driven enzyme design. We are very excited about the potential of this project and look forward to achieving a fully automated enzyme design system in the near future.

## Appendix B Open Discussion: Why is Substrate/Reaction-specified Enzyme Design Needed?

EnzymeFlow is unique in its leading approach to function-based de novo protein design. Currently, most protein design models, whether focused on backbone generation (Yim et al., ; ; Bose et al., ; Campbell et al., ; Krishna et al., ) or pocket design (Zhang et al., ; ; ; ), are structure-based. These models aim to design or modify proteins to achieve a specific 3D structure, prioritizing stability, folding, and molecular interactions. The design process typically involves optimizing a protein structure to minimize energy and achieve a stable structural conformation (Khoury et al., ; Pelay-Gimeno et al., ).

In contrast, function-based protein design focuses on creating proteins that perform specific biochemical tasks, such as catalysis, signaling, or even binding (Martin et al., ; Thornton et al., ). These models are driven by the need for proteins to carry out particular functions rather than adopt a specific 3D structure. Function-based design often targets the active site or binding pockets, optimizing them for specific molecular interactions—in our case, the enzyme’s catalytic pockets.

Our philosophy is that protein function determines its structure, meaning that a protein folds into a specific 3D shape to achieve its intended function, and the resulting structure can then be translated into a proper sequence—essentially, protein function $\rightarrow$ protein structure $\rightarrow$ protein sequence. EnzymeFlow follows this philosophy. Specifically, the function of an enzyme is determined by its ability to catalyze a specific reaction or interact with a specific substrate. Therefore, our enzyme pocket design process begins with the reaction or substrate in mind, incorporating reaction/substrate specificity into the generation process. The reaction or substrate represents the functional target for the generated enzyme pockets.

In this approach, EnzymeFlow generates enzyme pocket structures specified for the desired protein function, which contrasts with current generative methods that prioritize structure first. These existing methods operate on the idea that protein structure $\rightarrow$ protein function $\rightarrow$ protein sequence. However, proteins should be designed primarily for their functionality, not just their structures. EnzymeFlow’s focus on function-based design could serve as an inspiration for future advancements, leading the way toward more purposeful, function-driven protein design.

## Appendix C Extended Related Work — More Discussion

### C.1 Protein Representation Learning

Graph representation learning emerges as a potent strategy for representing and learning about proteins and molecules, focusing on structured, non-Euclidean data (Satorras et al., ; Luan et al., ; ; Hua et al., ; ; Luan et al., ; ).
In this context, proteins and molecules can be effectively modeled as 2D graphs or 3D point clouds, where nodes correspond to individual atoms or residues, and edges represent interactions between them (Gligorijević et al., ; Zhang et al., ; Hua et al., ; Zhang et al., ).
Indeed, representing proteins and molecules as graphs or point clouds offers a valuable approach for gaining insights into and learning the fundamental geometric and chemical mechanisms governing protein-ligand interactions.
This representation allows for a more comprehensive exploration of the intricate relationships and structural features within protein-ligand structures (Tubiana et al., ; Isert et al., ; Zhang et al., ).

### C.2 Protein Function Annotation

Protein function prediction aims to determine the biological role of a protein based on its sequence, structure, or other features. It is a crucial task in bioinformatics, often leveraging databases such as Gene Ontology (GO), Enzyme Commission (EC) numbers, and KEGG Orthology (KO) annotations (Bairoch, ; Consortium, ; Mao et al., ). Traditional methods like BLAST, PSI-BLAST, and eggNOG infer function by comparing sequence alignments and similarities (Altschul et al., ; ; Huerta-Cepas et al., ). Recently, deep learning has introduced more advanced approaches for protein function prediction (Ryu et al., ; Kulmanov & Hoehndorf, ; Bonetta & Valentino, ).
There are two major types of function prediction models, one uses only protein sequence as their input, while the other also uses experimentally-determined or predicted protein structure as input. Typically, these methods predict EC or GO annotations to approximate protein functions, rather than describing the exact catalyzed reaction, which is a limitation of these approaches.

### C.3 Protein Evolution

Please refer to Sec. 2.1.

### C.4 Generative Models for Protein and Pocket Design

Please refer to Sec. 2.2.

## Appendix D Co-Evolutionary MSA Transformer

Co-evolution captures the dynamic relationship between an enzyme and its substrate during a catalytic reaction. AlphaFold2 (Jumper et al., ) has demonstrated the critical importance of leveraging protein evolution, specifically through multiple sequence alignments (MSA) across protein sequences, to enhance a model’s generalizability and expressive power. Previous works, such as MSA Transformer (Rao et al., ) and EvoFormer (Jumper et al., ), have focused on encoding and learning protein evolution from MSA results. Proper co-evolution encodings of enzymes and reactions are essential for capturing the dynamic changes that occur during catalytic processes, not only in our EnzymeFlow model but in other models as well.

Figure: Figure 9: Enzyme-reaction co-evolution and tokenized representation.
Refer to caption: x9.png

### D.1 Co-evolution vocabulary

We provide our co-evolution dictionary for tokenization and encoding following:

Figure: Figure 10: EnzymeFlow co-evolution dictionary.
Refer to caption: x10.png

### D.2 coEvoFormer Implementation

Here, we introduce a new co-evolutionary MSA transformer, coEvoFormer. For details of enzyme-reaction co-evolution, please refer to Sec 4.1.1.

The code for coEvoFormer follows directly:

Figure: Listing 1: Pytorch Implementation of coEvoFormer.

## Appendix E Molecule GNN

### E.1 3D Molecule GNN

The 3D molecule GNN plays a crucial role in EnzymeFlow. During the structure-based hierarchical pre-training, it encodes ligand molecule representations, learning the constrained geometry between protein binding pockets and ligand molecules. This pre-training process makes the 3D molecule GNN transferable. When the flow model is fine-tuned, the 3D molecule GNN is also fine-tuned, transferring its prior knowledge about ligand molecules to substrate molecules in enzyme-catalyzed reactions. This allows for substrate-specific encodings while leveraging the knowledge learned from protein-ligand interactions.

Consider a molecule $l_{s}$ with $N_{l_{s}}$ atoms; this could be a ligand conformation in a protein-ligand pair or a substrate conformation in an enzyme-substrate pair. The molecule $l_{s}$ can be viewed as a set of atomic point clouds in 3D Euclidean space, where each atom is characterized by its atomic type. There is a distance relationship between each atom pair in the point cloud, which can be processed as bonding features. In our 3D molecule GNN, we use a radial basis function to process these pairwise atomic distances, a technique commonly employed to ensure equivariance and invariance in model design (Hua et al., ; Zhang et al., ; ). The 3D molecule GNN takes a molecule conformation $l_{s}$ as input and outputs an embedded molecule representation $H_{l_{s}}\in\mathbb{R}^{N_{l_{s}}\times D_{H_{l_{s}}}}$, where $D_{H_{l_{s}}}$ denotes the hidden dimension size.

The code for 3D Molecule GNN follows directly:

Figure: Listing 2: Pytorch Implementation of 3D Molecule GNN.

### E.2 2D Molecule GNN

Like the 3D molecule GNN, the 2D molecule GNN is also important in our EnzymeFlow implementation. In an enzyme-catalyzed reaction, the substrate molecule is transformed into a product molecule, with enzyme-substrate interactions driving this chemical transformation. The 2D molecule GNN plays a key role in modeling and encoding this transformation during the catalytic process, making it equally important as our use of co-evolutionary dynamics. While the 3D molecule GNN encodes the substrate, the 2D molecule GNN encodes the product, guiding the design of the enzyme catalytic pocket.

Consider a product molecule $l_{p}$ with $N_{l_{p}}$ atoms in a catalytic reaction. This molecule can be represented as a graph, where nodes correspond to atoms and edges represent bonds. In our 2D molecule GNN, we use fingerprints with attention mechanisms (Xiong et al., ) to facilitate message passing between atoms, enabling effective communication across the molecule. The 2D molecule GNN takes this molecular graph $l_{p}$ as input and outputs an embedded molecule representation $H_{l_{p}}\in\mathbb{R}^{N_{l_{p}}\times D_{H_{l_{p}}}}$, where $D_{H_{l_{p}}}$ denotes the hidden dimension size.

The code for 2D Molecule GNN follows directly:

Figure: Listing 3: Pytorch Implementation of 2D Molecule GNN.

## Appendix F Vector Field Computation and Sampling

Here, we describe how to compute vectors fields and perform sampling for catalytic pocket residues frames, EC-class, as well as the enzyme-reaction co-evolution.

### F.1 Background

Catalytic Pocket Frame.
Please refer to Sec. 4.1.

EC-Class.
Please refer to Sec. 4.1.

Co-evolution.
Please refer to Sec. 4.1.1.

Vector Field.
Flow matching describes a process where a flow transforms a simple distribution $p_{0}$ into the target data distribution $p_{1}$ (Lipman et al., ). The goal in flow matching is to train a neural network $v_{\theta}(\epsilon_{t},t)$ that approximates the vector field $u_{t}(\epsilon)$, which measures the transformation of the distribution $p_{t}(\epsilon_{t})$ as it evolves toward $p_{1}(\epsilon_{t})$ over time $t\in[0,1)$. The process is optimized using a regression loss defined as $\mathcal{L}_{\text{FM}}=\mathbb{E}_{t\sim\mathcal{U}[0,1],p_{t}(\epsilon_{t})}
\|v_{\theta}(\epsilon_{t},t)-u_{t}(\epsilon)\|^{2}$.
However, directly computing $u_{t}(\epsilon)$ is often intractable in practice. Instead, a conditional vector field $u_{t}(\epsilon|\epsilon_{1})$ is defined, and the conditional flow matching objective is computed as $\mathcal{L}_{\text{CFM}}=\mathbb{E}_{t\sim\mathcal{U}[0,1],p_{t}(\epsilon_{t})
}\|v_{\theta}(\epsilon_{t},t)-u_{t}(\epsilon|\epsilon_{1})\|^{2}$. Notably, $\nabla_{\theta}\mathcal{L}_{\text{FM}}=\nabla_{\theta}\mathcal{L}_{\text{CFM}}$.

During inference or sampling, an ODEsolver, e.g., Euler method, is typically used to solve the ODE governing the flow, expressed as $\epsilon_{1}=\texttt{ODEsolver}(\epsilon_{0},v_{\theta},0,1)$, where $\epsilon_{0}$ is the initial data and $\epsilon_{1}$ is the generated data.
In actual training, rather than directly predicting the vector fields, it is more common to use the neural network to predict the final state at $t=1$, then interpolates to calculate the vector fields. This approach has been shown to be more efficient and effective for network optimization (Yim et al., ; Bose et al., ; Campbell et al., ).

### F.2 Continuous Variable Trajectory

Given the predictions for translation $\hat{x}_{1}$ and rotation $\hat{r}_{1}$ at $t=1$, we interpolate and their corresponding vector fields are computed as follows:

$$ ${v}_{\theta}(x_{t},t)=\frac{\hat{x}_{1}-x_{t}}{1-t},\quad{v}_{\theta}(r_{t},t) =\frac{\log_{r_{t}}\hat{r}_{1}}{1-t}.$ (9) $$

The sampling or trajectory can then be computed using Euler steps with a step size $\Delta t$, as follows:

$$ $x_{t+\Delta t}=x_{t}+{v}_{\theta}(x_{t},t)\cdot\Delta t,\quad r_{t+\Delta t}=r _{t}+{v}_{\theta}(r_{t},t)\cdot\Delta t,$ (10) $$

where the prior of $x_{0},r_{0}$ are chosen as the uniform distribution on $\mathbb{R}^{3}$ and SO(3), respectively.

### F.3 Discrete Variable Trajectory

For the discrete variables, including amino acid types, EC-class, and co-evolution, we follow Campbell et al. () to use continuous time Markov chains (CTMC).

Continuous Time Markov Chain.
A sequence trajectory $\epsilon_{t}$ over time $t\in[0,1]$ that follows a CTMC alternates between resting in its current state and
periodically jumping to another randomly chosen state. The frequency and destination of the jumps are determined by the rate matrix $R_{t}\in\mathbb{R}^{N\times N}$ with the constraint its off-diagonal elements are non-negative. The probability of $\epsilon_{t}$ jumping to a different state $s$ follows $R_{t}(\epsilon_{t},s)\mathrm{d}t$ for the next infinitesimal time step $\mathrm{d}t$. We can express the transition probability as

$$ $p_{t+\mathrm{d}t}(s|\epsilon_{t})=\delta\{\epsilon_{t},s\}+R_{t}(\epsilon_{t}, s)\mathrm{d}t,$ (11) $$

where $\delta(\text{a},\text{b})$ is the Kronecker delta, equal to $1$ if $\text{a}=\text{b}$ and 0 0 if $\text{a}\neq\text{b}$, and $R_{t}(\epsilon_{t},\epsilon_{t})=-\sum_{\gamma\neq\epsilon}(\epsilon_{t},\gamma)$ (Campbell et al., ). Therefore, $p_{t+\mathrm{d}t}$ is a Categorical distribution with probabilities $\delta(\epsilon_{t},\cdot)+R_{t}(\epsilon_{t},\cdot)\mathrm{d}t$ with notation $s\sim\text{Cat}(\delta(\epsilon_{t},s)+R_{t}(\epsilon_{t},s)\mathrm{d}t)$.

For finite time intervals $\Delta t$, a sequence trajectory can be
simulated with Euler steps following:

$$ $\epsilon_{t+\Delta t}\sim\text{Cat}(\delta(\epsilon_{t},\epsilon_{t+\Delta t}) +R_{t}(\epsilon_{t},\epsilon_{t+\Delta t})\Delta t).$ (12) $$

The rate matrix $R_{t}$ along with an initial distribution $p_{0}$ define CTMC.
Furthermore, the probability flow $p_{t}$ is the marginal distribution of $\epsilon_{t}$ at every time $t$, and we say the rate matrix $R_{t}$ generates $p_{t}$ if $\partial_{t}p_{t}=R^{T}_{t}p_{t},\forall t\in[0,1]$.

In the actual training, Campbell et al. () show that we can train a neural network to approximate the true denoising distribution using the standard cross-entropy:

$$ $\mathcal{L}_{\text{CE}}=\mathbb{E}_{t\sim\mathcal{U}[0,1],p_{t}(\epsilon_{t})} [\log p_{\theta}(\epsilon_{1}|\epsilon_{t})],$ (13) $$

which leads to our neural network objectives for amino acid types, EC-class, and co-evolution as:

$$ $\begin{split}&\mathcal{L}_{\text{aa}}=\mathbb{E}_{t\sim\mathcal{U}[0,1],p_{t}( c_{t})}[\log p_{\theta}(c_{1}|c_{t})],\mathcal{L}_{\text{ec}}=\mathbb{E}_{t \sim\mathcal{U}[0,1],p_{t}(y_{\text{ec}_{t}})}[\log p_{\theta}(y_{\text{ec}_{1 }}|y_{\text{ec}_{t}})],\\ &\mathcal{L}_{\text{coevo}}=\mathbb{E}_{t\sim\mathcal{U}[0,1],p_{t}(u_{t})}[ \log p_{\theta}(u_{1}|u_{t})].\end{split}$ (14) $$

Rate Matrix for Inference.
The conditional rate matrix $R_{t}(\epsilon_{t},s|s_{1})$ generates the conditional flow $p_{t}(\epsilon_{t}|\epsilon_{1})$.
And $R_{t}(\epsilon_{t},s)=\mathbb{E}_{p_{1}(\epsilon_{1}|\epsilon_{t})}[R_{t}(
\epsilon_{t},s|\epsilon_{1})]$, for which the expectation is taken over $p_{1}(\epsilon_{1}|\epsilon_{t})=\frac{p_{t}(\epsilon_{t}|\epsilon_{1})p_{1}(
\epsilon_{1})}{p_{t}(\epsilon_{t})}$.
With the conditional rate matrix, the sampling can be performed:

$$ $\begin{split}&R_{t}(\epsilon_{t},\cdot)\leftarrow\mathbb{E}_{p_{1}(\epsilon_{1 }|\epsilon_{t})}[R_{t}(\epsilon_{t},\cdot|\epsilon_{1})],\\ &\epsilon_{t+\Delta t}\sim\text{Cat}(\delta(\epsilon_{t},\epsilon_{t+\Delta t} )+R_{t}(\epsilon_{t},\epsilon_{t+\Delta t})\Delta t).\end{split}$ (15) $$

The rate matrix generates the probability flow for discrete variables.

Campbell et al. () define the conditional rate matrix starting with

$$ $R_{t}(\epsilon_{t},s|\epsilon_{t})=\frac{\text{ReLU}(\partial_{t}p_{t}(s| \epsilon_{1})-\partial_{t}p_{t}(\epsilon_{t}|\epsilon_{1}))}{N\cdot p_{t}( \epsilon_{t}|\epsilon_{1})}.$ (16) $$

In practice, the closed-form of conditional rate matrix with masking state ✕ is defined as:

$$ $R_{t}(\epsilon_{t},s|\epsilon_{1})=\frac{\delta(\epsilon_{1},s)}{1-t}\delta( \epsilon_{t},\text{\char 53}).$ (17) $$

With the definition of the conditional rate matrix $R_{t}(\epsilon_{t},s|\epsilon_{1})$, we can perform sampling and inference for amino acid types, EC-class, and co-evolution following:

$$ $\begin{split}&c_{t+\Delta t}\sim\text{Cat}(\delta(c_{t},c_{t+\Delta t})+R_{t}( c_{t},c_{t+\Delta t}|v_{\theta}(c_{t},t))\cdot\Delta t),\\ &y_{\text{ec}_{t+\Delta t}}\sim\text{Cat}(\delta(y_{\text{ec}_{t}},y_{\text{ec }_{{t+\Delta t}}})+R_{t}(y_{\text{ec}_{t}},y_{\text{ec}_{{t+\Delta t}}}|v_{ \theta}(y_{\text{ec}_{t}},t))\cdot\Delta t),\\ &u_{t+\Delta t}\sim\text{Cat}(\delta(u_{t},u_{t+\Delta t})+R_{t}(u_{t},u_{t+ \Delta t}|v_{\theta}(u_{t},t))\cdot\Delta t).\end{split}$ (18) $$

## Appendix G EnzymeFlow SE(3)-equivariance

Theorem.
Let $\phi$ denote an SE(3) transformation. The catalytic pocket design in EnzymeFlow, represented as $p_{\theta}(\mathbf{T}|l_{s})$, is SE(3)-equivariant, meaning that $p_{\theta}(\phi(\mathbf{T})|\phi(l_{s}))=p_{\theta}(\mathbf{T}|l_{s})$, where $\mathbf{T}$ represents the generated catalytic pocket, and $l_{s}$ denotes the substrate conformation.

Proof.
Given an SE(3)-invariant prior, such that $p(\mathbf{T}_{0},l_{s})=p(\phi(\mathbf{T}_{0}),\phi(l_{s}))$, and an SE(3)-equivariant transition state for each time step $t$ via an SE(3)-equivariant neural network, such that $p_{\theta}(\mathbf{T}_{t+\Delta t},l_{s})=p_{\theta}(\phi(\mathbf{T}_{t+\Delta
t
}),\phi(l_{s}))$, it follows that for the total time steps $T$, we have:

$$ $\begin{split}p_{\theta}(\phi(\mathbf{T}_{1})|\phi(l_{s}))&=\int p_{\theta}( \phi(\mathbf{T}_{0},l_{s}))\prod_{n=0}^{T-1}p_{\theta}(\phi(\mathbf{T}_{n \Delta t+\Delta t},l_{s})|\phi(\mathbf{T}_{n\Delta t},l_{s}))\\ &=\int p_{\theta}(\mathbf{T}_{0},l_{s})\prod_{n=0}^{T-1}p_{\theta}(\phi( \mathbf{T}_{n\Delta t+\Delta t},l_{s})|\phi(\mathbf{T}_{n\Delta t},l_{s}))\\ &=\int p_{\theta}(\mathbf{T}_{0},l_{s})\prod_{n=0}^{T-1}p_{\theta}(\mathbf{T}_ {n\Delta t+\Delta t},l_{s}|\mathbf{T}_{n\Delta t},l_{s})\\ &=p_{\theta}(\mathbf{T}_{1}|l_{s}).\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \square\end{split}$ (19) $$

## Appendix H EnzymeFill Dataset Statistics

Data Source.
Please refer to Sec. 3.

**Table 3: EnzymeFill Dataset Statistics.**
| Data | Reaction | Enzyme | Substrate | Product | Enzyme Commission Class |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| #reaction | #enzyme | #substrate | #avg atom | #product | #avg atom | EC1 | EC2 | EC3 | EC4 | EC5 | EC6 | EC7 |  |
| Rawdata | 232520 | 97912 | 7259 | 30.81 | 7664 | 30.34 | 44881 (19.30$\%$) | 75944 (32.66$\%$) | 37728 (16.23$\%$) | 47242 (20.32$\%$) | 8315 (3.58$\%$) | 18281 (7.86$\%$) | 129 (0.06$\%$) |
| 40$\%$ Homo | 19379 | 6922 | 4798 | 31.06 | 4897 | 30.24 | 4754 (24.53$\%$) | 5857 (30.22$\%$) | 4839 (24.97$\%$) | 1764 (9.10$\%$) | 759 (3.92$\%$) | 1379 (7.12$\%$) | 27 (0.14$\%$) |
| 50$\%$ Homo | 34750 | 13442 | 5675 | 31.45 | 5871 | 30.75 | 8184 (23.55$\%$) | 11174 (32.16$\%$) | 8050 (23.17$\%$) | 3203 (9.22$\%$) | 1357 (3.91$\%$) | 2752 (7.92$\%$) | 30 (0.09$\%$) |
| 60$\%$ Homo | 53483 | 22350 | 6112 | 30.95 | 6331 | 30.34 | 11674 (21.83$\%$) | 18419 (34.44$\%$) | 11394 (21.30$\%$) | 5555 (10.39$\%$) | 2194 (4.10$\%$) | 4200 (7.85$\%$) | 47 (0.09$\%$) |
| 80$\%$ Homo | 100925 | 43458 | 6619 | 30.46 | 6943 | 29.95 | 21308 (21.11$\%$) | 34344 (34.03$\%$) | 18925 (18.75$\%$) | 14010 (13.88$\%$) | 3901 (3.87$\%$) | 8371 (8.29$\%$) | 66 (0.07$\%$) |
| 90$\%$ Homo | 132047 | 55697 | 6928 | 30.32 | 7298 | 29.81 | 28833 (21.84$\%$) | 43287 (32.78$\%$) | 23989 (18.17$\%$) | 20070 (15.20$\%$) | 5015 (3.80$\%$) | 10766 (8.15$\%$) | 87 (0.07$\%$) |

Figure: Figure 11: Distribution of enzyme-reaction pairs over EC-class.
Refer to caption: x11.png

Debiasing.
Please refer to Sec. 3. We provide data statistics, including the EC-class distribution, in Table 3, and visualize the distribution in Figure 11.

From the data, we observe that EC1, EC2, EC3, and EC4 contribute the most enzyme-reaction pairs to our dataset. Specifically, EC1 refers to oxidation/reduction reactions, involving the transfer of hydrogen, oxygen atoms, or electrons from one substance to another. EC2 involves the transfer of a functional group (such as methyl, acyl, amino, or phosphate) from one substance to another. EC3 is associated with the formation of two products from a substrate through hydrolysis, while EC4 involves the non-hydrolytic addition or removal of groups from substrates, potentially cleaving C-C, C-N, C-O, or C-S bonds.
Our dataset distribution closely follows the natural enzyme-reaction enzyme commission class distribution, with Transferases (EC2) being the most dominant.

## Appendix I Work in Progress: Enzyme Pocket-Reaction Recruitment with Enzyme CLIP Model

In addition to evaluating the catalytic pockets generated from the functional and structural perspectives, we may raise a key question of how we quantitatively determine whether the generated pockets can catalyze a specific reaction. To answer it, we are working to train an enzyme-reaction CLIP model using enzyme-reaction pairs (with pocket-specific information) from the $60\%$-clustered data, excluding the 100 evaluation samples from training. All enzymes not annotated to catalyze a specific reaction are treated as negative samples, following the approach in Yang et al. (); Mikhael et al. (). For the $100$ generated catalytic pockets of each reaction, we select the Top-1 pocket with the highest TM-score for evaluation using the enzyme CLIP model.

Figure: Figure 12: Enzyme-Reaction CLIP model comparison. (a) Existing CLIP models use the full enzyme structure or full enzyme sequence, paired with reaction SMILES as input. (b) Our pocket-specific CLIP model focuses on catalytic pockets, using both their structures and sequences paired with molecular graphs of reactions. The pocket-specific CLIP approach learns from enzyme active sites, which exhibit higher functional concentration. (c) Overview of Pocket-specific CLIP model.
Refer to caption: x12.png

Pocket-specific CLIP.
Unlike existing methods that typically train on full enzyme structures or sequences (Yu et al., ; Mikhael et al., ), our pocket-specific CLIP approach is designed to focus specifically on catalytic pockets, including both their structures and sequences, paired with molecular graphs of catalytic reactions (illustrated in Fig. 12). As shown in Fig. 2(b), catalytic pockets are usually the regions that exhibit high functional concentration, while the remaining parts tend to be less functionally important. Therefore, focusing on catalytic pockets is more applicable and effective for enzyme CLIP models. The advantage of the pocket-specific CLIP is that it learns from active sites that are highly meaningful both structurally and sequentially.

We illustrate our pocket-specific enzyme CLIP approach in Fig. 12.
In our pocket-specific CLIP model, we encode the pocket structure and sequence using ESM3 (Hayes et al., ), and the substrate and product molecular graphs using MAT (Maziarka et al., ). Cross-attention is applied to compute the transition state of the reaction, capturing the transformation of the substrate into the product, as proposed in Hua et al. (). This is followed by another cross-attention mechanism to learn the interactions between the catalytic pocket and the reaction. The model is trained by enforcing high logits for positive enzyme-reaction pairs and low logits for negative enzyme-reaction pairs.

Metrics.
To evaluate the catalytic ability of the designed pockets for a given reaction, we employ retrieval-based ranking as proposed in Hua et al. (). This ranking-based evaluation ensures fairness and minimizes biases. The metrics include: Top-k Acc, which quantifies the proportion of instances in which the catalytic pocket is ranked within the CLIP’s top-k predictions; Mean Rank, which calculates the average position of the pocket in the retrieval list; Mean Reciprocal Rank (MRR), which measures how quickly the pocket is retrieved by averaging the reciprocal ranks of the first correct pocket across all reactions. These metrics help assess whether a catalytic pocket designed for a specific reaction ranks highly in the recruitment list, indicating its potential to catalyze the reaction.

### I.1 Inpainting Catalytic Pocket with ESM3 for Full Enzyme Recruitment

Figure: Figure 13: Inpainting catalytic pocket using ESM3.
Refer to caption: x13.png

ESM3 (Hayes et al., ) can inpaint missing structures and sequences with functional motifs. In this context, we train a separate full enzyme CLIP model for the enzyme recruitment task. This model is trained using the same $60\%$-clustered data but incorporates full enzyme structures and sequences. For generated catalytic pockets and those in the evaluation set, we use ESM3 to inpaint them, completing the structures and sequences predicted by ESM3. These ESM3-inpainted enzymes are then evaluated using the full enzyme CLIP model, applying the same retrieval-based ranking metrics as before. We illustrate the catalytic pocket inpainting pipeline in Fig. 13.

In conclusion, we are developing a pocket-specific enzyme CLIP model for pocket-based enzyme recruitment tasks and a full-enzyme CLIP model using ESM3 for inpainting and pocket scaffolding in full enzyme recruitment tasks. However, we recognize that directly using ESM3 for catalytic pocket inpainting lacks domain-specific knowledge, making fine-tuning necessary. To address this, we are working on a fine-tuning open-source large biological model, e.g., Genie2 (Lin et al., ), on our EnzymeFill dataset. Genie2, pre-trained on FoldSeek-clustered AlphaFold- and Protein-DataBank proteins for de novo protein design and (multi-)motif scaffolding, aligns well with our catalytic pocket scaffolding task. Fine-tuning Genie2 on EnzymeFill will enhance its performance in catalytic pocket inpainting. The development of EnzymeFlow, aimed at achieving an AI-driven automated enzyme design platform, is discussed in App. A.

Figure: Figure 14: Visualization and comparison between RFDiffusionAA-designed pockets and EnzymeFlow-designed pockets after superimposition with ground-truth pockets. Light color represents EnzymeFlow-designed pockets, blue color represents RFDiffusionAA-designed pockets, spectral color represents the ground-truth reference pockets. TM-score, RMSD, AAR are reported.
Refer to caption: x14.png

## Appendix J RFDiffusionAA-design vs. EnzymeFlow-design

In Fig. 14, we visualize and compare the RFDiffusionAA-generated pockets (Krishna et al., ) with EnzymeFlow-generated catalytic pockets, both aligned to the ground-truth reference pockets. In RFDiffusionAA, the generation is conditioned on the substrate conformation, and the pocket sequence is computed post hoc using LigandMPNN (Dauparas et al., ). In contrast, EnzymeFlow conditions the generation on the reaction, with the pocket sequence co-designed alongside the pocket structure. In addition to visualization, we report TM-score, RMSD, and AAR, where EnzymeFlow outperforms RFDiffusionAA across all three metrics, demonstrating EnzymeFlow’s ability to generate more structurally valid enzyme catalytic pockets.

## Appendix K EnzymeFlow Neural Network Implementation

The equivariant neural network is based on the Invariant Point Attention (IPA) implemented in AlphaFold2 (Jumper et al., ). In the following, we detail how enzyme catalytic pockets, substrate molecules, product molecules, EC-class, and co-evolution interact within our network.

The code for EnzymeFlow main network follows directly:

Figure: Listing 4: Pytorch Implementation of EnzymeFlow Main Network.

Fun Fact: While implementing enzyme-substrate and enzyme-product interactions by cross-attention fusion networks, we experimented with using PairFormer (with only 3-4 layers) as implemented in AlphaFold3 (Abramson et al., ). However, the computational load was immense—it would take years to run on our A40 GPU. Our fusion network turns to be a more efficient approach. It makes me wonder who has the resources to re-train AlphaFold3, given the heavy computational demands!

## Peer Reviews

confidence: 5
contribution: 2
initial_rating: 5
presentation: 2
questions: I will be happy to review my score if the authors can answer the above questions convincingly as well as provide the following additional information:
1. Please clearly indicate what novel contributions come from the authors versus have been taken from other papers and combined. For example, it seems that most of the generative model is based on MultiFlow and not introduced by the authors. Is the approach for ligand-conditioning developed by you or by others? The co-evolution for example (to the best of my knowledge) is a novel contribution of the authors. 
2. Please provide a convincing argument to the significance of the results and an explanation as to why the numbers being so low is acceptable. For example, would you expect pockets generated by your model to be active? 
3. You claim that other approaches simply consider static behavior of proteins and their ligands, but I do not see any consideration of dynamic behavior in your model beyond considering both substrate and product. Do you have reason to believe that your model learns this implicitly? If so please provide evidence of this.
4. How does your model perform using a standard protein MSA compared to your special coevolution MSA?
5. Please provide results for vanilla MultiFlow without any additional elements as a baseline.
6. Please provide a TM-score for the active site against the entire protein, not just the pocket.
soundness: 2
strengths: The paper attempts to solve a key task on the road to de novo enzyme design -- namely generating enzyme pockets which are conditioned on the reaction of interest. The paper has a number of strengths:
1. The authors present an interesting idea -- that enzymes and their associated reactions co-evolve. They attempt to use this hypothesis to learn representations of this co-evolution to enhance generation.
2. They introduce a new dataset of enzyme pockets. 
3. They combine a number of methods applied in different applications on a new application.
summary: EnzymeFlow introduces a new approach to conditionally generate enzyme pockets conditioned on the reaction of interest. They use a modified MultiFlow approach that is conditioned on both substrates and products, they use an auxiliary EC flow, and they use a novel reaction-protein coevolution MSA to enhance the generation process. The evaluate the model across a number of metrics that are considered relevant for enzymatic activity including cRMSD and TM-score of the pockets; predicted binding affinities, chai score, amino acid recovery and predicted EC accuracy.
weaknesses: The main weakness with the paper is the results:
1. It is unclear whether the improvements presented by the authors are significant or not. Please provide confidence intervals such that it is easier to evaluate the significance of the results. 
2. It is unclear to me whether these scores meaningfully correlate with enzyme function. For example, TM-scores of below 0.3 represent quite a significant difference from the ground truth structure, meaning that the generated pockets are still quite different. Why is this? Furthermore, it seems that the generated pockets recover the correct amino acids a small fraction of the time and additionally only have the same predicted EC a small fraction of the time. A strong result would be that generated structures are similar to ground truth, have close or exact amino acid identities and (if they are truly functionally similar) should have the same predicted EC numbers.
3. The novel contributions of the author seem to also have very little impact on performance -- are the results w/o coevolution, pretraining or both statistically significant? 
4. While I rather like your attempt to incorporate co-evolutionary reaction-enzyme information, I am not convinced that SMILES of reactions is a good approach as small changes in molecules can have large effects on SMILE strings. Are there alternative ways of doing this? In how many cases do SMILES strings change significantly across different proteins in the same MSA? 
5. Size of evaluation set.

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 4
questions: 1. Could the authors clarify the rationale for focusing on a pathway from pocket to motif-scaffolding rather than complete enzyme design?
2. Testing the full protein configurations by integrating EnzymeFlow with recent motif-scaffolding methods or inpainting methods and comment on the self-consistency of the designed pockets would be helpful in understanding the application potential.
3. In Table 2, the comparison with RFDiffusionAA may not be ideal as RFDiffusionAA is designed for whole proteins rather than specific pockets. It may be more appropriate to extract the pocket from a whole protein generated by RFDiffusionAA and compare it with EnzymeFlow.
4. Could the authors provide an analysis of EnzymeFlow's performance across different substrate classes?
soundness: 2
strengths: - EnzymeFlow shifts the focus from static ligand-protein interactions to more complex enzyme-substrate interactions, a more functionally relevant framework for catalysis. This paradigm is well-motivated.
- EnzymeFlow proposes a distinct formulation for enzyme design that departs from traditional protein design workflows, emphasising the importance of function in modelling.
- The proposed method is technically sound.
summary: This paper introduces a novel approach to enzyme pocket design, emphasizing functional relevance from the outset. The authors propose EnzymeFlow, a flow matching model conditioned on both substrates and products, trained to predict enzyme pocket structure, sequence, EC-class, and enzyme-reaction co-evolution concurrently. They introduce EnzymeFill, a newly curated dataset tailored for the enzyme pocket design task, comprising enzyme-reaction pairs with precise pocket structures. Experimental results provide substantial evidence of EnzymeFlow's effectiveness in generating functionally reliable enzyme pockets that align with catalytic requirements.
weaknesses: - Despite the promising performance on pocket design, the utility of EnzymeFlow in whole enzyme design remains under-explored, limiting insight into its full application potential.
- As the experimental results show, although EnzymeFlow achieves better functional performance compared to other baseline methods, the ECacc is still somewhat low to conclude that EnzymeFlow adequately captures the catalytic requirements.

---

confidence: 3
contribution: 2
initial_rating: 6
presentation: 2
questions: * About the ECAcc

First, the use of ECAcc as a metric for evaluating enzyme functionality requires additional justification. It is unclear how ECAcc is directly correlated with catalytic ability, and including references that support this metric’s relevance to enzymatic activity would help strengthen its validity as a functional evaluation.

Second, it would be insightful to understand the model’s performance when the EC class is not co-generated during training. If this information is not utilized by other baselines, the comparison may not be entirely fair.

Third, the reported accuracy (~0.2) appears relatively low, suggesting potential challenges in accurately predicting EC classes. An explanation of these challenges would be helpful.
soundness: 3
strengths: (1) This work effectively integrates various resources - such as data, pre-training, and co-evolutionary information - to enhance enzyme design performance. 

(2) The authors curate a dataset tailored for enzyme pocket design, which could serve as a crucial resource for advancing predictive models in this field.
summary: This paper proposes a model to design enzyme pockets conditioned on reactions. It is a flow-matching model to co-generate enzyme pocket structures, sequence, ec class, and MSAs of enzymes and reaction smiles. Their model is pre-trained on the protein structure dataset and protein-ligand binding dataset. Empirical study shows that their method outperforms other baselines in generation quality and function prediction.
weaknesses: (1) mismatch in introduction and method

The introduction emphasizes the importance of capturing chemical changes specific to enzyme generation, distinguishing it from docking tasks that do not consider reactions. However, the method section lacks sufficient detail on how reaction-specific modeling is incorporated. The approach appears closer to a docking setup, focusing primarily on backbone structures, with limited attention to sidechain interactions critical for catalytic activity.

(2) concerns about co-evolutionary dynamics

The sequence alignment approach applied to SMILES representations raises concerns, as small molecules are inherently non-sequential, and different SMILES can produce varying alignments. 

(3) evaluation of functions

The rationale behind the ECAcc evaluation metric requires further clarification, as its relevance to enzyme function is not immediately clear. 

(4) evaluation of structures

The curated enzyme pocket dataset is a valuable resource. However,  If I did not misunderstand the curation process,  the binding structures were computationally predicted, and there may be inherent biases from the prediction model. Including evaluations on non-synthetic datasets could help mitigate any potential bias and validate the robustness of the proposed methods.

---

confidence: 5
contribution: 2
initial_rating: 5
presentation: 2
questions: 1. According to the code, it appears that providing MSA and EC class during sampling does not influence IPA's backbone design, nor are these features fed back as self-conditioning. Do these tasks merely help the model learn a better landscape during training?
2. Why aren't the features of MSA and EC class integrated into the backbone embedding before entering IPA?
3. Continuing from question 1, how is the multi-label classification for EC class specifically conducted? EnzymeFlow uses ec_pred for class prediction, while the comparison method uses the CLEAN model to predict EC class from the generated structure. Is this a fair comparison?
4. Continuing from question 3, the ec_embed feature of EC class does not enter IPA, so how is it ensured that the generated structure matches the given EC class during sampling?
5. How were the comparative methods set up? Does Table 2 include the performance of PocketFlow fine-tuned on enzyme data?
soundness: 2
strengths: This paper provides a dataset for enzyme pocket design tasks and details the workflow for collecting and cleaning the dataset. It adapts and innovates upon the previous ideas from PocketFlow for the enzyme pocket design context by incorporating 3D and 2D molecular information of substrates and product molecules at the encoding level, thereby describing the dynamic catalytic process. The paper also introduces a new approach to constructing and encoding MSA co-evolutionary information for enzyme catalysis, offering new ideas for future developments in this field.
summary: This paper proposes a new model named EnzymeFlow, designed to generate enzyme catalytic pockets for specific substrates through flow matching and enzyme-reaction co-evolution. The model employs a hierarchical pre-training strategy, initially pre-trained on protein backbones and ligand-binding pockets, followed by fine-tuning on enzyme catalytic reactions. The authors also constructed a large-scale dataset named EnzymeFill, containing over 320,000 enzyme-reaction pairs, to support model training. Experimental results indicate that EnzymeFlow performs well in generating high-quality catalytic pockets, showing its potential in enzyme engineering and synthetic biology.
weaknesses: The design of certain modules and the loss functions raises questions about their logical significance. Specifically, Equation (5) describes the score function loss for enzyme-reaction co-evolution information. Reconstructing MSA from its noisy encoded form would certainly make sense, but in the code implementation, the MSA encoding is only activated during MSA diffusion. Ultimately, it compresses $N_{MSA}$ into a single sequence representation (MSA + bb_lig_fusion_emb) to reconstruct $N_{MSA}$, raising doubts about the validity of reconstructing high-dimensional data from such a low-dimensional form.

Moreover, both MSA and EC class, as implemented in the code, function more like two output heads in a multi-task setup. These significant conditional features are not integrated early into the IPA network but are instead fused after the IPA outputs the updated structure, making it difficult for these features to directly influence IPA’s backbone design. This makes the description in Equation (6) misleading, as it may lead readers to believe that these conditional features have a substantial multimodal influence on backbone design. If the authors had included an architecture of the model's computation flow, it would be clear that the feature paths of MSA and EC class are almost entirely separate from the core backbone + substrate + product molecule paths. In Figure 3.3, the influence of EC class and co-evolution on the gradient is minimal, more akin to decoding pre-designed structure embeddings to predict MSA and EC class.

Additionally, a long-standing issue in this field is that enzyme pocket design is distinct from general protein design, and in silico metrics alone are insufficient to establish the practicality and reliability of newly designed enzymes. Only wet lab experimental results serve as the gold standard for this task.

Meta-review: This paper seems to have several significant weaknesses. The most important are
- The unclear role of the EC class as a conditioning factor. As mentioned by some reviewers, the actual source code suggests that  MSA and EC class appear more like two multi-task learning tasks, which also raises questions about the extent to which these "conditional" features can have a substantial influence on the backbone design. 
- The unclear role and importance of a rather general concept such as cross attention for modeling details in chemical reactions.  
- The unclear relevance of experimental results for predicting enzyme functionality.
- The unclear statistical significance of several results.
While some of these concerns could be addressed to some degree in the authors' rebuttal, in the end just too many open questions remained. Therefore, I conclude that this paper in its present form is not ready for publication, and I recommend rejection of this paper.

Decision: Reject