A reaction skeleton clustering multi-step reverse synthesis route planning method and system based on search enhancement and reaction feasibility verification

CN122889108APending Publication Date: 2026-10-09SHANGHAI ARTIFICIAL INTELLIGENCE INNOVATION CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611374407.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

若二者直接耦合,容易导致相同搜索状态产生不同扩展结果,影响路线规划的一致性

Benefits of technology

[0016]本发明提供的一种基于检索增强生成与反应可行性验证的反应骨架聚类多步逆合成路线规划方法及系统,通过标准化对象连接单步候选生成、化学可行性评价和多步搜索过程,避免不同模块之间因数据表示不一致导致的候选结构、原子映射结果和评价信息无法关联的问题。候选标识和父实例标识贯穿整个处理流程,使每个评价结果能够准确回写至对应的搜索节点和具体分子实例。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122889108A_ABST
    Figure CN122889108A_ABST
Patent Text Reader

Abstract

The application discloses a reaction skeleton clustering multi-step reverse synthesis route planning method and system based on retrieval enhancement, reaction feasibility verification, and the like. Based on a target molecule, a starting material set, historical reaction data, and search parameters, a root molecule node is established, an abstract molecule node is selected from a current legal frontier, a current specific instance is obtained from an instance pool, a candidate reaction substance combination capable of synthesizing the abstract molecule node through one-step reaction is obtained, a generation order and a generation score are obtained, the candidate reaction substance combination is evaluated, an entry tree set is determined, reaction skeleton and abstract molecule clustering are performed, and a or tree, a candidate pool, an instance pool, and a non-skeleton edge are updated based on a clustering result. The starting material set is queried based on the current specific instance, a deterministic state propagation is performed, if the root node is closed, a multi-step route is restored according to a representative candidate in the tree, an actual instance, and the non-skeleton edge, otherwise, the specific instance is switched in the same instance pool, and the foregoing steps are performed again.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided chemical synthesis planning technology, and in particular to a method and system for planning multi-step retrosynthetic routes based on retrieval-enhanced generation and reaction feasibility verification through reaction framework clustering. Background Technology

[0002] Retrosynthetic analysis starts with the target product and deduces precursor reactants by breaking chemical bonds sequentially until a directly obtainable starting material is obtained. A target molecule typically has multiple possible dissociations, and a candidate reaction may require the availability of multiple reactants. Therefore, multi-step retrosynthetic search is suitable to be represented as an AND-OR tree, where molecular nodes are "OR" nodes, solved when one sub-reaction is closed, and reaction nodes are "AND" nodes, closed only when all sub-reactants are solved. Each expansion of a molecular node in a multi-step retrosynthetic system involves single-step candidate generation, candidate screening, candidate insertion into the tree, and state updates. Errors from single-step models propagate down the tree, while repeated candidates increase the search scale. Therefore, the performance of a multi-step system depends not only on the accuracy of a single-step model but also on the data interfaces between modules, the quality control of insertion into the tree, the state compression method, and the fallback mechanism after failure.

[0003] Existing multi-step retrosynthetic planning methods typically employ a cascaded architecture of a single-step reaction generation model, a candidate scoring model, and a search algorithm. The single-step reaction generation model generates precursor candidates, the candidate scoring model filters based on model probabilities or rules, and the search algorithm adds candidates to the synthesis tree and determines route completion through inventory matching. Specifically, the target molecule is first obtained, then the single-step model generates multiple reactant combinations, and candidates are filtered based on model scores or simple rules. Each candidate is added as an independent reaction node to an AND-OR tree. Heuristic algorithms or planning models are used to select the next molecule node. When a leaf molecule matches the starting raw material library, the tree state is updated upwards, and this process is repeated until a route is found or the budget is exhausted. Some schemes also temporarily add similar reactions during single-step model inference or use language models to evaluate candidates. At the tree search level, existing schemes often use specific reactant strings as node identities.

[0004] However, existing schemes lack a unified state representation and constraint mechanism among modules. Single-step reaction generation models often fail to utilize sufficient reaction knowledge, relying on implicit learning of reaction patterns from model parameters. They generate candidates solely based on the current molecular structure, making it difficult to reliably invoke relevant historical reaction precedents according to the structural characteristics of the current target molecule. The lack of integration with historical search information and failure feedback leads to insufficient correlation between candidate generation and search state. The absence of constraints based on structural similarity and reaction relevance to the current target molecule may introduce reaction information incompatible with current planning conditions, causing low-quality candidates to accumulate continuously during multi-step expansion, affecting the reliability of route planning results. Existing scoring methods primarily rely on model confidence or empirical rules, lacking comprehensive analysis of atomic mapping, bond changes, reaction sites, and knowledge evidence. The lack of chemical constraints allows some unexplainable reactions to enter the search process. The fact that a candidate reaction can be generated by the model does not mean it is suitable as an effective step in a multi-step synthetic route. Once low-confidence candidates enter the search process, they further generate a large number of invalid expansions, reducing overall planning efficiency. Existing methods typically use specific molecules or reaction instances as search nodes, making it difficult to identify the same reaction patterns behind different specific implementations. For the same core bond break, different leaving groups, protected states, or activated states can generate multiple parallel branches. If these are all searched as independent branches, it will result in a large amount of redundant expansion. However, if only simple merging is performed, the specific structural information required for subsequent inventory judgment, instance replacement, and route recovery may be lost. In addition, existing methods usually do not save candidate sources, evaluation criteria, and state change information, making it difficult to roll back and replan when a route fails, and the search process lacks recoverability and auditability. Specifically, the unavailability of a specific molecule instance or the inability to continue subsequent steps does not mean that the corresponding reaction mode is infeasible. If there is a lack of hierarchical management of candidate instances and specific molecule states, it is difficult to recover executable routes while maintaining search compression effects. Furthermore, the output of a single-step reaction generation model has a certain degree of uncertainty, while operations such as node expansion, state updates, and closure judgments in an AND-OR tree need to meet deterministic logical constraints. If the two are directly coupled, it is easy to cause different expansion results for the same search state, affecting the consistency of route planning. Summary of the Invention

