A single-step retrosynthesis method and system based on multi-semantic network

By integrating ECFP4 and SMILES word single-hot features through a multi-semantic network, the problem of poor single-step retrosynthesis prediction in the existing technology is solved, and more accurate and interpretable retrosynthesis predictions are achieved, which is suitable for chemical and biological retrosynthesis. And the enzyme information matching operation is avoided in biological retrosynthesis.

CN114496105BActive Publication Date: 2024-08-23WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210080029.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2024-08-23
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

Existing retrosynthetic methods have poor prediction results in single-step retrosynthetic prediction, especially the method based on ECFP4 vectors cannot fully learn effective information, while the SMILES string method has poor interpretability and cannot match enzyme information.

Method used

The multi-semantic network method is used to fuse ECFP4 features and SMILES word single hot features, and the semantic features are extracted and fused through the convolution layer, normalization layer, activation layer, pooling layer and fully connected layer to build a template-based single-step inverse The synthesis prediction model can predict the reaction template of the target product molecule and generate the SMILES string of the reactant molecule.

Benefits of technology

It improves the accuracy and interpretability of single-step retrosynthesis prediction, and can fully learn the deep semantic information of single-hot features of ECFP4 and SMILES words. It is suitable for chemical and biological retrosynthesis and does not require enzyme information matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114496105B
    Figure CN114496105B
Patent Text Reader

Abstract

The present invention provides a single-step retrosynthesis method and system based on a multi-semantic network. When performing single-step retrosynthesis prediction, the ECFP4 feature and SMILES word single-hot feature of the target product molecule are input, and after passing through the multi-semantic network, the first k reactions that may occur on the target product molecule are output in the form of a reaction template. According to the output reaction template, combined with the SMILES string of the target product molecule, the SMILES string of the reactant corresponding to the target product molecule is finally calculated to achieve single-step retrosynthesis prediction. The present invention is the first to use a multi-semantic fusion network to perform single-step retrosynthesis prediction in the field of single-step retrosynthesis. It is a template-based single-step retrosynthesis method, and the prediction result has strong interpretability. In addition to learning the fused semantic features, the network also learns the ECFP4 semantic features and the SMILES word single-hot semantic features, thereby enhancing the expression ability of the fused semantic features to the molecules, thereby improving the accuracy of the prediction results of the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of analysis of single-step retrosynthesis in retrosynthesis, and in particular to a single-step retrosynthesis method and system based on a multi-semantic network, and belongs to the application of a machine learning neural network model in the field of single-step retrosynthesis. Background Art

[0002] The core idea of ​​retrosynthesis is to continuously decompose the target molecule into simple and usable "precursor" molecules in a recursive way. These molecules can be obtained through chemical reactions or enzymatic reactions until these molecules are commercially available or appear in chassis biological strains. Therefore, according to the different types of molecular reactions, retrosynthesis can be divided into chemical retrosynthesis and biological retrosynthesis. Incomplete professional background knowledge and huge search space make the retrosynthesis problem a huge challenge. In this case, computer-aided retrosynthesis pathway design methods have gradually begun to be deployed and have great development potential, while also making it possible to synthesize new high-value molecules.

[0003] So far, chemical retrosynthesis methods have been relatively mature, but these methods have failed to consider the principles of green chemistry: the raw materials, catalysts, solvents and reagents, products, by-products, etc. used are likely to cause harm to the ecological environment and community safety. Based on this, finding a green and environmentally friendly retrosynthesis route has received widespread attention from experts and scholars. In the early 21st century, the concept of biological retrosynthesis was first proposed. Biological retrosynthesis recursively decomposes the target molecule into "precursor" molecules and limits the reaction to enzymatic reactions until the final starting molecules are all available precursors in the chassis biological strain. Compared with traditional chemical retrosynthesis methods, biological retrosynthesis is safer, more environmentally friendly, and more cost-effective.

[0004] All existing retrosynthetic methods need to solve a problem: the single-step retrosynthetic problem, that is, predicting possible reactants based on intermediates, and optimizing the entire retrosynthetic path design by optimizing the single-step retrosynthesis. The description of molecules in retrosynthetic methods mainly includes ECFP4 (Extended Connectivity Fingerprints) vectors and SMILES (Simplified Molecular Input Line Entry Specification). First, the ECFP4 vector represents the count of all functional groups during the reaction process, which can represent the complex relationship between atoms in the functional groups, but cannot represent the order relationship between atoms. The existing retrosynthetic methods based on ECFP4 vectors are mainly template-based methods: that is, the retrosynthetic problem is converted into a classification problem of molecular fingerprints to reaction templates. These methods are based on the similarity of ECFP4 vectors to learn, or use simple neural networks to learn, resulting in the inability to fully learn the effective information of ECFP4 vectors. Then, the molecular SMILES string represents a hypothetical order relationship between atoms, but it cannot represent the complex relationship between atoms. Retrosynthetic methods based on molecular SMILES strings are mostly template-free methods, which generalize the single-step retrosynthetic problem into a sequence translation problem, but this type of method has poor interpretability. Moreover, when used for single-step biological reverse synthesis, the enzyme information cannot be matched.

[0005] It can be seen from this that the methods in the prior art have the technical problem of poor prediction effect. Summary of the invention

[0006] In view of the shortcomings of the prior art mentioned in the above background technology, the present invention proposes a single-step retrosynthesis method and system for multi-semantic networks. The method is a template-based retrosynthesis method that regards the single-step retrosynthesis problem as a multi-classification problem and then performs retrosynthesis prediction.

[0007] The technical solution adopted by the present invention is:

[0008] The first aspect provides a single-step retrosynthesis method based on a multi-semantic network, comprising:

[0009] S1: Obtain a public data set and perform preprocessing to obtain a data set D after preprocessing, wherein each piece of data in the data set D corresponds to a specific reaction, and each piece of data includes a reaction, a reactant molecule, and a product molecule;

[0010] S2: Use the RDChiral tool to extract reaction templates from all data in the dataset D, remove duplicate reaction templates, and obtain the final reaction template set T; each reaction template contains one or more reactions;

