A method for predicting the reverse synthesis of compound molecules and related devices
Through the target inverse synthesis model of graph neural network and reactant generation network, the leaf nodes are gradually expanded to determine the broken bond position of compound molecules and generate predictive molecules collections, solving the problem of insufficient accuracy in the prediction of compound molecules in the prior art, and achieving reliable inverse synthesis prediction of multi-step reactions.
Patent Information
- Application Number
- CN202110112207.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-27
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-01-27
AI Technical Summary
Existing template-based compound molecular inverse synthesis prediction algorithms require massive reaction templates, which cannot predict or predict errors, affecting accuracy.
The target inverse synthesis model of the graph neural network and reactant generation network is adopted. By obtaining the target molecule as the root node of the tree structure, the leaf node is gradually expanded, the broken bond position is determined and the predicted molecule collection is generated, and the inverse synthesis path is performed recursively.
Improve the accuracy and reliability of the prediction of reverse synthesis of compound molecules, ensuring the reliability of multi-step reaction processes.
Smart Images

Figure CN114822703B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for predicting the retrosynthesis of a compound molecule and a related device. Background Art
[0002] With the rapid development of artificial intelligence (AI), it has been gradually introduced into various scientific fields and is playing a significant role. In chemistry, chemical reactions are infinitely variable under different conditions. Therefore, in the past, when preparing compound molecules, researchers required a great deal of time and effort to design a reasonable organic synthesis route. However, if AI technology could assist researchers in designing organic synthesis routes, it could greatly improve the efficiency of researchers in the research and development of chemical drug molecules and other compounds.
[0003] Current AI-based retrosynthesis algorithms can be primarily categorized as template-based. In these algorithms, the templates or rules describing chemical reaction transformations can be manually annotated or extracted from existing chemical reaction libraries. These are then used to match the chemical reactions predicted to occur with the target molecule.
[0004] However, template-based algorithms require a large number of reaction templates. Retrosynthesis processes without reaction templates may be unpredictable or incorrectly predicted, affecting the accuracy of retrosynthesis predictions for compound molecules. Summary of the Invention
[0005] In view of this, the present application provides a method for retrosynthetic prediction of compound molecules, which can effectively improve the accuracy of retrosynthetic prediction of compound molecules.
[0006] In a first aspect, the present application provides a method for predicting the retrosynthesis of a compound molecule, which can be applied to a system or program containing a retrosynthesis prediction function of a compound molecule in a terminal device, specifically comprising:
[0007] Acquire a target molecule and use the target molecule as a root node in a tree structure, wherein the root node is associated with a first leaf node in the tree structure, and the tree structure includes a retrosynthetic pathway of the target molecule;
[0008] Expanding the first leaf node based on a target retrosynthetic model to obtain a plurality of second leaf nodes, the target retrosynthetic model comprising a graph neural network and a reactant generation network, the graph neural network being used to determine bond-breaking positions of compound molecules in the first leaf node, and the reactant generation network being used to obtain a predicted molecule set based on the bond-breaking positions;
[0009] Recursively processing the set of predicted molecules in the second leaf node to determine a terminal node when a preset condition is met;
[0010] The path information corresponding to the terminal node is traversed to determine the retrosynthetic path of the target molecule.
[0011] Optionally, in some possible implementations of the present application, the first leaf node is expanded based on the target retrosynthesis model to obtain multiple second leaf nodes, including:
[0012] Determine a first character string corresponding to the compound molecule in the first leaf node;
[0013] converting the first string into a first molecular graph based on node distribution;
[0014] Inputting the first molecular graph into the graph neural network to obtain the bond breaking position;
[0015] inputting the bond-breaking position into the reactant generation network to obtain at least one synthon;
[0016] The synthons are filtered based on preset rules to determine the predicted molecule set.
[0017] Optionally, in some possible implementations of the present application, inputting the first molecular graph into the graph neural network to obtain the bond breaking position includes:
[0018] Inputting the first molecular graph into the graph neural network and parsing it in combination with the bond breaking number restriction to obtain bond breaking information;
[0019] determining target key features based on the target molecule;
[0020] The bond breaking information is extracted based on the target key features to obtain the bond breaking position, the target key features include atomic key features and bond key features, the atomic key features include at least one of atom type, number of bonds, formal charge, chirality, number of hydrogen atoms, atomic hybridization state, aromaticity, atomic weight, high-frequency reaction center characteristics and reaction type, and the bond key features include at least one of bond type, conjugation, ring bond and molecular stereochemical characteristics.
[0021] Optionally, in some possible implementations of the present application, the method further includes:
[0022] Obtaining a first training molecule and a corresponding first training synthon;
[0023] determining point features and edge features of the first training molecule and the first training synthon, wherein the point features are used to indicate the atomic relationship between the first training molecule and the first training synthon, and the edge features are used to indicate the chemical bond relationship between the first training molecule and the first training synthon;
[0024] Training a first loss function based on the point features and the edge features;
[0025] determining a bond breaking probability of a chemical bond between the first training molecule and the first training synthon;
[0026] Training a second loss function based on the bond break probability;
[0027] The graph neural network is updated according to the trained first loss function and the trained second loss function.
[0028] Optionally, in some possible implementations of the present application, inputting the bond-breaking position into the reactant generation network to obtain at least one synthon includes:
[0029] Segmenting the target molecule based on the bond breaking positions to obtain at least one synthetic sub-molecule graph;
[0030] converting the synthon molecule graph into a second string;
[0031] updating the second character string based on a preset response type to obtain a third character string;
[0032] The third character string is input into the reactant generation network to obtain at least one synthon.
[0033] Optionally, in some possible implementations of the present application, the method further includes:
[0034] obtaining a second training molecule, a second training synthon, and a training reactant;
[0035] determining a first training character string based on a character string corresponding to the second training molecule, a character string corresponding to the second training synthon, and the preset reaction type;
[0036] determining a second training character string corresponding to the training reactant;
[0037] Associating the first training character string with the second training character string to determine a first training sample pair;
[0038] The reactant generation network is trained based on the first training sample pairs.
[0039] Optionally, in some possible implementations of the present application, the method further includes:
[0040] Obtaining a candidate string predicted by the graph neural network;
[0041] adding the candidate character string to the character string corresponding to the second training synthesizer to update the first training character string to obtain a third training character string;
[0042] Associating the third training character string with the second training character string to determine a second training sample pair;
[0043] The reactant generation network is trained based on the second training sample pairs.
[0044] Optionally, in some possible implementations of the present application, the method further includes:
[0045] Determine the target character format;
[0046] The character string corresponding to the second training synthesizer and the first training character string determined by the preset reaction type are updated based on the target character format to reduce the distance between the character string corresponding to the second training synthesizer and the first training character string determined by the preset reaction type.
[0047] Optionally, in some possible implementations of the present application, recursively processing the set of predicted molecules in the second leaf node to determine a terminal node when a preset condition is met includes:
[0048] Determining a first candidate molecule corresponding to the predicted molecule set in the second leaf node under a preset reaction type;
[0049] Expanding the first candidate molecule based on a target retrosynthetic model to obtain a third leaf node;
[0050] recursively processing the set of predicted molecules in the third leaf node to determine a second candidate molecule;
[0051] If the second candidate molecule meets the preset condition, the second candidate molecule is determined as the terminal node.
[0052] Optionally, in some possible implementations of the present application, if the second candidate molecule meets a preset condition, determining the second candidate molecule as the terminal node includes:
[0053] Traversing based on the second candidate molecule to obtain a plurality of path molecules;
[0054] If the path molecule is a molecule in the basic molecule set, it is determined that the second candidate molecule meets the preset condition, and the second candidate molecule is determined to be the terminal node.
[0055] Optionally, in some possible implementations of the present application, if the second candidate molecule meets a preset condition, determining the second candidate molecule as the terminal node includes:
[0056] determining the number of expansions corresponding to the second candidate molecule in the tree structure;
[0057] If the number of expansions reaches a preset value, it is determined that the second candidate molecule meets the preset condition, and the second candidate molecule is determined to be the terminal node.
[0058] Optionally, in some possible implementations of the present application, the target molecule is a drug molecule, the tree structure is a Monte Carlo tree, and the compound molecules in the second leaf node are screened based on at least one of the competitive reaction of the group, the use of the protecting group, the reaction characteristics of the characteristic group, and the human name reaction rule.
[0059] A second aspect of the present application provides a device for predicting the retrosynthesis of a compound molecule, comprising:
[0060] an acquisition unit, configured to acquire a target molecule and use the target molecule as a root node in a tree structure, wherein the root node is associated with a first leaf node in the tree structure, and the tree structure contains a retrosynthetic pathway of the target molecule;
[0061] an expansion unit, configured to expand the first leaf node based on a target retrosynthetic model to obtain a plurality of second leaf nodes, wherein the target retrosynthetic model includes a graph neural network and a reactant generation network, the graph neural network is configured to determine bond breaking positions of compound molecules in the first leaf node, and the reactant generation network is configured to obtain a predicted molecule set based on the bond breaking positions;
[0062] a processing unit, configured to recursively process the set of predicted molecules in the second leaf node to determine a terminal node when a preset condition is met;
[0063] The prediction unit is used to traverse the path information corresponding to the terminal node to determine the retrosynthetic path of the target molecule.
[0064] Optionally, in some possible implementations of the present application, the expansion unit is specifically configured to determine a first character string corresponding to the compound molecule in the first leaf node;
[0065] The expansion unit is specifically configured to convert the first character string into a first molecular graph based on node distribution;
[0066] The expansion unit is specifically configured to input the first molecular graph into the graph neural network to obtain the bond breaking position;
[0067] The expansion unit is specifically configured to input the bond-breaking position into the reactant generation network to obtain at least one synthon;
[0068] The expansion unit is specifically configured to filter the synthons based on preset rules to determine the predicted molecule set.
[0069] Optionally, in some possible implementations of the present application, the expansion unit is specifically configured to input the first molecular graph into the graph neural network, and perform parsing in combination with a bond breaking number restriction to obtain bond breaking information;
[0070] The expansion unit is specifically used to determine the target key feature based on the target molecule;
[0071] The expansion unit is specifically used to extract the bond breaking information based on the target key features to obtain the bond breaking position, the target key features include atomic key features and bond key features, the atomic key features include at least one of atom type, number of bonds, formal charge, chirality, number of hydrogen atoms, atomic hybridization state, aromaticity, atomic weight, high-frequency reaction center features and reaction type, and the bond key features include at least one of bond type, conjugation, ring bond and molecular stereochemical features.
[0072] Optionally, in some possible implementations of the present application, the expansion unit is specifically configured to obtain a first training molecule and a corresponding first training synthon;
[0073] The expansion unit is specifically configured to determine point features and edge features of the first training molecule and the first training synthon, wherein the point features are used to indicate the atomic relationship between the first training molecule and the first training synthon, and the edge features are used to indicate the chemical bond relationship between the first training molecule and the first training synthon;
[0074] The expansion unit is specifically configured to train a first loss function based on the point features and the edge features;
[0075] The expansion unit is specifically configured to determine a bond breaking probability of a chemical bond between the first training molecule and the first training synthon;
[0076] The expansion unit is specifically configured to train a second loss function based on the bond break probability;
[0077] The expansion unit is specifically used to update the graph neural network according to the trained first loss function and the trained second loss function.
[0078] Optionally, in some possible implementations of the present application, the expansion unit is specifically configured to segment the target molecule based on the bond breaking position to obtain at least one synthetic sub-molecule graph;
[0079] The expansion unit is specifically configured to convert the synthon molecule graph into a second character string;
[0080] The expansion unit is specifically configured to update the second character string based on a preset response type to obtain a third character string;
[0081] The expansion unit is specifically configured to input the third character string into the reactant generation network to obtain at least one synthon.
[0082] Optionally, in some possible implementations of the present application, the expansion unit is specifically used to obtain a second training molecule, a second training synthon, and a training reactant;
[0083] The expansion unit is specifically configured to determine the first training character string based on the character string corresponding to the second training molecule, the character string corresponding to the second training synthon, and the preset reaction type;
[0084] The expansion unit is specifically configured to determine a second training character string corresponding to the training reactant;
[0085] The expansion unit is specifically configured to associate the first training string with the second training string to determine a first training sample pair;
[0086] The expansion unit is specifically configured to train the reactant generation network based on the first training sample pairs.
[0087] Optionally, in some possible implementations of the present application, the expansion unit is specifically used to obtain a candidate character string predicted by the graph neural network;
[0088] The expansion unit is specifically configured to add the candidate character string to the character string corresponding to the second training synthesizer to update the first training character string to obtain a third training character string;
[0089] The expansion unit is specifically configured to associate the third training string with the second training string to determine a second training sample pair;
[0090] The expansion unit is specifically configured to train the reactant generation network based on the second training sample pairs.
[0091] Optionally, in some possible implementations of the present application, the expansion unit is specifically used to determine a target character format;
[0092] The expansion unit is specifically configured to update the character string corresponding to the second training synthon and the first training character string determined by the preset reaction type based on the target character format, so as to reduce the distance between the character string corresponding to the second training synthon and the first training character string determined by the preset reaction type.
[0093] Optionally, in some possible implementations of the present application, the processing unit is specifically configured to determine a first candidate molecule corresponding to the predicted molecule set in the second leaf node under a preset reaction type;
[0094] The processing unit is specifically configured to expand the first candidate molecule based on a target retrosynthetic model to obtain a third leaf node;
[0095] The processing unit is specifically configured to recursively process the set of predicted molecules in the third leaf node to determine a second candidate molecule;
[0096] The processing unit is specifically configured to determine the second candidate molecule as the terminal node if the second candidate molecule meets a preset condition.
[0097] Optionally, in some possible implementations of the present application, the processing unit is specifically configured to perform traversal based on the second candidate molecule to obtain a plurality of path molecules;
[0098] The processing unit is specifically configured to determine, if the path molecule is a molecule in the basic molecule set, whether the second candidate molecule meets the preset condition and determine the second candidate molecule as the terminal node.
[0099] Optionally, in some possible implementations of the present application, the processing unit is specifically configured to determine the number of expansions corresponding to the second candidate molecule in the tree structure;
[0100] The processing unit is specifically configured to determine that the second candidate molecule meets the preset condition if the number of expansions reaches a preset value, and determine that the second candidate molecule is the terminal node.
[0101] The third aspect of the present application provides a computer device comprising: a memory, a processor and a bus system; the memory is used to store program code; the processor is used to execute the retrosynthesis prediction method of the compound molecule described in the first aspect or any one of the first aspects according to the instructions in the program code.
[0102] The fourth aspect of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the method for retrosynthesis prediction of a compound molecule described in the first aspect or any one of the first aspects.
[0103] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for retrosynthesis prediction of a compound molecule provided in the first aspect or various optional implementations of the first aspect.
[0104] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0105] By obtaining a target molecule and using it as the root node in a tree structure, the root node is associated with the first leaf node in the tree structure, and the tree structure contains the retrosynthetic path of the target molecule; then, based on the target retrosynthetic model, the first leaf node is expanded to obtain multiple second leaf nodes. The target retrosynthetic model includes a graph neural network and a reactant generation network. The graph neural network is used to determine the bond-breaking position of the compound molecule in the first leaf node, and the reactant generation network is used to obtain a set of predicted molecules based on the bond-breaking position; further, the set of predicted molecules in the second leaf node is recursively processed to determine the terminal node when the preset conditions are met; and then the path information corresponding to the terminal node is traversed to determine the retrosynthetic path of the target molecule. Thus, the retrosynthetic prediction process of multi-step reactions is realized. Due to the use of a step-by-step recursive expansion and screening process of leaf nodes, and the path backtracking of the terminal node when the preset conditions are met, the reliability of the reactants in the retrosynthetic prediction process of the multi-step reaction is guaranteed, and the accuracy of the retrosynthetic prediction of the compound molecule is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0106] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0107] Figure 1 A network architecture diagram for the operation of the retrosynthesis prediction system for compound molecules;
[0108] Figure 2 A flowchart for the reverse synthesis prediction of a compound molecule provided in an embodiment of the present application;
[0109] Figure 3 A flowchart of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0110] Figure 4A schematic diagram of a scenario for a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0111] Figure 5 A schematic diagram of another scenario of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0112] Figure 6 A schematic diagram of another scenario of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0113] Figure 7 A schematic diagram of another scenario of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0114] Figure 8 A schematic diagram of another scenario of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0115] Figure 9 A schematic diagram of another scenario of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0116] Figure 10 A flowchart of another method for predicting the reverse synthesis of a compound molecule provided in an embodiment of the present application;
[0117] Figure 11 A schematic diagram of another scenario of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0118] Figure 12 A schematic diagram of another scenario of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0119] Figure 13 A schematic diagram of another scenario of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0120] Figure 14 A schematic diagram of another scenario of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application;
[0121] Figure 15 A schematic diagram of the structure of a retrosynthesis prediction device for a compound molecule provided in an embodiment of the present application;
[0122] Figure 16 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
[0123] Figure 17 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0124] The embodiment of the present application provides a method for predicting the retrosynthesis of a compound molecule and a related device, which can be applied to a system or program containing a retrosynthesis prediction function of a compound molecule in a terminal device, by obtaining a target molecule and using the target molecule as a root node in a tree structure, the root node is associated with the first leaf node in the tree structure, and the tree structure contains the retrosynthesis path of the target molecule; then the first leaf node is expanded based on the target retrosynthesis model to obtain multiple second leaf nodes, the target retrosynthesis model includes a graph neural network and a reactant generation network, the graph neural network is used to determine the bond breaking position of the compound molecule in the first leaf node, and the reactant generation network is used to obtain a set of predicted molecules based on the bond breaking position; further, the set of predicted molecules in the second leaf node is recursively processed to determine the terminal node when a preset condition is reached; and then the path information corresponding to the terminal node is traversed to determine the retrosynthesis path of the target molecule. Thus, the retrosynthesis prediction process of a multi-step reaction is realized, and due to the process of gradually recursively expanding and screening the leaf nodes, and tracing back the path of the terminal node when the preset condition is reached, the reliability of the reactants in the retrosynthesis prediction process of the multi-step reaction is guaranteed, and the accuracy of the retrosynthesis prediction of the compound molecule is improved.
[0125] The terms "first," "second," "third," "fourth," etc. (if any) in the specification and claims of the present application and in the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential sequence. It should be understood that the numbers used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "corresponding to," and any variations thereof, are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or apparatus.
[0126] First, some terms that may appear in the embodiments of this application are explained.
[0127] Simplified molecular input line entry specification (SMILES): A specification that explicitly describes the molecular structure using an ASCII string.
[0128] Transformer: A neural network model for sequence learning based on attention mechanism.
[0129] Graph Neural Networks (GNN): A series of neural network algorithms that are applicable to graph data, such as molecular graphs.
[0130] Reaction center: refers to the subgraph consisting of the vertex of a bond that will be broken during retrosynthesis and the edges of its first-degree neighbors.
[0131] Monte Carlo Tree Search (MCTS): A heuristic search algorithm used for certain decision-making processes. A prime example is the Go program AlphaGo, which uses both Monte Carlo Tree Search and deep learning.
[0132] Atom-mapping: A way of representing chemical reactions by matching atoms one-to-one between reactants and products. Often used in template-based retrosynthesis algorithms.
[0133] Basic molecule set: A basic molecule set is a library of compounds used to determine the predicted endpoint of a reaction in multi-step retrosynthesis. That is, as long as the predicted reactant is within the set, the reaction is predicted to stop and will not be further decomposed to predict the synthesis path. Therefore, the size of the basic molecule set determines the number of steps in a synthesis route.
[0134] Root node: The search starting node in the tree structure, used to indicate the target synthetic compound in the retrosynthesis prediction of compounds.
[0135] Leaf node: A lower-level node of the root node, which is used to indicate the intermediate compound after single-step or multi-step retrosynthesis prediction in the retrosynthesis prediction of a compound.
[0136] Terminal node: A node in a tree structure that satisfies the search termination criteria, such as a node that satisfies the search termination criteria in a Monte Carlo tree search for retrosynthesis prediction. The search termination criteria may be that the number of expansions of the terminal node reaches a preset value or that the terminal node is a molecule in a preset molecule set.
[0137] Retrosynthetic pathway: the pathway from the target synthetic compound to the compounds involved in the reaction.
[0138] It should be understood that the retrosynthesis prediction method of compound molecules provided in this application can be applied to a system or program containing a retrosynthesis prediction function of compound molecules in a terminal device, such as a drug synthesis assistant. Specifically, the retrosynthesis prediction system of compound molecules can be run on Figure 1 In the network architecture shown in Figure 1As shown in FIG, it is a network architecture diagram of the operation of the retrosynthesis prediction system of compound molecules. As can be seen from the figure, the retrosynthesis prediction system of compound molecules can provide a retrosynthesis prediction process of compound molecules with multiple information sources, that is, through the trigger operation on the terminal side, the target molecule is sent to the server to realize the prediction of the reactant and feedback to the terminal; it can be understood that Figure 1 A variety of terminal devices are shown in FIG. 4 . The terminal devices may be computer devices. In actual scenarios, more or fewer types of terminal devices may participate in the process of retrosynthesis prediction of compound molecules. The specific number and type depend on the actual scenario and are not limited here. In addition, Figure 1 One server is shown in the figure, but in actual scenarios, multiple servers may be involved, and the specific number of servers depends on the actual scenario.
[0139] In this embodiment, the server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be connected directly or indirectly via wired or wireless communication, and the terminal and server can be connected to form a blockchain network, which is not limited in this application.
[0140] It can be understood that the above-mentioned retrosynthesis prediction system for compound molecules can be run on personal mobile terminals, for example, as an application such as a drug synthesis assistant, or it can be run on a server, or it can be run on a third-party device to provide retrosynthesis predictions for compound molecules, so as to obtain the retrosynthesis prediction processing results of the compound molecules of the information source; the specific retrosynthesis prediction system for compound molecules can be run in the above-mentioned device in the form of a program, or it can be run as a system component in the above-mentioned device, or it can be used as a cloud service program. The specific operation mode depends on the actual scenario and is not limited here.
[0141] With the rapid development of artificial intelligence (AI), it has been gradually introduced into various scientific fields and is playing a significant role. In chemistry, chemical reactions are infinitely variable under different conditions. Therefore, in the past, when preparing compound molecules, researchers required a great deal of time and effort to design a reasonable organic synthesis route. However, if AI-based machine learning techniques could assist researchers in designing organic synthesis routes, it could greatly improve the efficiency of researchers in the research and development of chemical drug molecules and other compounds.
[0142] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning through demonstration.
[0143] Currently, machine learning-based retrosynthesis algorithms can be primarily categorized as template-based. In template-based algorithms, the templates or rules describing chemical reaction transformations can be manually annotated or extracted from existing chemical reaction libraries. These are then used to match the chemical reactions predicted to occur with the target molecule.
[0144] However, template-based algorithms require a large number of reaction templates. Retrosynthesis processes without reaction templates may be unpredictable or incorrectly predicted, affecting the accuracy of retrosynthesis predictions for compound molecules.
[0145] In order to solve the above problems, this application proposes a method for predicting the retrosynthesis of compound molecules. Figure 2 In the process framework of the reverse synthesis prediction of the compound molecules shown, Figure 2 As shown, a process architecture diagram of the reverse synthesis prediction of a compound molecule provided in an embodiment of the present application, the user performs the target operation related to target molecule input by the terminal, so that the target molecule is sent to the server, and then the determination of the reactant is carried out by combining single-step reaction prediction and multi-step reaction prediction. Specifically, that is, using the molecular graph structure information and SMILES string information of the original product (target molecule), the synthon after bond breaking is completed, so as to obtain reactant. The graph structure and SMILES string information of the molecule are fully utilized in the prediction process summary; and due to the flow of its whole reverse synthesis, the bond breaking position is first given, and the synthon after bond breaking is completed, and this process is very easy to visualize, and also extremely interpretable. Subsequent reuse of the method for Monte Carlo tree search carries out the sorting and selection of single-step results, and then realizes multi-step reaction prediction, so as to obtain reactant.
[0146] It is understandable that the method provided in this application can be written as a program to serve as a processing logic in a hardware system, or as a retrosynthesis prediction device for a compound molecule, which implements the above-mentioned processing logic in an integrated or external manner. As an implementation method, the retrosynthesis prediction device for the compound molecule obtains a target molecule and uses the target molecule as the root node in a tree structure, the root node is associated with the first leaf node in the tree structure, and the tree structure contains the retrosynthesis path of the target molecule; then, based on the target retrosynthesis model, the first leaf node is expanded to obtain multiple second leaf nodes, the target retrosynthesis model includes a graph neural network and a reactant generation network, the graph neural network is used to determine the bond breaking position of the compound molecule in the first leaf node, and the reactant generation network is used to obtain a predicted molecule set based on the bond breaking position; further, the predicted molecule set in the second leaf node is recursively processed to determine the terminal node when the preset condition is met; and then the path information corresponding to the terminal node is traversed to determine the retrosynthesis path of the target molecule. This realizes the retrosynthesis prediction process of multi-step reactions. By adopting the process of step-by-step recursive expansion and screening of leaf nodes, and tracing back the path of the terminal node when the preset conditions are met, the reliability of the reactants in the retrosynthesis prediction process of multi-step reactions is guaranteed, and the accuracy of the retrosynthesis prediction of compound molecules is improved.
[0147] The solutions provided in the embodiments of the present application involve machine learning technology of artificial intelligence, which is specifically illustrated by the following embodiments:
[0148] In combination with the above process architecture, the following will introduce the retrosynthesis prediction method of the compound molecules in this application, please refer to Figure 3 , Figure 3 A flowchart of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application is provided. The prediction method can be executed by a terminal, a server, or both a terminal and a server. The embodiment of the present application includes at least the following steps:
[0149] 301. Obtain a target molecule and use the target molecule as a root node in a tree structure.
[0150] In this embodiment, the target molecule can be a drug molecule or a compound molecule for other purposes. The specific molecular form depends on the actual scenario.
[0151] In addition, the root node is associated with the first leaf node in the tree structure, and the tree structure contains the retrosynthetic path of the target molecule; wherein the tree structure can be a Monte Carlo tree, that is, a heuristic search algorithm tree used for decision-making process, in which the root node is the node in the upper layer of the leaf node, and the synthesis path of the target molecule can be determined by tracing back the path from the leaf node to the root node.
[0152] In order to facilitate the understanding of the embodiment, first see Figure 4 The scene flow shown, Figure 4 A schematic diagram of a scenario for a method for predicting the retrosynthesis of a compound molecule, provided in an embodiment of the present application. Each node represents a set of molecules (e.g., a set of reactants, i.e., a node containing multiple reactant molecules). Furthermore, the endpoint molecule (reactant) is defined as the final node. Starting from the root node (target molecule), the search tree iterates through four steps: selection, expansion, rollout, and update, and the above process can be repeated after the update.
[0153] Specifically, the selection process is to traverse the search tree from the root node (target molecule) to the leaf node by selecting the child node A with a higher score. The score is generated by a scoring function, which is a weighted sum of the scores (rewards) fed back by all the terminal nodes expanded from the root node and the inverse of the number of visits to the root node.
[0154] The expansion process is to expand the node A with a high score to obtain B and C, that is, to add leaf nodes through the target retrosynthesis model. For example, you can first traverse 10 reaction types and predict 3 results for each reaction type, up to a total of 30. Then, filter the 30 results and retain the ones with higher probability using methods such as partial rules, retrosynthesis probability, and forward synthesis prediction model probability. Among them, the partial rules include (1) the generated result molecule must be a molecule that exists in nature; (2) the generated result molecule is organic; (3) the number of rings of the generated result molecule does not increase. The retrosynthesis probability model and forward synthesis prediction model are empirical models based on the summary of synthesis experience, which can reflect the feasibility of the expanded compound.
[0155] The simulation phase first iterates through 10 reaction types, predicting one result for each, for a total of 10. These 10 results are then filtered, and the most likely reaction is selected for further expansion using factors such as retrosynthesis probability and forward synthesis prediction probability. This process is repeated until a stopping condition is met. Specifically, the stopping condition can be that all leaf nodes are in the basic molecule set or a specified number of predictions has been reached.
[0156] The update step calculates the reward score for the final node and gradually updates it to the nodes in the previous layer. The reward calculation involves simulating a synthetic pathway that can generate the final node. The reward is calculated by dividing the number of leaf node molecules in the pathway by the number of leaf node molecules in the raw material library. This updates the tree structure score, facilitating the subsequent selection-expansion-simulation-update cycle, allowing for accurate extraction of suitable reactants based on the tree structure.
[0157] It can be understood that the scoring in the tree structure in this embodiment is set as a cyclic process, and the specific scoring function can be used in any round of the cyclic process; in addition, the numerical descriptions in the above step explanations are only examples, and the specific numerical values depend on the actual scenario.
[0158] 302. Expand the first leaf node based on the target retrosynthesis model to obtain multiple second leaf nodes.
[0159] In this embodiment, the target retrosynthesis model includes a graph neural network and a reactant generation network. The graph neural network is used to determine the bond-breaking position of the compound molecule in the first leaf node, and the reactant generation network is used to obtain a predicted molecule set based on the bond-breaking position; that is, the process of determining the intermediate reactant in the second leaf node includes two stages, namely, one stage is used to predict the potential bond-breaking position of the molecule and generate the synthon after the bond-breaking; the second stage is to use the information of the reactant to complete the synthon and obtain the intermediate reactant.
[0160] Optionally, in the process of obtaining the intermediate reactant (determination of the second leaf node), multiple candidate results may be obtained, and screening is required to obtain the intermediate reactant, such as Figure 5 As shown, Figure 5 A scenario diagram of a method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application; the figure shows that for compound molecule A, after determining the bond-breaking position, it can first be expanded based on the reaction type, and then the reaction type is preliminarily selected to obtain candidate sequence 1 (R1-Rn), for example, the top 10 types of each reaction type are selected; then effectiveness screening is performed to obtain candidate sequence 2 (R1-Rk, k<n), for example, to determine whether the molecules in candidate sequence 1 are molecules that may exist effectively and stably; further atomic conservation screening is performed to obtain candidate sequence 3 (R1-Rm, m<k); then the synthesis probability in candidate sequence 3 is calculated, thereby screening out five possible reaction sets B and C, wherein the synthesis probability can be obtained based on the success rate or usage rate of different types of reactions statistically analyzed in the database.
[0161] In addition, the determination of intermediate reactants can also be carried out directly based on the bond breaking probability of the expanded set of reaction types, or based on the determination of the reactant prediction probability after the initial selection of reaction types, or the determination of the reactant set in the second leaf node by combining the two repeated items.
[0162] It is understandable that for a complex molecule, multiple single-step reaction predictions are typically required. Based on the ranking results of the single steps, the next single-step reaction prediction is then performed for the resulting reactants or intermediates until a library of known or commercially available raw materials (here defined as the basic set of molecules, which is used to determine the endpoint of the retrosynthetic analysis) is reached. Therefore, the accuracy of single-step reaction predictions plays a crucial role in the prediction of the entire multi-step retrosynthesis.
[0163] The following describes the process of single-step prediction, that is, the process of using the target retrosynthesis model. Figure 6 As shown, it is a scenario schematic diagram of a method for retrosynthesis prediction of a compound molecule provided in an embodiment of the present application; the figure shows that for the single-step prediction process, the first character string corresponding to the compound molecule in the first leaf node is first determined; then the first character string is converted into a first molecular graph based on the node distribution; and then the first molecular graph is input into the graph neural network to obtain the bond breaking position (bond breaking position determination); then the bond breaking position is input into the reactant generation network to obtain at least one synthon; and then the synthons are filtered based on preset rules to determine the predicted molecule set (reactant set).
[0164] After obtaining the reactant set, the specific reaction process can be obtained, such as Figure 7 As shown, it is a scene diagram of a method for retrosynthesis prediction of a compound molecule provided in an embodiment of the present application; the figure shows synthon 1 and synthon 2 obtained based on the target molecule, and reactants 1 and reactant 2 corresponding to synthon 1 and synthon 2, wherein the determination of reactant 1 is the process of searching the basic molecule set for synthon 1, that is, searching the basic molecule set for molecules associated with the synthon.
[0165] It can be understood that the problem of bond breakage prediction is a graph-to-graph conversion problem. Regarding the molecular graph determination process in the above steps, the given product SMILES string is first converted into a corresponding molecular graph Gp with Np nodes, which is then input into the graph neural network to predict bond breaks within this molecular graph.
[0166] Specifically, the bond break prediction process is based on target key features. First, the first molecular graph is fed into a graph neural network and parsed with a bond break limit to obtain bond break information. Next, target key features are determined based on the target molecule, such as the atom types and bond types. Finally, bond break information is extracted based on the target key features to determine the bond break locations.
[0167] It can be understood that the target key features include atomic key features and bond key features, and the features of atoms (nodes) and bonds (edges) used in the target key features can be automatically extracted using the open source RDKit. Specifically, atomic key features include at least one of atom type, number of bonds, formal charge, chirality, number of hydrogen atoms, atomic hybridization state, aromaticity, atomic weight, high-frequency reaction center features and reaction type, and bond key features include at least one of bond type, conjugation, ring bond and molecular stereochemistry features.
[0168] Specifically, the atomic type is the atomic number of the atom (referring to the sequence number of the elements in the periodic table); the number of bonds is the number of different chemical bonds to which the atom belongs; the formal charge is the charge assigned to the atom in the product molecule; the chirality means that a molecule cannot overlap with its mirror image, such as people's hands, the left hand and the mirror-image right hand do not overlap; the number of connected hydrogen atoms is the number of hydrogen atoms connected to the atom; the atomic hybridization is sp, sp2, sp3, sp3d or sp3d2; the aromaticity is the ability to characterize whether the atom is in an aromatic ring system; the atomic weight is the weight of the atom; the high-frequency reaction center feature is whether an atom has the high-frequency reaction center feature, which depends on whether the molecular subgraph containing the atom is a high-frequency reaction center; the high-frequency reaction center refers to the center where reactions frequently occur, extracted from the products of the retrosynthesis training set; the chemical reaction type of the retrosynthesis reaction can also be used as a feature of the atom. In addition, the bond type indicates the type of chemical bond, such as single bond, double bond, triple bond, aromatic bond, etc.; the conjugation characteristic indicates whether the chemical bond is conjugated; the ring bond characteristic indicates whether the chemical bond is part of a ring bond; the molecular stereochemistry characteristics include no chiral factors, arbitrary chiral factors, or double bond stereochemistry, etc.
[0169] Optionally, since there may be multiple combinations of bond breaks for a given target molecule, an auxiliary task can be added to limit the total number of bond breaks. Figure 8 As shown, a scenario schematic diagram of a method for retrosynthesis prediction of a compound molecule provided in an embodiment of the present application is shown; the figure shows a bond breaking prediction process (a) based on atomic features, and a bond breaking prediction process (b) based on atomic features and bond features, that is, the number of bond breaks, bond breaking type or bond breaking energy value is limited on the basis of the bond breaking prediction process of atomic features, thereby improving the accuracy of determining the bond breaking position.
[0170] The following describes the training process for the neural network in this example. The model training data used comes from the USPTO_50k and USPTO_480k datasets, subsets of the 1.8 million-word USPTO database. Reactions involving chiral molecules were excluded, and all reactions were atom-mapped. The distribution of reaction types is shown in Table 1, which primarily covers the 10 major chemical reaction types.
[0171] Table 1. Distribution of reaction types in USPTO_50k and USPTO_480k data
[0172]
[0173] Specifically, for the training process of the graph neural network, first obtain the first training molecule and the corresponding first training synthon; then determine the point features (atomic features) and edge features (bond features) of the first training molecule and the first training synthon, wherein the point features are used to indicate the relationship between the atoms between the first training molecule and the first training synthon, and the edge features are used to indicate the relationship between the chemical bonds between the first training molecule and the first training synthon; then train the first loss function based on the point features and the edge features; and determine the bond breaking probability of the chemical bond between the first training molecule and the first training synthon; and then train the second loss function based on the bond breaking probability; thereby updating the graph neural network according to the trained first loss function and the trained second loss function.
[0174] Specifically, for the training process of the first loss function, that is, for a given input:
[0175] Gp={Ap,Ep,Xp}
[0176] Wherein, Gp is the molecular graph of the first training molecule, Ap is the atomic feature of the first training molecule, Ep is the bond feature of the first training molecule, and Xp is the parameter of the GAT model.
[0177] Embedding is different from GAT value considerations The EGAT algorithm calculates the embedding of points and edges in the l+1th layer according to the following formula: and From the embedding of the previous layer and
[0178] First, multiply the vector representation (embedding) of the point by the weight:
[0179]
[0180] Then, the activation function is used for calculation (the Mish function is used as an example):
[0181]
[0182] Furthermore, softmax is used to obtain the embedding of the l+1 layer. The last formula is to concatenate the vertices i and j of the l+1 layer and the three vectors of the edge and then multiply them by the weight coefficient. The specific formula is as follows:
[0183]
[0184]
[0185]
[0186] Among them, the initial embedding are the features of the input points and edges. W, V, U are vectors of different weight coefficients; zi, cij are intermediate variables; are trainable parameters (F, F`, and D are the values of the dimensions of different feature vectors), N i is the neighbor point of node i, a i,j is the attention parameter of node i and its neighbor j. and are the representations of the output points and edges respectively.
[0187] Furthermore, the loss of chemical bond breaking simulation is explained. After superimposing L layers of EGAT, the final edge representation can be obtained. represents the chemical bond between nodes i and j; Represents each node. In order to predict the key The possibility of bond breaking can be solved by adding a fully connected layer and a Sigmoid activation layer:
[0188]
[0189] Among them, d i,j is the position of the broken bond; is the final edge representation; is the weight coefficient.
[0190] Then, the goal of optimizing bond break prediction is to minimize the bond break d i,j and the real y i,j ∈{0, 1} is the negative logarithm of the likelihood through a binary cross entropy loss function, the specific function is as follows:
[0191]
[0192] Where K is the key b i,j The amount of all data that exists, G is the corresponding molecular graph, y i,j is the confidence parameter, d i,j is the position of the broken bond.
[0193] It is understandable that if the corresponding adjacent element a i,j If it is not zero, then key b i,j exists. For the ground-truth y i,j =1 means that the chemical bond between the i-th atom and the j-th atom is broken.
[0194] Optionally, the model training at this stage can use a multistep method, but in order to improve the learning rate, it can be optimized to a cosine annealing training method, that is, the learning rate changes cyclically.
[0195] Specifically, cosine annealing can reduce the learning rate using a cosine function. In a cosine function, as x increases, the cosine value first decreases slowly, then decreases more rapidly, and then decreases slowly again. This decrease pattern can be combined with the learning rate to produce very good results in a very efficient calculation method. The specific calculation formula is as follows:
[0196]
[0197] Among them, η t is the learning rate; η max is the maximum learning rate; η min is the minimum learning rate; T cur is the current iteration number; T max is the maximum number of iterations.
[0198] Through the above calculation process, we can escape the current local optimum and find a new local optimum. After each cycle of calculation is completed, the model parameters of different local optimal points are saved, thereby gradually reducing the learning rate.
[0199] The above embodiment introduces the use of graph neural networks and the learning process. The use of reactant generation networks and the learning process are described below. Specifically, after predicting the bond breaking position, the synthon can be obtained by segmenting the target molecule. The segmented synthon subgraph can be converted into a SMILES representation using RDKit. It should be noted that the synthon here is not necessarily a real reactant, but may only be a substructure of the reactant. A Transformer-based neural network (reactant generation network) for predicting reactants can then be constructed.
[0200] Specifically, the application process of the reactant generation network is to first segment the target molecule based on the bond breaking position obtained by the graph neural network to obtain at least one synthon molecule graph; then convert the synthon molecule graph into a second string; further update the second string based on the preset reaction type to obtain a third string, wherein the preset reaction type can be any one of the reaction types shown in Table 1; then input the third string into the reactant generation network to obtain at least one synthon.
[0201] In one possible scenario, Figure 9 As shown, a scenario diagram of a method for predicting the reverse synthesis of a compound molecule provided in an embodiment of the present application; that is, each reaction type can be represented as a string RXN, for example, if the reaction type is the kth type, it is represented by RXN_k; each product molecule can be expressed as a SMILES string, recorded as Product; each synthon can also be expressed as a SMILES string, recorded as Synthon; the molecule corresponding to each synthon can also be expressed as a SMILES string, recorded as Reactant. Here, the source sequence data information is a series of reaction type information (if any), a standardized product SMILES string and the corresponding synthon. The target sequence is the SMILES information of the reactant corresponding to each synthon. Further, an attention mechanism can be used to make both the product and the synthon observable, thereby increasing the interpretability of the algorithm.
[0202] Furthermore, during the training of the reactant generation network, the relationships among training molecules, synthons, and training reactants need to be associated in the character dimension. Specifically, a second training molecule, a second training synthon, and a training reactant can be obtained. A first training string can then be determined based on the string corresponding to the second training molecule, the string corresponding to the second training synthon, and a preset reaction type. A second training string corresponding to the training reactant can also be determined. The first and second training strings can then be associated to determine a first training sample pair. Finally, the reactant generation network can be trained based on the first training sample pair.
[0203] In one possible scenario, assuming there are two possible second training synthons, whose SMILES strings are Synthon1 and Synthon2, the strings corresponding to the reaction type, product molecule, and synthon can be combined to obtain a long string (the first training string), as shown below:
[0204] U=<RXN_i> Product <link> Sython1.Synthon2
[0205] And correspond to the correct target molecule strings Reactant1 and Reactant2 (here, assuming there are only two reactants), strung into a long target string (the second training string):
[0206] V=Reactant1.Reactant2
[0207] Then you can use U and V to form a training sample (the first training sample pair):
[0208] (U, V)
[0209] Optionally, to improve the robustness of the reactant generation network, the SMILES strings of the synthons predicted in the first stage (bond breaking and segmentation) can also be used as training data, where the predictions may be incorrect. Specifically, the candidate strings predicted by the graph neural network (prediction results) are first obtained; the candidate strings are then added to the strings corresponding to the second training synthons to update the first training strings to obtain third training strings; the third training strings are further associated with the second training strings to determine second training sample pairs; and the reactant generation network is then trained based on the second training sample pairs.
[0210] In one possible scenario, suppose the first-stage model predicts three synthons (candidate strings):
[0211]
[0212] Then you can also enter the third training string as:
[0213]
[0214] Then, together with the correct output target V, form a sample (the second training sample pair):
[0215]
[0216] The first training sample pairs are then combined to train the second stage model (reactant generation network).
[0217] Specifically, during the training process, the training objective can be to minimize the difference between the predicted string and the true reactant string. The specific formula is as follows:
[0218]
[0219] Where S is the SMILES string of all reactants predicted by the model, s represents the index of the sth reaction sample, and l is any suitable loss function, such as a negative likelihood function.
[0220] Optionally, to reduce the difficulty of learning the sequence model, the edit distance between the SMILES expression of the learning target, i.e., the reactant, and the synthon can be minimized, that is, the SMILES of each synthon can be canonicalized. Specifically, the target character format can be first determined, i.e., processed using the open source chemical informatics tool RDKit; then, based on the target character format, the string corresponding to the second training synthon and the first training string determined by the preset reaction type are updated to reduce the distance between the string corresponding to the second training synthon and the first training string determined by the preset reaction type, thereby reducing the difficulty of learning the sequence model.
[0221] 303. Recursively process the predicted molecule set in the second leaf node to determine the terminal node when a preset condition is met.
[0222] In this embodiment, recursive processing is a method of solving a problem by repeatedly decomposing the problem into similar sub-problems, that is, the process of splitting the compound in the predicted molecule set in the second leaf node to obtain the synthon is repeated until the preset condition is met.
[0223] Specifically, the recursive processing process is to first determine the first candidate molecule corresponding to the predicted molecule set in the second leaf node under the preset reaction type; then expand the first candidate molecule based on the target retrosynthesis model to obtain the third leaf node; and recursively process the predicted molecule set in the third leaf node to determine the second candidate molecule; if the second candidate molecule meets the preset conditions, the second candidate molecule is determined as the terminal node, thereby realizing the prediction of multi-step retrosynthesis.
[0224] Specifically, the preset conditions can be set so that all synthons after the above recursive processing are molecules in the basic molecule set; that is, first traverse based on the second candidate molecule to obtain multiple path molecules; if the path molecule is a molecule in the basic molecule set, then determine that the second candidate molecule meets the preset conditions, and determine the second candidate molecule as the end node, thereby ensuring that the compound molecules on the predicted synthesis path are all simple basic molecules, ensuring feasibility in actual scenarios.
[0225] Furthermore, when selecting a basic molecule set, it's important to consider the rationality of the set's predicted results for multi-step retrosynthesis. Rationality here refers to the fact that chemists, when actually performing a synthesis, will consider the price and commercial availability of the intermediates at each step in the synthesis route to decide whether to continue with the retrosynthesis. Therefore, when selecting a basic molecule set, it's important to ensure that the molecules are commercially available chemical intermediates, rather than drug molecules used for virtual drug screening. The difference between the two is that chemical intermediates are generally packaged in large quantities (g level), while drug molecules used for screening are generally packaged in small quantities, at the milligram level, and are also relatively expensive. Therefore, when selecting compound libraries, I often base my selection on this principle, choosing building block libraries from companies with publicly available reagent catalogs and other companies that develop molecular libraries. Building block libraries, by contrast, have relatively small molecules and simple structures, offering cost advantages in practical use cases.
[0226] Understandably, the basic molecule set primarily considered the commercial availability and known status of the compounds. Therefore, we selected the common raw material supplier eMolecules (Plus and SC libraries, with over 20 million compounds) and the common building block compound library companies Enamine (97,000 compounds) and ChemDiv (70,000 compounds). After merging and deduplicating these libraries, the final basic molecule set consisted of approximately 23 million molecules.
[0227] Optionally, the preset condition may also be the number of recursive processing cycles, i.e., the number of expansions of the second candidate molecule. Specifically, the number of expansions corresponding to the second candidate molecule is first determined in the tree structure. If the number of expansions reaches a preset value, the second candidate molecule is determined to have met the preset condition and is designated as the final node. For example, when the number of expansions of the second candidate molecule reaches two, the second candidate molecule is segmented to obtain a third candidate molecule, and the third candidate molecule is further segmented to obtain a fourth candidate molecule, which is then designated as the final node.
[0228] 304. Traverse the path information corresponding to the terminal node to determine the retrosynthetic path of the target molecule.
[0229] In this embodiment, traversing the path information corresponding to the terminal node is to perform a reverse search in the direction of the root node based on the terminal point, thereby associating the compounds involved in the path to determine the retrosynthetic path of the target molecule.
[0230] In one possible scenario, the prediction method based on the above multi-step retrosynthesis has a top-10 prediction accuracy of 64% on the public ChEMBL100 molecule test set, that is, 64 out of 100 molecules can be predicted, and the top-1 prediction accuracy is 43%. This result is in the leading position in performance among several public platforms.
[0231] In combination with the above embodiment, it can be seen that by obtaining the target molecule and using the target molecule as the root node in the tree structure, the root node is associated with the first leaf node in the tree structure, and the tree structure contains the retrosynthetic path of the target molecule; then the first leaf node is expanded based on the target retrosynthetic model to obtain multiple second leaf nodes, the target retrosynthetic model includes a graph neural network and a reactant generation network, the graph neural network is used to determine the bond breaking position of the compound molecule in the first leaf node, and the reactant generation network is used to obtain a predicted molecule set based on the bond breaking position; further recursively process the predicted molecule set in the second leaf node to determine the terminal node when the preset condition is met; and then traverse the path information corresponding to the terminal node to determine the retrosynthetic path of the target molecule. Thus, the retrosynthetic prediction process of the multi-step reaction is realized. Due to the process of gradually recursively expanding and screening the leaf nodes, and tracing back the path of the terminal node when the preset condition is met, the reliability of the reactants in the retrosynthetic prediction process of the multi-step reaction is guaranteed, and the accuracy of the retrosynthetic prediction of the compound molecule is improved.
[0232] The above embodiment introduces the retrosynthesis prediction process of multi-step reactions. In the expansion process, different rules (for example, the generated result molecule must be a molecule existing in nature, the generated result molecule is organic, the number of rings of the generated result molecule does not increase, etc.) and models (for example, retrosynthesis probability model, forward synthesis prediction model, etc.) are used to screen nodes. In the process of setting specific rules and models, they can be automatically called or set by relevant personnel according to needs. The scenario is explained below. Please refer to Figure 10 , Figure 10 This is a flow chart of another method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application. The embodiment of the present application includes at least the following steps:
[0233] 1001. Obtain a target molecule and use the target molecule as a root node in a tree structure.
[0234] 1002. Expand the first leaf node based on the target retrosynthesis model to obtain multiple second leaf nodes.
[0235] In this embodiment, the process of steps 1001-1002 is the same as Figure 3 Steps 301-302 of the illustrated embodiment are similar, and the relevant feature descriptions can be referred to and will not be repeated here.
[0236] 1003. Obtain reaction screening requirements in response to the target operation.
[0237] In this embodiment, the reaction screening requirement is to screen the nodes that will subsequently participate in the simulation, such as screening out compounds with competitive reaction risks, selecting compounds with protecting groups, screening out compounds based on the distribution characteristics of CH bonds, selecting compounds involved in human name reactions, etc. The specific reaction screening requirements depend on the actual scenario.
[0238] It is understandable that the target operation can be an immediate input operation in the background by relevant personnel, or it can be an operation to set filtering rules between tree structure nodes. The specific operation method depends on the actual scenario.
[0239] Optionally, the above reaction screening requirements can also be applied to the screening during the expansion process. For example, during the expansion process, 10 reaction types are first traversed, and 3 results are predicted for each reaction type, for a total of up to 30. These 30 results are then filtered using the above reaction screening requirements to retain the most likely ones.
[0240] 1004. Screen the compound molecules in the second leaf node based on the reaction screening requirement.
[0241] In this embodiment, the above reaction screening requirements are described in conjunction with specific reactions.
[0242] (1) Application of competitive reaction.
[0243] In this embodiment, the reaction route is rationally designed by applying competitive reaction to avoid functional group interference, such as Figure 11 As shown, it is a scene diagram of the reverse synthesis prediction method of another compound molecule provided in the embodiment of the present application; the key step of the synthesis route in the figure is when to convert C=O into C=S double bond. Here, if the thiolation reaction is performed when the route of compound 3 is predicted, multiple competitive reactions of the C=O double bond will appear here, namely the competitive reactions of the aldehyde carbonyl and the amide carbonyl, and then the nodes containing the corresponding reactants will be screened out. The route thus given can avoid the prediction of the competitive reaction, that is, the thiolation reaction is performed when compound 5 is selected, and then the aldehyde group is introduced to obtain compound 3, thereby improving the accuracy of the reverse synthesis prediction.
[0244] (2) The use of protecting groups.
[0245] In this embodiment, the rational use of protecting groups has always been a difficult problem in computer-assisted retrosynthesis prediction, because this requires the computer to analyze the groups that may be present in the reaction substrate and then rationally protect the groups that are not desired to participate in the reaction with protecting groups and then remove the protecting groups.
[0246] In one possible scenario, Figure 12 As shown, it is a schematic diagram of a scenario of another method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application; for the target synthetic compound 9, the free NH2 group will have a competitive reaction, so the front protection is first performed as NHBoc to obtain compound 10, and then compound 10 can be easily obtained from compounds 11 and 12. Otherwise, if the free NH2 is in 12, an intramolecular reaction will occur with itself, affecting the reaction result, so the prediction results of the reactants without group protection are screened.
[0247] In another possible scenario, hydroxyl groups often need to be protected during oxidation or certain reactions conducted under alkaline conditions. Specific protection methods include: (1) preventing hydroxyl groups from being affected by bases by using etherification reactions, such as: ROH+ROH→H2O+R—O—R; (2) preventing hydroxyl group oxidation by using esterification reactions.
[0248] In addition, the protection of carboxyl groups sometimes requires protection under high temperature or alkaline conditions. The most common method for protecting carboxyl groups is esterification. Or, the protection of unsaturated carbon-carbon bonds: Carbon-carbon double bonds are easily oxidized, and their protection is mainly to use addition reactions to saturate them. Or, the protection of carbonyl groups (often appearing in the form of information questions) Carbonyl groups, especially aldehyde groups, often need to be protected when undergoing oxidation reactions or encountering bases. The protection of carbonyl groups generally adopts the method of generating acetals or ketals. For example: the generated acetals or ketals can be hydrolyzed to become the original aldehydes or ketones. The determination of the specific protecting group depends on the actual scenario and is not limited here.
[0249] (3) Application of regioselectivity.
[0250] In this embodiment, the regioselectivity problem of CH substitution reaction on the aromatic ring is solved, such as Figure 13FIG. 1 is a schematic diagram of another method for predicting the retrosynthesis of a compound molecule according to an embodiment of the present invention; when predicting molecule 15, the bromination reaction between NBS (16) and compound 17 is selected. Compound 17 has multiple aromatic rings (pyridine and furan rings) that can be brominated by compound 16. Therefore, the key to correctly predicting regioselectivity is to reasonably determine the distribution of the partial charge of each CH. Therefore, in the process of setting the reaction screening requirements, a specific CH distribution rule can be specified to select the corresponding reactants.
[0251] (4) Use of classic name reactions.
[0252] In this embodiment, since most organic name reactions have been studied and used by many organic chemists, they are relatively reliable chemical reactions, the substrate generalization is relatively high, and the reaction route is more likely to succeed. Therefore, when performing retrosynthetic analysis, the use of classic name reactions is a relatively reliable route, which is more likely to be favored by users and can predict reasonable and robust chemical reactions. Figure 14 , which is a schematic diagram of a scenario of another method for predicting the retrosynthesis of a compound molecule provided in an embodiment of the present application; the figure shows the Mitsunobu reaction, that is, in the process of screening reactants, compounds 21 and 22 are preferentially selected.
[0253] Specifically, the use of classic name reactions includes but is not limited to the following examples:
[0254] Beckman rearrangement: the reaction of ketone oxime to amide (caprolactam) under acidic conditions;
[0255] Cannizzarro disproportionation: the reaction of an aldehyde without α-h in the presence of a strong base to produce an alcohol and a carboxylic acid (benzaldehyde);
[0256] Claisen ester condensation: an ester forms a carbon anion in the presence of a strong base and undergoes nucleophilic addition elimination to another ester;
[0257] Clemmensen reduction: the reaction of aldehydes and ketones to hydrocarbons in the presence of zinc amalgam and concentrated hydrochloric acid (carbonyl groups become methylene groups);
[0258] cope elimination reaction: the elimination reaction of a tertiary amine after treatment with hydrogen peroxide and heating (Hoffmann's rule);
[0259] Corey-House reaction: coupling of alkyl halides and dialkyl copper lithium reagents (important reaction for connecting carbon chains);
[0260] Cram's rule: Nucleophiles preferentially attack from the side with less steric resistance;
[0261] Dickerman condensation: The reaction is similar to ester condensation, forming a ring;
[0262] Diels-Alder reaction: generally a reaction between a derivative of 1,3-butadiene and a derivative of ethylene (synergistic reaction);
[0263] Fehling's reagent: freshly prepared copper hydroxide oxidizes aldehydes to acids;
[0264] Friedel-Crafts reaction: a reaction that introduces a hydrocarbon or acyl group onto a benzene ring.
[0265] It is understandable that the application of the above reaction screening requirements can use one or more of them in actual scenarios, and the specific number and judgment order depend on the actual scenario.
[0266] 1005. Recursively process the predicted molecule set in the filtered second leaf node to determine the terminal node when a preset condition is met.
[0267] Specifically, in a recursive process, each simulation might involve traversing 10 reaction types, predicting one result for each, for a total of 10. These 10 results are then filtered, and the most likely reaction is selected for further expansion using the aforementioned reaction screening requirements, combined with the retrosynthesis probability and forward synthesis prediction probability. This process is then repeated until a stopping condition is met. This stopping condition can be when all leaf nodes are within the basic molecule set or when a preset number of recursions has been reached.
[0268] 1006. Traverse the path information corresponding to the terminal node to determine the retrosynthetic path of the target molecule.
[0269] In this embodiment, the process of step 1005-step 1006 is the same as Figure 3 Steps 303-304 of the illustrated embodiment are similar, and the relevant feature descriptions can be referred to and will not be repeated here.
[0270] It is understandable that the setting of the above reaction screening requirements can also be applied to the scenario of single-step retrosynthesis prediction. That is, for this application, a single-step retrosynthesis prediction method is also disclosed. Figure 3 Step 302 of the illustrated embodiment will not be described in detail here.
[0271] For single-step retrosynthesis predictions, the method achieved a 62.4% prediction accuracy even for data without reaction type labels, enhancing its generalizability and practicality, as real-world scenarios may lack such reaction type labels. This also demonstrates that large datasets significantly improve the accuracy of single-step predictions. Specifically, the accuracy was 58% on a dataset of 50,000 reactions, and increased to 62.4% when the dataset was expanded to 480,000 reactions.
[0272] In this example, the prediction accuracy for multi-step retrosynthesis currently leads the way on several publicly available platforms. On the publicly available ChEMBL 100 molecule test set, the top-10 prediction accuracy was 64%, meaning 64 of the 100 molecules could be predicted. The top-1 prediction accuracy was 43%, demonstrating excellent feasibility.
[0273] In order to better implement the above solution of the embodiment of the present application, the following also provides related devices for implementing the above solution. Figure 15 , Figure 15 This is a schematic diagram of the structure of a retrosynthesis prediction device for a compound molecule provided in an embodiment of the present application. The prediction device 1500 includes:
[0274] An acquisition unit 1501 is configured to acquire a target molecule and use the target molecule as a root node in a tree structure, wherein the root node is associated with a first leaf node in the tree structure, and the tree structure includes a retrosynthetic pathway for the target molecule.
[0275] an expansion unit 1502 for expanding the first leaf node based on a target retrosynthetic model to obtain a plurality of second leaf nodes, wherein the target retrosynthetic model includes a graph neural network and a reactant generation network, the graph neural network is used to determine bond breaking positions of compound molecules in the first leaf node, and the reactant generation network is used to obtain a predicted molecule set based on the bond breaking positions;
[0276] The processing unit 1503 is configured to recursively process the set of predicted molecules in the second leaf node to determine a terminal node when a preset condition is met;
[0277] The prediction unit 1504 is configured to traverse the path information corresponding to the terminal node to determine the retrosynthetic path of the target molecule.
[0278] Optionally, in some possible implementations of the present application, the expansion unit 1502 is specifically configured to determine a first character string corresponding to the compound molecule in the first leaf node;
[0279] The expansion unit 1502 is specifically configured to convert the first character string into a first molecular graph based on node distribution;
[0280] The expansion unit 1502 is specifically configured to input the first molecular graph into the graph neural network to obtain the bond breaking position;
[0281] The expansion unit 1502 is specifically configured to input the bond breaking position into the reactant generation network to obtain at least one synthon;
[0282] The expansion unit 1502 is specifically configured to filter the synthons based on preset rules to determine the predicted molecule set.
[0283] Optionally, in some possible implementations of the present application, the expansion unit 1502 is specifically configured to input the first molecular graph into the graph neural network, and perform parsing in combination with a bond breaking number restriction to obtain bond breaking information;
[0284] The expansion unit 1502 is specifically configured to determine a target key feature based on the target molecule;
[0285] The expansion unit 1502 is specifically used to extract the bond breaking information based on the target key features to obtain the bond breaking position, the target key features include atomic key features and bond key features, the atomic key features include at least one of atom type, number of bonds, formal charge, chirality, number of hydrogen atoms, atomic hybridization state, aromaticity, atomic weight, high-frequency reaction center features and reaction type, and the bond key features include at least one of bond type, conjugation, ring bond and molecular stereochemical features.
[0286] Optionally, in some possible implementations of the present application, the expansion unit 1502 is specifically configured to obtain a first training molecule and a corresponding first training synthon;
[0287] The expansion unit 1502 is specifically configured to determine point features and edge features of the first training molecule and the first training synthon, wherein the point features are used to indicate the atomic relationship between the first training molecule and the first training synthon, and the edge features are used to indicate the chemical bond relationship between the first training molecule and the first training synthon;
[0288] The expansion unit 1502 is specifically configured to train a first loss function based on the point features and the edge features;
[0289] The expansion unit 1502 is specifically configured to determine a bond breaking probability of a chemical bond between the first training molecule and the first training synthon;
[0290] The expansion unit 1502 is specifically configured to train a second loss function based on the bond break probability;
[0291] The expansion unit 1502 is specifically used to update the graph neural network according to the trained first loss function and the trained second loss function.
[0292] Optionally, in some possible implementations of the present application, the expansion unit 1502 is specifically configured to segment the target molecule based on the bond break position to obtain at least one synthetic sub-molecule graph;
[0293] The expansion unit 1502 is specifically configured to convert the synthon molecule graph into a second character string;
[0294] The expansion unit 1502 is specifically configured to update the second character string based on a preset response type to obtain a third character string;
[0295] The expansion unit 1502 is specifically configured to input the third character string into the reactant generation network to obtain at least one synthon.
[0296] Optionally, in some possible implementations of the present application, the expansion unit 1502 is specifically configured to obtain a second training molecule, a second training synthon, and a training reactant;
[0297] The expansion unit 1502 is specifically configured to determine a first training character string based on a character string corresponding to the second training molecule, a character string corresponding to the second training synthon, and the preset reaction type;
[0298] The expansion unit 1502 is specifically configured to determine a second training character string corresponding to the training reactant;
[0299] The expansion unit 1502 is specifically configured to associate the first training string with the second training string to determine a first training sample pair;
[0300] The expansion unit 1502 is specifically configured to train the reactant generation network based on the first training sample pairs.
[0301] Optionally, in some possible implementations of the present application, the expansion unit 1502 is specifically configured to obtain a candidate character string predicted by the graph neural network;
[0302] The expansion unit 1502 is specifically configured to add the candidate character string to the character string corresponding to the second training synthesizer to update the first training character string to obtain a third training character string;
[0303] The expansion unit 1502 is specifically configured to associate the third training string with the second training string to determine a second training sample pair;
[0304] The expansion unit 1502 is specifically configured to train the reactant generation network based on the second training sample pairs.
[0305] Optionally, in some possible implementations of the present application, the expansion unit 1502 is specifically configured to determine a target character format;
[0306] The expansion unit 1502 is specifically configured to update the character string corresponding to the second training synthon and the first training character string determined by the preset reaction type based on the target character format, so as to reduce the distance between the character string corresponding to the second training synthon and the first training character string determined by the preset reaction type.
[0307] Optionally, in some possible implementations of the present application, the processing unit 1503 is specifically configured to determine a first candidate molecule corresponding to the predicted molecule set in the second leaf node under a preset reaction type;
[0308] The processing unit 1503 is specifically configured to expand the first candidate molecule based on a target retrosynthetic model to obtain a third leaf node;
[0309] The processing unit 1503 is specifically configured to recursively process the predicted molecule set in the third leaf node to determine a second candidate molecule;
[0310] The processing unit 1503 is specifically configured to determine the second candidate molecule as the terminal node if the second candidate molecule meets a preset condition.
[0311] Optionally, in some possible implementations of the present application, the processing unit 1503 is specifically configured to perform traversal based on the second candidate molecule to obtain a plurality of path molecules;
[0312] The processing unit 1503 is specifically configured to determine, if the path molecule is a molecule in the basic molecule set, whether the second candidate molecule meets the preset condition and determine the second candidate molecule as the terminal node.
[0313] Optionally, in some possible implementations of the present application, the processing unit 1503 is specifically configured to determine the number of expansions corresponding to the second candidate molecule in the tree structure;
[0314] The processing unit 1503 is specifically configured to determine that the second candidate molecule meets the preset condition if the number of expansions reaches a preset value, and determine that the second candidate molecule is the final node.
[0315] By obtaining a target molecule and using it as the root node in a tree structure, the root node is associated with the first leaf node in the tree structure, and the tree structure contains the retrosynthetic path of the target molecule; then, based on the target retrosynthetic model, the first leaf node is expanded to obtain multiple second leaf nodes. The target retrosynthetic model includes a graph neural network and a reactant generation network. The graph neural network is used to determine the bond-breaking position of the compound molecule in the first leaf node, and the reactant generation network is used to obtain a set of predicted molecules based on the bond-breaking position; further, the set of predicted molecules in the second leaf node is recursively processed to determine the terminal node when the preset conditions are met; and then the path information corresponding to the terminal node is traversed to determine the retrosynthetic path of the target molecule. Thus, the retrosynthetic prediction process of multi-step reactions is realized. Due to the use of a step-by-step recursive expansion and screening process of leaf nodes, and the path backtracking of the terminal node when the preset conditions are met, the reliability of the reactants in the retrosynthetic prediction process of the multi-step reaction is guaranteed, and the accuracy of the retrosynthetic prediction of the compound molecule is improved.
[0316] The present application also provides a terminal device, such as Figure 16 The figure is a schematic diagram of the structure of another terminal device provided by an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method section of the embodiment of the present application. The terminal can be any terminal device including a mobile phone, tablet computer, personal digital assistant (PDA), point of sales (POS), car computer, etc. Taking the mobile phone as an example:
[0317] Figure 16 The block diagram shows a partial structure of a mobile phone related to the terminal provided in the embodiment of the present application. Figure 16 The mobile phone includes components such as a radio frequency (RF) circuit 1610, a memory 1620, an input unit 1630, a display unit 1640, a sensor 1650, an audio circuit 1660, a wireless fidelity (WiFi) module 1670, a processor 1680, and a power supply 1690. Those skilled in the art will appreciate that Figure 16 The mobile phone structure shown in the figure does not constitute a limitation to the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0318] The following combination Figure 16 A detailed introduction to the various components of a mobile phone:
[0319] The RF circuit 1610 can be used to receive and send signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 1680 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 1610 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 1610 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the global system of mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.
[0320] Memory 1620 can be used to store software programs and modules. Processor 1680 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in memory 1620. Memory 1620 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, memory 1620 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0321] The input unit 1630 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 1630 may include a touch panel 1631 and other input devices 1632. The touch panel 1631, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 1631, as well as air touch operations within a certain range on the touch panel 1631) and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1631 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 1680, and can receive commands sent by the processor 1680 and execute them. In addition, the touch panel 1631 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1631, the input unit 1630 can also include other input devices 1632. Specifically, the other input devices 1632 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power keys, etc.), a trackball, a mouse, a joystick, and the like.
[0322] The display unit 1640 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1640 may include a display panel 1641. Optionally, the display panel 1641 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 1631 may cover the display panel 1641. When the touch panel 1631 detects a touch operation on or near it, it is transmitted to the processor 1680 to determine the type of touch event. Subsequently, the processor 1680 provides a corresponding visual output on the display panel 1641 according to the type of touch event. Although in Figure 16 In the embodiment, the touch panel 1631 and the display panel 1641 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 1631 and the display panel 1641 can be integrated to realize the input and output functions of the mobile phone.
[0323] The mobile phone may also include at least one sensor 1650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1641 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1641 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described here.
[0324] Audio circuit 1660, speaker 1661, and microphone 1662 provide an audio interface between the user and the phone. Audio circuit 1660 converts received audio data into electrical signals and transmits them to speaker 1661, which then converts them into sound signals for output. Microphone 1662, on the other hand, converts collected sound signals into electrical signals, which are then received by audio circuit 1660 and converted into audio data. The audio data is then processed by processor 1680 and transmitted to, for example, another phone via RF circuit 1610, or stored in memory 1620 for further processing.
[0325] WiFi is a short-range wireless transmission technology. Mobile phones can help users send and receive emails, browse the web, and access streaming media through the WiFi module 1670. It provides users with wireless broadband Internet access. Figure 16 A WiFi module 1670 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0326] Processor 1680 is the control center of the phone, connecting all parts of the phone using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 1620 and accessing data stored in memory 1620, it executes various phone functions and processes data, thereby providing overall phone monitoring. Optionally, processor 1680 may include one or more processing units; alternatively, processor 1680 may integrate an application processor and a modem processor, with the application processor primarily handling the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 1680.
[0327] Specifically, the processor 1680 obtains a target molecule and uses the target molecule as the root node in a tree structure. The root node is associated with the first leaf node in the tree structure. The tree structure contains the retrosynthetic path of the target molecule. Then, based on the target retrosynthetic model, the first leaf node is expanded to obtain multiple second leaf nodes. The target retrosynthetic model includes a graph neural network and a reactant generation network. The graph neural network is used to determine the bond breaking position of the compound molecule in the first leaf node. The reactant generation network is used to obtain a set of predicted molecules based on the bond breaking position. Further, the set of predicted molecules in the second leaf node is recursively processed to determine the terminal node when the preset condition is met. Then, the path information corresponding to the terminal node is traversed to determine the retrosynthetic path of the target molecule. Thus, the retrosynthetic prediction process of the multi-step reaction is realized. Due to the process of gradually recursively expanding and screening the leaf nodes and tracing back the path of the terminal node when the preset condition is met, the reliability of the reactants in the retrosynthetic prediction process of the multi-step reaction is guaranteed, and the accuracy of the retrosynthetic prediction of the compound molecule is improved.
[0328] The mobile phone also includes a power supply 1690 (such as a battery) for supplying power to various components. Optionally, the power supply can be logically connected to the processor 1680 through a power management system, thereby managing charging, discharging, and power consumption through the power management system.
[0329] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0330] In the embodiment of the present application, the processor 1680 included in the terminal also has the function of executing each step of the above-mentioned page processing method.
[0331] The present application also provides a server. Figure 17 , Figure 17 17 is a structural diagram of a server provided in an embodiment of the present application. The server 1700 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1722 (for example, one or more processors) and memory 1732, and one or more storage media 1730 (for example, one or more mass storage devices) for storing application programs 1742 or data 1744. Among them, the memory 1732 and the storage medium 1730 can be temporary storage or permanent storage. The program stored in the storage medium 1730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1722 can be configured to communicate with the storage medium 1730 to execute a series of instruction operations in the storage medium 1730 on the server 1700.
[0332] The server 1700 may also include one or more power supplies 1726, one or more wired or wireless network interfaces 1750, one or more input and output interfaces 1758, and / or one or more operating systems 1741, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0333] Specifically, the central processor 1722 in the server 1700 is specifically configured to obtain a target molecule and use the target molecule as a root node in a tree structure, wherein the root node is associated with a first leaf node in the tree structure, and the tree structure includes a retrosynthetic pathway of the target molecule;
[0334] Expanding the first leaf node based on a target retrosynthetic model to obtain a plurality of second leaf nodes, the target retrosynthetic model comprising a graph neural network and a reactant generation network, the graph neural network being used to determine bond-breaking positions of compound molecules in the first leaf node, and the reactant generation network being used to obtain a predicted molecule set based on the bond-breaking positions;
[0335] Recursively processing the set of predicted molecules in the second leaf node to determine a terminal node when a preset condition is met;
[0336] The path information corresponding to the terminal node is traversed to determine the retrosynthetic path of the target molecule.
[0337] Optionally, in a possible scenario, for the process of expanding the first leaf node based on the target retrosynthesis model to obtain multiple second leaf nodes, the central processor 1722 is specifically configured to:
[0338] Determine a first character string corresponding to the compound molecule in the first leaf node;
[0339] converting the first string into a first molecular graph based on node distribution;
[0340] Inputting the first molecular graph into the graph neural network to obtain the bond breaking position;
[0341] inputting the bond-breaking position into the reactant generation network to obtain at least one synthon;
[0342] The synthons are filtered based on preset rules to determine the predicted molecule set.
[0343] Optionally, in one possible scenario, for the process of inputting the first molecular graph into the graph neural network to obtain the bond breaking position, the central processor 1722 is specifically configured to:
[0344] Inputting the first molecular graph into the graph neural network and parsing it in combination with the bond breaking number restriction to obtain bond breaking information;
[0345] determining target key features based on the target molecule;
[0346] The bond breaking information is extracted based on the target key features to obtain the bond breaking position, the target key features include atomic key features and bond key features, the atomic key features include at least one of atom type, number of bonds, formal charge, chirality, number of hydrogen atoms, atomic hybridization state, aromaticity, atomic weight, high-frequency reaction center characteristics and reaction type, and the bond key features include at least one of bond type, conjugation, ring bond and molecular stereochemical characteristics.
[0347] Optionally, in one possible scenario, the central processor 1722 is specifically configured to: obtain a first training molecule and a corresponding first training synthon;
[0348] determining point features and edge features of the first training molecule and the first training synthon, wherein the point features are used to indicate atomic relationships between the first training molecule and the first training synthon, and the edge features are used to indicate chemical bond relationships between the first training molecule and the first training synthon;
[0349] Training a first loss function based on the point features and the edge features;
[0350] determining a bond breaking probability of a chemical bond between the first training molecule and the first training synthon;
[0351] Training a second loss function based on the bond break probability;
[0352] The graph neural network is updated according to the trained first loss function and the trained second loss function.
[0353] Optionally, in one possible scenario, for the process of inputting the bond breaking position into the reactant generation network to obtain at least one synthon, the central processor 1722 is specifically configured to:
[0354] Segmenting the target molecule based on the bond breaking positions to obtain at least one synthetic sub-molecule graph;
[0355] converting the synthon molecule graph into a second string;
[0356] updating the second character string based on a preset response type to obtain a third character string;
[0357] The third character string is input into the reactant generation network to obtain at least one synthon.
[0358] Optionally, in one possible scenario, the central processor 1722 is specifically configured to:
[0359] obtaining a second training molecule, a second training synthon, and a training reactant;
[0360] determining a first training character string based on a character string corresponding to the second training molecule, a character string corresponding to the second training synthon, and the preset reaction type;
[0361] determining a second training character string corresponding to the training reactant;
[0362] Associating the first training character string with the second training character string to determine a first training sample pair;
[0363] The reactant generation network is trained based on the first training sample pairs.
[0364] Optionally, in one possible scenario, the central processor 1722 is specifically configured to:
[0365] Obtaining a candidate string predicted by the graph neural network;
[0366] adding the candidate character string to the character string corresponding to the second training synthesizer to update the first training character string to obtain a third training character string;
[0367] Associating the third training character string with the second training character string to determine a second training sample pair;
[0368] The reactant generation network is trained based on the second training sample pairs.
[0369] Optionally, in one possible scenario, the central processor 1722 is specifically configured to:
[0370] Determine the target character format;
[0371] The character string corresponding to the second training synthesizer and the first training character string determined by the preset reaction type are updated based on the target character format to reduce the distance between the character string corresponding to the second training synthesizer and the first training character string determined by the preset reaction type.
[0372] Optionally, in one possible scenario, for the process of recursively processing the set of predicted molecules in the second leaf node to determine a terminal node when a preset condition is met, the central processor 1722 is specifically configured to:
[0373] Determining a first candidate molecule corresponding to the predicted molecule set in the second leaf node under a preset reaction type;
[0374] Expanding the first candidate molecule based on a target retrosynthetic model to obtain a third leaf node;
[0375] recursively processing the set of predicted molecules in the third leaf node to determine a second candidate molecule;
[0376] If the second candidate molecule meets the preset condition, the second candidate molecule is determined as the terminal node.
[0377] Optionally, in one possible scenario, for the process of determining the second candidate molecule as the final node if the second candidate molecule meets a preset condition, the central processor 1722 is specifically configured to:
[0378] Traversing based on the second candidate molecule to obtain a plurality of path molecules;
[0379] If the path molecule is a molecule in the basic molecule set, it is determined that the second candidate molecule meets the preset condition, and the second candidate molecule is determined to be the terminal node.
[0380] Optionally, in one possible scenario, for the process of determining the second candidate molecule as the final node if the second candidate molecule meets a preset condition, the central processor 1722 is specifically configured to:
[0381] determining the number of expansions corresponding to the second candidate molecule in the tree structure;
[0382] If the number of expansions reaches a preset value, it is determined that the second candidate molecule meets the preset condition, and the second candidate molecule is determined to be the terminal node.
[0383] The steps performed by the management device in the above embodiment can be based on the Figure 17 The server structure shown.
[0384] The present application also provides a computer-readable storage medium in which a reverse synthesis prediction instruction for a compound molecule is stored. When the computer-readable storage medium is run on a computer, the computer executes the aforementioned Figures 3 to 14 The illustrated embodiment describes the steps performed by the device for predicting the retrosynthesis of a compound molecule in the method.
[0385] The present application also provides a computer program product including instructions for retrosynthesis prediction of compound molecules, which, when executed on a computer, enables the computer to execute the aforementioned Figures 3 to 14 The illustrated embodiment describes the steps performed by the device for predicting the retrosynthesis of a compound molecule in the method.
[0386] The present application also provides a compound molecule retrosynthesis prediction system, which may include Figure 15 A retrosynthetic prediction device for the compound molecules in the described embodiments, or Figure 16 The terminal device in the described embodiment, or Figure 17 The server being described.
[0387] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0388] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0389] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0390] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0391] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a device for predicting the reverse synthesis of compound molecules, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0392] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for predicting the retrosynthesis of a compound molecule, characterized in that: include: Acquire a target molecule and use the target molecule as a root node in a tree structure, wherein the root node is associated with a first leaf node in the tree structure, and the tree structure includes a retrosynthetic pathway of the target molecule; Expanding the first leaf node based on a target retrosynthetic model to obtain a plurality of second leaf nodes, the target retrosynthetic model comprising a graph neural network and a reactant generation network, the graph neural network being used to determine bond-breaking positions of compound molecules in the first leaf node, and the reactant generation network being used to obtain a predicted molecule set based on the bond-breaking positions; Recursively processing the set of predicted molecules in the second leaf node to determine a terminal node when a preset condition is met; The path information corresponding to the terminal node is traversed to determine the retrosynthetic path of the target molecule.
2. The method according to claim 1, characterized in that The first leaf node is expanded based on the target retrosynthesis model to obtain multiple second leaf nodes, including: Determine a first character string corresponding to the compound molecule in the first leaf node; converting the first string into a first molecular graph based on node distribution; Inputting the first molecular graph into the graph neural network to obtain the bond breaking position; inputting the bond-breaking position into the reactant generation network to obtain at least one synthon; The synthons are filtered based on preset rules to determine the predicted molecule set.
3. The method according to claim 2, characterized in that Inputting the first molecular graph into the graph neural network to obtain the bond breaking position includes: Inputting the first molecular graph into the graph neural network and parsing it in combination with the bond breaking number restriction to obtain bond breaking information; determining target key features based on the target molecule; The bond breaking information is extracted based on the target key features to obtain the bond breaking position, the target key features include atomic key features and bond key features, the atomic key features include at least one of atom type, number of bonds, formal charge, chirality, number of hydrogen atoms, atomic hybridization state, aromaticity, atomic weight, high-frequency reaction center characteristics and reaction type, and the bond key features include at least one of bond type, conjugation, ring bond and molecular stereochemical characteristics.
4. The method according to claim 3, characterized in that The method further comprises: Obtaining a first training molecule and a corresponding first training synthon; determining point features and edge features of the first training molecule and the first training synthon, wherein the point features are used to indicate the atomic relationship between the first training molecule and the first training synthon, and the edge features are used to indicate the chemical bond relationship between the first training molecule and the first training synthon; Training a first loss function based on the point features and the edge features; determining a bond breaking probability of a chemical bond between the first training molecule and the first training synthon; Training a second loss function based on the bond break probability; The graph neural network is updated according to the trained first loss function and the trained second loss function.
5. The method according to claim 2, characterized in that Inputting the bond breaking position into the reactant generation network to obtain at least one synthon comprises: Segmenting the target molecule based on the bond breaking positions to obtain at least one synthetic sub-molecule graph; converting the synthon molecule graph into a second string; updating the second character string based on a preset response type to obtain a third character string; The third character string is input into the reactant generation network to obtain at least one synthon.
6. The method according to claim 5, characterized in that The method further comprises: obtaining a second training molecule, a second training synthon, and a training reactant; determining a first training character string based on a character string corresponding to the second training molecule, a character string corresponding to the second training synthon, and the preset reaction type; determining a second training character string corresponding to the training reactant; Associating the first training character string with the second training character string to determine a first training sample pair; The reactant generation network is trained based on the first training sample pairs.
7. The method according to claim 6, characterized in that The method further comprises: Obtaining a candidate string predicted by the graph neural network; adding the candidate character string to the character string corresponding to the second training synthesizer to update the first training character string to obtain a third training character string; Associating the third training character string with the second training character string to determine a second training sample pair; The reactant generation network is trained based on the second training sample pairs.
8. The method according to claim 6, characterized in that The method further comprises: Determine the target character format; The character string corresponding to the second training synthesizer and the first training character string determined by the preset reaction type are updated based on the target character format to reduce the distance between the character string corresponding to the second training synthesizer and the first training character string determined by the preset reaction type.
9. The method according to claim 1, characterized in that The recursive processing of the predicted molecule set in the second leaf node to determine a terminal node when a preset condition is met includes: Determining a first candidate molecule corresponding to the predicted molecule set in the second leaf node under a preset reaction type; Expanding the first candidate molecule based on a target retrosynthetic model to obtain a third leaf node; recursively processing the set of predicted molecules in the third leaf node to determine a second candidate molecule; If the second candidate molecule meets the preset condition, the second candidate molecule is determined as the terminal node.
10. The method according to claim 9, characterized in that If the second candidate molecule meets the preset condition, determining the second candidate molecule as the terminal node includes: Traversing based on the second candidate molecule to obtain a plurality of path molecules; If the path molecule is a molecule in the basic molecule set, it is determined that the second candidate molecule meets the preset condition, and the second candidate molecule is determined to be the terminal node.
11. The method according to claim 9, characterized in that If the second candidate molecule meets the preset condition, determining the second candidate molecule as the terminal node includes: determining the number of expansions corresponding to the second candidate molecule in the tree structure; If the number of expansions reaches a preset value, it is determined that the second candidate molecule meets the preset condition, and the second candidate molecule is determined to be the terminal node.
12. The method according to claim 1, characterized in that The target molecule is a drug molecule, the tree structure is a Monte Carlo tree, and the compound molecules in the second leaf node are screened based on at least one of competitive reactions of groups, the use of protecting groups, reaction characteristics of characteristic groups, and human name reaction rules.
13. A device for predicting the retrosynthesis of a compound molecule, characterized in that: include: an acquisition unit, configured to acquire a target molecule and use the target molecule as a root node in a tree structure, wherein the root node is associated with a first leaf node in the tree structure, and the tree structure contains a retrosynthetic pathway of the target molecule; an expansion unit, configured to expand the first leaf node based on a target retrosynthetic model to obtain a plurality of second leaf nodes, wherein the target retrosynthetic model includes a graph neural network and a reactant generation network, the graph neural network is configured to determine bond breaking positions of compound molecules in the first leaf node, and the reactant generation network is configured to obtain a predicted molecule set based on the bond breaking positions; a processing unit, configured to recursively process the set of predicted molecules in the second leaf node to determine a terminal node when a preset condition is met; The prediction unit is used to traverse the path information corresponding to the terminal node to determine the retrosynthetic path of the target molecule.
14. A computer device, characterized in that: The computer device includes a processor and a memory: The memory is used to store program code; the processor is used to execute the retrosynthesis prediction method of the compound molecule according to any one of claims 1 to 12 according to the instructions in the program code.
15. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, which, when executed on a computer, enables the computer to execute the method for retrosynthesis prediction of a compound molecule according to any one of claims 1 to 12.
Citation Information
Patent Citations
Training method and device for determining neural network of molecular inverse synthetic route
CN112037868A
Computational generation of chemical synthesis routes and methods
CN112272764A
Cited By
Retrosynthesis prediction method for compound molecule, and related apparatus
WO2022161269A1