[0005] To address some or all of the problems in existing technologies, and in order to improve the relevance and chemical reliability of candidate reactions entering a multi-step search process, the first aspect of this invention provides a multi-step retrosynthetic route planning method based on retrieval-enhanced generation and reaction feasibility verification through reaction scaffold clustering, comprising: Based on the target molecule, the set of starting materials, historical reaction data, and search parameters, a root molecule node corresponding to the target molecule is established; Select an abstract molecular node from the current legitimate frontiers of the root molecular node, and obtain the current concrete instance from the instance pool of the abstract molecular node; Obtain candidate generation results that can synthesize the current specific instance through a one-step reaction, wherein the candidate generation results include candidate reactant combinations, generation order, and generation score; The candidate reactant combinations are evaluated from the dimensions of structural fact calculation, chemical evidence retrieval, original model evaluation, and evidence constraint calibration to obtain evaluation records and determine the set of input trees; The input tree set is clustered with reaction skeleton and abstract molecule, and the AND-OR tree, candidate pool, instance pool, and non-skeleton edges are updated based on the clustering results. Based on the current specific instance, query the starting raw material set and perform deterministic state propagation. If the root node is closed, then recover the multi-step route based on the representative candidates, actual instances, and non-skeleton edges in the tree. Otherwise, select the untried specific instance from the instance pool of the same abstract molecular node, and repeat the steps of obtaining candidate generation results and evaluation records for the specific instance.

[0006] Furthermore, by using a single-step inverse synthesis model, candidate generation results capable of synthesizing the current specific instance in a single reaction are obtained, including: Based on the structural characteristics, reaction center characteristics, and reaction type correlation of the target molecule, reaction precedents related to the current planning task are retrieved from the historical reaction data to construct a candidate knowledge retrieval pool. The current specific instance is converted into an extended connectivity fingerprint, and M candidate responses are recalled from the candidate knowledge retrieval pool; Calculate the similarity between the products of the M candidate reactions and the extended connectivity fingerprint, and select the top K candidate reactions in descending order; The current specific instance and the corresponding first K candidate reactions are input into the single-step retrosynthetic model to obtain the candidate generation results, wherein the candidate generation results also include the bond breaking position of the target product, synthon, leaving group, and reaction precedents that play a major role in the generation results.

[0007] Furthermore, the reaction framework clustering multi-step retrosynthetic route planning method also includes: Before evaluation, the candidate reactant combinations are structurally analyzed, normalized, and deduplicated, and then combined with the current product to be disassembled to form a standard candidate reaction record.

[0008] Furthermore, the feasibility assessment module evaluates the candidate reactant combinations, including: The reactants and products corresponding to the candidate reactant combinations are analyzed, and elements, atomic numbers, chemical bonds, ring systems, aromaticity, formal charges, stereochemistry and functional groups are extracted. An atomic mapping between the reactant and product masses is established to obtain a set of bond changes and form structural facts. Based on the aforementioned set of functional groups and bond changes, supporting and limiting evidence is retrieved from the functional group feature library, retrosynthetic transformation library, substrate scope library, product rationality library, nomenclature reaction library, and negative restriction library. The weight of the evidence is determined according to the degree of matching of bond breaking patterns, functional group matching degree, and substrate applicability scope matching degree to obtain weighted chemical evidence. The candidate reactant combinations, structural facts, and weighted chemical evidence are input into the comprehensive evaluation model to obtain the original score, original confidence level, reasoning explanation, supporting reasons, risk factors, blocking factors, and single-step experimental rationality judgment; The original score is constrained by blocking constraints, boundary constraints, and evidential constraints, and the original confidence level is adjusted by a penalty term to obtain the final score and final confidence level.

[0009] Furthermore, the set of trees to be included is determined as follows: Candidate reactant combinations that are deemed feasible, have normal and valid evaluation results, and whose final scores and final confidence levels are both higher than the preset thresholds will be included in the tree. Boundary candidates that do not meet the criteria for inclusion in the tree but do not have blocking errors are written into the manual review pool or the reduced-weight candidate pool.

[0010] Furthermore, the reaction framework and abstract molecule clustering of the input tree set includes: For candidate reactant combinations in the tree set, calculate the identity bonds of the reaction skeleton and the identity bonds of the abstract molecules; Candidate reactant combinations with the same skeletal identity bonds are grouped into a candidate pool, and candidate reactant combinations with the same abstract molecular identity bonds are grouped into an instance pool. Non-skeletal steps are registered as non-skeletal edges, where a non-skeletal step refers to a step where the skeletal bond on the reactant side and the skeletal bond on the product side are not identical. Figure 1 Candidate reactant combinations when no new core backbone bonds are formed.

[0011] Furthermore, switching specific instances within the same instance pool includes: Priority for untried instances within the same instance pool is calculated based on inventory availability, source response score, source response confidence, and expected expansion cost. Select the specific instance with the highest priority.

[0012] A second aspect of the present invention provides a multi-step retrosynthetic route planning system based on retrieval-enhanced generation and reaction feasibility verification through clustering of reaction scaffolds, comprising: A single-step retrosynthetic model is used to obtain candidate generation results that can synthesize the current specific instance through a one-step reaction. The current specific instance is selected from the current legitimate frontier of the root molecular node, and obtained from the instance pool of the abstract molecular node. The root molecular node is established based on the target molecule, the set of starting materials, historical reaction data and search parameters. The single-step reaction feasibility determination module is used to evaluate the candidate reactant combination from the dimensions of structural fact calculation, chemical evidence retrieval, original model evaluation, and evidence constraint calibration, obtain evaluation records, and determine the set of input trees; The multi-step retrosynthesis search module is used to cluster the reaction skeleton and abstract molecules of the input tree set, and update the AND-OR tree, candidate pool, instance pool and non-skeleton edges based on the clustering results. Based on the current specific instance, it queries the starting raw material set and performs deterministic state propagation. If the root node is closed, the multi-step route is restored according to the representative candidates, actual instances and non-skeleton edges in the tree. Otherwise, the specific instance is switched in the same instance pool and the first K reaction precedents are re-determined.

[0013] Furthermore, the reaction framework clustering multi-step retrosynthetic route planning system also includes: The candidate normalization module is used to perform structural analysis, normalization, and deduplication on the candidate reactant combination before evaluation, and to combine the candidate reactant combination with the current product to be disassembled into a standard candidate reaction record.

