A nanobody binder de novo design method and device based on reasoning stage sequential reward guidance
Patent Information
- Application Number
- CN202611373860.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-10-02
AI Technical Summary
[0005]本发明提供一种基于推理阶段序贯奖励引导的纳米抗体结合体从头设计方法和装置,解决了现有纳米抗体从头设计方法在生成互补决定区及抗体—抗原对接位姿时缺乏明确的目标导向、生成分布较为分散,难同时兼顾结合界面信度、对接位姿一致性和目标表位接触覆盖程度,且通常仅在生成终点进行筛选,导致低质量采样分支持续占用计算资源、有效候选生成比例较低,及为提高生成质量而需要重新训练或调整生成模型、部署成本较高的技术问题
本发明通过在流匹配生成模型的推理采样轨迹中设置多个中间检查点,对各并行采样分支执行预测性终态采样,并基于界面预测指标、对接位姿一致性指标及表位接触覆盖指标中的至少两项构建抗体特异性奖励信号,进而对并行采样分支进行概率化重采样,使具有较高潜在结合质量的采样分支获得更多后续计算资源,并使生成过程逐步向高奖励候选所在区域偏移。由此,本发明能够在生成过程尚未结束时识别并减少低质量采样分支,降低无效采样所造成的计算资源消耗,提高有限采样预算下高质量纳米抗体候选的生成比例。同时,通过联合生成纳米抗体互补决定区及其相对于靶标抗原的对接位姿,并结合人源化纳米抗体框架区和表位热点条件进行约束,有利于提高候选纳米抗体的框架兼容性、目标表位结合方向性、结合界面信度及对接位姿自洽性。此外,本发明的奖励引导过程主要在推理阶段实施,无需针对所述推理阶段奖励引导过程重新训练或更新已经训练完成的流匹配生成模型的网络参数或修改复合物结构预测模型的网络参数,因而具有部署成本较低、适配性较强和便于针对不同靶标调整奖励指标及参数的优点,用于纳米抗体候选的批量生成、筛选和后续实验验证。
Smart Images