[0011] S3: According to the product molecules in the data set D, the ECFP4 feature set E of the product molecules represented by the ECFP4 vector and the SMILES word single-hot feature set S of the product molecules represented by the SMILES word single-hot matrix are obtained respectively;

[0012] S4: Constructing sample set where e i ∈E,s i ∈S represent the ECFP4 feature and SMILES single-word hot feature of the product molecule in the i-th data in the dataset D, respectively, i ∈T represents the reaction template in the i-th data in D, and N represents the number of sample sets;

[0013] S5: Build a multi-semantic network, including input layer, convolution layer, normalization layer, activation layer, pooling layer, dropout layer, fully connected layer and output layer, where the convolution layer is used to convolve the input data, the normalization layer is used to normalize the convolutional features, the activation layer is used to activate the normalized features, the pooling layer performs pooling operations on the ECFP4 features and the SMILES single-hot features respectively, so as to obtain ECFP4 semantic features and SMILES single-hot semantic features; the ECFP4 semantic features and the SMILES single-hot semantic features are fused to obtain fused semantic features; then the fused semantic features are passed through the dropout layer, the fully connected layer and the softmax, and the final output result is obtained through the output layer;

[0014] S6: using the sample set in step S4 to train the multi-semantic network in step S5 to obtain a trained single-step retrosynthesis prediction model;

[0015] S7: For a target product molecule to be predicted, the single-step retrosynthesis prediction model trained in step S6 is used to predict a reaction template that can generate the target product molecule. Combined with the SMILES string of the target product molecule, the RDChiral tool is used to calculate the SMILES string of the reactant molecule corresponding to the target product molecule to achieve single-step retrosynthesis prediction.

[0016] In one embodiment, step S2 includes:

[0017] The RDChiral tool is used to extract reaction templates from all data in the dataset D, and duplicate reaction templates are removed to obtain the final reaction template set T.

[0018] In one embodiment, step S3 includes:

[0019] According to the product molecules in the data set D, the RDKit tool is used to generate the ECFP4 vectors of the product molecules in all the data in D, and the ECFP4 feature set E of the product molecules represented by the ECFP4 vector is obtained; the sklearn tool is used to generate the SMILES word one-hot matrix of the product molecules in all the data in D, and the SMILES word one-hot feature set S of the product molecules represented by the SMILES word one-hot matrix is ​​obtained.

[0020] In one embodiment, the SMILES word one-hot matrix of the product molecules in all data in D is generated using the sklearn tool, and the SMILES word one-hot feature set S of the product molecules represented by the SMILES word one-hot matrix is ​​obtained, including:

[0021] S3.1: One-hot encode each character in the alphabet that makes up the SMILES string, generating a shape w 2 word vector; take the first l in the SMILES string of each product molecule 2 The word vectors of the characters form the SMILES word one-hot matrix If the product molecule SMILES string is insufficient 2 characters, fill them with 0 vectors;

[0022] S3.2: The matrix Each consecutive n lines in the is a group, and n lines correspond to word vectors of n characters. The word vectors in the same group are concatenated in sequence to obtain a vector of length w. 1 The combined word vector, w 1 =n*w 2 , a total of l 1 Combined word vectors, The thermal characteristics of SMILES words constituting the product molecules Among them, w 2 , l 2 , n is a positive integer, n <l 2 .

[0023] In one embodiment, the multi-semantic network in S5 has one input layer and k convolutional layers. 1 +k 2 The number of normalization layers is k 1 +k 2 The number of activation layers is k 1 +k 2 The number of pooling layers is k 1 +k 2 The number of dropout layers is 2, the number of fully connected layers is 3, the number of output layers is 3, and k 1 and k 2 is a positive integer;

[0024] The processing steps include:

[0025] S5.1: The input layer contains two nodes. Input node 1 inputs ECFP4 features represented by ECFP4 vectors, and input node 2 inputs SMILES single-hot features represented by SMILES single-hot matrix.

[0026] S5.2: Use k 1 The convolution kernels of the same size convolve the ECFP4 features of node 1 input, k 1 The number of output channels of each convolution kernel is c 1 , get the ECFP4 features after convolution;

[0027] S5.3: Use k 2 Convolution kernels of different sizes are used to convolve the SMILES single-hot features of node 2 input, k 2 The number of output channels of each convolution kernel is c 2 , get the SMILES word single-hot feature after convolution;

[0028] S5.4: The features after convolution in S5.2 and the features after convolution in S5.3 are normalized through the normalization layer to obtain the normalized ECFP4 features and SMILES single-hot features;

[0029] S5.5: Perform ReLU activation operation on the normalized ECFP4 features and SMILES word one-hot features through the activation layer to obtain the activated ECFP4 features and SMILES word one-hot features;

[0030] S5.6: Performing maximum pooling operations on the activated ECFP4 features and SMILES single-hot features through the pooling layer to obtain ECFP4 features and SMILES single-hot features after the pooling operation;

[0031] S5.7: concatenate the ECFP4 features after maximum pooling to obtain concatenated ECFP4 semantic features, concatenate the SMILES single-hot features after maximum pooling to obtain concatenated SMILES single-hot semantic features, and concatenate the ECFP4 semantic features and the SMILES single-hot semantic features to obtain fused semantic features;

[0032] S5.8: The fused semantic features are sent to a fully connected layer, and then through a Softmax, the probability between [0,1] of each node is output, denoted as p 1 ∈R d, indicating the predicted probability of each type of reaction template; at the same time, the ECFP4 semantic features and SMILES single-hot semantic features are respectively passed through the dropout layer, the fully connected layer, and the Softmax layer to output the probability between [0,1] of each node, which are respectively denoted as p 2 ∈R d and p 3 ∈R d , respectively represent the probability of occurrence of each type of reaction template predicted based on ECFP4 semantic features and SMILES word-hot semantic features, d is the number of reaction templates in the reaction template set T;

[0033] S5.9: The final prediction result is obtained through the output layer according to the result of S5.8.

[0034] In one embodiment, in step S6, during the training process, three cross entropy losses of the model are obtained according to the three classification results of the model and are recorded as loss 1 、loss 2 and loss 3 , the final loss of the single-step retrosynthesis prediction model is:

[0035] loss = α 1 loss 1 +α 2 loss 2 +α 3 loss 3

[0036] Among them, loss 1 、loss 2 、loss 3 They represent the loss of fusion semantic feature prediction, the loss of ECFP4 semantic feature prediction, and the loss of SMILES single-hot semantic feature prediction, respectively. j (j=1,2,3) represent three losses respectively 1 ,loss 2 and loss 3 The weight in the global loss of the network, and ∑α j =1 and α j ∈(0,1).

[0037] Based on the same inventive concept, the second aspect of the present invention provides a single-step retrosynthesis system based on a multi-semantic network, comprising:

[0038] A data set preprocessing module is used to obtain a public data set and perform preprocessing to obtain a data set D after preprocessing, wherein each piece of data in the data set D corresponds to a specific reaction, and each piece of data includes a reaction, a reactant molecule, and a product molecule;

[0039] A reaction template set building module, used to build a reaction template set T;

[0040] A feature construction module is used to obtain an ECFP4 set E of product molecules represented by ECFP4 vectors and a SMILES word single-hot feature set S of product molecules represented by a SMILES word single-hot matrix according to target product molecules in the data set D;

[0041] Sample set building module, used to build sample sets where e i ∈E,s i ∈S represent the ECFP4 feature and SMILES single-word hot feature of the product molecule in the i-th data in the dataset D, respectively, i ∈T represents the reaction template in the i-th data in D, and N represents the number of sample sets;

[0042] A multi-semantic network building module is used to build a multi-semantic network, including an input layer, a convolution layer, a normalization layer, an activation layer, a pooling layer, a dropout layer, a fully connected layer, and an output layer. The convolution layer is used to convolve the input data, the normalization layer is used to normalize the features after convolution, the activation layer is used to activate the features after normalization, and the pooling layer performs pooling operations on the ECFP4 features and the SMILES single-hot features, respectively, to obtain ECFP4 semantic features and SMILES single-hot semantic features; the ECFP4 semantic features and the SMILES single-hot semantic features are fused to obtain fused semantic features; and then the fused semantic features are passed through the dropout layer, the fully connected layer, and the softmax, and the final output result is obtained through the output layer;

[0043] A multi-semantic network training module is used to train the multi-semantic network in the multi-semantic network building module using the sample set of the sample set building module to obtain a trained single-step retrosynthesis prediction model;

[0044] The single-step retrosynthesis prediction module is used to predict a reaction template that can generate a target product molecule for a target product molecule to be predicted using the single-step retrosynthesis prediction model trained in the multi-semantic network training module, and then combine the SMILES string of the target product molecule to finally calculate the SMILES string of the reactant corresponding to the target product molecule to achieve single-step retrosynthesis prediction.

[0045] The above one or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:

[0046] The single-step retrosynthesis method based on multi-semantic network provided by the present invention has built a multi-semantic network, an input layer, a convolution layer, a normalization layer, an activation layer, a pooling layer, a dropout layer, a fully connected layer and an output layer, and the ECFP4 feature and the SMILES word single hot feature of the target product molecule are used as inputs, and the deep semantic features of the ECFP4 feature and the SMILES word single hot feature of the target product molecule can be extracted by a semantic extraction method, relative to a simple neural network method, the effective information of the ECFP4 feature and the SMILES word single hot feature can be fully learned, and the complementary information between the two can be learned by fusion semantics, so as to improve the predicted result. In addition, the present invention adopts a single-step retrosynthesis method based on a template, and the predicted result has strong interpretability. In addition, the single-step retrosynthesis prediction model of the present invention can be used as a single-step chemical retrosynthesis prediction and can be used as a single-step biological retrosynthesis prediction, and there is no need to perform a matching operation of enzyme information when performing a single-step biological retrosynthesis prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 A single-step retrosynthesis prediction flow chart of a multi-semantic network in an embodiment of the present invention;

[0049] Figure 2 It is a SMILES word single-hot feature map in an embodiment of the present invention;

[0050] Figure 3 A schematic diagram of a multi-semantic network in an embodiment of the present invention;

[0051] Figure 4 Schematic diagram of a single-step retrosynthesis system module of a multi-semantic network in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The present invention discloses a method and system for single-step retrosynthesis of a multi-semantic network, wherein the method inputs the ECFP4 feature and the SMILES word single-hot feature of the target product molecule when performing single-step retrosynthesis prediction, and after passing through the multi-semantic network, outputs the first k reactions that may occur on the target product molecule in the form of a reaction template. According to the output reaction template, combined with the SMILES string of the target product molecule, the SMILES string of the reactant corresponding to the target product molecule can be finally calculated to achieve single-step retrosynthesis prediction. The present invention also proposes a single-step retrosynthesis system of a multi-semantic network, which performs single-step retrosynthesis prediction through data set preprocessing, reaction template set construction, feature construction, sample set construction, multi-semantic network construction, and multi-semantic network training.

[0053] The method and system provided by the present invention have the following advantages or beneficial technical effects:

[0054] The present invention is the first in the field of single-step retrosynthesis to use a multi-semantic fusion network to predict single-step retrosynthesis. It is a template-based single-step retrosynthesis method, and the prediction result has strong interpretability. The present invention designs a new loss function that can improve the training accuracy of the model. The present invention designs a semantic extraction method that can extract the deep semantic features of the ECFP4 features and SMILES word single hot features of the target product molecule. The present invention designs a construction method of SMILES word single hot features that can contain more potential information. The single-step retrosynthesis prediction model of the present invention can be used as both a single-step chemical retrosynthesis prediction and a single-step biological retrosynthesis prediction, and no enzyme information matching operation is required when performing single-step biological retrosynthesis prediction.

[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] Embodiment 1

[0057] The embodiment of the present invention provides a single-step retrosynthesis method based on a multi-semantic network, comprising:

[0058] S1: Obtain a public data set and perform preprocessing to obtain a data set D after preprocessing, wherein each piece of data in the data set D corresponds to a specific reaction, and each piece of data includes a reaction, a reactant, and a target product molecule;