[0014] A third aspect of the present invention provides an electronic device for reaction skeleton clustering multi-step retrosynthetic route planning, comprising a memory and a processor, wherein the memory is configured to store a computer program that executes the reaction skeleton clustering multi-step retrosynthetic route planning method as described above when the processor is running.

[0015] A fourth aspect of the present invention provides a computer-readable storage medium for reaction skeleton clustering multi-step retrosynthetic route planning, which stores a computer program that, when run on a processor, executes the reaction skeleton clustering multi-step retrosynthetic route planning method as described above.

[0016] This invention provides a multi-step retrosynthetic route planning method and system based on retrieval-enhanced generation and reaction feasibility verification through clustering of reaction scaffolds. It connects single-step candidate generation, chemical feasibility evaluation, and multi-step search processes through standardized objects, avoiding the problem of inconsistent data representation between different modules that leads to a lack of correlation between candidate structures, atom mapping results, and evaluation information. Candidate identifiers and parent instance identifiers are used throughout the entire processing flow, enabling each evaluation result to be accurately written back to the corresponding search node and specific molecular instance.

[0017] The method and system, through reaction relevance retrieval and precedent injection mechanisms during the training phase, enable the single-step model to learn and utilize historical reaction knowledge related to the current target molecule, thereby improving the ability to utilize similar reaction patterns and structural environments during candidate generation and reducing low-relevance candidates lacking reaction precedent support.

[0018] The single-step reaction feasibility assessment module first calculates deterministic structural facts, then combines reaction knowledge evidence and model-assisted reasoning results, and forms the final evaluation result through constraint calibration. Low-confidence candidates are filtered or have their priority reduced before entering the search tree, reducing the cumulative computational overhead caused by invalid candidates in subsequent multi-step expansion processes.

[0019] Reaction framework clustering can group candidates with significant differences in leaving groups, activation forms, and specific substrate forms into those with the same core reaction pattern, while retaining specific structural information through candidate pools and instance pools. This allows the system to reduce redundant search branches while retaining the information needed for inventory lookups, instance replacements, and route recovery.

[0020] Instance-level fallback mechanisms enable multiple concrete implementations under the same reaction pattern to share existing search states. When a concrete instance fails to meet inventory conditions or subsequent expansion fails, the system does not need to rebuild the search process. Instead, it can select other feasible instances based on the candidate pool and instance pool, improving the reusability of search states and the probability of route closure.

[0021] The non-skeleton edge mechanism ensures that auxiliary steps such as protection, deprotection, activation, and functional group interconversion do not occupy the main reaction skeleton search depth, while allowing for the reinsertion of corresponding specific reaction steps during the route recovery phase. For candidates whose equivalence cannot be reliably determined, the system retains specific instance information through an abstract hard failure fallback mechanism to avoid erroneous merging that could render the route unexecutable.

[0022] The deterministic scheduler restricts the generative planning module's direct modification rights to the search state, ensuring that AND-OR tree expansion, node updates, inventory determination, and route closure processes satisfy deterministic logic constraints. Route scoring comprehensively considers factors such as critical weak steps, success probability, and route length, and compared to simply averaging single-step scores, it more accurately reflects the impact of critical failure steps in a multi-step synthetic route on overall feasibility. Attached Figure Description

[0023] To further illustrate the above and other advantages and features of the various embodiments of the present invention, a more specific description of the various embodiments of the present invention will be presented with reference to the accompanying drawings. It is to be understood that these drawings depict only typical embodiments of the invention and are therefore not intended to limit its scope. In the drawings, identical or corresponding parts will be indicated by identical or similar reference numerals for clarity.

[0024] Figure 1 This diagram illustrates a multi-step retrosynthetic route planning method based on retrieval enhancement generation and reaction feasibility verification using clustering of reaction skeletons, according to an embodiment of the present invention. Figure 2 A schematic flowchart of a single-step retrosynthesis method based on reaction precedent retrieval according to an embodiment of the present invention is shown. Figure 3 A flowchart illustrating a single-step reaction feasibility determination method according to an embodiment of the present invention is shown. Figure 4 The diagram shows a schematic of a multi-step retrosynthetic route planning system based on retrieval enhancement generation and reaction feasibility verification of reaction skeleton clustering according to an embodiment of the present invention. Detailed Implementation

[0025] In the following description, the invention is described with reference to various embodiments. However, those skilled in the art will recognize that the embodiments may be practiced without one or more specific details or in conjunction with other alternatives and / or additional methods or components. In other instances, well-known structures or operations are not shown or described in detail so as not to obscure the inventive points of the invention. Similarly, for illustrative purposes, specific numbers and configurations are set forth to provide a comprehensive understanding of embodiments of the invention. However, the invention is not limited to these specific details.

[0026] In this specification, references to "an embodiment" or "this embodiment" mean that a particular feature, structure, or characteristic described in connection with that embodiment is included in at least one embodiment of the invention. The phrase "in one embodiment" appearing throughout this specification does not necessarily refer to the same embodiment in all instances.

[0027] It should be noted that the embodiments of the present invention describe the method steps in a specific order; however, this is only for illustrating the specific embodiment and not for limiting the order of the steps. On the contrary, in different embodiments of the present invention, the order of the steps can be adjusted according to actual needs.