Figure CN122867773A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of bioinformatics technology, and in particular to a de novo design method and apparatus for nanoantibody conjugates based on reasoning-stage sequential reward guidance. Background Technology
[0002] Nanobodies, also known as heavy chain antibody variants, are single-domain antigen-binding fragments derived from heavy chain antibodies of camelids. Nanobodies possess advantages such as small molecular weight, high stability, strong tissue penetration, ease of recombinant expression, and large-scale preparation, making them promising for applications in disease diagnosis, targeted therapy, molecular imaging, and biosensing. Designing de novo binding nanobodies targeting specific antigens is of great significance for shortening antibody discovery cycles and reducing experimental screening costs.
[0003] In recent years, protein and antibody structure design methods based on deep generative models have provided a new technical path for de novo conjugate design. While diffusion- or flow-matching-based generative models can generate candidate antibody structures under given target conditions, they still have limitations in the de novo design of nanobody-antigen conjugates. Existing generative methods, when simultaneously generating complementarity-determining regions (CDGs) and docking poses, often struggle to stably learn the docking relationship between nanobodies and antigens, and lack effective constraints on the framework region, easily generating frameworks that deviate from humanized templates, have unstable internal folds, or poor exploitability. Current generative processes typically lack clear target guidance, resulting in a dispersed distribution of generated structures within the candidate space. The proportion of candidates that can truly form stable antigen interfaces is low, requiring extensive structure prediction and wet experimental validation. Commonly used fold confidence scores or single interface metrics struggle to simultaneously evaluate interface confidence, docking pose consistency, and the coverage of the target epitope by the CDG. This makes it difficult to provide effective optimization signals during the generative stage and to support the screening of large-scale candidate libraries.
[0004] Therefore, a technical solution is needed that deeply integrates the flow matching generation paradigm, humanized framework constraints, and antibody-specific composite reward mechanism, so that the generation process can gradually shift towards candidate regions with high interface confidence, high pose consistency, and high epitope coverage during the inference stage without retraining the generation backbone, and provide traceable multi-index screening results. Summary of the Invention
[0005] This invention provides a de novo design method and apparatus for nanobody conjugates based on sequential reward guidance during the inference phase. It solves the technical problems of existing de novo nanobody design methods, such as lack of clear target guidance when generating complementarity-determining regions and antibody-antigen docking poses, relatively scattered generation distribution, difficulty in simultaneously taking into account binding interface reliability, docking pose consistency and target epitope contact coverage, and screening usually only at the generation endpoint, resulting in low-quality sampling branches continuously consuming computing resources, low effective candidate generation ratio, and the need to retrain or adjust the generation model to improve generation quality, which leads to high deployment costs.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A de novo design method for nanobody conjugates based on sequential reward guidance during the reasoning stage, characterized by comprising: The three-dimensional structural information of the target antigen to be bound, the epitope hotspot information of the target antigen, the framework region information of the humanized nanobody, and the slot length information of the complementarity-determining region are obtained. The generation conditions are constructed based on the three-dimensional structural information of the target antigen, the epitope hotspot information, and the framework region information and complementarity-determining region slot length information of the humanized nanobody. Using a flow matching generation model, multiple parallel sampling branches are sampled along a preset sampling trajectory under the constraints of the generation conditions to generate the complementarity determination region of the nanobody and the docking pose of the nanobody relative to the target antigen. Before the preset sampling trajectory reaches its endpoint, at least two intermediate checkpoints are set, and a reward guidance operation is performed at each of the intermediate checkpoints, including: Save the generation state of the current parallel sampling branch; Based on the generated state, predictive final state sampling is performed to obtain the corresponding predictive final state candidate nanobody sequences and candidate nanobody-antigen complex structures; The predicted final-state candidate nanobody sequence and the target antigen information are input into the complex structure prediction model to obtain the re-predicted nanobody-antigen complex structure and corresponding evaluation information. Based on at least a partial comparison between the re-predicted nanobody-antigen complex structure and evaluation information and the predicted final-state candidate nanobody-antigen complex structure, an antibody-specific reward signal is obtained. The parallel sampling branch is resampled according to the antibody-specific reward signal, and the resampled sampling branch returns to the corresponding intermediate checkpoint to continue sampling along the preset sampling trajectory. At the end of the sampling trajectory, the target candidate nanobody-antigen complex is determined based on the antibody-specific reward signal, and the corresponding nanobody sequence and three-dimensional structure are output.
[0007] In a further embodiment, the reward guidance operation adopts a sequential trajectory optimization method, repeatedly performing predictive final state sampling, reward evaluation, and sampling branch update at multiple intermediate checkpoints, so that the generation process gradually shifts towards the high reward region during the inference phase.
[0008] The three-dimensional structure of the target antigen, epitope hotspots, the humanized nanobody framework, and the slot length of the complementarity-determining region (CDR) are used as joint generation conditions. A flow-matching generation model is used to generate the CDR of the nanobody and its docking pose relative to the target antigen in parallel, with multiple intermediate checkpoints set before the sampling trajectory reaches its endpoint. At each intermediate checkpoint, predictive final-state sampling is performed on the current sampling branch. The binding interface and docking structure of the predicted final-state candidates are re-predicted and evaluated using a complex structure prediction model to obtain antibody-specific reward signals. Based on these reward signals, the parallel sampling branches are resampled, allowing high-reward branches to receive more subsequent sampling opportunities and low-reward branches to reduce or stop sampling. This continuously adjusts sampling resources and the generation trajectory during inference without changing the network parameters of the generation model. Consequently, the generation process gradually concentrates on candidate regions with higher potential binding quality, reduces the computational resource consumption of low-quality sampling branches, increases the proportion of high-quality nanobody candidates generated under a limited sampling budget, and improves the overall performance of candidate nanobodies in terms of binding interface quality, docking pose consistency, and target epitope matching.
[0009] In a further embodiment, the antibody-specific reward signal is determined based on at least two evaluation metrics: an interface prediction metric for evaluating the reliability of the nanobody-antigen binding interface; a pose consistency metric for evaluating the consistency between the generated docking pose and the docking pose re-predicted by the structure prediction model; and an epitope contact coverage metric for evaluating the degree of contact between the complementarity determination region and the epitope hotspot space; the evaluation metrics are used to form the antibody-specific reward signal through a weighted summation.
[0010] At least two of the following metrics—interface prediction, pose consistency, and epitope contact coverage—are used to jointly evaluate candidate nanobody-antigen complexes from different dimensions. The interface prediction metric reflects the predictive reliability of the nanobody-antigen binding interface. The pose consistency metric measures the consistency between the docking pose obtained by the flow matching generation model and the docking pose re-predicted by the structure prediction model. The epitope contact coverage metric evaluates the spatial contact and coverage of the complementarity determination region with the target epitope hotspot. These metrics are then fused using a weighted summation method to form a unified antibody-specific reward signal. This avoids evaluation bias caused by relying on a single evaluation metric, ensuring the reward signal simultaneously considers binding interface quality, docking pose stability, and target epitope coverage. This improves the ability to identify and distinguish high-quality candidate nanobodies and provides a more stable and comprehensive guiding basis for subsequent sampling branch resampling and trajectory optimization.
[0011] In a further embodiment, when resampling the parallel sampling branches according to the antibody-specific reward signal, the selection probability of each parallel sampling branch is determined according to the antibody-specific reward signal corresponding to each parallel sampling branch and a preset temperature modulation parameter, and probabilistic resampling is performed according to the selection probability; the temperature modulation parameter is used to adjust the degree of influence of the difference between different antibody-specific reward signals on the selection probability; the temperature modulation parameter gradually decreases as the sampling trajectory progresses; the diversity of sampling branches is improved in the early stage of sampling, and the retention probability of high reward sampling branches is improved in the later stage of sampling.
[0012] When resampling parallel sampling branches based on antibody-specific reward signals, temperature modulation parameters jointly determine the selection probability of each sampling branch, allowing the influence of reward values on branch retention and replication probabilities to be dynamically adjusted with each sampling stage. Higher temperature modulation parameters are used in the early stages of sampling to reduce the difference in selection probabilities between different reward branches, allowing more sampling branches with different conformations and docking poses to be retained, thus maintaining high search diversity. As the sampling trajectory progresses, the temperature modulation parameters are gradually reduced to amplify the difference in selection probabilities between different reward values, giving high-reward sampling branches a higher retention or replication probability, and gradually concentrating sampling resources towards regions containing high-quality candidates. Therefore, premature convergence to local high-reward regions can be avoided in the early stages of sampling, maintaining sufficient exploration of the candidate space. Simultaneously, the ability to target and utilize high-reward candidates is enhanced in the later stages of sampling, improving the generation probability of high-quality nanobody candidates and the utilization efficiency of limited computational resources while balancing sampling diversity and convergence efficiency.
[0013] In a further embodiment, the step of constructing generation conditions based on the three-dimensional structural information of the target antigen, the epitope hotspot information, the humanized nanobody framework region information, and the complementarity determination region slot length information includes: feature encoding the three-dimensional structural information of the target antigen to obtain target antigen structural conditions; determining the corresponding hotspot region in the three-dimensional structure of the target antigen based on the epitope hotspot information and constructing epitope hotspot conditions; feature encoding at least one of the sequence information and backbone structure information of the humanized nanobody framework region, and constructing a fixed region mask or a constrained region mask based on the framework region position to obtain humanized nanobody framework conditions; constructing complementarity determination region generation slots based on the start and end boundaries of each complementarity determination region and the corresponding slot length information, and encoding the position boundary and length information of the generation slots to obtain complementarity determination region slot length conditions; and combining the target antigen structural conditions, the epitope hotspot conditions, the humanized nanobody framework conditions, and the complementarity determination region slot length conditions to form joint generation conditions for inputting the flow matching generation model.
[0014] The epitope hotspot conditions include an epitope hotspot mask, which is constructed based on the epitope hotspot information and used to mark epitope hotspot residues or epitope hotspot regions in the target antigen. This mask is input into the flow matching generation model as part of the joint generation conditions to guide the complementary decision region (CDR) to spatially sample the epitope hotspot region. The complementary decision region slot length conditions include slot boundary features, slot length features, and a generation region mask. Based on the start and end boundaries of each complementary decision region and the corresponding slot length information, complementary decision region generation slots are set between adjacent frame regions. The position boundaries of the generated slots, as well as the preset number of residues, candidate length set, or allowed length range, are encoded to obtain the slot boundary features and slot length features. The generation region mask is constructed based on the position of the generated slots. The humanized nanobody framework conditions include framework region sequence features and backbone coordinate features obtained by feature encoding the amino acid sequence and backbone coordinates of the humanized nanobody framework region, as well as a fixed region mask or a constrained region mask constructed according to the framework region position. The humanized nanobody framework conditions are used to constrain the amino acid sequence and internal backbone geometry of the humanized nanobody framework region to remain fixed or constrained during the generation process, while allowing the humanized nanobody framework as a whole to rotate and translate relative to the target antigen. The target antigen structure conditions are obtained by coordinate normalization, geometric feature encoding and residue feature encoding of the three-dimensional structural information of the target antigen, and include at least one of antigen residue features, antigen backbone coordinate features, inter-residue distance features and local spatial environment features.
[0015] By characterizing the three-dimensional structure of the target antigen, epitope hotspots, the humanized nanobody framework, and the complementarity-determining region (CDR) slot length, and combining these characteristics into joint generation conditions for a flow-matching generation model, the nanobody generation process is synergistically guided from multiple aspects, including structural location, target binding region, framework constraints, and CDR generation range. The target antigen structural condition provides information on antigen residues, backbone geometry, and local spatial environment, enabling the model to perceive the overall and local structure of the target antigen. The epitope hotspot condition marks the target binding region with hotspot masks, guiding the CDR to preferentially sample spatially near the target epitope. The humanized nanobody framework condition constrains the amino acid sequence and internal backbone geometry of the framework region through framework region sequence features, backbone coordinate features, and fixed or constrained region masks. The CDR slot length condition limits the generation location and allowed residue range of each CDR through slot boundaries, length features, and generation region masks. This reduces the unconstrained search on the antigen surface and in the nanobody sequence space, allowing the generation process to focus more on candidate regions that meet the requirements of target epitopes, framework structures, and complementarity determination regions (CDRs). While preserving the CDR conformation and overall docking pose search capability, it improves the target epitope directionality, framework compatibility, and structural rationality of candidate nanobodies, and increases the generation efficiency of effective candidates.
[0016] In a further embodiment, the flow matching generation model includes: an α-carbon coordinate channel for characterizing the spatial backbone position of the nanobody and the spatial pose of the nanobody relative to the target antigen; a per-residue latent variable channel for characterizing residue sequence information, side chain information and local structural information; the α-carbon coordinate channel and the per-residue latent variable channel jointly sample along the preset sampling trajectory, and generate candidate nanobody sequences and three-dimensional structures through a structure decoding model.
[0017] The flow-matching generation model employs an α-carbon coordinate channel and a per-residue latent variable channel to jointly model the spatial structural information and local residue information of nanobodies. The α-carbon coordinate channel characterizes the spatial position of the nanobody backbone and the overall docking pose of the nanobody relative to the target antigen. The per-residue latent variable channel characterizes residue type, side chain conformation, and local structural features. During sampling, the two states co-evolve along a preset sampling trajectory, enabling the nanobody backbone conformation, docking position, residue sequence, and local structure to cooperate in generation. At the sampling endpoint, a structural decoding model converts the jointly generated state into a candidate nanobody sequence and three-dimensional structure. This avoids insufficient information expression caused by relying solely on coordinate information or sequence features for generation, allowing the model to simultaneously consider the overall spatial conformation of the nanobody, antigen docking pose, residue composition, and local side chain structure. This improves the consistency and structural integrity between candidate nanobody sequences and three-dimensional structures, enhances the structural rationality of candidate binding compounds, and improves the reliability of subsequent evaluation and screening.
[0018] In a further embodiment, the humanized nanobody framework region information includes framework region sequence information and framework region backbone structure information; during the sampling process, the latent variable corresponding to each residue of the framework region is constrained to evolve towards the target latent variable corresponding to the humanized nanobody framework region, and at the sampling endpoint, the generated nanobody framework region sequence is made consistent with the humanized nanobody framework region sequence; and the current generation state is constrained by the framework region backbone template through rigid body alignment, so that the framework region maintains a preset internal folding structure, while allowing the nanobody as a whole to adjust its spatial pose relative to the target antigen.
[0019] By simultaneously utilizing the sequence information and backbone structure information of the humanized nanobody framework region, dual constraints are imposed on the sequence characteristics and spatial conformation of the framework region. During the flow-matching sampling process, the latent variables corresponding to each residue in the framework region evolve stepwise along a preset generation trajectory towards the target latent variables determined by the humanized framework template, thereby limiting undesirable shifts in the residue types and local structures of the framework region. Furthermore, at the sampling endpoint, the consistency between the generated nanobody framework region sequence and the preset humanized framework sequence is ensured. Simultaneously, a rigid body alignment method is used to match the framework backbone of the currently generated region with the preset framework backbone template, maintaining the predetermined internal folding structure of the framework region without locking its absolute spatial position relative to the target antigen. This allows the nanobody to still rotate and translate relative to the target antigen as a whole and search for suitable docking poses. Therefore, while preserving the overall docking pose search freedom of the nanobody, the occurrence of sequence drift, non-physical deformation, or internal folding disruption in the framework region during sampling is reduced. This improves the consistency, structural stability, and developability of the humanized framework of candidate nanobodies and provides a more stable structural basis for the generation of complementarity-determining region conformations and the optimization of the antigen-binding interface.
[0020] In a further embodiment, the constraint of the latent variable corresponding to each residue of the frame region during the sampling process and the constraint of the frame region skeleton through rigid body alignment together constitute a frame latch constraint; the frame latch constraint is executed in multiple or all numerical integration time steps of the preset sampling trajectory; constraining the latent variable corresponding to each residue of the frame region includes: causing the latent variable corresponding to each residue of the frame region to evolve along the preset trajectory towards the target latent variable obtained according to the humanized nanobody frame region; constraining the frame region skeleton through rigid body alignment includes: rigidly aligning the skeleton template of the humanized nanobody frame region with the frame region skeleton in the current generation state, so that the frame region maintains the preset internal skeleton geometry corresponding to the skeleton template, while allowing the nanobody as a whole to adjust its spatial pose relative to the target antigen.
[0021] A frame latching mechanism is formed by combining trajectory constraints of the latent variables of each residue in the frame region with rigid body constraints of the frame backbone, and these constraints are continuously applied at multiple or all numerical integration time steps of the flow-matched sampling trajectory. The latent variable constraints of each residue cause the latent variables of the frame region to evolve gradually along a preset trajectory toward the target latent variables determined by the humanized nanobody frame template, thus limiting undesirable drift of the frame region sequence and local structural features during sampling. The rigid body alignment constraints, by rigidly matching the frame backbone template with the frame backbone in the current generation state, maintain the preset internal backbone geometry of the frame region, while not locking the absolute spatial position of the frame relative to the target antigen, allowing the nanobody as a whole to still search for different antigen docking poses through rotation and translation. Therefore, sequence and structural offsets of the frame region can be continuously corrected throughout the sampling process, reducing the probability of non-physical stretching, local distortion, and internal folding damage to the frame region, while preserving the search freedom of the overall docking pose of the nanobody. This improves the consistency, structural stability, and reliability of the humanized frame of the candidate nanobody, and provides stable structural support for the free generation of the complementarity-determining region and the optimization of the binding interface.
[0022] In some embodiments, the generation state of the corresponding sampling branch is saved at each intermediate checkpoint. The generation state includes at least the α-carbon coordinate state, the per-residue latent variable state, and the current sampling time parameter. When the spatial pose of the nanobody relative to the target antigen is represented by independent pose parameters, the generation state also includes rotation and translation parameters for characterizing the spatial pose.
[0023] At each intermediate checkpoint, the current generated state of each parallel sampling branch is fully saved, ensuring that subsequent predictive final state calculations, reward evaluations, and master trajectory recovery after resampling can all be based on the same state snapshot. The α-carbon coordinate state records the current nanobody skeleton image and its spatial position, while the per-residue latent variable state records the current residue type, side chain, and local structural features. The current sampling time parameter determines the specific position of this state in the flow-matched sampling trajectory. When the overall docking pose of the nanobody relative to the target antigen is represented by independent parameters, the corresponding rotation and translation parameters are further saved to fully preserve the spatial docking state of the current branch. This ensures that predictive final state sampling is used only to evaluate the potential quality of branches without disrupting the original master sampling state, and that branches retained or replicated after resampling can accurately return to the corresponding intermediate checkpoints for continued sampling, avoiding state loss or trajectory discontinuity and improving the accuracy and stability of branch recovery, replication, and updating during sequential reward guidance.
[0024] A de novo design device for nanobody conjugates based on sequential reward guidance during the reasoning phase includes: The information acquisition module is used to acquire the three-dimensional structural information of the target antigen to be bound, the epitope hotspot information of the target antigen, the framework region information of the humanized nanobody, and the slot length information of the complementarity determination region. The generation condition construction module is used to construct generation conditions based on the three-dimensional structural information of the target antigen, the epitope hotspot information, the framework region information of the humanized nanobody, and the slot length information of the complementarity determination region. The parallel sampling module is used to sample multiple parallel sampling branches along a preset sampling trajectory under the constraints of the generation conditions using a flow matching generation model, thereby generating the complementarity determination region of the nanobody and the docking pose of the nanobody relative to the target antigen. The checkpoint setting module is used to set at least two intermediate checkpoints before the preset sampling trajectory reaches the end point; A reward guidance module is used to save the generation state of the current parallel sampling branch at each intermediate checkpoint, perform predictive final-state sampling based on the generation state, and obtain the corresponding predictive final-state candidate nanobody sequence and candidate nanobody-antigen complex structure; input the predictive final-state candidate nanobody sequence and the target antigen information into the complex structure prediction model to obtain the re-predicted nanobody-antigen complex structure and corresponding evaluation information, and obtain an antibody-specific reward signal based on at least a partial comparison result between the re-predicted nanobody-antigen complex structure and evaluation information and the predictive final-state candidate nanobody-antigen complex structure; resample the parallel sampling branch according to the antibody-specific reward signal, and cause the resampled sampling branch to return to the corresponding intermediate checkpoint to continue sampling along the preset sampling trajectory. The result determination and output module is used to determine the target candidate nanobody-antigen complex at the end of the preset sampling trajectory based on the antibody-specific reward signal, and output the corresponding nanobody sequence and three-dimensional structure.
[0025] Beneficial effects: This invention sets multiple intermediate checkpoints in the inference sampling trajectory of the flow-matching generation model, performs predictive final-state sampling on each parallel sampling branch, and constructs an antibody-specific reward signal based on at least two of the following: interface prediction index, docking pose consistency index, and epitope contact coverage index. This allows for probabilistic resampling of the parallel sampling branches, enabling sampling branches with higher potential binding quality to receive more subsequent computational resources and gradually shifting the generation process towards the region containing high-reward candidates. Therefore, this invention can identify and reduce low-quality sampling branches before the generation process is complete, reducing computational resource consumption caused by invalid sampling and increasing the proportion of high-quality nanobody candidates generated under a limited sampling budget. Simultaneously, by jointly generating the complementarity-determining region of the nanobody and its docking pose relative to the target antigen, and combining this with constraints based on the humanized nanobody framework region and epitope hotspot conditions, it is beneficial to improve the framework compatibility, target epitope binding directionality, binding interface confidence, and docking pose self-consistency of candidate nanobodies. Furthermore, the reward guidance process of this invention is mainly implemented in the inference stage, without the need to retrain or update the network parameters of the already trained flow matching generation model or modify the network parameters of the complex structure prediction model for the reward guidance process in the inference stage. Therefore, it has the advantages of low deployment cost, strong adaptability and easy adjustment of reward indicators and parameters for different targets, and can be used for the batch generation, screening and subsequent experimental verification of nanobody candidates. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 A flowchart illustrating the de novo design method for nanobody conjugates based on inference-stage sequential reward guidance, provided for embodiments of this application; Figure 2 The diagram shows the structure of the de novo design method for nanobody conjugates based on inference-stage sequential reward guidance, which is provided in the embodiments of this application. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. In summary, the content of this specification should not be construed as a limitation of this application.
[0030] This embodiment provides a de novo design method for nanobody conjugates based on sequential reward guidance during the inference phase. The method establishes a nanobody-antigen complex generation framework based on a flow-matching generation model and introduces an antibody-specific reward mechanism during the generation model's inference process. Multiple intermediate checkpoints are used to dynamically optimize the parallel sampling trajectory, enabling the generation process to gradually shift towards candidate nanobody conjugates with high interface confidence, high pose consistency, and high epitope coverage without requiring retraining or updating the network parameters of the already trained flow-matching generation model for the inference phase reward guidance process.
[0031] The method in this embodiment can be deployed in a server, workstation, cloud computing platform, or bioinformatics analysis pipeline. The computing device can perform operations such as target input, condition construction, stream matching sampling, reward calculation, sampling branch update, and result output. It can also connect to external protein structure databases, antibody databases, and structure prediction computing platforms via network interfaces to achieve batch design of nanobody candidates.
[0032] See Figure 1 This paper provides a de novo design method for nanobody conjugates based on sequential reward guidance during the reasoning stage. Step S101: Obtain the three-dimensional structural information of the target antigen to be bound, the epitope hotspot information of the target antigen, the framework region information of the humanized nanobody, and the slot length information of the complementarity determination region.
[0033] The three-dimensional structural information of the target antigen is used to describe the spatial conformation of the target antigen molecule, including but not limited to the spatial coordinates of antigen residues, main chain backbone structure, secondary structure composition, surface exposed area, local structural flexibility information, and spatial distance relationship between residues.
[0034] The three-dimensional structural information of the target antigen comes from experimentally analyzed structures, such as X-ray crystal structures, cryo-electron microscopy structures, or nuclear magnetic resonance structures, as well as from predicted structures obtained by structural prediction models.
[0035] The target antigen is a cytokine, receptor, enzyme, or other protein target.
[0036] The epitope hotspot information is used to describe the location regions where nanobodies are expected to recognize and bind. The epitope hotspot information is a set of epitope hotspots on the target antigen, consisting of one or more residues, that are expected to be recognized by the nanobodies.
[0037] Based on experimental data, structural analysis results, or computational prediction methods, the key binding regions on the surface of the target antigen are determined, and the residue numbers, spatial coordinates, and proximity relationships corresponding to the key binding regions are used as epitope hotspot information.
[0038] In one embodiment, an epitope hotspot mask is constructed based on the epitope hotspot information. The epitope hotspot mask is used to mark the positions of residues or atoms in the target antigen that belong to the epitope hotspots and is input as conditional constraint information into the generation network to guide the complementarity determination region of the nanobody to be generated toward the epitope hotspot region.
[0039] In one embodiment, the three-dimensional structure of the target antigen is converted into a three-dimensional geometric feature representation that the model can process, and a spatial coordinate system centered on the target antigen is established, so that the subsequent nanobody generation process can complete conditional sampling within the coordinate space of the target antigen.
[0040] By employing the above methods, the generative model can perceive the target binding region, reducing the probability of searching for binding sites without constraint across the entire antigen surface and improving the directionality of subsequent generation processes.
[0041] The humanized nanobody framework region information is used to define the framework backbone, sequence background, and positional boundaries between the framework region and the complementarity determination region of the nanobody to be generated.
[0042] The framework region information of the humanized nanobody includes one or more of the following: framework region amino acid sequence, framework region residue number, framework region three-dimensional coordinates, start and end positions of complementarity-determining regions, connection relationship between framework regions and complementarity-determining regions, and information on conserved residues in the framework region.
[0043] The information on the humanized nanobody framework region comes from known humanized nanobody structures, humanized nanobody templates, nanobody framework databases, human immunoglobulin germline framework sequences, humanized common framework sequences, or humanized frameworks obtained through complementarity-determining region transplantation; it is also obtained by sequence substitution and structural optimization of non-humanized nanobody frameworks according to preset humanization rules.
[0044] In one embodiment, the positional boundaries between the framework region and the complementarity-determining region are determined according to the immunoglobulin variant region numbering rules, and the amino acid sequence, backbone structure, or both of the framework region are used as fixed conditions or structural constraints in the generation process to keep the main chain structure, conserved residues, or other preset regions of the framework region unchanged, or to adjust them only within a preset range, and the amino acid sequence and three-dimensional conformation of the complementarity-determining region are generated or optimized at the complementarity-determining region position defined by the framework region.
[0045] In one embodiment, the framework region of the humanized nanobody is encoded with structural features to obtain the framework region residue features, spatial coordinate features, and geometric relationship features between residues. The structural features are then used as conditional constraint information input into the generation network to constrain the continuity of the connection, spatial compatibility, and overall structural stability between the generated complementarity determination region and the framework region.
[0046] By introducing the framework region information of the humanized nanobody, the generated complementarity-determining region can be adapted to the preset humanized framework backbone, thereby improving the structural integrity, framework compatibility and humanization degree of the candidate nanobody while maintaining the target epitope binding directionality.
[0047] The complementarity determination region slot length information is used to limit the number of residues contained in one or more complementarity determination regions in the nanobody to be generated.
[0048] The complementarity determination region slot length information includes the preset number of residues, candidate length set, or allowed length range of at least one complementarity determination region among CDR1, CDR2, and CDR3.
[0049] The length of the complementary determination region slot is specified by the user, or determined based on the numbering results of the humanized nanobody framework, the framework region connection boundary, the statistical distribution of known nanobody sequences, or a preset generation rule.
[0050] In one embodiment, the start and end boundaries of each complementarity determination region are determined according to the immunoglobulin variant region numbering rules, and the corresponding complementarity determination region slot length is set according to the start and end boundaries, so that the generation network generates a predetermined number of amino acid residues and their three-dimensional conformation in the corresponding slot.
[0051] In one implementation, different complementary decision regions are provided with the same or different slot lengths, and the slot lengths of CDR1, CDR2 and CDR3 are set independently to each other.
[0052] In one embodiment, the slot length is a fixed length; in another embodiment, the slot length is a variable length that allows the generated network to select within a preset range.
[0053] Step S102: Construct generation conditions.
[0054] The three-dimensional structural information, epitope hotspot information, and humanized nanobody framework region information of the target antigen are respectively feature-encoded to obtain target antigen structural conditions, epitope hotspot conditions, and humanized nanobody framework conditions. The conditions are then combined to form joint generation conditions for inputting the flow matching generation model.
[0055] In one embodiment, the three-dimensional structural information of the target antigen is subjected to coordinate normalization, geometric feature encoding, and residue feature encoding to obtain one or more of antigen residue features, antigen skeleton coordinate features, residue distance features, and local spatial environment features, and the features are constructed as target antigen structural conditions.
[0056] In one embodiment, based on the epitope hotspot information, the corresponding hotspot residues or hotspot atoms are mapped onto the three-dimensional structure of the target antigen to construct an epitope hotspot mask or epitope hotspot feature representation, and the epitope hotspot mask or epitope hotspot feature representation is constructed as an epitope hotspot condition.
[0057] In one embodiment, the variable region of the nanobody to be generated is divided into FR1, CDR1, FR2, CDR2, FR3, CDR3 and FR4 regions connected in sequence according to the immunoglobulin variable region numbering rules. FR1, FR2, FR3 and FR4 constitute the framework region, and CDR1, CDR2 and CDR3 constitute the complementarity-determining region.
[0058] In one embodiment, the amino acid sequence and backbone coordinates of the humanized nanobody framework region are feature-encoded, and a fixed region mask or a constrained region mask is constructed according to the position of the framework region. The framework region sequence features, backbone coordinate features, and fixed region mask or constrained region mask are used to construct the humanized nanobody framework conditions.
[0059] In one implementation, complementary decision region generation slots are set between adjacent frame regions based on the start and end boundaries of each complementary decision region and the corresponding slot length information. The position boundaries, preset number of residues, candidate length set or allowed length range of each generated slot are encoded, and a generation region mask is constructed based on the position of the generated slot. The slot boundary features, length features and generation region mask are used to construct the complementary decision region slot length conditions.
[0060] In one implementation, the target antigen structure condition, epitope hotspot condition, humanized nanobody framework condition, and complementarity determination region slot length condition are aligned and combined to form a joint conditional representation for conditional generation, and the joint conditional representation is input into the stream matching generation model.
[0061] Under the aforementioned generation conditions, the amino acid type, main chain conformation, and side chain conformation within each complementary determination region generation slot are set as variables to be generated, and the spatial pose of the nanobody relative to the target antigen evolves along with the α-carbon coordinate state of the nanobody. In another embodiment, the spatial pose is also explicitly characterized and generated using independent rotation and translation parameters.
[0062] The start and end boundaries of the complementarity-determining regions (CDRs) are used to determine the sequence position of each CDR within the nanobody variant and its connection position with adjacent framework regions. The start and end boundaries are determined according to a preset immunoglobulin variant numbering rule and include one or more of the following: the start residue position, the end residue position, the front-end linking framework residue position, and the rear-end linking framework residue position of each CDR.
[0063] The start and end boundaries of CDR1 are located between FR1 and FR2, the start and end boundaries of CDR2 are located between FR2 and FR3, and the start and end boundaries of CDR3 are located between FR3 and FR4. These start and end boundaries are used to determine the insertion position and connection endpoint of the complementarity determination region generation slot in the nanobody variant region.
[0064] Under the combined constraints of target antigen structure conditions, epitope hotspot conditions, humanized nanobody framework conditions, and complementarity determination region (CDR) slot length conditions, the flow matching generation model generates the amino acid sequence and three-dimensional conformation of the complementarity determination region within the corresponding generation slot of each CDR while maintaining the fixed or constrained amino acid sequence and internal backbone geometry of the framework region. Simultaneously, it allows the humanized nanobody framework as a whole to rotate and translate relative to the target antigen. Furthermore, it searches for or adjusts the relative spatial pose of the nanobody relative to the target antigen, thereby obtaining a candidate nanobody-antigen complex containing the candidate nanobody amino acid sequence, the candidate nanobody three-dimensional structure, and the nanobody-target antigen binding conformation.
[0065] Step S103: Using a flow matching generation model, multiple parallel sampling branches are sampled along a preset sampling trajectory under the constraints of the generation conditions to generate the nanobody complementarity determination region and the docking pose of the nanobody relative to the target antigen.
[0066] The flow-matching generation model employs a partially latent variable flow-matching structure, including an α-carbon coordinate channel and a per-residue latent variable channel. The α-carbon coordinate channel is used to explicitly characterize the backbone geometry of the nanobody and its spatial pose relative to the target antigen; the per-residue latent variable channel is used to characterize residue type, side chain conformation, and local structural information. The α-carbon coordinate channel and the per-residue latent variable channel together constitute the current generation state and evolve jointly along the preset sampling trajectory.
[0067] The current generated state at sampling time t will be represented as: xt = (r t , z t ).
[0068] x t It represents the current generation state at sampling time t. It is not a single coordinate value, nor a nanobody sequence, but a collection of all the information to be generated that the model needs to save and update at the current moment. For example, the spatial position of the current nanobody backbone, the docking pose of the current nanobody relative to the antigen, the latent variable representation of each residue, and the structure and sequence generation trend of the current complementarity determination region.
[0069] r t This represents the α-carbon coordinate state at sampling time t; by recording the three-dimensional coordinates of the α-carbon atoms of each residue, the spatial shape of the protein backbone is approximately described. t It is not a single three-dimensional coordinate, but usually a set of coordinates composed of multiple residue coordinates. For example, when a nanobody has N residues to be represented, That is, each residue corresponds to three coordinate components (x, y, y). i ,y i ,z i ), r t The main expression includes the backbone shape of the complementarity-determining region, the spatial relationship between residues, the translation and rotation position of the nanobody relative to the target antigen, the docking pose between the nanobody and the antigen, and the spatial connection relationship between the framework region and the complementarity-determining region.
[0070] z t This represents the state of the latent variables for each residue at sampling time t. Latent variables are low-dimensional feature representations used internally by the model. They are not directly read amino acid letters or atomic coordinates, but rather a set of numerical features learned by the structural autoencoder. Each residue corresponds to a latent variable vector. For example, using eight-dimensional latent variables per residue, the i-th residue is represented as: The hidden variables of all N residues together constitute Each residue of latent variable comprehensively represents the amino acid residue type, side chain conformation, local atomic arrangement, local chemical environment, spatial structural features near the residue, and information outside the main chain that is difficult to represent solely by α-carbon coordinates. Each residue of latent variable represents a corresponding latent variable vector for each amino acid residue. For example, a nanobody with 120 residues, each using an 8-dimensional latent variable, would have 120 sets of latent variables within the model, each containing 8 values. It does not represent the entire nanobody with a single latent variable, but rather expresses it residue-by-residue, thus preserving sequence position and local structural information.
[0071] A conditional denoising network is used to predict the velocity field under the current state. The conditional denoising network predicts the velocity field corresponding to the current generation state based on the current generation state xt, the sampling time t and the generation condition c.
[0072] , wherein xt represents the current generation state at sampling time t, and c represents a joint generation condition composed of target antigen structure condition, epitope hotspot condition, humanized nanobody framework condition and complementarity-determining region slot length condition; v θ represents the velocity field output by the conditional denoising network characterized by parameter θ. θ represents the set of network parameters learned by the conditional denoising network in the training stage and kept fixed in the inference sampling stage, including trainable parameters corresponding to each feature representation module, geometric update module and velocity prediction module of the conditional denoising network; in the sequential reward guided process in the inference stage described in the present application, the parameter θ is not updated according to the antibody-specific reward signal.
[0073] t is a sampling time parameter in the flow matching model, which is usually normalized to between 0 and 1. Here t is not in seconds or minutes, but a mathematical parameter representing the advancement degree of the generation process.
[0074] t=0 represents the initial sampling state, and the region to be generated is usually close to random noise; 0<t<1 represents the intermediate generation state, where structural and sequence information are gradually formed; t=1 represents the sampling end point, and a complete candidate nanobody-antigen complex is obtained.
[0075] According to the velocity field output by the conditional denoising network, numerical integration is performed on the current generation state, so that each parallel sampling branch gradually evolves from the initial state along a preset sampling trajectory to the final state corresponding to the candidate nanobody-antigen complex.
[0076] In one embodiment, the conditional denoising network includes a feature representation module, a geometric update module and a velocity prediction module.
[0077] The feature representation module is configured to characterize one or more of residue type, current latent variable, sampling time, chain identifier, region mask, epitope hotspot, and inter-residue distance and relative orientation.
[0078] The geometric update module propagates condition information of target antigen, humanized framework and epitope hotspot according to current three-dimensional coordinates, and performs feature update by using a three-dimensional geometric network with equivariance or invariance to rotation and translation.
[0079] The velocity prediction module outputs the α-carbon coordinate velocity of the residues to be generated and the hidden variable velocity per residue. The target antigen coordinates remain fixed, and the complementarity-determining region participates in the generation and update; the framework region maintains its amino acid sequence and internal backbone geometry fixed or undergoes restricted adjustments according to the framework residue mask, while allowing the framework region as a whole to rotate and translate relative to the target antigen with the nanobody.
[0080] In the initial state, the complementarity-determining region (CDR) to be generated and the docking pose of the nanobody relative to the target antigen are initialized according to a preset noise distribution. The amino acid sequence and internal backbone geometry of the humanized nanobody framework region remain fixed or constrained, while preserving the degrees of freedom for rotation and translation of the humanized nanobody framework as a whole relative to the target antigen. Thus, the generation model primarily generates and adjusts the residue types, side chain conformations, main chain backbone conformations, and spatial pose of the nanobody relative to the target antigen in the CDR.
[0081] In one implementation, the α-carbon coordinate channel employs a sampling method with random perturbation to maintain structural diversity among different parallel sampling branches; the per-residue latent variable channel employs an integration method based on a deterministic velocity field to maintain the continuity of the latent variable evolution trajectory.
[0082] The partial latent variable flow matching model employs a product space representation, ensuring that each residue simultaneously corresponds to an α-carbon three-dimensional coordinate and a low-dimensional latent variable per residue. After the preset sampling trajectory reaches its endpoint, a pre-trained and parameter-frozen structural autoencoder decoder, based on the latent variable per residue and combined with the α-carbon coordinate, recovers the residue type, side chain conformation, and full-atom three-dimensional structure of the candidate nanobody, thereby obtaining the candidate nanobody sequence and the candidate nanobody-antigen complex structure.
[0083] In one implementation, the target antigen structural features and the humanized nanobody framework features are concatenated into the representation channel of the conditional denoising network, and the epitope hotspot mask paired features are injected into the paired representation channel of the conditional denoising network. The latent variable per residue is an eight-dimensional vector; the encoder and decoder of the structural autoencoder maintain parameter freeze during the training and sampling process of the flow matching generation model, and are only used to obtain the latent variable target and decode the final latent variable and α-carbon coordinates into a full-atom structure and sequence.
[0084] Before the preset sampling trajectory reaches its endpoint, at least two intermediate checkpoints are set, and a reward-guided operation is performed at each intermediate checkpoint, including: saving the generation state of the current parallel sampling branch; performing predictive final-state sampling based on the generation state to obtain the corresponding candidate nanobody-antigen complex; evaluating the structure of the candidate nanobody-antigen complex using a complex structure prediction model to obtain an antibody-specific reward signal; resampling the parallel sampling branch according to the antibody-specific reward signal, and causing the resampled sampling branch to return to the corresponding intermediate checkpoint to continue sampling along the preset sampling trajectory; at the endpoint of the sampling trajectory, determining the target candidate nanobody-antigen complex according to the antibody-specific reward signal, and outputting the corresponding nanobody sequence and three-dimensional structure.
[0085] Step S104: Set at least two intermediate checkpoints before the preset sampling trajectory reaches the endpoint, and perform sequential reward guidance operation at each intermediate checkpoint.
[0086] In this embodiment, a sequential reward guidance mechanism based on intermediate checkpoints of the trajectory is introduced during the sampling of nanobody conjugates by the flow matching generation model. Unlike the method of evaluating and screening candidate structures only at the sampling endpoint, this application performs predictive final state evaluation on the current generation state of each parallel sampling branch before the generation trajectory is completed, and adjusts the retention probability and computational resource allocation of different sampling branches in the subsequent sampling process according to the evaluation results, so that the generation distribution gradually shifts towards the region where high-reward candidates are located during the inference process.
[0087] The sequential reward guidance process does not change the network parameters of the flow matching generation model, nor does it require retraining the flow matching generation model. Instead, during a single inference process, it adjusts the subsequent evolution distribution of the parallel sampling branch through predictive final state sampling, antibody-specific reward evaluation, and probabilistic branch resampling.
[0088] At multiple intermediate checkpoints along the preset sampling trajectory, the current generation state of each parallel sampling branch is saved. Based on the saved generation state, corresponding trial copies are established, and each trial copy performs predictive final state sampling along the remaining sampling trajectory. The candidate nanobody-antigen complex obtained from each trial copy is evaluated using a complex structure prediction model to obtain an antibody-specific reward signal. Based on the antibody-specific reward signal and temperature modulation parameters, each parallel sampling branch is probabilistically resampled, so that high-reward branches are more likely to be replicated or retained, and low-reward branches are more likely to be eliminated. The resampled branches return to the generation state saved at the corresponding intermediate checkpoint and continue sampling along the preset sampling trajectory.
[0089] In one implementation, the sequential reward guidance is implemented using a Feynman-Kats-guided sequential resampling method. The Feynman-Kats guidance uniformly achieves trajectory guidance at intermediate checkpoints and candidate selection at sampling endpoints within the same inference process, independent of model training epochs and without requiring updates to the network parameters of the flow matching generation model or complex structure prediction model.
[0090] Step S1041: Set intermediate checkpoints.
[0091] The preset sampling trajectory extends from the initial sampling time t=0 to the final sampling time t=1, where t=0 represents the initial state and t=1 represents the final state after completion. At least two intermediate time nodes are set between the initial sampling time and the final sampling time as intermediate checkpoints for performing predictive final state sampling, reward evaluation, and branch resampling.
[0092] In one implementation, the main sampling process includes approximately 400 integration steps, with intermediate checkpoints set at the 100th, 200th, and 300th integration steps. The checkpoint locations described above are only one specific implementation; other numbers and locations of intermediate checkpoints may be set based on the total number of main sampling steps, model convergence characteristics, computational resources, and reward / evaluation costs.
[0093] By setting multiple intermediate checkpoints in the sampling trajectory, potential low-quality generation branches are identified before the sampling endpoint is reached, and subsequent sampling resources are allocated more to generation branches with higher potential rewards, reducing the probability that low-quality branches will continue to accumulate structural errors and occupy full sampling computation resources.
[0094] Step S1042: Save the current generation state of the parallel sampling branch.
[0095] At each intermediate checkpoint, the generation state corresponding to each parallel sampling branch is saved. The generation state includes at least the α-carbon coordinate state, the state of hidden variables per residue, and the current sampling time parameter.
[0096] When the spatial pose of the nanobody relative to the target antigen is represented by α-carbon coordinate states, the spatial pose is included in the α-carbon coordinate states; when the model uses rotation and translation parameters to characterize the docking pose alone, the generated states also include the corresponding rotation and translation parameters. The generated states are also associated with corresponding generation conditions or generation condition identifiers.
[0097] At a certain intermediate checkpoint, each parallel sampling branch corresponds to an independent state snapshot. Different state snapshots have different complementarity-determining region skeleton images, per-residue latent variable states, and docking poses of the nanobody relative to the target antigen.
[0098] The purpose of saving the generated state is to use it as a common starting point for predictive final state sampling and subsequent recovery sampling. Predictive final state sampling is performed on a copy of the state snapshot, without overwriting the original saved state snapshot. After reward evaluation and branch resampling are completed, the retained or copied sampling branches continue sampling along the main sampling trajectory from the corresponding original state snapshot.
[0099] Step S1043: Perform predictive final state sampling.
[0100] At each intermediate checkpoint, a trial copy is established based on the generation state saved by each parallel sampling branch, and each trial copy is advanced along the remaining sampling trajectory to the sampling endpoint to obtain the predictive final state candidate nanobody-antigen complex corresponding to each sampling branch.
[0101] The predictive final state sampling is used to estimate the endpoint structure and potential reward that the sampling branch can obtain when continuing sampling based on the current sampling branch's generation state. The predictive final state candidates are only used for reward evaluation and do not directly replace the checkpoint states stored in the main sampling branch.
[0102] For example, at the intermediate checkpoint where the sampling time t equals 0.5, the current generation state of the i-th sampling branch is used as the starting point for the trial calculation. The corresponding trial calculation copy is advanced from t equals 0.5 to t equals 1 to obtain the predictive final state candidate corresponding to the sampling branch. The predictive final state candidate is then input into the complex structure prediction model for subsequent reward evaluation.
[0103] In one implementation, to reduce the computational overhead of predictive final state sampling at each intermediate checkpoint, the predictive final state sampling uses fewer integration steps than the remaining interval corresponding to the main sampling path. By increasing the trial integration step size, adopting a simplified integration strategy, or using differentiated channel integration steps, the predictive final state candidate can be approximately obtained.
[0104] For example, the main sampling process employs approximately 400 integration steps, while the predictive final state sampling at intermediate checkpoints uses fewer trial integration steps. During trial completion, the α-carbon coordinate channel and the per-residue latent variable channel employ the same or different number of trial integration steps, but these steps are fewer than the number of integration steps corresponding to the main sampling path within the same remaining time interval. This reduces the computational cost of intermediate reward evaluation while preserving the ability to estimate the final state reward.
[0105] Differentiated trial integration allows the α-carbon coordinate channel to use more geometric update steps and the per-residue latent variable channel to use fewer deterministic integration steps, or vice versa; the specific number of steps is predetermined based on the final state reward estimation accuracy and computational cost. In one specific implementation, the number of predictive final state trial integration steps is determined based on the remaining master sampling integration steps between the current intermediate checkpoint and the sampling endpoint, such that the number of trial integration steps is a portion of the corresponding remaining master sampling integration steps, for example, set to one-quarter to one-half of the corresponding remaining master sampling integration steps. For the α-carbon coordinate channel and the per-residue latent variable channel, the number of trial integration steps is set according to the geometric structure change and latent variable convergence, respectively, and the trial configuration with lower computational cost is selected while maintaining the discriminative power of the predictive final state reward evaluation results. Regardless of the trial configuration used, the original state snapshot of the intermediate checkpoint is restored and copied after resampling, instead of directly writing the trial-obtained final state candidate back to the master sampling trajectory.
[0106] Step S1044: Calculate antibody-specific reward signals using a complex structure prediction model.
[0107] For each predicted final state candidate, the structure of the complex formed by the candidate nanobody and the target antigen is predicted and evaluated using a complex structure prediction model.
[0108] The nanobody sequence and target antigen information corresponding to the predicted final state candidate are input into the complex structure prediction model. The complex structure prediction model predicts the complex structure formed by the nanobody and the target antigen, and outputs the interface prediction score and the complex structure prediction confidence.
[0109] The complex structure predicted by the complex structure prediction model is compared with the candidate complex structure generated by the flow-matching generation model to evaluate the self-consistency of the candidate nanobody-antigen docking posture. Simultaneously, the structural prediction confidence of the nanobody-target antigen binding interface is evaluated based on the interface prediction score output by the complex structure prediction model. The predictive final state candidate includes the candidate nanobody amino acid sequence and the candidate nanobody-antigen complex three-dimensional structure obtained by the flow-matching generation model. The candidate nanobody-antigen complex three-dimensional structure is used to characterize the binding conformation formed at the endpoint of the current flow-matching generation trajectory calculation. The candidate nanobody amino acid sequence and target antigen information are used as inputs to the complex structure prediction model, which independently obtains the re-predicted nanobody-antigen complex structure. The re-predicted complex structure does not replace the predictive final state candidate structure obtained by the flow-matching generation model, but serves as an independent evaluation result for calculating the interface prediction index and the docking posture consistency index with the predictive final state candidate structure. When a complex structure prediction model fails to output a valid complex structure, the output result does not meet the preset structural integrity requirements, or the structure prediction confidence is lower than the preset minimum requirement, the corresponding predictive final state candidate is marked as an invalid evaluation candidate, assigned a preset minimum reward value, or its probability of entering the subsequent retention set of the current intermediate checkpoint is reduced. For the same sampling task, all predictive final state candidates adopt the same anomaly evaluation handling rules to reduce the impact of complex structure prediction anomalies on the sampling branch selection results.
[0110] The antibody-specific reward signal includes at least two of the following: interface prediction index, docking pose consistency index, and epitope contact coverage index.
[0111] The interface prediction metric is used to evaluate the confidence level of the predicted structure of the binding interface between the candidate nanobody and the target antigen. In one embodiment, the interface prediction TM score ipTM(x) output by the complex structure prediction model is used as the interface prediction metric. The larger the ipTM(x), the higher the confidence level of the complex structure prediction model in predicting the relative spatial relationship of the candidate nanobody-antigen binding interface. The ipTM(x) reflects the confidence level of the interface structure prediction by the computational model and is not directly equivalent to the actual binding affinity or experimental stability of the candidate nanobody.
[0112] The docking pose consistency index is used to evaluate the degree of consistency between the docking pose of the nanoantibody-antigen generated by the flow matching generation model and the docking pose predicted by the complex structure prediction model.
[0113] Based on the corresponding target antigen α-carbon atoms in the two complexes, the candidate complex structures obtained by the convection matching generation model and the complex structures re-predicted by the complex structure prediction model are spatially rigidly aligned. While maintaining the target antigen alignment relationship, corresponding nanobody residues in the two complexes are selected, and the root mean square deviation (RMSD) between the corresponding α-carbon atoms of these residues is calculated to obtain the docking root mean square deviation (RMSDdock(x)). RMSDdock(x) uses angstroms as the unit of length.
[0114] The root mean square deviation of the docking is converted into a docking pose consistency reward: exp represents the natural exponential function; RMSDdock(x) represents the root mean square deviation of the docking. This represents a scale parameter greater than 0, used to adjust the degree of influence of the root mean square deviation of docking on the bonus value.
[0115] In one implementation, the nanobody residues involved in the calculation include all corresponding nanobody residues in the two complexes; in other implementations, only complementarity-determining region residues, interface residues, or pre-specified nanobody residues may be selected for calculation. All candidates in the same sampling task use the same residue selection and correspondence rules to ensure the comparability of docking pose consistency evaluations between different candidates.
[0116] σ and RMSDdock(x) use the same unit of length, in one implementation using angstroms, to make the exponential term RMSDdock(x) / σ dimensionless. σ is used to determine the decay rate of the pose consistency bonus as the root mean square deviation of docking increases; the smaller σ is, the more sensitive the bonus is to docking pose deviation, and the smaller the RMSDdock(x) / σ, the more significant the decay. dock Changes can lead to a significant decrease in rewards; the larger σ is, the greater the reward will be with RMSD. dock The decrease becomes more gradual. In one embodiment, σ is set to 0.5 Å to 5.0 Å, preferably 1.0 Å to 3.0 Å, for example, 2.0 Å.
[0117] RMSD dock(x) The smaller the value, the more consistent the docking pose generated by the flow matching generation model is with the docking pose predicted by the complex structure prediction model, and the closer the docking pose consistency reward is to 1; RMSD dock(x) The larger the value, the greater the difference between the two docking poses, and the closer the docking pose consistency reward is to 0. This docking pose consistency index is used to avoid candidate results where the interface prediction score is high, but the docking pose generated by the flow matching generation model is significantly inconsistent with the docking pose predicted by the composite structure prediction model.
[0118] In one implementation, the epitope contact coverage index is used to evaluate the spatial coverage of the complementarity determination region (CDR) of a candidate nanobody on a pre-specified epitope hotspot. For each pre-specified epitope hotspot atom, it is determined whether there exists at least one CDR atom whose spatial distance from it is not greater than a preset atom distance threshold; if so, the epitope hotspot atom is identified as a contacted epitope hotspot atom. The epitope contact coverage index is the ratio between the number of contacted epitope hotspot atoms and the total number of pre-specified epitope hotspot atoms, and its value ranges from 0 to 1.
[0119] The epitope contact coverage index, Coverage(x), is expressed as: Ncontact(x) represents the number of epitope hotspot atoms that form effective contact with at least one complementary determinant region atom; Nhotspot represents the total number of pre-specified epitope hotspot atoms.
[0120] The value of Coverage(x) ranges from 0 to 1. The larger the Coverage(x), the higher the proportion of epitope hotspot atoms covered by the complementarity-determining region. The epitope contact coverage index is used to reduce the probability that candidate nanobodies will obtain a high interface prediction score by only contacting the target antigen through a few tip residues or a small number of local atoms.
[0121] In one embodiment, the epitope hotspot atom and complementarity-determining region atom are non-hydrogen heavy atoms from the corresponding residues; in other embodiments, α-carbon atoms, side-chain heavy atoms, or pre-specified representative atoms may also be used for contact determination. All candidates in the same sampling task use the same atom selection rules and distance threshold. In one specific embodiment, the preset atom distance threshold is set to 5 angstroms.
[0122] The above three types of rewards consist of ipTM for evaluating the confidence of the interface structure, RMSD consistency for constraining the consistency between the generated pose and the predicted pose, and Coverage for evaluating the degree of contact coverage between the CDR and the surface hotspot.
[0123] Step S1045: Construct antibody-specific complex reward signal.
[0124] In this embodiment, multiple evaluation indicators are integrated to form a comprehensive reward: ,in: α, β, and γ are weighting coefficients; σ is a scaling parameter. x represents the predictive final-state candidate nanobody-antigen complex; R(x) represents the antibody-specific complex reward value corresponding to candidate x.
[0125] In one implementation, the interface prediction metric ipTM(x), docking pose consistency reward, and surface contact coverage metric Coverage(x) all take values between 0 and 1. The weighting coefficients α, β, and γ are all non-negative and satisfy the following: 0≤α≤1, 0≤β≤1, 0≤γ≤1; α+β+γ=1. α represents the weight corresponding to the interface prediction index ipTM(x), β represents the weight corresponding to the docking pose consistency index, and γ represents the weight corresponding to the epitope contact coverage index Coverage(x). By making the sum of the three weight coefficients equal to 1, each weight coefficient represents the relative contribution of the corresponding evaluation index to the antibody-specific composite reward signal, and ensures that the composite reward values at different intermediate checkpoints have a basically consistent numerical scale. When only two of the above three evaluation indicators are used to construct the antibody-specific composite reward signal, the weight coefficients corresponding to the unused evaluation indicators are set to 0, and the sum of the weight coefficients corresponding to the remaining evaluation indicators is 1.
[0126] In another implementation, the weighting coefficients α, β, and γ are set in stages according to the sampling time or the location of intermediate checkpoints, and α, β, and γ remain non-negative and their sum equals 1 in each sampling stage. As the sampling process progresses from the early stage to the later stage, the weight γ corresponding to the surface contact coverage index generally does not increase, the weight α corresponding to the interface prediction index generally does not decrease, and the weight β corresponding to the docking pose consistency index remains unchanged or generally does not decrease.
[0127] In the early stages of sampling, the docking sites, complementarity-determining region (CDR) skeletal structure, and binding interfaces of candidate nanobodies are not yet fully formed. At this point, increasing the weight γ corresponding to the epitope contact coverage index allows the sampling branch to prioritize exploring the spatial region near the target epitope hotspot and promotes distributed contact between the CDR and multiple epitope hotspots, reducing the probability of the sampling branch prematurely concentrating on a small number of local contact conformations.
[0128] During the mid-sampling stage, the candidate nanobody has initially approached the target epitope and formed a preliminary complementarity-determining region conformation and docking pose. At this point, the weight γ corresponding to the epitope contact coverage index is gradually reduced, while the weight α corresponding to the interface prediction index and the weight β corresponding to the docking pose consistency index are increased. This shifts the sampling process from epitope region exploration to a combination of interface optimization and docking pose correction.
[0129] In the later stages of sampling, the skeletal structure and docking positions of the candidate nanobodies have been largely established. At this point, further increasing the weight α corresponding to the interface prediction index and the weight β corresponding to the docking pose consistency index, while decreasing the weight γ corresponding to the epitope contact coverage index, makes the sampling branch place greater emphasis on the prediction confidence of the complex interface structure and the consistency between the generated pose and the re-predicted pose, thereby promoting the convergence of candidate results to regions with reliable interface structures and self-consistent docking poses.
[0130] In one exemplary implementation, the weight range corresponding to each reward component is set according to the sampling stage.
[0131] In the early stages of sampling, α was set to 0.20–0.40, β to 0.10–0.30, and γ to 0.40–0.60. In the middle stages of sampling, α was set to 0.35–0.55, β to 0.15–0.35, and γ to 0.20–0.40. In the later stages of sampling, α was set to 0.50–0.75, β to 0.20–0.40, and γ to 0.05–0.20.
[0132] In each sampling stage, α, β, and γ take values within their respective ranges, and their sum equals 1. The weight range is used to reflect the adjustment rules of the early sampling stage focusing on target epitope region exploration, the middle sampling stage considering epitope contact coverage and interface optimization, and the later sampling stage focusing on interface prediction confidence and docking pose self-consistency.
[0133] In one specific embodiment with three intermediate checkpoints, the first intermediate checkpoint corresponds to the early stage of sampling, with α = 0.30, β = 0.20, and γ = 0.50; the second intermediate checkpoint corresponds to the middle stage of sampling, with α = 0.45, β = 0.25, and γ = 0.30; and the third intermediate checkpoint corresponds to the late stage of sampling, with α = 0.60, β = 0.30, and γ = 0.10.
[0134] The weight ranges and specific weight values mentioned above are merely examples and do not constitute a limitation on how weights should be set. The specific weights for each stage are determined in advance based on the validation data, the output characteristics of the complex structure prediction model, and the requirements of the nanobody design task.
[0135] The antibody-specific complex reward signal is calculated based on the structural prediction results and spatial geometric relationships of the candidate complex, rather than through the characteristic spatial distance between the candidate structure and the reference sample; thus, the reward signal is used to comprehensively characterize the prediction confidence of the candidate binding interface, the self-consistency of the docking pose, and the epitope contact coverage.
[0136] Step S1046: Perform probabilistic resampling based on the reward signal.
[0137] After obtaining the reward for each sampling branch, update the selection probability of each branch based on the reward value.
[0138] The probability of selection is expressed as: , R represents the probability that the i-th sampling branch is selected in this resampling. i R represents the antibody-specific composite reward value corresponding to the i-th sampling branch. j Let represent the antibody-specific composite reward value corresponding to the j-th sampling branch, N represent the total number of current parallel sampling branches, and τ be the temperature modulation parameter. The numerator represents the value used to convert the reward value of the i-th sampling branch into a non-negative exponential weight, R. i The larger the value, the greater the corresponding exponential weight, and the higher the probability that this sampling branch will be selected. The denominator represents the sum of the exponential weights corresponding to all N sampling branches, used to normalize the exponential weights of each sampling branch. After normalization, the selection probability of each sampling branch satisfies the condition. The temperature modulation parameter τ is used to adjust the probability difference between different reward values. When τ is large, the difference in selection probability between different sampling branches decreases, and the probability distribution becomes more uniform, so that low-reward branches still have a certain probability of being retained, which is conducive to maintaining the diversity of sampling branches. When τ is small, the difference between different reward values is amplified, and the probability distribution is more concentrated on high-reward branches, increasing the probability that high-reward branches are replicated and increasing the probability that low-reward branches are eliminated.
[0139] In one implementation, the intermediate checkpoints in the early stages of sampling employ relatively large temperature modulation parameters to encourage multiple sampling branches to explore different complementary decision region configurations and docking poses; as the sampling process progresses to later stages, the temperature modulation parameters are gradually reduced, so that the selection probability is further concentrated on high-reward branches, thereby enhancing the development and convergence of high-quality candidate state regions.
[0140] Based on the calculated selection probabilities P1 to P2 N Perform multiple distributed resampling. In one implementation, the number of resampling operations is set to N, which is the same as the number of parallel sampling branches before resampling, so that the total number of parallel sampling branches remains unchanged after resampling is completed.
[0141] In one implementation, the number of parallel sampling branches is 2 to 32, and the temperature modulation parameter ranges from 0.01 to 1.0; intermediate checkpoints are also set to 0.25, 0.50, and 0.75 relative to the sampling time; the temperature modulation parameter is gradually reduced from 0.2 at the early checkpoints to 0.02 at the later checkpoints.
[0142] According to the selection probability P1 to P NPerform N samplings with replacement from the current N sampling branches. Any sampling branch may be selected once, selected multiple times, or not selected at all. The intermediate checkpoint states corresponding to repeatedly selected sampling branches are copied into multiple subsequent sampling branches; unselected sampling branches will not enter the subsequent main sampling process.
[0143] Since the resampling is a probabilistic selection, high-reward branches are not necessarily copied, and low-reward branches are not necessarily eliminated; compared with low-reward branches, high-reward branches only have a higher probability of being selected and copied.
[0144] Multinomial distribution resampling is performed according to the selection probability corresponding to each sampling branch. In one implementation, N samples with replacement are performed from the current N parallel sampling branches to keep the total number of parallel sampling branches unchanged before and after resampling.
[0145] Since the sampling is with replacement, the same sampling branch may be selected once, selected repeatedly, or not selected at all. Sampling branches with higher reward values have a higher selection probability and are therefore more likely to be retained or replicated into multiple subsequent sampling branches, thus obtaining more subsequent sampling resources; sampling branches with lower reward values have a lower selection probability and are therefore more likely to be not selected and stop entering the subsequent main sampling process.
[0146] The multiple subsequent sampling branches obtained through replication share the same initial state at intermediate checkpoints. During subsequent sampling, by superimposing random perturbations onto the α-carbon coordinate channel, using different random seeds, or introducing other random sampling factors, the replicated branches can form different subsequent evolution trajectories. Therefore, replicating high-reward branches does not simply generate multiple identical candidate results, but rather allocates more subsequent sampling resources to state regions with higher potential quality.
[0147] For example, there are currently four parallel sampling branches, A, B, C, and D, with corresponding antibody-specific composite reward values of 0.85 for branch A, 0.60 for branch B, 0.40 for branch C, and 0.35 for branch D. After calculating the selection probability based on the reward value and temperature modulation parameters of each branch, branch A, due to its higher reward value, has a higher selection probability and can therefore be repeatedly selected in the multivariate resampling process, being replicated as multiple subsequent sampling branches. Branch D, due to its lower reward value, has a lower selection probability and is therefore not selected once and will not enter the subsequent main sampling process.
[0148] The above results represent only one probabilistic resampling outcome and do not imply that branch A will necessarily be replicated in every resampling, nor that branch D will necessarily be eliminated in every resampling. Through this probabilistic resampling, high-reward sampling branches are more likely to be retained and continue sampling, while low-reward sampling branches retain a certain probability of being selected, thus maintaining a certain level of sampling diversity while prioritizing the use of high-quality candidate states.
[0149] After resampling is completed, each selected sampling branch continues to evolve along the main sampling trajectory towards the next intermediate checkpoint or sampling endpoint from the generation state saved at the corresponding intermediate checkpoint. The probabilistic resampling only adjusts the probability of each sampling branch being retained and copied, without updating the network parameters of the flow matching generation model or the complex structure prediction model.
[0150] Step S1047: The resampled sampling branch returns to the corresponding intermediate checkpoint and continues to sample along the preset sampling trajectory.
[0151] After completing probabilistic resampling, the next stage of parallel sampling branches is established based on the number of times each original sampling branch was selected during the resampling process and the generation state snapshots saved at the corresponding intermediate checkpoints.
[0152] For an original sampling branch that is selected once, its corresponding intermediate checkpoint generation state is retained and used as the starting state for a subsequent sampling branch. For an original sampling branch that is selected multiple times, its corresponding intermediate checkpoint generation state is copied to create multiple subsequent sampling branches. For original sampling branches that are not selected, they are not allowed to enter the subsequent main sampling process.
[0153] After resampling, the generated state used to continue the main sampling is a snapshot of the original state pre-saved at the corresponding intermediate checkpoint, rather than the candidate final state obtained from predictive final state sampling. The predictive final state candidate is only used to calculate the antibody-specific reward signal and does not directly replace the generated state of the main sampling branch after the reward evaluation is completed.
[0154] The intermediate checkpoint generation state includes at least the sampling time parameter, the α-carbon coordinate state, and the per-residue latent variable state. When the spatial pose of the nanobody relative to the target antigen is represented by independent rotation and translation parameters, the generation state also includes the corresponding rotation and translation parameters. The generation state is also associated with corresponding target antigen conditions, epitope hotspot conditions, humanized nanobody framework conditions, and complementarity-determining region slot length conditions.
[0155] After resampling, each sampling branch does not need to reinitialize the α-carbon coordinate state, the state of each residue latent variable, or the relative spatial pose of the nanobody-antigen. Instead, it continues to perform flow-matched numerical integration from the sampling time of the corresponding intermediate checkpoint. For example, when the sampling time corresponding to the intermediate checkpoint is tk, the x(tk) saved by the resampling branch is used as the starting state, and it continues to evolve from tk to the next intermediate checkpoint or the sampling endpoint t=1.
[0156] In this way, the resampled sampling branch can inherit the complementarity determination region skeleton, residue latent variable features, spatial position of nanobody relative to target antigen and initial binding direction that have been formed before the current intermediate checkpoint, and continue to adjust the complementarity determination region sequence, local conformation and docking pose based on the existing generated state.
[0157] For multiple subsequent sampling branches obtained by copying the same intermediate checkpoint state, each copied branch has the same initial intermediate checkpoint state. Since the α-carbon coordinate channel uses a sampling method with random perturbation, each copied branch can form different subsequent evolution trajectories as it continues sampling along the preset sampling trajectory. Therefore, copying high-reward sampling branches involves configuring multiple subsequent sampling branches in the vicinity of the corresponding high-reward generation state, increasing the exploration opportunities in the vicinity of that state.
[0158] When using fully deterministic integration in subsequent sampling processes, a small perturbation of a preset magnitude is applied to the generated state before the replicated branch continues sampling. This prevents multiple sampling branches copied from the same state from evolving along identical trajectories and generating the same candidate results. In one implementation, the small perturbation is applied to the α-carbon coordinate state and / or the per-residue latent variable state corresponding to the complementary decision region to be generated, without changing the target antigen state and avoiding disruption of the frame region latch constraint. The perturbation magnitude is set so that the perturbed replicated branch remains in the vicinity of the intermediate checkpoint state being replicated, while enabling different replicated branches to form different subsequent evolution trajectories. Thus, replicating high-reward sampling branches essentially involves configuring multiple subsequent exploration branches near high potential quality states.
[0159] The process of returning to the checkpoint and continuing sampling does not retrain the flow matching generation model, update the network parameters of the complex structure prediction model, or change the generation conditions corresponding to the current sampling branch. Its purpose is to reallocate subsequent computational resources based on the resampling results, so that generation states with higher selection probabilities correspond to more subsequent sampling branches, and to gradually shift the generation process towards high-reward candidate state regions while maintaining trajectory continuity.
[0160] Step S1048: Determine the target candidate nanobody-antigen complex at the end of the sampling trajectory. When each parallel sampling branch after resampling advances along the preset sampling trajectory to the sampling endpoint t=1, the final generated state corresponding to each sampling branch is obtained. Using a pre-trained and parameter-frozen structural autoencoder decoder, the latent variable state of each residue in each final generated state is decoded, and combined with the corresponding α-carbon coordinate state, the amino acid sequence, side chain conformation, and full-atom three-dimensional structure of each candidate nanobody are recovered, thereby obtaining (N) final candidate nanobody-antigen complexes.
[0161] Let the i-th final candidate nanobody-antigen complex be denoted as x(i), i = 1, 2, ..., N. For each final candidate x(i), the endpoint evaluation is performed again according to the aforementioned calculation method for antibody-specific complex reward signal. The nanobody sequence and target antigen information corresponding to the final candidate are input into the complex structure prediction model to obtain the interface prediction index; the docking pose generated by the flow matching generation model is compared with the docking pose re-predicted by the complex structure prediction model to obtain the docking pose consistency index; and the epitope contact coverage index is obtained based on the spatial contact relationship between the candidate nanobody complementarity determination region and the preset epitope hotspot.
[0162] Based on at least two of the interface prediction index, docking pose consistency index, and epitope contact coverage index, the antibody-specific composite reward value corresponding to each final candidate is calculated according to the aforementioned weighted fusion method.
[0163] The reward calculation at the endpoint is performed on the actual final candidate complexes generated by each sampling branch, and is no longer part of the predictive final state trial calculation at intermediate checkpoints. The predictive final state candidates obtained at intermediate checkpoints are only used to estimate the potential rewards of the corresponding branches and guide branch resampling, and are not directly used as the final design result.
[0164] Compare the antibody-specific complex reward values of all final candidates, and determine the candidate with the highest reward value as the target candidate nanobody-antigen complex:
[0165] in, This indicates the final identified target candidate nanobody-antigen complex. This represents the antibody-specific composite reward value corresponding to the i-th final candidate.
[0166] In a further embodiment, multi-index screening and structural redundancy removal are performed on the final candidates or the candidates initially determined based on the antibody-specific composite reward value, and the candidates are sorted according to the screening results, composite reward value or interface prediction index to determine the target candidate set for output or subsequent experimental verification.
[0167] After identifying target candidates, the system outputs the corresponding nanobody amino acid sequence, nanobody three-dimensional structure, and nanobody-target antigen complex three-dimensional structure. In one embodiment, the output also includes associated evaluation information such as the antibody-specific complex reward value, interface prediction index, docking pose consistency index, epitope contact coverage index, and candidate number of the target candidate, supporting subsequent candidate review, calculation screening, and experimental verification.
[0168] The reward evaluation and candidate selection at the endpoint are only used to determine target candidates from the final candidates that have already been sampled. They do not update the network parameters of the flow matching generation model or the complex structure prediction model, nor do they retrain the model through backpropagation. While maintaining the existing model's generation and evaluation capabilities, this reduces the data and computational costs required for retraining, avoids the model from reducing structural rationality or generation diversity due to over-adaptation to specific reward metrics, and facilitates adjustments to reward components, weights, and epitope hotspot conditions for different targets.
[0169] This embodiment provides a de novo design method for nanobody conjugates based on sequential reward guidance during the inference phase. The method uses a flow-matching generation model as the backbone, employing the three-dimensional structural information of the target antigen, epitope hotspot information, humanized nanobody framework region information, and complementarity-determining region (CDR) slot length information as joint generation conditions. The CDR of the nanobody is generated in a joint state space composed of the α-carbon coordinate state and the latent variable state of each residue, while simultaneously searching for the overall docking pose of the nanobody relative to the target antigen.
[0170] During the training phase, the docking pose of the humanized nanobody framework, which serves as the conditional input, is deleashed. This prevents the model from simply replicating the absolute docking positions of the real framework-antigen in the training samples. Instead, the model learns the relative docking relationships between the nanobody and the target antigen based on the target antigen structure, epitope hotspots, and the internal structure of the framework. During the inference phase, a framework latching mechanism constrains the internal folding structure of the humanized nanobody framework region. This preserves the overall degrees of freedom for rotation and translation of the nanobody relative to the target antigen, while allowing CDR1, CDR2, and CDR3 to maintain their structural and sequence generation degrees of freedom.
[0171] Furthermore, predictive final-state sampling is performed at multiple intermediate checkpoints along the flow-matched sampling trajectory. An antibody-specific reward signal is constructed based on the evaluation results of the candidate nanobody-antigen complexes. Probabilistic resampling is then applied to the parallel sampling branches based on this reward signal, gradually concentrating limited sampling resources towards regions containing high-reward candidates. At the end of the complete sampling trajectory, composite reward evaluation, multi-index screening, structural redundancy removal, and candidate ranking are further performed on the actually generated candidate nanobody-antigen complexes. The sequence, three-dimensional structure, and corresponding evaluation results of the target candidate nanobody are then output.
[0172] The antibody-specific reward signal not only serves as the basis for candidate filtering at the sampling endpoint, but also as a guiding signal for updating sampling branches and adjusting generation trajectories during the inference sampling process. This increases the generation ratio of high-reward candidates under a limited sampling budget and reduces the number of low-quality candidates entering the subsequent experimental verification process.
[0173] The flow-matching generation model employs a partially latent variable flow-matching structure, and its joint generation state includes at least an α-carbon coordinate state and a per-residue latent variable state. The α-carbon coordinate state represents the three-dimensional spatial position of the α-carbon atoms of each residue of the nanobody to be generated, thereby characterizing the backbone structure of the nanobody and the overall spatial pose of the nanobody relative to the target antigen. The per-residue latent variable state characterizes the residue type, side chain conformation, local structure, and other local structural information that is difficult to express by the α-carbon coordinates alone.
[0174] Each residue corresponds to a low-dimensional latent variable vector. In one specific implementation, each residue uses an 8-dimensional latent variable. The latent variable per residue can be converted into the corresponding residue type, side chain conformation, and local all-atom structure by a pre-trained structural autoencoder decoder.
[0175] The overall docking pose of the nanobody relative to the target antigen is encompassed within all α-carbon coordinate states of the nanobody. A uniform rotation and translation of all α-carbon coordinates indicates a change in the overall docking pose of the nanobody; a change in the local coordinates of the complementarity-determining region indicates a change in the local binding conformation. Therefore, in a preferred embodiment, the overall docking pose of the nanobody does not need to be set as an independently generated variable, but is uniformly represented by the α-carbon coordinate states.
[0176] The combined generation conditions include target antigen structure conditions, epitope hotspot conditions, humanized nanobody framework conditions, and complementarity-determining region slot length conditions. The humanized nanobody framework conditions include framework residue types, framework backbone atomic coordinates, and framework residue masks.
[0177] The residue positions in the complete nanobody sequence to be generated are divided into frame region residue positions and complementarity-determining region (CD) residue positions, which do not overlap. In one embodiment, the CD includes CDR1, CDR2, and CDR3, and the frame region includes FR1, FR2, FR3, and FR4, or includes all residue positions in the complete nanobody sequence except for CDR1, CDR2, and CDR3. The frame region and CD are determined based on CD sequence metadata, immunoglobulin variant numbering rules, or preset position intervals.
[0178] The complementary determination region slot length condition is used to determine the index positions of multiple frame fragments in the complete sequence to be generated, and the generated residue positions and slot lengths corresponding to CDR1, CDR2 and CDR3, respectively.
[0179] In some embodiments, the flow matching generation model serves as a general protein structure generation model or a protein binding protein generation model. It is pre-trained on large-scale protein structure data to learn the spatial geometry of the protein backbone, the local structure of residues, the docking relationships of complexes, and the general ability to generate binding proteins under given target conditions.
[0180] After obtaining general protein generation capabilities, the binding-target conditional fine-tuning is further performed using protein complex data, and the nanobody-antigen complex data is further used for specific fine-tuning for nanobody design tasks. Accordingly, in one embodiment, the training process includes structural autoencoder training, target-free monomer pre-training of the flow-matching generation model, binding-target conditional fine-tuning, and nanobody-antigen specific fine-tuning.
[0181] In one set of non-limiting embodiments, approximately 344,508 monomeric predicted structures and approximately 500,000 synthetic dimer pairs were used in the relevant training phase, with the data scale for relevant pre-training and fine-tuning reaching approximately 1.3 million structure samples. The training data was divided into training and validation sets at a ratio of approximately 99.9% and 0.1%, respectively.
[0182] Training is used to obtain a variational structural autoencoder for low-dimensional latent variables per residue. The structural autoencoder includes an encoder and a decoder. The encoder encodes the protein sequence and three-dimensional structure into residue-by-residue low-dimensional latent variables, and the decoder recovers the residue type, side chain conformation, and full-atom three-dimensional structure based on the residue-by-residue latent variables and their corresponding α-carbon coordinates.
[0183] In one specific implementation, the encoder and decoder each comprise 12 Transformer modules, each with approximately 130 million parameters, and employ an attention mechanism based on pairwise feature bias. Each protein residue corresponds to an 8-dimensional low-dimensional latent variable.
[0184] In the first training phase, the structural autoencoder is pre-trained using high-quality predicted monomer structures. Training samples are obtained from a predicted protein structure database and clustered using structure retrieval or structure clustering tools. Representative structures from each cluster are selected for training to reduce training bias caused by the repetition of highly similar structures.
[0185] In one specific implementation, only predicted monomer structures with an average structure prediction confidence of not less than 80 and a length between 32 and 256 residues are retained. The structure autoencoder pre-training performs approximately 500,000 training steps and is trained in parallel using 16 A100-80GB graphics processors.
[0186] Since predicted protein structures typically have a high degree of geometric regularity, their local structures can be more idealized than experimentally resolved structures. Therefore, after completing the pre-training of the predicted structures, the structure autoencoder is further fine-tuned using protein chains from the experimentally resolved protein structure database.
[0187] In one embodiment, individual protein chains are extracted from monomeric structures and multimeric structures with an oligomeric state of no more than 10 residues from an experimentally analyzed protein database. Further requirements include a protein chain length between 50 and 256 residues, an experimental structural resolution better than 5.0 Å, a ring region residue ratio not exceeding 50%, and a radius of gyration not exceeding a preset threshold. After the above filtering, approximately 110,976 protein chains are obtained in one specific embodiment.
[0188] The fine-tuning process involves approximately 40,000 training steps and employs parallel training with 16 GPUs, each with a batch size of 16.
[0189] The structural autoencoder employs a variational autoencoder as its training objective and utilizes a standard Gaussian distribution as a prior latent variable. In one specific implementation, the weights corresponding to the variational constraints are set to 0.0001. The structural reconstruction loss includes residue sequence cross-entropy loss and squared distance loss corresponding to the coordinates of non-α carbon atoms.
[0190] The structural autoencoder decoder outputs a full-atom coordinate representation in Atom37 format. During training, the effective atoms actually present for different residues are determined based on the real amino acid sequence; during inference, the corresponding effective atoms are determined based on the amino acid type obtained from decoding. The α-carbon coordinates are directly generated explicitly using the flow matching model or the input α-carbon coordinates, without requiring the structural autoencoder to re-predict the α-carbon coordinates.
[0191] In one specific implementation, the structural autoencoder uses the AdamW optimizer with a learning rate of 0.0001 and a weight decay parameter of 0.01. It also uses an exponential moving average to maintain the model parameters, with the exponential moving average coefficient set to 0.999.
[0192] After the structural autoencoder is trained, its parameters are frozen, and a conditional denoising network for stream matching generation is further trained.
[0193] The flow-matching generation model is trained in a product state space consisting of α-carbon coordinates and low-dimensional latent variables per residue. A pre-trained and parameter-frozen structural autoencoder is used to encode the protein structure as residue-by-residue low-dimensional latent variables, while the α-carbon coordinates are explicitly modeled by the flow-matching generation model.
[0194] The conditional denoising network learns the velocity field that evolves from a pre-set noisy initial state to the joint data distribution of the true α-carbon coordinates and latent variables per residue. The training objective of the flow matching model is constructed by comparing the current state evolution velocity predicted by the conditional denoising network with the target velocity corresponding to the pre-set flow matching path.
[0195] During training, target structure conditions, folding category conditions, or other generation conditions are randomly masked according to preset probabilities, enabling the same generation model to learn both conditional and unconditional generation simultaneously. In one implementation, different types of generation conditions are randomly masked independently according to their corresponding preset masking probabilities; these masking probabilities are preset based on the training balance between conditional and unconditional generation capabilities and remain fixed within the same training phase or are adjusted according to a preset training strategy.
[0196] In one implementation, targetless pre-training is performed on monomeric protein data, enabling the conditional denoising network to learn the general ability to recover the overall protein structure from alpha carbon coordinate noise and per-residue latent variable noise.
[0197] The pre-trained individual data is the same as or partially overlaps with the high-quality predicted individual structural data used in the first stage of the structural autoencoder. In one specific embodiment, the individual pre-training of the conditional denoising network performs approximately 540,000 training steps and is trained in parallel using 32 A100-80GB graphics processors, with the Adam optimizer employed.
[0198] In a specific network structure, the single residue representation channel dimension of the conditional denoising network is set to 768, and the residue pair representation channel dimension is set to 256. The network includes 14 Transformer modules with a total of approximately 160 million parameters.
[0199] The conditional denoising network employs an attention mechanism based on residue pair feature bias, rather than a triangular update module. The α-carbon coordinate channel and the latent variable channel for each residue have their own independent sampling times, and the corresponding sampling time information is injected into the conditional denoising network through adaptive layer normalization and output scaling.
[0200] After completing the targetless monomer pre-training, the model is further fine-tuned using protein-binding complex-target complex data, starting from the parameters of the pre-trained monomer model. This stage enables the model to learn to generate the binding protein under given target protein structural conditions, and to learn the overall spatial position, binding direction, and docking relationship of the generated binding protein relative to the target protein.
[0201] In one specific implementation, the combiner-target conditional fine-tuning performs approximately 290,000 training steps and is conducted in parallel using 96 A100-80GB graphics processors, with the optimizer being Adam.
[0202] The training data consists of a mixture of synthetic dimer structure data and experimentally resolved protein complex structure data in a predetermined ratio. In one specific embodiment, the sampling ratio is set to 8:2.
[0203] The synthetic dimer data is constructed from a database of predicted protein structures with domain annotations. In one embodiment, the predicted protein structures are restricted to a preset subset of sequence similarity clusters. In one specific embodiment, the set of structures clustered by 50% sequence similarity corresponds to approximately 47,180,623 structures and 77,743,546 protein chains.
[0204] Subsequently, candidate dimers that meet the interfacial contact conditions are extracted from the structural data. In one specific embodiment, it is required that each of the two chains constituting the dimer has at least four residues that form an α-carbon atom contact with the other chain at a distance of no more than 10 angstroms. After this process, approximately 123,606,001 candidate dimers are obtained.
[0205] Furthermore, both chains are required to have predefined hierarchical domain annotations. In one specific implementation, both chains are required to have CAT-level annotations in the CATH structural classification system, resulting in approximately 10,089,503 candidate dimers after this filtering.
[0206] Subsequently, candidate dimers are clustered into multimer structures based on overall structural similarity, chain-level structural similarity, and interface structural similarity. In one specific implementation, an overall clustering threshold of 0.6, a chain-level TM similarity threshold of 0.7, and an interface local structural similarity threshold of 0.3 are used.
[0207] After the above structural clustering, approximately 3,556,223 structural clusters were obtained, including approximately 587,687 non-singleton clusters and approximately 2,968,536 singleton clusters.
[0208] Further quality filtering is performed based on the complex interface length, interface prediction error, and interface structure prediction confidence level. In one specific embodiment, only candidate dimers with an interface length greater than 10, an interface prediction error less than 10, and an interface structure prediction confidence level greater than 70 are retained.
[0209] After the above filtering, approximately 510,454 representative structure clusters were obtained, corresponding to approximately 7,112,609 original candidate data. During actual training, only representative structures of each structure cluster were used to reduce the duplication of highly similar training samples.
[0210] For experimental resolution of protein complex data, multi-level quality filtering is also performed. In one implementation, the first level of filtering requires that the length of the protein chain to be formed into the complex be between 50 and 250 residues, and that the target protein chain be at least 50 residues long; the second level of filtering requires that the resolution of the experimentally resolved structure be better than 5 angstroms; the third level of filtering uses a pre-trained complex structure prediction model to re-predict the structure of the candidate complexes, and performs quality screening based on interface prediction error, local confidence of the complex interface, and interface prediction TM score.
[0211] In one specific implementation, only complexes with an interface prediction error of no more than 10 Å, a complex interface local prediction confidence of no less than 0.8, an interface prediction TM score of no less than 0.5, and at least one predicted interface residue under an 8 Å distance cutoff condition are retained.
[0212] Through the above filtering, approximately 45,856 experimentally analyzed protein complex training samples were obtained. The complex structure prediction model was only used as a training data quality filtering tool, while the actual target structure used during the training of the stream matching model was still the original complex structure obtained from the experimental analysis.
[0213] For each real protein complex training sample, the α-carbon coordinates of the real conjugate protein are obtained, and the corresponding target per-residue latent variable is obtained based on the real protein structure using a parameter-frozen structural autoencoder.
[0214] Subsequently, the initial state of the α-carbon coordinate and the initial state of the latent variable per residue are sampled from a preset noise distribution. In one embodiment, the initial noise of the two channels adopts a standard normal distribution.
[0215] Based on the generation time of the current random sampling, the real target state and the initial noise state are combined according to the preset flow matching path to construct the intermediate state of α carbon coordinates and the intermediate state of latent variable per residue during the training process.
[0216] In one implementation, the preset flow matching path is constructed by continuous interpolation between the initial noise state and the true target state. For a generation time obtained through random sampling, the contribution ratios of the initial noise state and the true target state in the current intermediate state are determined according to the generation progress represented by that generation time. The closer the sampling time is to the initial generation end, the closer the intermediate state is to the initial noise state; the closer the sampling time is to the end generation end, the closer the intermediate state is to the true target state. The α-carbon coordinate channel and the per-residue latent variable channel construct intermediate states according to their respective sampling times.
[0217] During training, the direction of state change corresponding to the evolution from the initial noisy state to the true target state serves as the supervision target, enabling the conditional denoising network to predict the subsequent evolution direction based on the current intermediate state, sampling time, and generation conditions. By repeatedly performing the above training on different training samples and at different sampling times, the conditional denoising network learns to gradually recover the protein backbone, local residue structure, and spatial positional relationship of the binding organism relative to the target from a random initial state.
[0218] In the α-carbon coordinate channel, an overall translational perturbation is added to the initial α-carbon coordinate noise to enable the model to further learn the translational relationship between the binding agent and the target protein.
[0219] The conditional denoising network predicts the evolution rate of the α-carbon coordinate state and the state of hidden variables per residue, respectively. By minimizing the velocity prediction error of the two channels simultaneously, it learns the joint generation path from the noise state to the real combined structure state and the real state of hidden variables per residue.
[0220] The sampling times for the α-carbon coordinate channel and the per-residue latent variable channel are independent of each other. For example, both channels are sampled uniformly within the entire generation time interval with a probability of about 2%, and sampled according to their respective preset Beta distributions for the remaining approximately 98% of the time.
[0221] The alpha carbon coordinate channel uses a Beta distribution that favors larger time values, while the per-residue latent variable channel uses a Beta distribution that favors smaller time values. This results in a higher probability of time combinations during training where the alpha carbon coordinate generation progresses ahead of the per-residue latent variable generation progress, thus matching the relatively fast integral scheduling method used for the alpha carbon coordinate channel during the inference phase.
[0222] The Beta distribution is determined by a first shape parameter and a second shape parameter. In one embodiment, in the Beta distribution corresponding to the α-carbon coordinate channel, the first shape parameter is greater than the second shape parameter, and both are greater than 0, so that the sampling time of the α-carbon coordinate channel tends to take the larger time value corresponding to the later stage of the generation process; in the Beta distribution corresponding to the per-residue latent variable channel, the first shape parameter is less than the second shape parameter, and both are greater than 0, so that the sampling time of the per-residue latent variable channel tends to take the smaller time value corresponding to the earlier stage of the generation process. In a specific embodiment, the first shape parameter and the second shape parameter corresponding to the α-carbon coordinate channel are set to 2 and 1, respectively, and the first shape parameter and the second shape parameter corresponding to the per-residue latent variable channel are set to 1 and 2, respectively. The above parameters are only examples and can be adjusted according to the generation progress, convergence characteristics, and training needs of the α-carbon coordinate channel and the per-residue latent variable channel.
[0223] In a further embodiment, an independent training branch is established starting from the same targetless monomer pre-trained model parameters, and fine-tuned using synthetic dimer data and fold category labels, thereby obtaining a combined generation model that supports preset fold category guidance.
[0224] In one specific implementation, this independent training branch performs approximately 200,000 training steps using training data containing only synthetic dimer data and CAT fold category labels, and utilizes 96 A100 graphics processors. This training branch is used for the controlled generation of β-sheets, α-helices, or other preset fold categories, but does not constitute an essential component of the master generation model for nanobody design.
[0225] In the fine-tuning stage for nanobody-antigen complexes, the pre-trained generative model is further fine-tuned using nanobody-antigen complex structural data, while keeping the structural autoencoder parameters frozen throughout. Full-parameter fine-tuning is employed for the generative backbone; low-rank adaptation fine-tuning is also used, freezing most parameters of the generative backbone and updating only the low-rank adaptation module of the attention layer and the conditional construction, initial representation construction, or paired feature construction modules, thus reducing memory and training overhead.
[0226] The target state corresponding to the real training samples includes the target α-carbon coordinates of each residue of the nanobody and the corresponding latent variables per residue. The target α-carbon coordinates are derived from the real three-dimensional structure in the training data, and the latent variables per residue are encoded by a pre-trained, parameter-frozen structural autoencoder.
[0227] The initial state is obtained through random sampling. In one specific implementation, the initial state of the α-carbon coordinate is obtained by zero-mean isotropic Gaussian random sampling, and the initial state of the latent variable for each residue is obtained by Gaussian random sampling consistent with the statistical distribution of the latent space of the structural autoencoder.
[0228] During training, continuous intermediate states are constructed between the initial state and the target state based on the current sampling time. The conditional denoising network receives the current intermediate state, sampling time, and joint generation conditions as input, and predicts the velocity field corresponding to the α-carbon coordinate state and the hidden variable state per residue, respectively.
[0229] The joint generation conditions include at least the three-dimensional structure of the target antigen, the humanized nanobody framework, epitope hotspot information, and the length of the complementarity-determining region slot. The target antigen structure remains fixed throughout the training process and is only used as conditional information in velocity prediction, not as a state to be generated in the update.
[0230] Different supervision weights are used for the frame region and complementarity-determining region. The complementarity-determining region participates fully in coordinate and latent variable supervision, focusing on learning conformational changes at the antigen-binding interface. The frame region participates in coordinate supervision, but its supervision weight is reduced to avoid the frame loss accounting for an excessive proportion of the total loss due to the large number of frame residues.
[0231] In one specific implementation, the α-carbon coordinate loss weight in the frame region is set to 0.25, and the complementarity determination region uses a weight of 1. Each residue latent variable channel has a regional weight independent of the α-carbon coordinate channel. In another specific implementation, the latent variables per residue in the frame region and the complementarity determination region use the same weight, i.e., the latent variable weight in the frame region is set to 1.0.
[0232] The velocity prediction error corresponding to the α-carbon coordinate channel and the velocity prediction error corresponding to the per-residue latent variable channel together constitute the flow matching training objective. In one implementation, channel-level weights are set for the α-carbon coordinate channel and the per-residue latent variable channel, and the corresponding supervision contribution is further determined by combining the region weights corresponding to the frame region and the complementary decision region within each channel. The channel-level weights are pre-set according to the numerical scale of the loss of the two channels, the convergence status, and the needs of the training task, so that both the α-carbon coordinate generation capability and the per-residue latent variable generation capability are effectively trained.
[0233] In another implementation of the nanobody-specific fine-tuning method, the α-carbon coordinate loss term of the framework region is down-weighted relative to the complementarity determination region and docking pose loss term, with a weight of 0.5. The above weights are non-limiting embodiments and can be adjusted according to the composition of the training data and the generation task.
[0234] During the training phase, nanobody chains in the training samples are identified, and the locations of complementarity-determining regions are determined based on the sequence information, numbering information, or regional annotations of CDR1, CDR2, and CDR3.
[0235] Residues in the nanobody chain that do not belong to the complementarity-determining region were identified as framework region residues, and the N, CA, C and O backbone atoms corresponding to the framework region residues were selected as framework motifs.
[0236] Based on the frame motif, information such as frame main chain coordinates, frame atom masks, frame residue types, and frame residue position masks are obtained and used to construct humanized frame conditions for the input condition denoising network.
[0237] If the true absolute coordinates of the framework motifs in the training complex relative to the target antigen are directly used as the conditional input, the condition can directly carry the true nanobody-antigen docking pose, enabling the conditional denoising network to complete training by replicating the known pose, without having to fully learn to determine the docking pose based on the target antigen structure, epitope hotspots, and the internal shape of the framework.
[0238] For each nanobody-antigen complex training sample, the corresponding protein chain that forms a complex with the nanobody chain is identified as the target antigen. The residue type, main chain coordinates, and spatial structural features of the target antigen are retained as target antigen structural conditions. During training, the target antigen structure remains fixed and is not used as a variable to be generated in the flow matching state update.
[0239] Epitope hotspot information for the training phase is determined based on the actual binding interface between the nanobody and the target antigen in the training samples. In one embodiment, antigen residues within a preset spatial distance range from the complementarity-determining region (CDR) residues of the nanobody are marked as epitope-related residues, and an epitope hotspot mask is constructed accordingly. Simultaneously, the actual number of residues in each CDR is counted based on the start and end positions of CDR1, CDR2, and CDR3, and the corresponding length is used as the CDR slot length condition. Thus, each training sample forms target antigen structure conditions, epitope hotspot conditions, framework conditions, and CDR slot length conditions corresponding to the inference phase.
[0240] Therefore, in a preferred embodiment, a random rigid body reconstruction or a random SE(3) transformation is performed on the frame motif as a conditional input.
[0241] The geometric center of the framework motif is determined and centered based on the coordinates of the effective framework main chain atoms. Then, random three-dimensional rotations and random spatial translations are applied to the centered framework motif.
[0242] Random rotation is sampled uniformly from a three-dimensional rotation space. Random translation is sampled from a preset probability distribution. In one specific embodiment, the random translation vector is sampled from a zero-mean Gaussian distribution, with a standard deviation of 1.0 nanometers for each coordinate direction.
[0243] The aforementioned random rigid body reconstruction only applies to the frame motif coordinates, which serve as conditional inputs, without altering the true, intact nanobody structure that serves as the training target for flow matching, nor does it change the true docking pose of the nanobody relative to the target antigen in the training samples.
[0244] Therefore, the humanized framework in the input conditions retains the internal geometry, residue types, and connection relationships between framework residues, but does not directly carry the true absolute docking position and spatial orientation, thus forcing the model to learn the overall docking relationship based on the target antigen structure, epitope hotspots, and the internal structure of the humanized framework.
[0245] To alleviate the problems of insufficient diversity of interface structures and leakage of homologous samples across sets, the training data is clustered according to the similarity of nanobody sequences, complementarity-determining regions, antigens or interface structures, and the training set and validation set are divided accordingly.
[0246] Low-frequency interface clusters are weighted to increase the training contribution of rare interface configurations. To ensure that the design targeting the antigen to be bound is a de novo design, complexes homologous to or belonging to the same family as the target antigen to be bound are excluded from the training data.
[0247] After model training is complete, the inference phase of de novo nanobody design begins. During the inference phase, instead of retraining to generate the backbone, flow-matching sampling is performed under joint generation constraints. A humanized framework is maintained through a frame latch mechanism, and sequential rewards guide the optimization of sampling branches.
[0248] Based on the humanized nanobody framework template to be used and the slot lengths of CDR1, CDR2 and CDR3, multiple framework fragments are placed at the preset index positions of the complete nanobody sequence to be generated, and corresponding complementary determination regions are set between adjacent framework fragments to generate slots.
[0249] The positions of the framework region residues are marked using a framework residue mask, and the generation slots corresponding to CDR1, CDR2, and CDR3 are not part of the framework residue mask. In one specific embodiment, the humanized nanobody framework template includes 89 framework residues.
[0250] In the implementation method employing free docking pose search, the humanized frame motif, which serves as the conditional input, is self-centered so that its geometric center is located at a preset origin. Furthermore, random rotations and random translations are applied to the centered frame motif.
[0251] Through the above processing, the humanized frame used as input condition is mainly used to represent the internal geometry of the frame, without pre-defining the absolute position and spatial orientation of the frame in the target antigen coordinate system, thus preserving degrees of freedom for subsequent overall docking pose search.
[0252] Before inference begins, a pre-trained and parameter-frozen structural autoencoder is used to encode the humanized frame template, thereby obtaining the target latent variables corresponding to each residue in the frame region.
[0253] Considering that slots CDR1, CDR2, and CDR3 in the complete sequence to be generated are zero-filled or other placeholders at the start of inference, directly inputting the complete sequence containing the placeholder regions into the structural autoencoder can interfere with the local neighborhood modeling and attention calculation of the structural autoencoder.
[0254] Therefore, in one implementation, based on the frame residue mask, only the actual frame residues present in each sample are collected to form a compact encoded input containing only frame region residues.
[0255] The compact coding input includes the frame main chain coordinates, the frame main chain atomic mask, the frame residue type, and the effective residue mask.
[0256] The structural autoencoder outputs the corresponding latent variable distribution parameters for each frame residue, and selects the mean of the latent variable distribution as the deterministic frame target latent variable.
[0257] After obtaining the frame target latent variables, the compact frame target latent variables are mapped residue by residue back to the corresponding positions in the full-length per-residue latent variable tensor based on the frame index position corresponding to each sample.
[0258] Because different generated samples use different CDR1, CDR2, and CDR3 slot lengths, the index positions of the frame fragments in the complete sequence to be generated can also differ between samples. Accordingly, the collection of frame residues, the encoding by the structural autoencoder, and the remapping of the target latent variables are performed independently for each sample.
[0259] To ensure that the humanized nanobody framework region maintains the preset humanized framework folding structure during flow matching sampling, while allowing the overall docking pose of the nanobody relative to the target antigen to change, in a preferred embodiment, framework latching constraints are performed at multiple or all numerical integration time steps of the preset sampling trajectory.
[0260] In this specification, the trajectory pinning constraint acting on the latent variable channel of each residue in the frame region and the rigid body constraint acting on the α carbon coordinate channel of the frame region are collectively referred to as the frame latching mechanism.
[0261] At the start of sampling, the initial latent variables corresponding to the frame regions in the current candidate samples are saved, and the initial latent variables of the frame and the corresponding candidate generation states are maintained in a one-to-one correspondence throughout the main sampling process, the branch sampling process, and the predictive final state trial calculation.
[0262] In a preferred embodiment, a linear interpolation path is employed. Before each invocation of the conditional denoising network, the latent variables of the frame region are set to the interpolation state between the initial latent variables of the frame and the target latent variables of the frame, based on the current sampling time of the latent variable channel per residue.
[0263] In the early stages of sampling, the latent variables in the frame region are closer to the initial latent variables of the frame. As the sampling time progresses, the latent variables in the frame region gradually move closer to the target latent variables obtained based on the humanized frame template. When the sampling reaches its end, the latent variables in the frame region are set as the target latent variables of the frame.
[0264] The latent variables at the corresponding positions of CDR1, CDR2, and CDR3 are not subjected to the aforementioned framework latent variable replacement, but continue to be predicted by the conditional denoising network and updated by the numerical integrator. Therefore, the complementarity determination region can maintain a relatively free sequence and local structure search capability during the generation process.
[0265] Since the latent variables in the frame region are reset to the positions corresponding to the preset trajectory before each network computation, even if the previous numerical integration time step or random sampling process causes the latent variables in the frame to drift, it will be corrected before the next network computation.
[0266] At the end of the complete sampling, frame latent variable pinning is performed again to make the final latent variable of the frame region exactly equal to the target latent variable obtained by encoding the humanized frame template.
[0267] In another implementation, the trajectory of the frame latent variables is modulated using a nonlinear time modulation method consistent with the training path of the flow matching model. In yet another implementation, the initial frame latent variables are directly set as the target frame latent variables, ensuring that the frame region latent variables remain constant throughout the sampling process.
[0268] Therefore, the latent variable constraints for each residue in the frame region adopt linear interpolation trajectories, nonlinear interpolation trajectories, or constant target latent variable trajectories.
[0269] Frame latent variable pinning directly constrains the latent variable representation obtained by the structural autoencoder based on the humanized frame template. Because the structural autoencoder uses a lossy encoding method, even if the latent variables in the frame region are completely identical to the target latent variables, it does not necessarily mean that the type of every frame residue and the coordinates of every side chain atom obtained by the final decoding are completely identical to each item in the humanized frame template.
[0270] Therefore, in implementations that require precise preservation of the humanized framework amino acid sequence, after the final structure decoding, the framework region residue types are further replaced with the residue types corresponding to the humanized framework template based on the framework residue mask.
[0271] In the humanized framework template, the three-dimensional coordinates of the α-carbon atoms of each framework region residue are used as the framework template coordinates to characterize the spatial shape of the main chain backbone of the humanized nanobody framework.
[0272] At each sampling time step, the latent variable trajectory pinning of the frame region is completed, and the current joint generation state, the sampling time corresponding to the two channels, and the joint generation conditions are input into the conditional denoising network.
[0273] The conditional denoising network outputs the velocity fields corresponding to the α carbon coordinate channel and the latent variable channel for each residue, and also outputs other network results that can be further converted into clean final state predictions.
[0274] After obtaining the clean final state prediction of the α carbon coordinates corresponding to the current time step, the predicted final state α carbon coordinates of each residue in the frame region are extracted based on the set of frame residue positions.
[0275] Through the aforementioned Kabsch rigid body alignment process, based on the correspondence between the humanized nanobody framework template and the current predicted final state coordinates of the framework, the rigid body rotation and translation transformation that optimally coincides with the template is determined. This corrects the overall spatial position and orientation of the framework region without altering the relative geometric relationships of the residues within the framework. Furthermore, the Kabsch rigid body alignment constraint and the latent variable trajectory pinning for each residue in the framework region together constitute a framework latching mechanism. This allows the sequence and local structural features of the framework region to continuously evolve towards the preset humanized framework state. Rigid body constraints maintain the geometry of the framework's internal skeleton while not locking the absolute spatial position of the nanobody relative to the target antigen, enabling the nanobody as a whole to still search for different docking poses through rotation and translation. This reduces the probability of non-physical stretching, local distortion, internal folding damage, and sequence drift occurring in the framework region during sampling. It preserves the integrity and consistency of the humanized framework structure while retaining the overall docking pose search freedom, thereby improving the structural stability, framework compatibility, and reliability of the generated results of the candidate nanobody. It also provides a stable structural foundation for the conformational generation of the complementarity-determining region and the optimization of the binding interface.
[0276] The optimal translation vector is determined based on the spatial relationship between the geometric center of the humanized frame template and the final geometric center of the predicted frame.
[0277] By performing rigid body transformation on the humanized frame template using the optimal rotation matrix and optimal translation vector, a rigid frame prediction final state that matches the overall nanoantibody docking position and spatial orientation predicted by the current model is obtained.
[0278] The coordinates corresponding to the frame region positions in the clean final state of α-carbon coordinates predicted by the conditional denoising network are replaced with the humanized frame template coordinates after rigid body transformation, while the original network predictions corresponding to the positions of CDR1, CDR2, and CDR3 are retained, thus forming the rigid body clean final state of α-carbon coordinates.
[0279] The aforementioned replacement applies to the clean final state predicted by the model, rather than directly fixing the frame region in the current noisy sampling state to a specific absolute position on the humanized frame template. Therefore, this process primarily constrains the internal geometry of the frame region, without pre-fixing the overall position and orientation of the nanobody relative to the target antigen.
[0280] After obtaining the rigid clean final state, the α carbon coordinate velocity corresponding to the position of the frame residue is re-determined based on the difference between the current frame region coordinate state and the rigid frame clean final state.
[0281] In one implementation, the subsequent evolution velocity of the frame region is calculated based on the spatial difference between the current state of the frame region and the final state of rigid body cleaning, as well as the current remaining sampling time, and this velocity is used to replace the original α carbon coordinate velocity of the frame region output by the conditional denoising network.
[0282] For the complementary decision region positions corresponding to CDR1, CDR2, and CDR3, the coordinate velocity of the original output of the conditional denoising network or the coordinate velocity adjusted by other guiding methods will continue to be used.
[0283] Through the above processing, the numerical integrator can continuously guide the frame region to a clean final state that maintains the internal geometry of the humanized frame template without fixing the absolute docking pose of the frame.
[0284] After obtaining the α-carbon coordinate velocity and the hidden variable velocity per residue after the rigid body frame processing, the current generation state is updated according to the preset numerical integration method.
[0285] The numerical integration method employs Euler integration, as well as other numerical integration methods suitable for flow-matched sampling. During integration, random perturbations are added to the α-carbon coordinate channel or the latent variable channel per residue as needed to maintain structural diversity among different sampling branches. A completely deterministic integration method is also used for any channel.
[0286] Since the predicted final state Kabsch rigid body projection mainly acts on the clean final state and corresponding velocity predicted by the model, the intermediate noisy state after single-valued integration still has a certain degree of internal geometric deviation within the frame. This deviation is continuously corrected by the rigid clean final state and corresponding velocity field in subsequent sampling time steps.
[0287] When the complete master sampling trajectory or a partial sampling trajectory initiated from an intermediate checkpoint reaches the output endpoint, terminal frame projection is also performed.
[0288] In the terminal frame projection, the humanized frame template is aligned to the frame region α carbon coordinates in the endpoint state using the Kabsch rigid body alignment method, and the aligned humanized frame template coordinates are used to replace the frame region α carbon coordinates in the endpoint state.
[0289] Simultaneously, the implicit variable pinning of the frame is performed again. Through terminal frame projection, the α carbon coordinates of the frame region are made to accurately maintain the internal pairwise distances and rigid body folding geometry corresponding to the humanized frame template.
[0290] In another implementation, after the state update is completed in one or more numerical integration time steps, Kabsch rigid body projection is directly performed on the temporary α carbon coordinate state obtained by the integrator.
[0291] Specifically, the α-carbon coordinates corresponding to the frame region residues are extracted from the integrated temporary α-carbon coordinate state, and the optimal rotation and translation for aligning the humanized frame template to the temporary frame coordinates are calculated.
[0292] Subsequently, the α carbon coordinates corresponding to the frame region in the temporary state are replaced with the humanized frame template coordinates after optimal rigid body transformation, while keeping the α carbon coordinates corresponding to the positions of CDR1, CDR2, and CDR3 unchanged.
[0293] Therefore, after each integration and state projection, the internal geometry of the frame region is accurately restored to the internal geometry corresponding to the humanized frame template.
[0294] The integrated state projection can be used alone or in combination with one or more of the following: predicted final state Kabsch rigid body projection, frame coordinate velocity rewriting, and terminal frame projection.
[0295] In another application scenario, if the humanized framework template has been pre-connected to the target antigen and the two are in the same coordinate system, then the absolute coordinate latching method is used.
[0296] In the absolute coordinate latching mode, the α carbon coordinates of the frame region are gradually pinned to the absolute coordinates of the humanized frame template in the target antigen coordinate system along a preset trajectory.
[0297] This method not only fixes the internal geometry of the framework, but also the overall docking pose of the framework relative to the target antigen, thus making it suitable for applications where it is not necessary to search for the overall docking position and orientation of the nanobody.
[0298] For implementations that require free searching of the overall docking pose of the nanobody-antigen, it is preferable not to use an absolute coordinate latching method.
[0299] Through the aforementioned framework latching mechanism, the structural constraints of the humanized nanobody framework region are relatively separated from the free generation of the complementarity-determining region.
[0300] The α-carbon coordinates of the frame region are continuously constrained by the internal geometry of the rigid body of the humanized frame template; the latent variables of each residue in the frame region are pinned according to the target latent variable trajectory determined by the humanized frame template; the positions corresponding to CDR1, CDR2 and CDR3 neither participate in the frame α-carbon coordinate replacement nor perform frame target latent variable pinning.
[0301] Therefore, the α-carbon coordinate state and the hidden variable state per residue of the complementarity-determining region can still evolve freely under the joint constraints of the target antigen structure condition, epitope hotspot condition, humanized framework connection boundary, and complementarity-determining region slot length condition.
[0302] The model is thus able to search for different complementarity-determining region (CDR) main chain conformations, side chain conformations, amino acid compositions, and binding conformations between the CDR and the target antigen.
[0303] For the implementation method using free docking pose search, the rigid body rotation and translation parameters corresponding to the humanized frame template are re-determined based on the final state of the frame predicted by the conditional denoising network at each sampling time step, rather than based on the absolute position of the frame template at the initial input.
[0304] Therefore, the humanized framework can perform rotation and translation around the target antigen as a whole, searching for different nanobody-antigen docking poses while maintaining its internal folded structure.
[0305] When using beam search, parallel branch sampling, forward guided sampling, or initiating predictive final state trials from intermediate checkpoints, the conditional information related to frame latches should be kept synchronized with the candidate generation state.
[0306] The frame latch-related information includes frame residue masks, frame template coordinates, frame target latent variables, frame initial latent variables or frame initial noise, and the currently used rigid body projection mode.
[0307] When the candidate generation state is copied, tiled, filtered, eliminated, or reordered, the frame latch data corresponding to the candidate state is synchronously updated with the same index, so that each candidate branch is always associated with the correct humanized frame constraint information.
[0308] The partial sampling process corresponding to each candidate branch adopts the same framework latent variable trajectory pinning, prediction final state Kabsch rigid body projection, and framework coordinate velocity rewriting method as the main sampling process.
[0309] When the predictive final state trial ends or the corresponding part of the sampling trajectory reaches its endpoint, the terminal frame projection is performed again.
[0310] This ensures that the predictive final state candidates used to calculate the antibody-specific reward signal at intermediate checkpoints have consistent frame constraint semantics with the final output candidates, reducing evaluation bias caused by using different frame processing methods in the trial calculation process and the main sampling process.
[0311] The frame pose deleaking during the training phase and the frame latching during the inference phase have different functions, but they work together.
[0312] During the training phase, a random SE(3) transformation is applied to the humanized framework as a conditional input to avoid the conditional denoising network directly reading the real docking pose from the absolute coordinates of the framework. This encourages the model to learn to infer the nanobody-antigen docking relationship based on the target structure, epitope hotspots and the internal structure of the framework.
[0313] During the inference phase, one or more of the following methods are used: frame latent variable trajectory pinning, predicted final state Kabsch rigid body projection, frame coordinate velocity rewriting, post-integration state projection, and terminal frame projection. These methods reduce the probability of non-physical stretching, local distortion, frame folding damage, or deviation from the preset humanized frame template in the frame area.
[0314] Therefore, the training phase primarily addresses how the model learns docking relationships, while the inference phase focuses on maintaining stability within the framework while freely searching for docking poses. Simultaneously, the complementarity-determining region retains its structural and sequence generation degrees of freedom, ensuring that the nanobody as a whole still possesses the ability to search for docking poses relative to the target antigen.
[0315] Multiple intermediate checkpoints are set in the main sampling trajectory of the flow matching. At each intermediate checkpoint, the joint generation state corresponding to the current parallel sampling branch is saved, and predictive final state sampling is performed from the state to obtain the corresponding candidate nanobody-antigen complex.
[0316] In a preferred implementation of the free docking pose search, the frame latch employs a combined process: frame latent variable trajectory pinning is performed before each call to the conditional denoising network; Kabsch rigid body projection is performed based on the frame clean final state predicted by the conditional denoising network, and the α-carbon coordinate velocity of the frame region is re-determined based on the rigid clean final state; then, numerical integration is performed to update the current state; when it is necessary to further reduce the geometrical drift of the intermediate state frame, post-integration state projection is performed after some or all integration time steps; when the complete sampled trajectory or predictive final state trial reaches the endpoint, terminal frame projection is performed. The post-integration state projection is a selectively reinforced constraint step and is not necessarily performed simultaneously with the predicted final state Kabsch rigid body projection and frame coordinate velocity rewriting. When the task requires searching for the overall docking pose of the nanobody relative to the target antigen, the above-mentioned free pose frame latch method is used instead of absolute coordinate latch; the absolute coordinate latch method is used only when the target relative pose between the humanized frame and the target antigen has been predetermined and there is no need to continue searching for the overall docking position and orientation.
[0317] The predictive final state candidates are evaluated using complex structure prediction models or other evaluation models, and antibody-specific reward signals are constructed based on one or more evaluation indicators.
[0318] The branch weights and selection probabilities are determined based on the antibody-specific reward signals of each parallel sampling branch, and probabilistic resampling is performed according to the selection probabilities.
[0319] The probabilistic resampling is implemented using the Feynman-Kats sequential particle update method.
[0320] The resampled branch returns to the corresponding intermediate checkpoint and continues to perform subsequent sampling along the main sampling trajectory.
[0321] By repeatedly performing predictive final state evaluation and probabilistic resampling at multiple intermediate checkpoints, the reward signal participates in the allocation of sampling resources and trajectory guidance during the generation process, thereby enabling high-reward branches to obtain more subsequent computational resources and reducing the continuous occupation of sampling budget by low-quality branches.
[0322] At the sampling endpoint, the actual generated candidate nanobody-antigen complexes are evaluated.
[0323] In some embodiments, candidates are subjected to joint screening of multiple indicators, requiring that the interface prediction score, the self-consistency bias of the binding skeleton, and the prediction confidence of the complex simultaneously meet preset conditions.
[0324] The threshold range for the interface prediction score ipTM is 0.80 to 0.90, and in one embodiment it is 0.85; the threshold range for the self-consistent root mean square deviation of the binding skeleton scRMSD is 1.0 Å to 2.0 Å, and in one embodiment it is 1.5 Å; the threshold range for the complex prediction confidence score pLDDT is 0.85 to 0.95, and in one embodiment it is 0.90.
[0325] The self-consistent root mean square deviation of the conjugate backbone is defined as the root mean square deviation of backbone atoms between the structure obtained by the independent folding prediction of the candidate nanoantibody sequence and the flow-matched generated structure.
[0326] The candidates selected through multi-index screening are further subjected to structural redundancy removal. Candidates with a root mean square deviation of the α-carbon backbone between designed nanobodies less than a preset threshold are grouped into the same structural cluster. In one embodiment, the threshold is 1.0 angstrom.
[0327] The number of unique combinations is counted, and the ratio of the number of unique combinations to the total number of generated candidates is used to calculate the success rate of unique combinations.
[0328] Sort the results in descending order by composite reward value or interface prediction score, and output a result file containing sequence number, nanobody sequence, interface prediction score, conjugate backbone self-consistency bias, complex prediction confidence, each reward component, model version number, and screening timestamp.
[0329] In one implementation, the interface prediction™ score output by the Boltz-2 complex structure prediction model is used to evaluate candidate nanobody-antigen complexes.
[0330] When the known effective complex is a positive example, and the decoy complex consisting of the incorrect target, the scrambled complementarity determination region 3 sequence, and the incorrect epitope is a negative example, the area under the receiver operating characteristic curve of the Interface Prediction™ score on the combined discrimination of positive examples and all decoys is approximately 0.85, indicating that this indicator can provide a discriminative computational evaluation basis for inference stage rewards and multi-indicator screening.
[0331] In a set of non-limiting embodiments, interleukin 33 was used as the target antigen, and a nanobody framework based on humanized PDB3EAK chain A was used as the generation condition. The de novo nanobody conjugate was designed using the aforementioned partial latent variable flow matching generation model.
[0332] In this embodiment, rigid frame docking sampling is performed on the humanized framework and the interleukin-33 target. The main sampling process consists of approximately 400 steps, and Feynman-Kats sequential resampling optimization is performed at steps 100, 200, and 300.
[0333] The interface prediction™ score output by the Boltz-2 complex structure prediction model is used as a reward, with both the number of branches and the branch width being 4, and the reward temperature being 0.05.
[0334] From 32 initial designs, 128 candidate nanobody-antigen complexes were obtained through branching expansion.
[0335] Based on complex structure prediction and consensus scores for multiple diffusion samples of each candidate, the average interface prediction TM score for 128 candidates was approximately 0.51, the median was approximately 0.49, and the maximum was approximately 0.87; the average complex prediction TM score was approximately 0.72; the average interface pLDDT score was approximately 0.73; the average conjugate pLDDT score was approximately 0.90; the average complex pLDDT score was approximately 0.89; and the average conjugate framework self-consistency root mean square deviation was approximately 1.16 Å, with a median of approximately 0.94 Å.
[0336] The three criteria of interface prediction score not less than 0.85, complex pLDDT not less than 0.90, and conjugate scRMSD not greater than 1.5 angstroms were used for parallel screening, and four candidates were found to meet all three criteria.
[0337] Further structural redundancy was removed by ensuring that the root mean square deviation of the α-carbon skeleton between the designed bonds was less than 1.0 angstrom, resulting in three unique bonds.
[0338] With 128 generated candidates as the denominator, the success rate of calculating the unique combination is approximately 2.3%.
[0339] In contrast, even after multiple rounds of complementary decision region sequence redesign, the success rate of generating the Geo-Flowv3 generative model for the same target is only about 0.6%.
[0340] Without additional complementary decision region sequence redesign, this application achieves a unique combination computation success rate of approximately 2.3% after one frame conditional generation, inference stage reward optimization, and multi-index screening. This demonstrates that this application can provide more candidates for experimental verification under the same computing power budget. The above figures are for illustrative purposes only and do not constitute a limitation on the scope of protection of this application.
[0341] See Figure 2 This application also provides a de novo design device for nanobody conjugates based on sequential reward guidance during the inference phase. The device is implemented via software, hardware, or a combination of both, and includes an information acquisition module for acquiring the three-dimensional structural information of the target antigen to be bound, the epitope hotspot information of the target antigen, the framework region information of the humanized nanobody, and the slot length information of the complementarity determination region. The generation condition construction module is used to construct generation conditions based on the three-dimensional structural information of the target antigen, the epitope hotspot information, the framework region information of the humanized nanobody, and the slot length information of the complementarity determination region. The parallel sampling module is used to sample multiple parallel sampling branches along a preset sampling trajectory under the constraints of the generation conditions using a flow matching generation model, thereby generating the complementarity determination region of the nanobody and the docking pose of the nanobody relative to the target antigen. The checkpoint setting module is used to set at least two intermediate checkpoints before the preset sampling trajectory reaches the end point; A reward guidance module is used to save the generation state of the current parallel sampling branch at each intermediate checkpoint, perform predictive final-state sampling based on the generation state, and obtain the corresponding predictive final-state candidate nanobody sequence and candidate nanobody-antigen complex structure; input the predictive final-state candidate nanobody sequence and the target antigen information into the complex structure prediction model to obtain the re-predicted nanobody-antigen complex structure and corresponding evaluation information, and obtain an antibody-specific reward signal based on at least a partial comparison result between the re-predicted nanobody-antigen complex structure and evaluation information and the predictive final-state candidate nanobody-antigen complex structure; resample the parallel sampling branch according to the antibody-specific reward signal, and cause the resampled sampling branch to return to the corresponding intermediate checkpoint to continue sampling along the preset sampling trajectory. The result determination and output module is used to determine the target candidate nanobody-antigen complex at the end of the preset sampling trajectory based on the antibody-specific reward signal, and output the corresponding nanobody sequence and three-dimensional structure.
[0342] In some implementations, the conditional generation module further includes a frame skeleton projection submodule and a frame latent variable constraint submodule.
[0343] The framework projection submodule is used to project the currently generated framework region skeleton onto the humanized nanobody framework region skeleton template through rigid body alignment based on the Kabsch algorithm, maintaining the preset internal folding structure of the framework region and allowing the nanobody as a whole to adjust its spatial pose relative to the target antigen.
[0344] The framework latent variable constraint submodule is used to fix or constrain the latent variables of each residue corresponding to the framework region during the sampling process, so that the latent variables of each residue corresponding to the framework region evolve towards the target latent variables corresponding to the preset humanized nanobody framework region; in the implementation where the final framework region sequence needs to be strictly consistent with the preset humanized nanobody framework region sequence, after structural decoding, the framework region residue type is set to the residue type corresponding to the preset humanized nanobody framework region according to the framework region residue mask.
[0345] In one implementation, a structural autoencoder is used to encode the input humanized nanobody framework region to obtain target latent variables corresponding to each residue in the framework region. After each state update in the flow-matched sampling, the framework region position is identified based on the framework region residue mask, and the latent variable of each residue at the current position of the framework region is maintained as the corresponding target latent variable, or restricted to the vicinity of the target latent variable; the latent variable of each residue corresponding to the complementarity determination region is not subject to the above-mentioned fixing operation, but continues to be updated according to the prediction results of the conditional denoising network. In this way, the framework region maintains the preset sequence and local structural features, while preserving the sequence and conformation generation degrees of freedom of the complementarity determination region.
[0346] In some implementations, the reward optimization module further includes a trajectory guidance submodule for determining branch weights and selection probabilities based on antibody-specific reward signals of each parallel sampling branch, and performing sequential probabilistic resampling according to the selection probabilities.
[0347] The device also includes an auxiliary storage unit for storing and retrieving parameters of the stream matching generation model, parameters of the complex structure prediction model, conditional configuration, screening threshold, reward evaluation parameters, and model version information.
[0348] This application also provides a computer device. The computer device is a terminal, server, workstation, or cloud computing node, including a processor, memory, network interface, display screen, and input device. These components communicate via a system bus or data communication channel.
[0349] The processor includes a central processing unit, a graphics processing unit, a tensor processor, or other accelerator chips.
[0350] The memory stores the operating system, generation model parameters, conditional configurations, screening thresholds, and computer programs. The network interface is used to communicate with external databases, antibody candidate libraries, or experimental management systems.
[0351] When the processor executes the computer program, it implements the steps of input acquisition, generation condition construction, partial latent variable stream matching sampling, frame latch constraint, sequential reward guidance, multi-index screening, structural redundancy removal, and result output in the method embodiments of this application.
[0352] This application also provides a computer read storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the above-described method.
[0353] The computer read storage medium includes non-volatile storage media and volatile storage media, and is separately disposed from the computer device to facilitate the transfer and deployment of the method described in this application between different computing environments.
[0354] Those skilled in the art will understand that all or part of the processes in the above embodiments are implemented by computer program instructions to related hardware; the above embodiments are only for illustrating this application and should not be construed as limiting the scope of protection. Equivalent substitutions, modifications, or improvements made without departing from the concept of this application should fall within the protection scope of this application.
Claims
1. A de novo design method for nanobody conjugates based on sequential reward guidance during the reasoning stage, characterized in that, include: The three-dimensional structural information of the target antigen to be bound, the epitope hotspot information of the target antigen, the framework region information of the humanized nanobody, and the slot length information of the complementarity-determining region are obtained. The generation conditions are constructed based on the three-dimensional structural information of the target antigen, the epitope hotspot information, the framework region information of the humanized nanobody, and the slot length information of the complementarity-determining region. Using a flow matching generation model, multiple parallel sampling branches are sampled along a preset sampling trajectory under the constraints of the generation conditions to generate the complementarity determination region of the nanobody and the docking pose of the nanobody relative to the target antigen. At least two intermediate checkpoints are set before the preset sampling trajectory reaches its endpoint; Perform a reward-guiding operation at each of the intermediate checkpoints, including: Save the generation state of the current parallel sampling branch; Based on the generated state, predictive final state sampling is performed to obtain the corresponding predictive final state candidate nanobody sequences and candidate nanobody-antigen complex structures; The predicted final-state candidate nanobody sequence and the target antigen information are input into the complex structure prediction model to obtain the re-predicted nanobody-antigen complex structure and corresponding evaluation information. Based on at least a partial comparison between the re-predicted nanobody-antigen complex structure and evaluation information and the predicted final-state candidate nanobody-antigen complex structure, an antibody-specific reward signal is obtained. The parallel sampling branch is resampled according to the antibody-specific reward signal, and the resampled sampling branch returns to the corresponding intermediate checkpoint to continue sampling along the preset sampling trajectory. At the end of the sampling trajectory, the target candidate nanobody-antigen complex is determined based on the antibody-specific reward signal, and the corresponding nanobody sequence and three-dimensional structure are output.
2. The method according to claim 1, characterized in that, The reward guidance operation adopts a sequential trajectory optimization method, repeatedly performing predictive final state sampling, reward evaluation, and sampling branch update at multiple intermediate checkpoints, so that the generation process gradually shifts towards the high reward region during the inference phase. The antibody-specific reward signal is determined based on at least two of the following evaluation metrics: An interface prediction index used to evaluate the reliability of nanobody-antigen binding interfaces; A pose consistency index is used to evaluate the consistency between the generated docking pose and the docking pose re-predicted by the structural prediction model. The epitope contact coverage index is used to evaluate the degree of contact between the complementary determination region and the epitope hotspot space. The evaluation indicators are used to form the antibody-specific reward signal through a weighted summation method.
3. The method according to claim 1, characterized in that, When resampling the parallel sampling branches according to the antibody-specific reward signal, the selection probability of each parallel sampling branch is determined according to the antibody-specific reward signal corresponding to each parallel sampling branch and the preset temperature modulation parameters, and probabilistic resampling is performed according to the selection probability. The temperature modulation parameter is used to adjust the degree of influence of the difference between different antibody-specific reward signals on the selection probability. The temperature modulation parameter gradually decreases as the sampling trajectory progresses; it increases the diversity of sampling branches in the early stage of sampling and increases the retention probability of high-reward sampling branches in the later stage of sampling.
4. The method according to claim 1, characterized in that, The step of constructing generation conditions based on the three-dimensional structural information of the target antigen, the epitope hotspot information, the framework region information of the humanized nanobody, and the slot length information of the complementarity-determining region includes: The three-dimensional structural information of the target antigen is feature-encoded to obtain the structural conditions of the target antigen; Based on the epitope hotspot information, the corresponding hotspot regions in the three-dimensional structure of the target antigen are determined, and epitope hotspot conditions are constructed. At least one of the sequence information and backbone structure information of the humanized nanobody framework region is feature-encoded, and a fixed region mask or a constrained region mask is constructed according to the position of the framework region to obtain the humanized nanobody framework conditions. Based on the start and end boundaries of each complementary decision region and the corresponding slot length information, a complementary decision region generation slot is constructed, and the position boundary and length information of the generation slot are encoded to obtain the complementary decision region slot length condition. The target antigen structure condition, the epitope hotspot condition, the humanized nanobody framework condition, and the complementarity determination region slot length condition are combined to form the joint generation conditions for inputting the flow matching generation model.
5. The method according to claim 1, characterized in that, The stream matching generation model includes: α-carbon coordinate channels used to characterize the spatial framework position of nanobody and the spatial pose of the nanobody relative to the target antigen. Per-residual variable channels used to characterize residue sequence information, side chain information, and local structural information; The α-carbon coordinate channel and the per-residue hidden variable channel are jointly sampled along the preset sampling trajectory, and candidate nanobody sequences and three-dimensional structures are generated through the structure decoding model.
6. The method according to claim 1, characterized in that, The humanized nanobody framework region information includes framework region sequence information and framework region backbone structure information; During the sampling process, the latent variable of each residue corresponding to the constraint frame region evolves to the target latent variable corresponding to the humanized nanobody frame region, and at the sampling endpoint, the generated nanobody frame region sequence is kept consistent with the humanized nanobody frame region sequence. The current generation state is constrained by the framework template of the frame region through rigid body alignment, so that the frame region maintains the preset internal folding structure, while allowing the nanobody as a whole to adjust its spatial pose relative to the target antigen. The constraints on the latent variables of each residue corresponding to the frame region during the sampling process and the constraints on the frame region skeleton through rigid body alignment together constitute the frame latch constraint. The frame latch constraint is executed at multiple or all of the numerical integration time steps of the preset sampling trajectory; Constraining the latent variables of each residue corresponding to the framework region includes: causing the latent variables of each residue corresponding to the framework region to evolve along a preset trajectory toward the target latent variables obtained according to the framework region of the humanized nanobody; Constraining the framework region skeleton by the rigid body alignment method includes: rigidly aligning the framework template of the humanized nanobody framework region with the framework region skeleton in the current generation state, so that the framework region maintains the preset internal skeleton geometry corresponding to the framework template, while allowing the nanobody as a whole to adjust its spatial pose relative to the target antigen.
7. The method according to claim 1, characterized in that, At each intermediate checkpoint, the generation state of the corresponding sampling branch is saved. The generation state includes at least the α-carbon coordinate state, the per-residue latent variable state, and the current sampling time parameter. When the spatial pose of the nanobody relative to the target antigen is represented by independent pose parameters, the generation state also includes rotation and translation parameters used to characterize the spatial pose.
8. A de novo design device for nanoantibody conjugates based on sequential reward guidance during the reasoning stage, characterized in that, include: The information acquisition module is used to acquire the three-dimensional structural information of the target antigen to be bound, the epitope hotspot information of the target antigen, the framework region information of the humanized nanobody, and the slot length information of the complementarity determination region. The generation condition construction module is used to construct generation conditions based on the three-dimensional structural information of the target antigen, the epitope hotspot information, the framework region information of the humanized nanobody, and the slot length information of the complementarity determination region. The parallel sampling module is used to sample multiple parallel sampling branches along a preset sampling trajectory under the constraints of the generation conditions using a flow matching generation model, thereby generating the complementarity determination region of the nanobody and the docking pose of the nanobody relative to the target antigen. The checkpoint setting module is used to set at least two intermediate checkpoints before the preset sampling trajectory reaches the end point; The reward guidance module is used to save the generation state of the current parallel sampling branch at each intermediate checkpoint, and perform predictive final state sampling based on the generation state to obtain the corresponding predictive final state candidate nanobody sequence and candidate nanobody-antigen complex structure. The predicted final-state candidate nanobody sequence and the target antigen information are input into the complex structure prediction model to obtain the re-predicted nanobody-antigen complex structure and corresponding evaluation information. Based on at least a partial comparison between the re-predicted nanobody-antigen complex structure and evaluation information and the predicted final-state candidate nanobody-antigen complex structure, an antibody-specific reward signal is obtained. The parallel sampling branch is resampled based on the antibody-specific reward signal, and the resampled sampling branch returns to the corresponding intermediate checkpoint to continue sampling along the preset sampling trajectory. The result determination and output module is used to determine the target candidate nanobody-antigen complex at the end of the preset sampling trajectory based on the antibody-specific reward signal, and output the corresponding nanobody sequence and three-dimensional structure.
9. A computer device, characterized in that, The device includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the de novo design method for nanobody conjugates based on inference-stage sequential reward guidance as described in any one of claims 1-7.
10. A computer read storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the de novo design method for nanobody conjugates based on inference-phase sequential reward guidance as described in any one of claims 1-7.