[0059] S2: Use the RDChiral tool to extract reaction templates from all data in the dataset D, remove duplicate reaction templates, and obtain the final reaction template set T; each reaction template contains one or more reactions;

[0060] S3: According to the product molecules in the data set D, the ECFP4 feature set E of the product molecules represented by the ECFP4 vector and the SMILES word single-hot feature set S of the product molecules represented by the SMILES word single-hot matrix are obtained respectively;

[0061] S4: Constructing sample set where e i ∈E,s i ∈S represent the ECFP4 feature and SMILES single-word hot feature of the product molecule in the i-th data in the dataset D, respectively, i ∈T represents the reaction template in the i-th data in D, and N represents the number of sample sets;

[0062] S5: Build a multi-semantic network, including input layer, convolution layer, normalization layer, activation layer, pooling layer, dropout layer, fully connected layer and output layer, where the convolution layer is used to convolve the input data, the normalization layer is used to normalize the convolutional features, the activation layer is used to activate the normalized features, the pooling layer performs pooling operations on the ECFP4 features and the SMILES single-hot features respectively, so as to obtain ECFP4 semantic features and SMILES single-hot semantic features; the ECFP4 semantic features and the SMILES single-hot semantic features are fused to obtain fused semantic features; then the fused semantic features are passed through the dropout layer, the fully connected layer and the softmax, and the final output result is obtained through the output layer;

[0063] S6: using the sample set in step S4 to train the multi-semantic network in step S5 to obtain a trained single-step retrosynthesis prediction model;

[0064] S7: For a target product molecule to be predicted, the single-step retrosynthesis prediction model trained in step S6 is used to predict the reaction template that can generate the target product molecule, and then combined with the SMILES string of the target product molecule, the RDChiral tool is used to calculate the SMILES string of the reactant molecule corresponding to the target product molecule to achieve single-step retrosynthesis prediction.

[0065] In the specific implementation process, each data in the dataset D specifically includes: (1) the reaction represented by a SMILES string; (2) all reactant molecules involved in the reaction (represented by a SMILES string. If there is more than one reactant molecule, the SMILES strings of multiple reactants are separated by delimiters); (3) one product molecule generated by the reaction (represented by a SMILES string); (4) the number of the catalytic enzyme (only for metabolic reactions, and not required). If there are multiple product molecules for a reaction in the original public dataset, there will be multiple related data in D, each corresponding to a product of the reaction.

[0066] See also Figure 1 , Figure 1 A flowchart of single-step retrosynthetic prediction of a multi-semantic network provided for an example of the present invention.

[0067] Step S7, when performing the synthesis prediction of the target product molecule to be predicted, inputs the ECFP4 feature and the SMILES word single thermal feature of the target product molecule to be predicted, and outputs the first k reactions that may occur on the target product molecule in the form of a reaction template through the single-step retrosynthesis prediction model. According to the output reaction template, combined with the SMILES string of the target product molecule, the SMILES string of the reactant corresponding to the target product molecule can be finally calculated to achieve single-step retrosynthesis prediction.

[0068] In one embodiment, step S2 includes:

[0069] The RDChiral tool is used to extract reaction templates from all data in the dataset D, and duplicate reaction templates are removed to obtain the final reaction template set T.

[0070] In the specific implementation process, the template_extractor function (template extraction function) in RDChiral is used to extract the SMARTS format reaction template.

[0071] In one embodiment, step S3 includes:

[0072] According to the product molecules in the data set D, the RDKit tool is used to generate the ECFP4 vectors of the product molecules in all the data in D, and the ECFP4 feature set E of the product molecules represented by the ECFP4 vector is obtained; the sklearn tool is used to generate the SMILES word one-hot matrix of the product molecules in all the data in D, and the SMILES word one-hot feature set S of the product molecules represented by the SMILES word one-hot matrix is ​​obtained.

[0073] In one embodiment, the SMILES word one-hot matrix of the product molecules in all data in D is generated using the sklearn tool, and the SMILES word one-hot feature set S of the product molecules represented by the SMILES word one-hot matrix is ​​obtained, including:

[0074] S3.1: One-hot encode each character in the alphabet that makes up the SMILES string, generating a dimension w 2 word vector; take the first l in the SMILES string of each product molecule 2 The word vectors of the characters form the SMILES word one-hot matrix If the product molecule SMILES string is insufficient 2 characters, fill them with 0 vectors;

[0075] S3.2: The matrix Each consecutive n lines in the is a group, and n lines correspond to word vectors of n characters. The word vectors in the same group are concatenated in sequence to obtain a vector of length w. 1 The combined word vector, w 1 =n*w 2 , a total of l 1 Combined word vectors, The thermal characteristics of SMILES words constituting the product molecules Among them, w 2 , l 2 , n is a positive integer, n <l 2 .

[0076] Specifically, the SMILES word one-hot feature of the product molecule is a 0-1 matrix, where each row of the matrix represents the combined word vector representation of n consecutive characters in the SMILES string of the product molecule. The SMILES word one-hot feature of the product molecule is generated as follows: First, assume that the alphabet of all SMILES strings of molecules in the dataset D contains w 2 letters, perform one-hot encoding on each character in all SMILES strings to generate a string of length w 2 Then, the first l in the product molecule SMILES string is 2 Each character is represented by a word vector, which is less than l 2 The characters are filled with 0 vectors to obtain the matrix Finally, starting from the first row, we transform the matrix Each consecutive n rows (n-character word vectors) are concatenated into a vector of length w. 1 (w 1 =n*w 2 ) combined word vector, a total of l 1 The matrix of combined word vectors is the single-heat matrix feature of the product molecule SMILES Among them, w 2 , l 2 , n is a positive integer, n <l 2 .

[0077] In the specific implementation, the length of the product molecule ECFP4 feature is 4096. The dimension of the product molecule SMILES word single hot feature is s∈{0,1} 75×120 , is a feature that vectorizes the product molecule SMILES string. Its generation steps include: first, one-hot encoding the alphabet of characters in all molecule SMILES strings to generate a 40-dimensional word vector. Then, the first 225 characters in the product molecule SMILES string are represented by word vectors, and characters less than 225 are padded with 0 vectors to obtain s 2 ∈{0,1} 225×40 Finally, s 2 ∈{0,1} 225×40 The word vectors of each consecutive 3 characters are concatenated into a combined word vector, and the final product word single-hot matrix s∈{0,1} is obtained 75×120 .