[0028] Existing multi-step retrosynthetic systems typically treat single-step candidate generation, candidate scoring, and tree search as loosely connected modules. This approach suffers from systemic problems during successive rounds of expansion. Single-step models lack historical reaction knowledge that matches the molecule to be decomposed, low-quality candidates accumulate with search depth, candidate scores lack structural facts and chemical evidence constraints, structurally unexplainable reactions may still enter the search tree, and candidates corresponding to different leaving groups, activated forms, or protected states are repeatedly created as independent branches, leading to repeated searches of the same skeleton strategy. Directly abstracting and merging specific candidates may result in the loss of information needed for real reactants, stock hits, and route recovery. If the strategy output of the language model directly controls the tree state, it may also lead to illegal expansion, incorrect pruning, or inconsistent closure judgments. Based on this, in order to establish a multi-step retrosynthetic processing chain with strict input-output connection, so that the single-step candidate generation results are entered into a compressed AND-OR tree search after structured adaptation and feasibility gating, and while reducing invalid candidates and equivalent branches, retaining specific reaction instances, specific molecular instances, and non-skeleton steps, thereby obtaining an auditable, reversible, and recoverable multi-step route to a specific chemical structure, this invention provides a multi-step retrosynthetic route planning method and system based on retrieval-enhanced generation and reaction feasibility verification using reaction skeleton clustering. For each specific molecular instance to be expanded, it retrieves historical reaction precedents related to its structural characteristics and enhances single-step candidate generation based on these precedents. The generated candidate reactions are uniformly converted into standard candidate reaction objects, and the current search position, candidate generation source, and normalized structural information are supplemented. Deterministic structural analysis, knowledge evidence retrieval, model-assisted evaluation, and evidence constraint calibration are performed on the standard candidate reactions to form standardized single-step evaluation objects. Only candidate reactions that meet the preset tree entry conditions are sent to the reaction skeleton identification and abstract molecular clustering process. Reaction skeleton nodes are used to represent the same core transformation mode, and candidate pools, instance pools, and non-skeleton edges are used to store specific reaction implementation forms. A deterministic scheduler is used to manage AND / OR tree states, inventory matching, instance rollback, route closure, and termination conditions. After route closure, the complete synthetic route is recovered based on the specific candidates, specific molecular instances, and non-skeleton step information saved during the search process.

[0029] The technical solution of the present invention will be further described below with reference to the accompanying drawings of the embodiments.

[0030] Figure 1 This diagram illustrates a flowchart of a multi-step retrosynthetic route planning method based on retrieval enhancement generation and reaction feasibility verification using clustering of reaction scaffolds, according to an embodiment of the present invention. Figure 1 As shown, a multi-step retrosynthetic route planning method based on retrieval-enhanced generation and reaction feasibility verification through reaction scaffold clustering includes: First, in step 101, the root molecular node is established. The target molecule is then obtained. The system uses a set of starting materials (B), a historical reaction database (D), and search parameters to establish a root molecular node corresponding to the target molecule. The target molecule includes its structural representation, and the search parameters include an upper limit for search depth, a single-step call budget, the number of target routes, and model configuration. In one embodiment of the invention, the target molecule is parsed and normalized, a root molecular node is established using the target molecule, and the specific structure of the target molecule is used as an initial instance in the root node instance pool.

[0031] Next, in step 102, a specific instance is selected. An abstract molecular node is selected from the current legitimate frontiers of the root molecular node using a scheduler, and a current specific instance is obtained from the instance pool of the abstract molecular node. .

[0032] Next, in step 103, candidate generation results are obtained. Candidate generation results capable of synthesizing the current specific instance through a one-step reaction are obtained, wherein the candidate generation results include candidate reactant combinations, generation order, and generation score. In one embodiment of the invention, candidate generation results capable of synthesizing the current specific instance through a one-step retrosynthesis model are obtained. In one embodiment of the invention, the single-step retrosynthesis model sequentially performs the steps of constructing a similar structure reaction precedent retrieval pool, two-stage reaction precedent retrieval, retrieval context construction, and candidate reactant generation. In one embodiment of the invention, reaction precedents are not only used for reasoning but also dynamically injected during the supervised fine-tuning stage, enabling the model to learn the rules of bond breaking, synthon, and leaving group combinations from historical precedents. Figure 2 This diagram illustrates a flow chart of a single-step retrosynthetic method based on reaction precedent retrieval according to an embodiment of the present invention, as shown below. Figure 2 As shown, in one embodiment of the present invention, the single-step retrosynthesis method based on reaction precedent retrieval includes: First, in step 201, a candidate knowledge retrieval pool is constructed. The historical response database D contains a large number of historical response records, each of which... It includes information such as reactants, products, reaction type, structural characteristics, and reaction conditions. For the current molecule instance to be processed... The system retrieves reaction precedents related to the current planned task from the reaction database based on the structural characteristics of the target molecule, the characteristics of the reaction center, and the relevance of the reaction type, thus constructing a candidate knowledge retrieval pool. , in, The historical data reflected in the database D is the first... A record of historical reactions, Indicates the current molecular instance With historical reaction records The correlation score between them can be calculated based on information such as molecular structure similarity, reaction mode matching, functional group environment, and reaction condition correlation. This indicates a preset correlation threshold.

[0033] The candidate knowledge retrieval pool is used to provide knowledge support for subsequent fine-grained retrieval of reaction precedents and single-step candidate generation, thereby improving the correlation between generated candidates and the current target molecule structural features and reaction planning tasks.

[0034] Next, in step 202, a two-stage reaction precedent search is performed. Convert to extended connectivity fingerprint In one embodiment of the invention, the radius is 2, and the dimension d = 2048. The first stage starts from... A preliminary recall of M candidate reactions was conducted, and the target product was calculated in the second stage. Candidate product fingerprints of the M candidate reaction precedents Similarity to Tanimoto: , according to The top K candidate response precedents are selected in descending order, where M > K. In one embodiment of the invention, coarse recall can use binary indexes, inverted indexes, or approximate nearest neighbor indexes. In other embodiments of the invention, Dice similarity, cosine similarity, or learned ranking score is used instead of Tanimoto similarity.

[0035] Next, in step 203, the context is retrieved. Each candidate reaction precedent includes at least the precedent product, precedent reactant, similarity, synthon, and leaving group. The sorted context is represented as follows: .

[0036] in, Indicates the first The product structure of a current molecule instance, Respectively represent the first The first to the current molecular instance corresponding to the first There are several candidate reaction precedents, among which The number of candidate precedents in the input prompt context.

[0037] In one embodiment of the present invention, the single-step retrosynthetic model uses a real reactant sequence. The goal is to supervise the learning of synthon and leaving group inference sequences. The autoregressive supervision loss is: , in, Indicates the first The training samples are located at positions 1 to... The target symbol, where For the first The target sequence length of each training sample These are the parameters for the single-step inverse synthesis model. For the single-step inverse synthesis model given the preceding target symbols and Under the conditions, predict The probability of, where For the first Retrieval enhancement prompts and context for each training sample.

[0038] By dynamically performing reaction precedent retrieval on each training sample, the single-step inverse synthesis model learns to enhance its candidate generation capabilities by utilizing relevant historical reaction knowledge during the training phase, rather than passively receiving external precedents only during the inference phase.

[0039] Finally, in step 204, the inference is output. The K candidate reaction precedents are input together into a single-step inverse synthesis model that has been trained with retrieval enhancement to obtain a set of candidate reactant combinations. In one embodiment of the invention, the inference phase employs the same or compatible retrieval process as the training phase, outputting one or more candidate reactant combinations. Each candidate combination contains one or more reactant structures and may include bond breakage, synthon, leaving group, production fraction, and principal precedent identifier.

[0040] Next, in step 104, candidate normalization and module interface adaptation are performed. In one embodiment of the present invention, to ensure that the inputs and outputs of each module correspond one-to-one, the candidate normalization module performs structural analysis, normalization, and deduplication on the candidate reactants, and combines the candidate reactants with the current product to be disassembled into a standard candidate reaction record. Each standard candidate reaction record includes at least the candidate number, parent molecule node number, parent specific instance number, product structure, reactant structure set, normalized reaction formula, generation source, current route depth, and route constraints. This record serves as the input for the subsequent single-step reaction feasibility determination module. In one embodiment of the present invention, the candidate set... The candidate normalization module, along with the current tree context input, splits the reactants for each candidate, then parses and normalizes the SMILES, removes completely duplicate reactant combinations, distinguishes between the main reactant and optional auxiliary components, and sets the current specific instance... Assuming the product is defined, a canonical reaction formula is constructed, a globally unique candidate identifier is assigned, and this identifier is written to the parent molecule node, parent instance, tree depth, and generation metadata. The candidate normalization module performs structural normalization on the reactants in each candidate combination, then sorts them according to the canonical structure to form unordered canonical keys. If two candidates have the same unordered canonical key, the candidate with the earlier generation order or higher generation score is retained, and their reaction precedent sources are merged. Finally, the current product to be decomposed, the normalized candidate reactants, the parent instance number, the current tree depth, and the generation information are encapsulated into a standard candidate reaction record, resulting in a set of standard candidate reaction objects for candidate combinations. It includes multiple standard candidate reaction objects, among which Indicates the first The candidate's A standard candidate reaction is selected. Candidates that cannot be resolved, have no reactants, or whose products are inconsistent with the current instance are marked as input errors and will not proceed to the subsequent chemical evaluation.

[0041] Next, in step 105, the feasibility of the single-step retrosynthetic reaction is determined. The candidate reactant combinations are evaluated based on structural fact calculations, chemical evidence retrieval, original model evaluation, and evidence constraint calibration dimensions, resulting in evaluation records and determining the set to be included in the tree. This prevents structurally inexplicable, experimentally unsuitable, or obviously insufficiently supported candidates from entering the multi-step tree, while providing a unified field for clustering and route ranking. In one embodiment of the invention, the feasibility of the single-step retrosynthetic reaction is determined. An evaluation was conducted, and the result was obtained. The candidate's Evaluation objects of the standard . Figure 3 This diagram illustrates a flowchart of a single-step reaction feasibility determination method according to an embodiment of the present invention. Figure 3 As shown, in one embodiment of the present invention, the single-step reaction feasibility determination includes: First, in step 301, chemical structure analysis is performed. The reactants and products corresponding to the candidate reactant combinations or standard candidate reactants are analyzed, and elements, atomic numbers, chemical bonds, ring systems, aromaticity, formal charges, stereochemistry, and functional groups are extracted to establish an atomic mapping between reactants and products. Next, in step 302, bonding, bond breaking, bond order changes, and structural facts are calculated. The bonds before and after the atom mapping are compared to obtain the first... The candidate's New key set for item Set of broken bonds Bond-level change set : , Further examination is conducted on atomic origin, anomalous valence states, competing nucleophiles, potentiophilic sites, regioselectivity, stereochemical changes, product stability, and multi-operation compression. Each result constitutes a structural fact: examination identifier, category, risk level, status, atom mapping number, structural site, and chemical description. These structural facts do not directly contribute to the final score or operational action. Atom mapping and... All were written And reused in subsequent multi-step retrosynthesis.

[0042] Next, in step 303, chemical knowledge evidence is enhanced. This is based on functional groups, reaction centers, and... Supporting and limiting evidence was retrieved from functional group feature libraries, retrosynthetic transformation libraries, substrate scope libraries, product plausibility libraries, named reaction libraries, and negative limitation libraries. Evidence weights were determined based on the degree of matching in bond formation / breaking patterns, functional group matching, and substrate applicability matching. Evidence that only has similar reaction names but cannot explain the actual bond formation / breaking relationship was assigned lower weights and did not directly prove the validity of the current reaction mechanism.

[0043] Next, in step 304, the initial evaluation. The standard candidate reaction objects... The comprehensive evaluation model, which integrates structural facts and weighted chemical evidence, yields the first... The candidate's Raw score Original confidence level The evaluation model includes reasoning explanations, supporting arguments, risk factors, blocking factors, and a judgment on the reasonableness of single-step experiments. In embodiments of the present invention, the comprehensive evaluation model can be a rule-based model, a machine learning model, a language model, or a combination thereof.

[0044] Next, in step 305, evidence-constrained decision calibration is performed. Deterministic constraints are applied to the original scores, where the deterministic constraints are categorized into blocking constraints, boundary constraints, and evidentiary constraints. Let the upper limit set of blocking scores be... The set of boundary score upper limits is The final score is then taken from the original score. Upper limit set of blocking scores Minimum value, boundary score upper limit set The smallest of the minimum values ​​can be represented as: , When the corresponding set is empty, its minimum value is considered positive infinity. For fundamental structural errors that must be rejected, we can directly set... An infeasibility determination is set. Evidence constraints do not change the direction of the judgment, but are implemented through an evidence penalty coefficient. Adjusting the confidence level: , in, For the first The candidate's Original confidence level of the item For the first The candidate's The upper limit of confidence level determined by constraints for each item. For the first The candidate's Evidence-based penalty coefficient.

[0045] The above form is used to illustrate the calibration relationship. The specific upper limit, threshold, and penalty function can be determined by expert rules or validation sets.

[0046] Finally, in step 306, the evaluation results are output. The final output is the standard evaluation object. It should include at least candidate identifiers, canonical reaction formulas, atomic mappings, bond changes, feasibility determination, final score, confidence level, structural facts, knowledge evidence, decision constraints, source of results, error type, and version.