[0078] In one embodiment, the multi-semantic network in S5 has one input layer and k convolutional layers. 1 +k 2 The number of normalization layers is k 1 +k 2 The number of activation layers is k 1 +k 2 The number of pooling layers is k 1 +k 2 The number of dropout layers is 2, the number of fully connected layers is 3, the number of output layers is 3, and k 1 and k 2 is a positive integer;

[0079] The processing steps include:

[0080] S5.1: The input layer contains two nodes. Input node 1 inputs ECFP4 features represented by ECFP4 vectors, and input node 2 inputs SMILES single-hot features represented by SMILES single-hot matrix.

[0081] S5.2: Use k 1 The convolution kernels of the same size convolve the ECFP4 features of node 1 input, k 1 The number of output channels of each convolution kernel is c 1 , get the ECFP4 features after convolution;

[0082] S5.3: Use k 2 Convolution kernels of different sizes are used to convolve the SMILES single-hot features of node 2 input, k 2 The number of output channels of each convolution kernel is c 2 , get the SMILES word single-hot feature after convolution;

[0083] S5.4: The features after convolution in S5.2 and the features after convolution in S5.3 are normalized through the normalization layer to obtain the normalized ECFP4 features and SMILES single-hot features;

[0084] S5.5: Perform ReLU activation operation on the normalized ECFP4 features and SMILES word one-hot features through the activation layer to obtain the activated ECFP4 features and SMILES word one-hot features;

[0085] S5.6: Performing maximum pooling operations on the activated ECFP4 features and SMILES single-hot features through the pooling layer to obtain ECFP4 features and SMILES single-hot features after the pooling operation;

[0086] S5.7: concatenate the ECFP4 features after maximum pooling to obtain concatenated ECFP4 semantic features, concatenate the SMILES single-hot features after maximum pooling to obtain concatenated SMILES single-hot semantic features, and concatenate the ECFP4 semantic features and the SMILES single-hot semantic features to obtain fused semantic features;

[0087] S5.8: The fused semantic features are sent to a fully connected layer, and then through a Softmax, the probability between [0,1] of each node is output, denoted as p 1 ∈R d , indicating the predicted probability of each type of reaction template; at the same time, the ECFP4 semantic features and SMILES single-hot semantic features are respectively passed through the dropout layer, the fully connected layer, and the Softmax layer to output the probability between [0,1] of each node, which are respectively denoted as p 2 ∈R d and p 3 ∈R d , respectively represent the probability of occurrence of each type of reaction template predicted based on ECFP4 semantic features and SMILES word-hot semantic features, d is the number of reaction templates in the reaction template set T;

[0088] S5.9: The final prediction result is obtained through the output layer according to the result of S5.8.

[0089] Specifically, semantics refers to more abstract features after the convolution layer, normalization layer, activation layer, and pooling layer operations. After the fusion semantic features pass through the dropout layer and the fully connected layer, a Softmax is passed to output the probability between [0,1] for each node, and this probability is recorded as p 1 ∈R d , which indicates the probability of each type of reaction template being predicted based on the fused semantic features. At the same time, the ECFP4 semantic features and the SMILES single-hot semantic features are respectively passed through the dropout layer, the fully connected layer, and then through the Softmax, and the probability between [0,1] of each node is also output, which are respectively denoted as p 2 ∈R d and p 3 ∈R d , respectively represent the probability of occurrence of each type of reaction template predicted by ECFP4 semantic features and SMILES single-hot semantic features.

[0090] p 1 is the output of the final network, which refers to the probability of occurrence of each type of template predicted by the fused semantic features. Since the fused semantic features are obtained by concatenating the ECFP4 semantic features and the SMILES single-hot semantic features. The probability of occurrence of each type of template p obtained by learning the ECFP4 semantic features and the single-hot semantic features separately. 2 ,p 3 . In this way, during the training of the model, the network's ability to learn ECFP4 semantic features and SMILES single-hot semantic features can be enhanced, thereby obtaining more abstract ECFP4 semantic features and SMILES single-hot semantic features. The two are spliced ​​to obtain more abstract fusion semantic features. In other words, in addition to learning fusion semantic features, the network also learns ECFP4 semantic features and SMILES single-hot semantic features separately. This can enhance the expression ability of ECFP4 features and SMILES single-hot semantic features for molecules, and also enhance the expression ability of fusion semantic features for molecules, thereby improving the accuracy of the network's prediction results.

[0091] See also Figure 2 , Figure 2It is the SMILES word one-hot feature map of the present invention. Product Molecule is the product molecule, One-Hot-Encoding is the one-hot encoding, SMILES String is the target product molecule SMIELS string, WordVector is the word vector, Composition of Word Vector is the combined word vector, One-Hot encoding of theSMILES String is the feature after the SMILES string is one-hot encoded, and SMILES Word One-Hot Feature is the word one-hot feature.

[0092] In a specific embodiment, in step S5, the multi-semantic network includes an input layer (1), convolutional layers (6), normalization layers (6), activation layers (6), pooling layers (6), dropout layers (2), fully connected layers (3), and output layers (3).

[0093] See also Figure 3 , Figure 3 The figure is a schematic diagram of the multi-semantic network of the present invention. Target Product Molecule represents the target product molecule, ECFP4 Feature and SMILES Word One Hot Feature represent the target product molecule ECFP4 feature and SMILES word one hot feature respectively. Convolution+BN+ReLU represents convolution, normalization and activation operations, Subsampling represents downsampling, Concatenation represents concatenation, and Fully connected represents full connection.

[0094] Step S5.2 uses three convolution kernels of size 1×4096 to convolve the ECFP4t features input to node 1. The number of output channels of the three convolution kernels is 100, and the ECFP4 features after convolution are obtained. Step S5.3 uses three convolution kernels of size 3×120, 4×120, and 5×120 to convolve the SMILES word one-hot matrix input to node 2. The number of output channels of the three convolution kernels is 100, and the SMILES word one-hot matrix features after convolution are obtained.

[0095] The ReLU activation function in S5.5 is:

[0096] f(x)=max(0,x)

[0097] Among them, x represents the input of the neuron, which can change all negative values ​​to 0, while the positive values ​​remain unchanged. This unilateral inhibition function can make the neurons in the neural network have sparse activation.

[0098] In S5.8, the Softmax function is specifically defined as:

[0099]

[0100] Among them, e is a natural constant, ∑ j e j represents the sum of all neurons with e as the base and the neuron as the exponent, S i Represents the result of the ith neuron after Softmax.

[0101] In one embodiment, in step S6, during the training process, three cross entropy losses of the model are obtained according to the three classification results of the model and are recorded as loss 1 、loss 2 and loss 3 , the final loss of the single-step retrosynthesis prediction model is:

[0102] loss = α 1 loss 1 +α 2 loss 2 +α 3 loss 3

[0103] Among them, loss 1 、loss 2 、loss 3 They represent the loss of fusion semantic feature prediction, the loss of ECFP4 semantic feature prediction, and the loss of SMILES single-hot semantic feature prediction, respectively. j (j=1,2,3) represent three losses respectively 1 ,loss 2 and loss 3 The weight in the global loss of the network, and ∑α j =1 and α j ∈(0,1).

[0104] Specifically, the loss function represents the difference between the calculated result and the true value. This embodiment proposes a new loss function, which is based on the original classification result (classification probability P) obtained by fusion semantic learning. 1 ) evaluation, adding the classification results of ECFP4 semantic features and SMILES single-hot semantic features (classification probability P 2 and P 3 ) is evaluated by using the weight α 1 , α 2 , α 3 Comprehensively evaluate the entire model to improve the training accuracy of the model. jThe value of is a decimal between (0, 1), and the endpoints 0 and 1 are not taken.

[0105] In the specific implementation process, the model uses the Adam optimizer. During model training, three cross entropy losses are calculated according to the three output results of step S5.

[0106] Cross entropy loss function loss j The specific form of (j=1,2,3) is as follows:

[0107]

[0108] Where d is the total number of tags, that is, the size of the reaction template set T; y i,c A binary identifier, indicating whether the true label of sample i is c, that is, whether the predicted rule of sample i is the same as the true rule c. It takes 1 when the true label of sample i is the same as c, otherwise it takes 0; p j,i,c It represents the j-th output probability of the network for sample i with label c, that is, the j-th output probability of the network predicting the rule of sample i to be c.

[0109] In a specific embodiment, in step S6, the number of model training epochs is set to 100, and multiple iterations are performed in each epoch until all training samples participate in one training, and the number of training samples participating in one iteration, batch_size, is set to 128. The initial learning rate is set to 0.001.

[0110] The method proposed in the present invention is explained and verified by means of specific examples below.

[0111] Example 1: The publicly available chemical reaction data set USPTO-50k is preprocessed according to step S1; a reaction template set is constructed according to step S2; ECFP4 features and SMILES word single-hot features are constructed according to step S3; set G is constructed according to step S4, and it is randomly divided into training set, validation set, and test set in a ratio of 8:1:1. The training set and validation set are used to train and select models, and the test set is used to predict the single-step retrosynthesis prediction model after training. The training set and validation set train the model, and the test set tests the prediction accuracy of the trained single-step chemical retrosynthesis prediction model. Table 1 shows the prediction performance of the single-step retrosynthesis prediction method of the multi-semantic network proposed in the present invention in single-step chemical retrosynthesis. The prediction accuracy of the top-1, top-3, top-5 and top-10 of the best experimental results in this field is 52.5%, 69.0%, 75.6% and 83.7% respectively. Obviously, the prediction accuracy of the model obtained based on the present invention is significantly higher than the best results in this field.

[0112] Table 1: Single-step chemical retrosynthesis prediction performance of multi-semantic networks

[0113] Top-1 Top-3 Top-5 Top-10 61.8% 80.6% 85.1% 89.5%

[0114] Example 2: The publicly available metabolic reaction data set MetaNetX is preprocessed according to step S1; a reaction template set is constructed according to step S2; ECFP4 features and SMILES word single-hot features are constructed according to step S3; set G is constructed according to step S4, and it is randomly divided into training set, validation set, and test set in a ratio of 8:1:1. The training set and validation set are used to train and select models, and the test set is used to predict the single-step retrosynthesis prediction model after training. The training set and validation set train the model, and the test set tests the prediction accuracy of the trained single-step biological retrosynthesis prediction model. Table 2 shows the prediction performance of the single-step retrosynthesis prediction method of the multi-semantic network proposed in the present invention in single-step biological retrosynthesis. There are few existing studies on single-step biological retrosynthesis, and the model of the present invention can predict single-step biological retrosynthesis without matching enzyme information.

[0115] Table 2: Single-step bioretrosynthesis prediction performance of multi-semantic networks

[0116]

[0117]

[0118] Compared with the prior art, the beneficial effects of the present invention are:

[0119] 1. The present invention is the first in the field of single-step retrosynthesis to use a multi-semantic fusion network to perform single-step retrosynthesis prediction. It is a template-based single-step retrosynthesis method, and the prediction results have strong interpretability.

[0120] 2. The present invention designs a new loss function, which can improve the training accuracy of the model by comprehensively evaluating the three prediction results of multi-semantic network learning.

[0121] 3. The present invention designs a semantic extraction method that can extract deep semantic information of the ECFP4 features and SMILES single-word hot features of the target product molecules.

[0122] 4. The present invention designs a method for constructing SMILES word single-hot features, which can contain more potential information.

[0123] 5. The single-step retrosynthesis prediction model of the present invention can be used for both single-step chemical retrosynthesis prediction and single-step biological retrosynthesis prediction, and no enzyme information matching operation is required when performing single-step biological retrosynthesis prediction.

[0124] Embodiment 2

[0125] Based on the same inventive concept, this embodiment provides a single-step retrosynthesis system based on a multi-semantic network, comprising:

[0126] A data set preprocessing module is used to obtain a public data set and perform preprocessing to obtain a data set D after preprocessing, wherein each piece of data in the data set D corresponds to a specific reaction, and each piece of data includes a reaction, a reactant molecule, and a product molecule;

[0127] A reaction template set building module, used to build a reaction template set T;

[0128] A feature construction module is used to obtain an ECFP4 feature set E of the product molecules represented by an ECFP4 vector and a SMILES word single-hot feature set S of the product molecules represented by a SMILES word single-hot matrix according to the target product molecules in the data set D;

[0129] Sample set building module, used to build sample sets where e i ∈E,s i ∈S represent the ECFP4 feature and SMILES single-word hot feature of the product molecule in the i-th data in the dataset D, respectively, i ∈T represents the reaction template in the i-th data in D, and N represents the number of sample sets;

[0130] A multi-semantic network building module is used to build a multi-semantic network, including an input layer, a convolution layer, a normalization layer, an activation layer, a pooling layer, a dropout layer, a fully connected layer, and an output layer. The convolution layer is used to convolve the input data, the normalization layer is used to normalize the features after convolution, the activation layer is used to activate the features after normalization, and the pooling layer performs pooling operations on the ECFP4 features and the SMILES single-hot features, respectively, so as to obtain ECFP4 semantic features and SMILES single-hot semantic features; the ECFP4 semantic features and the SMILES single-hot semantic features are fused to obtain fused semantic features; and then the fused semantic features are passed through the dropout layer, the fully connected layer, and the softmax, and the final output result is obtained through the output layer;

[0131] A multi-semantic network training module is used to train the multi-semantic network in the multi-semantic network building module using the sample set of the sample set building module to obtain a trained single-step retrosynthesis prediction model;

[0132] The single-step retrosynthesis prediction module is used to predict the reaction template that can generate a target product molecule for a target product molecule to be predicted using the single-step retrosynthesis prediction model trained in the multi-semantic network training module, and then combine the SMILES string of the target product molecule to calculate the SMILES string of the reactant molecule corresponding to the target product molecule using the RDChiral tool to achieve single-step retrosynthesis prediction.

[0133] See also Figure 4 , is a module schematic diagram of a single-step retrosynthesis system of a multi-semantic network in an embodiment of the present invention.

[0134] In general, the dataset preprocessing module: preprocesses the dataset to obtain the processed dataset; the reaction template set construction module: generates the reaction template set based on the preprocessed dataset; the feature construction module: generates the product molecule ECFP4 features and SMILES word single hot features according to the product molecules. The sample set construction module: generates a sample set consisting of ECFP4 features, SMILES word single hot features, and reaction templates; the multi-semantic network construction module: builds a multi-semantic network for single-step retrosynthesis prediction; the multi-semantic network training module: trains the multi-semantic network with the data in the sample set to obtain the trained multi-semantic network single-step retrosynthesis prediction model. The single-step retrosynthesis prediction module: uses the multi-semantic network model to predict the single-step retrosynthesis of new target product molecules.

[0135] Since the system introduced in the second embodiment of the present invention is a system used to implement the single-step retrosynthesis method based on the multi-semantic network in the first embodiment of the present invention, those skilled in the art can understand the specific structure of the system based on the method introduced in the first embodiment of the present invention, and no further description is given here. All systems used in the method of the first embodiment of the present invention belong to the scope of protection of the present invention.

[0136] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. A single-step retrosynthesis method based on multi-semantic networks, It is characterized in that include: S1: Obtain a public data set and perform preprocessing to obtain a data set D after preprocessing, wherein each piece of data in the data set D corresponds to a specific reaction, and each piece of data includes a reaction, a reactant molecule, and a product molecule; S2: Use the RDChiral tool to extract reaction templates from all data in the dataset D, remove duplicate reaction templates, and obtain the final reaction template set T; each reaction template contains one or more reactions; S3: According to the product molecules in the data set D, the ECFP4 feature set E of the product molecules represented by the ECFP4 vector and the SMILES word single-hot feature set S of the product molecules represented by the SMILES word single-hot matrix are obtained respectively; S4: Constructing sample set where e i ∈E,s i ∈S represent the ECFP4 feature and SMILES single-word hot feature of the product molecule in the i-th data in the dataset D, respectively, i ∈T represents the reaction template in the i-th data in D, and N represents the number of sample sets; S5: Build a multi-semantic network, including input layer, convolution layer, normalization layer, activation layer, pooling layer, dropout layer, fully connected layer and output layer, where the convolution layer is used to convolve the input data, the normalization layer is used to normalize the convolutional features, the activation layer is used to activate the normalized features, the pooling layer performs pooling operations on the ECFP4 features and the SMILES single-hot features respectively, so as to obtain ECFP4 semantic features and SMILES single-hot semantic features; the ECFP4 semantic features and the SMILES single-hot semantic features are fused to obtain fused semantic features; then the fused semantic features are passed through the dropout layer, the fully connected layer and the softmax, and the final output result is obtained through the output layer; S6: using the sample set in step S4 to train the multi-semantic network in step S5 to obtain a trained single-step retrosynthesis prediction model; S7: For a target product molecule to be predicted, the single-step retrosynthesis prediction model trained in step S6 is used to predict the reaction template that can generate the target product molecule, and then combined with the SMILES string of the target product molecule, the RDChiral tool is used to calculate the SMILES string of the reactant molecule corresponding to the target product molecule to achieve single-step retrosynthesis prediction.

2. The single-step retrosynthesis method according to claim 1, It is characterized in that Step S3 includes: According to the product molecules in the data set D, the RDKit tool is used to generate the ECFP4 vectors of the product molecules in all the data in D, and the ECFP4 feature set E of the product molecules represented by the ECFP4 vector is obtained; the sklearn tool is used to generate the SMILES word one-hot matrix of the product molecules in all the data in D, and the SMILES word one-hot feature set S of the product molecules represented by the SMILES word one-hot matrix is ​​obtained.