[0047] Based on the aforementioned standard evaluation object, it can be determined whether to enter the tree. In one embodiment of the present invention, only results from normal sources and with valid evaluations participate in the formal route decision. Indicates the first One candidate was deemed feasible, and This indicates that the evaluation result is from a legitimate and valid source. and They represent the first The candidate's Final score and confidence level of the item and Let represent the minimum score for entering the tree and the minimum confidence level for entering the tree, respectively. Then the th The candidate set for each current instance to be added to the tree is defined as follows: , in, Indicates the first The candidate's Whether an item is determined to be a feasible indicator.

[0048] All four conditions above must be met simultaneously. For boundary candidates that do not meet the entry criteria but do not exhibit blocking errors, they can be added to the manual review pool or the reduced-weight candidate pool instead of being directly deleted. Entry Set It is the candidate set received by the subsequent multi-step inverse synthesis search module.

[0049] Next, in step 106, reaction backbone and abstract molecule clustering is performed. The input tree set is clustered using reaction backbone and abstract molecule clustering, and the AND-OR tree, candidate pool, instance pool, and non-backbone edges are updated based on the clustering results. In one embodiment of the invention, reuse... The atomic mapping and bond changes in the reaction divide the two sides into mapped atoms and non-mapped substituents participating in the skeleton. For non-mapped substituents, their types are assigned based on the electronegativity of the first atom connected to the skeleton and local structural characteristics, and then replaced by type-occupying atoms to obtain an abstract canonical representation of the reactant and product sides. and The identity bonds of the reactive skeleton are: , For a specific molecule, substituent typing and allowing tactical difference folding are first performed. Then, a summary value is calculated on the resulting abstract canonical structure, which serves as the abstract molecule's identity key. Candidates with the same reaction backbone identity key are added to the same reaction backbone cluster. The candidate with the highest combined final score and confidence value is preferentially selected as the representative, and inventory availability or generation order can also be considered. The representative candidate drives the creation of downstream nodes, while the remaining candidates are stored in the candidate pool. Specific reactants with the same abstract molecule identity key enter the instance pool of the same abstract molecule node. If atom mapping fails, backbone bonds are inconsistent, mapping atom symbols do not match, or abstract rendering fails, the hash of the canonical specific reaction formula is used as the identity key, and the molecule is clustered separately without cross-candidate merging.

[0050] Finally, in step 107, deterministic state propagation occurs. The AND-OR search tree is represented as... ,in For molecular "OR" nodes, To respond to the AND node, Let represent the set of edges between nodes. As a representation node If the indicator is closed, then: , , in, Represents molecular nodes. Indicates the reaction node, Representing molecular nodes Can it be obtained from starting materials? This indicates that an "OR" logic is performed on all child reaction nodes. This indicates that an AND operation is performed on all child nodes.

[0051] In other words, a molecular node only fails when all reaction branches fail or are pruned and there are no instances left to roll back in the instance pool, while a reaction node fails when any necessary sub-molecule eventually fails. The calculation is repeated from bottom to top after each round of tree expansion until the state no longer changes.

[0052] It should be understood that, in the embodiments of the present invention, inventory queries are always performed on a concrete instance basis. As long as at least one normalized concrete molecule exists in the instance pool in the starting raw material set, the abstract molecule node can be marked as available, and the actual concrete instance number hit is recorded for route recovery.

[0053] When the skeletons on the reactant side and the product side Figure 1 When no new core backbone bonds are formed, the candidate is identified as a non-backbone step. In this case, no new backbone reaction node is created; instead, the candidate reactant is added as a concrete instance to the current abstract molecule node, and a non-backbone edge is registered. A non-backbone edge records at least the source instance, target instance, complete reaction formula, evaluation score, confidence level, and the type of protection, deprotection, activation, or functional group interconversion. Non-backbone edges do not increase the backbone depth; they are reinserted as concrete steps during route output.

[0054] When a specific instance fails to generate feasible candidates, reaches its expansion limit, or all downstream branches fail, the instance pool is queried first. Untried specific instances are selected from the instance pool of the same abstract molecular node, and operations such as reaction precedent retrieval, candidate generation, candidate normalization, and feasibility evaluation are re-executed for these specific instances, instead of immediately marking the abstract node as failed. In one embodiment of the invention, the priority of untried instances is calculated based on inventory availability, source reaction score, source reaction confidence, and expected expansion cost. The instance with the highest priority is selected, and unclosed subtrees belonging only to failed instances are cleared. A new instance then re-enters single-step inverse synthesis. Only when all instances in the instance pool of the same abstract molecular node fail does the abstract molecular node enter failure propagation.

[0055] In one embodiment of the invention, the scheduler sequentially calls the tree update process from steps 105 to 107 in each round, and then provides the planner with a compressed tree view and a set of legal actions. The planner outputs a suggested action. The scheduler executes the action only if it belongs to the set of legal actions and the action format, mutual exclusion conditions, and progress conditions are all validated; otherwise, the scheduler selects backoff actions from the set of legal actions in a predetermined order. The planner does not directly modify candidate feasibility, inventory hits, node status, route closure, or termination conditions. A main route can be locked, and necessary reactants can be automatically advanced along the AND relationship of reactions until closure, failure, or a new skeleton branch needs to be selected.

[0056] When the root node satisfies the closure condition, the actual specific candidates of each reaction skeleton node and the actual specific instances of each abstract molecular node are selected along the closure proof, and associated non-skeleton edges are inserted to form a specific path. .

[0057] Assume the route includes Each of the 10 effective reaction steps has a final score normalized to 1. Confidence level is The weak step score, geometric success score, and length penalty of the route are combined as follows: , in, , , To configure weights, The total number of valid response steps contained in the route is used for step score normalization. Routes containing blocking results or invalid source results are not included in the formal ranking. In other embodiments of the invention, the lowest single-step score, weighted average, cumulative success probability, or multi-objective ranking may be used instead of the aforementioned comprehensive evaluation.

[0058] Finally, the output includes the search tree, closed routes, candidate pool, instance pool, non-skeleton edges, single-step evaluation, inventory hits, instance switching trajectory, route score, and runtime statistics. The fast mode returns after the first route is closed, while the multi-route mode calculates route differences based on the intersection and union of the reaction skeleton identity sets contained in different routes, thus selecting routes with structural diversity.

[0059] At this point, the search loop is complete. After selecting the current specific instance, the scheduler sequentially calls the single-step candidate generation, candidate adaptation, and feasibility determination modules. Candidates that meet the tree entry conditions are updated into the AND-OR tree after abstract clustering. Subsequently, specific inventory queries and deterministic state propagation are executed. When the root node is closed, the specific route is restored. If the current instance fails, instance-level rollback is performed first. In other cases, the planner selects the next node from the valid extension items. This process is executed cyclically until the route is closed or the termination condition is met.

[0060] Based on the reaction framework clustering multi-step retrosynthetic route planning method described above. Figure 4 This diagram illustrates the structure of a multi-step retrosynthetic route planning system based on retrieval-enhanced generation and reaction feasibility verification using clustering of reaction scaffolds, according to an embodiment of the present invention. Figure 4 As shown, a reaction skeleton clustering multi-step inverse synthesis route planning system based on retrieval enhancement generation and reaction feasibility verification includes a single-step inverse synthesis model 401, a candidate normalization module 402, a single-step reaction feasibility determination module 403, and a multi-step inverse synthesis search module 404, which performs reaction skeleton clustering multi-step inverse synthesis route planning according to the method described above.

[0061] The single-step retrosynthetic model 401 is used to generate candidate generation results. Each result includes at least the combination of candidate reactants, generation order, and generation fraction. It may also include the bond-breaking position, synthon, leaving group, and reaction precedents that play a major role in the generation result of the target product. This result serves as the input to the candidate normalization module 402. The candidate normalization module 402 performs structural analysis, normalization, and deduplication on the candidate reactants, and combines the candidate reactants with the current product to be disassembled to form a standard candidate reaction record. Each standard candidate reaction record includes at least the candidate number, parent molecule node number, parent specific instance number, product structure, reactant structure set, canonical reaction formula, generation source, current route depth, and route constraints. This record serves as the input to the single-step reaction feasibility determination module 403. The single-step reaction feasibility determination module 403 supplements the standard candidate reaction record with atomic mapping, bonding and breaking changes, feasibility conclusion, final score, confidence level, structural facts, chemical knowledge evidence, triggered decision constraints, result source, error type, and model and strategy version to form a standard evaluation record, which serves as the input of the multi-step retrosynthesis search module 404.

[0062] In this system, the candidate number remains unchanged during candidate normalization, feasibility evaluation, and tree expansion, ensuring that the evaluation results correspond to the original generated candidates. The parent specific instance number allows the evaluation results to be written back to the specific molecular instance that generated the candidate. The atom mapping and bond formation / breaking changes calculated in the feasibility determination stage are directly reused by subsequent reaction skeleton clustering. Thus, the output data of the previous module completely constitutes the input data of the next module, avoiding duplicate mapping, candidate mismatch, and errors in writing back the evaluation results.

[0063] To verify the performance of the method and system, an instance to be expanded was selected. The reaction pool retrieves similar precedents, generating three candidates targeting the same aryl linker. The precursors for these three candidates contain bromine, iodine, and trifluoromethanesulfonate leaving groups, respectively. The candidate adaptation module assigns different candidate numbers to the three candidates, but assigns them the same parent instance number. The feasibility assessment module calculates atom mappings and bond changes, generating three standard evaluation objects. Two candidates meet the tree entry threshold, while one candidate enters the boundary pool due to substrate range limitations. The two tree entry candidates share the same core bond break and categorized substituents, thus obtaining the same... Candidates are grouped into the same reaction framework cluster, with the candidate having the higher product of score and confidence level serving as the representative, while the other is stored in the candidate pool. The specific precursor of the representative candidate enters the abstract molecule instance pool and is preferentially expanded. If all downstream branches of the instance fail, the system selects another specific precursor corresponding to the candidate pool according to the instance priority, keeping the upstream reaction framework node unchanged and re-calling the single-step generation module. If the backup instance hits the starting raw material library, the tree state propagates from bottom to top and closes the corresponding path. At output, the system uses the actual specific precursor that was hit and restores its associated protected or activated non-framework edges.

[0064] It can be seen that from the candidate set to the standard evaluation, and then to clustering and tree search, candidate identifiers, parent instances, atomic mappings, bond changes, scores and specific structures are continuously passed on.

[0065] Furthermore, the method was validated on the USPTO-190 and Pistachio Hard multistep inverse synthetic planning benchmark datasets. The validation showed that the retrieval-enhanced single-step candidate generation, single-step reaction feasibility determination, reaction skeleton clustering, instance-level backoff, and deterministic state propagation can work together in a unified multistep search process and complete the route closure of the test target.

[0066] The present invention also provides an electronic device for reaction skeleton clustering multi-step retrosynthetic route planning, comprising a memory and a processor, wherein the memory is configured to store a computer program that executes the reaction skeleton clustering multi-step retrosynthetic route planning method as described above when the processor is running.

[0067] The present invention also provides a computer-readable storage medium for reaction skeleton clustering multi-step retrosynthetic route planning, which stores a computer program that, when run on a processor, executes the reaction skeleton clustering multi-step retrosynthetic route planning method as described above.

[0068] Although various embodiments of the invention have been described above, it should be understood that they are presented by way of example only and not as limitations. It will be apparent to those skilled in the art that various combinations, modifications, and alterations can be made without departing from the spirit and scope of the invention. Therefore, the breadth and scope of the invention disclosed herein should not be limited by the exemplary embodiments disclosed above, but should be defined only according to the exemplary embodiments described herein and their equivalents.

Claims

1. A multi-step retrosynthetic route planning method based on retrieval-enhanced generation and reaction feasibility verification through clustering of reaction scaffolds, characterized in that, include: Based on the target molecule, the set of starting materials, historical reaction data, and search parameters, a root molecule node corresponding to the target molecule is established; Select an abstract molecular node from the current legitimate frontiers of the root molecular node, and obtain the current concrete instance from the instance pool of the abstract molecular node; Obtain candidate generation results that can synthesize the current specific instance through a one-step reaction, wherein the candidate generation results include candidate reactant combinations, generation order, and generation score; The candidate reactant combinations are evaluated from the dimensions of structural fact calculation, chemical evidence retrieval, original model evaluation, and evidence constraint calibration to obtain evaluation records and determine the set of input trees; The input tree set is clustered with reaction skeleton and abstract molecule, and the AND-OR tree, candidate pool, instance pool, and non-skeleton edges are updated based on the clustering results. Based on the current specific instance, query the starting raw material set and perform deterministic state propagation. If the root node is closed, recover the multi-step route based on the representative candidates, actual instances, and non-skeleton edges in the tree. Otherwise, select untried specific instances from the instance pool of the same abstract molecular node and re-obtain the candidate generation results and evaluation records for the specific instances.