3. The single-step retrosynthesis method according to claim 2, It is characterized in that Use the sklearn tool to generate the SMILES word one-hot matrix of the product molecules in all the data in D, and obtain the SMILES word one-hot feature set S of the product molecules represented by the SMILES word one-hot matrix, including the following steps: S3.1: One-hot encode each character in the alphabet that makes up the SMILES string, generating a shape w 2 word vector; take the first l in the SMILES string of each product molecule 2 The word vectors of the characters form the SMILES word one-hot matrix If the product molecule SMILES string is insufficient 2 characters, fill them with 0 vectors; S3.2: The matrix Each consecutive n lines in the is a group, and n lines correspond to word vectors of n characters. The word vectors in the same group are concatenated in sequence to obtain a vector of length w. 1 The combined word vector, w 1 =n*w 2 , a total of l 1 Combined word vectors, The thermal characteristics of SMILES words constituting the product molecules Among them, w 2 , l 2 , n is a positive integer, n <l 2 .

4. The single-step retrosynthesis method according to claim 1, It is characterized in that The number of input layers of the multi-semantic network in S5 is 1, and the number of convolutional layers is k. 1 +k 2 The number of normalization layers is k 1 +k 2 The number of activation layers is k 1 +k 2 The number of pooling layers is k 1 +k 2 The number of dropout layers is 2, the number of fully connected layers is 3, the number of output layers is 3, and k 1 and k 2 is a positive integer; The processing steps include: S5.1: The input layer contains two nodes. Input node 1 inputs ECFP4 features represented by ECFP4 vectors, and input node 2 inputs SMILES single-hot features represented by SMILES single-hot matrix. S5.2: Use k 1 The convolution kernels of the same size convolve the ECFP4 features of node 1 input, k 1 The number of output channels of each convolution kernel is c 1 , get the ECFP4 features after convolution; S5.3: Use k 2 Convolution kernels of different sizes are used to convolve the SMILES single-hot features of node 2 input, k 2 The number of output channels of each convolution kernel is c 2 , get the SMILES word single-hot feature after convolution; S5.4: The features after convolution in S5.2 and the features after convolution in S5.3 are normalized through the normalization layer to obtain the normalized ECFP4 features and SMILES single-hot features; S5.5: Perform ReLU activation operation on the normalized ECFP4 features and SMILES word one-hot features through the activation layer to obtain the activated ECFP4 features and SMILES word one-hot features; S5.6: Performing maximum pooling operations on the activated ECFP4 features and SMILES single-hot features through the pooling layer to obtain ECFP4 features and SMILES single-hot features after the pooling operation; S5.7: concatenate the ECFP4 features after maximum pooling to obtain concatenated ECFP4 semantic features, concatenate the SMILES single-hot features after maximum pooling to obtain concatenated SMILES single-hot semantic features, and concatenate the ECFP4 semantic features and the SMILES single-hot semantic features to obtain fused semantic features; S5.8: The fused semantic features are sent to a fully connected layer, and then through a Softmax, the probability between [0,1] of each node is output, denoted as p 1 ∈R d , indicating the predicted probability of each type of reaction template; at the same time, the ECFP4 semantic features and SMILES single-hot semantic features are respectively passed through the dropout layer, the fully connected layer, and the Softmax layer to output the probability between [0,1] of each node, which are respectively denoted as p 2 ∈R d and p 3 ∈R d , respectively represent the probability of occurrence of each type of reaction template predicted based on ECFP4 semantic features and SMILES word-hot semantic features, d is the number of reaction templates in the reaction template set T; S5.9: The final prediction result is obtained through the output layer according to the result of S5.

8.

5. The single-step retrosynthesis method according to claim 1, It is characterized in that Step S6 During the training process, according to the three classification results of the model, the three cross entropy losses of the model are obtained and recorded as loss 1 、loss 2 and loss 3 , the final loss of the single-step retrosynthesis prediction model is: loss=α 1 loss 1 +α 2 loss 2 +α 3 loss 3 Among them, loss 1 、loss 2 、loss 3 They represent the loss of fusion semantic feature prediction, the loss of ECFP4 semantic feature prediction, and the loss of SMILES single-hot semantic feature prediction, respectively. j (j=1,2,3) represent three losses respectively 1 ,loss 2 and loss 3 The weight in the global loss of the network, and ∑α j =1 and α j ∈(0,1).

6. A single-step retrosynthesis system based on multi-semantic networks, It is characterized in that include: A data set preprocessing module is used to obtain a public data set and perform preprocessing to obtain a data set D after preprocessing, wherein each piece of data in the data set D corresponds to a specific reaction, and each piece of data includes a reaction, a reactant molecule, and a product molecule; A reaction template set building module, used to build a reaction template set T; A feature construction module is used to obtain an ECFP4 feature set E of the product molecules represented by an ECFP4 vector and a SMILES word single-hot feature set S of the product molecules represented by a SMILES word single-hot matrix according to the product molecules in the data set D; Sample set building module, used to build sample sets where e i ∈E,s i ∈S represent the ECFP4 feature and SMILES single-word hot feature of the product molecule in the i-th data in the dataset D, respectively, i ∈T represents the reaction template in the i-th data in D, and N represents the number of sample sets; A multi-semantic network building module is used to build a multi-semantic network, including an input layer, a convolution layer, a normalization layer, an activation layer, a pooling layer, a dropout layer, a fully connected layer, and an output layer. The convolution layer is used to convolve the input data, the normalization layer is used to normalize the features after convolution, the activation layer is used to activate the features after normalization, and the pooling layer performs pooling operations on the ECFP4 features and the SMILES single-hot features, respectively, so as to obtain ECFP4 semantic features and SMILES single-hot semantic features; the ECFP4 semantic features and the SMILES single-hot semantic features are fused to obtain fused semantic features; and then the fused semantic features are passed through the dropout layer, the fully connected layer, and the softmax, and the final output result is obtained through the output layer; The multi-semantic network training module is used to train the multi-semantic network in the multi-semantic network building module using the sample set of the sample set building module to obtain a trained single-step retrosynthesis prediction model; the single-step retrosynthesis prediction module is used to predict a reaction that can generate a target product molecule to be predicted using the single-step retrosynthesis prediction model trained in the multi-semantic network training module, and then combine the SMILES string of the target product molecule to finally calculate the SMILES string of the reactant corresponding to the target product molecule to achieve single-step retrosynthesis prediction.