2. The reaction framework clustering multi-step retrosynthetic route planning method as described in claim 1, characterized in that, The candidate generation results that can synthesize the current specific instance in one reaction are obtained through a single-step inverse synthesis model, including: Based on the structural characteristics, reaction center characteristics, and reaction type correlation of the target molecule, reaction precedents related to the current planning task are retrieved from the historical reaction data to construct a candidate knowledge retrieval pool. The current specific instance is converted into an extended connectivity fingerprint, and M candidate responses are recalled from the candidate knowledge retrieval pool; Calculate the similarity between the products of the M candidate reactions and the extended connectivity fingerprint, and select the top K candidate reactions in descending order; The current specific instance and the corresponding first K candidate reactions are input into the single-step retrosynthetic model to obtain the candidate generation results, wherein the candidate generation results also include the bond breaking position of the target product, synthon, leaving group, and reaction precedents that play a major role in the generation results.

3. The reaction framework clustering multi-step retrosynthetic route planning method as described in claim 1, characterized in that, Also includes: Before evaluation, the candidate reactant combinations are structurally analyzed, normalized, and deduplicated, and then combined with the current product to be disassembled to form a standard candidate reaction record.

4. The reaction framework clustering multi-step retrosynthetic route planning method as described in claim 1, characterized in that, The feasibility assessment module evaluates the candidate reactant combinations, including: The reactants and products corresponding to the candidate reactant combinations are analyzed, and elements, atomic numbers, chemical bonds, ring systems, aromaticity, formal charges, stereochemistry and functional groups are extracted. An atomic mapping between the reactant and product masses is established to obtain a set of bond changes and form structural facts. Based on the aforementioned set of functional groups and bond changes, supporting and limiting evidence is retrieved from the functional group feature library, retrosynthetic transformation library, substrate scope library, product rationality library, nomenclature reaction library, and negative restriction library. The weight of the evidence is determined according to the degree of matching of bond breaking patterns, functional group matching degree, and substrate applicability scope matching degree to obtain weighted chemical evidence. The candidate reactant combinations, structural facts, and weighted chemical evidence are input into the comprehensive evaluation model to obtain the original score, original confidence level, reasoning explanation, supporting reasons, risk factors, blocking factors, and single-step experimental rationality judgment; The original score is constrained by blocking constraints, boundary constraints, and evidential constraints, and the original confidence level is adjusted by a penalty term to obtain the final score and final confidence level.

5. The reaction framework clustering multi-step retrosynthetic route planning method as described in claim 1, characterized in that, Determining the set of trees to be included includes: Candidate reactant combinations that are deemed feasible, have normal and valid evaluation results, and whose final scores and final confidence levels are both higher than the preset thresholds will be included in the tree. Boundary candidates that do not meet the criteria for inclusion in the tree but do not have blocking errors are written into the manual review pool or the reduced-weight candidate pool.

6. The reaction framework clustering multi-step retrosynthetic route planning method as described in claim 1, characterized in that, The reaction framework and abstract molecule clustering of the input tree set includes: For candidate reactant combinations in the tree set, calculate the identity bonds of the reaction skeleton and the identity bonds of the abstract molecules; Candidate reactant combinations with the same reaction skeletal identity bonds are grouped into the candidate pool, candidate reactant combinations with the same abstract molecular identity bonds are grouped into the instance pool, and non-skeletal steps are registered as non-skeletal edges, wherein the non-skeletal steps refer to candidate reactant combinations when the skeletal subgraphs of the reactant side and the product side are consistent and there are no newly formed core skeletal bonds.

7. The reaction framework clustering multi-step retrosynthetic route planning method as described in claim 1, characterized in that, Switching between specific instances within the same instance pool includes: Priority for untried instances within the same instance pool is calculated based on inventory availability, source response score, source response confidence, and expected expansion cost. Select the specific instance with the highest priority.

8. A multi-step retrosynthetic route planning system based on retrieval-enhanced generation and reaction feasibility verification through clustering of reaction scaffolds, characterized in that, include: A single-step retrosynthetic model is configured to obtain candidate generation results that can synthesize the current specific instance through a one-step reaction. The current specific instance is selected from the current legitimate frontier of the root molecular node, and obtained from the instance pool of the abstract molecular node. The root molecular node is established based on the target molecule, the set of starting materials, historical reaction data, and search parameters. The candidate generation results include candidate reactant combinations, generation order, and generation score. The single-step reaction feasibility determination module is configured to evaluate the candidate reactant combination from the dimensions of structural fact calculation, chemical evidence retrieval, original model evaluation, and evidence constraint calibration, obtain evaluation records, and determine the tree set; The multi-step retrosynthesis search module is configured to cluster the reaction skeleton and abstract molecules of the input tree set, and update the AND-OR tree, candidate pool, instance pool, and non-skeleton edges based on the clustering results. It queries the starting raw material set based on the current specific instance, performs deterministic state propagation, and if the root node is closed, it restores the multi-step route based on the representative candidates, actual instances, and non-skeleton edges in the tree. Otherwise, it switches specific instances in the same instance pool and re-determines the first K reaction precedents.

9. The reaction framework clustering multi-step retrosynthetic route planning system as described in claim 8, characterized in that, Also includes: The candidate normalization module is configured to perform structural analysis, normalization, and deduplication on the candidate reactant combinations before evaluation, and to combine the candidate reactant combinations with the current product to be disassembled to form a standard candidate reaction record.

10. A computer-readable storage medium for multi-step retrosynthetic route planning using reaction framework clustering, characterized in that, The system contains a computer program that, when run on a processor, executes the reaction skeleton clustering multi-step retrosynthetic route planning method as described in any one of claims 1 to 7.