Molecular single-step inverse synthesis method and system, medium and electronic equipment
Through the multimodal molecular characterization extraction model and bidirectional attention mechanism, the problems of incomplete semantic representation and multi-source data integration in the molecular inverse synthesis model are solved, the accuracy and generalization performance of the molecular inverse synthesis task are improved, and the modeling is simplified process.
Patent Information
- Application Number
- CN202310778357.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2024-12-31
AI Technical Summary
The existing molecular inverse synthesis models have problems such as incomplete semantic representation, single-modal, inability to aggregate multi-source data information, lack of multi-modal information integration, and introduction of specific task characteristics.
A molecular characterization extraction model and molecular inverse synthesis model framework are proposed, and a multimodal molecular characterization extraction model is constructed through a multimodal mechanism, a two-way attention mechanism and a two-track information merging fine-tuning strategy are introduced to improve the semantic characterization and generalization performance of the model.
It improves the accuracy and generalization performance of molecular inverse synthesis tasks, improves the pre-training accuracy and atomic classification accuracy, simplifies the modeling process, and realizes an efficient molecular inverse synthesis algorithm.
Smart Images

Figure CN119229988A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of molecular retrosynthesis, and in particular to a molecular single-step retrosynthesis method, system, medium and electronic equipment. Background Art
[0002] In the prior art, molecular retrosynthesis usually adopts the following two methods:
[0003] (1) Artificial synthesis
[0004] Artificial retrosynthesis requires a lot of manpower, has high technical requirements for staff, and is time-consuming and labor-intensive, resulting in huge cost investment.
[0005] (2) Construction of molecular retrosynthesis model based on neural network
[0006] At present, the construction of molecular retrosynthesis model includes the following steps: 1) collecting chemical reaction equation data; 2) obtaining products and reactants; 3) calculating product and reactant feature vectors; 4) constructing retrosynthesis model based on feature vectors. However, the existing molecular retrosynthesis model has the following problems:
[0007] First, the existing molecular retrosynthesis model is task-oriented, and all data comes from chemical reaction equations. Compared with the huge data molecule library, the semantic representation of the molecular feature vector calculated based on the reaction equation is incomplete;
[0008] Second, the existing molecular retrosynthesis model is based on a single modality and cannot aggregate multi-source data information;
[0009] Third, the existing molecular retrosynthesis models do not have a suitable way to integrate the multimodal molecular information expression;
[0010] Fourth, the existing fine-tuning is just a subsequent stacking of network layers based on pre-training. The shallow features of specific tasks cannot be introduced into the model, and the specificity of the task cannot be reflected. Summary of the invention
[0011] In view of the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a molecular single-step retrosynthesis method, system, medium, and electronic equipment to achieve single-step retrosynthesis of molecules by constructing a molecular characterization extraction model and a molecular retrosynthesis model.
[0012] In a first aspect, the present invention provides a molecular single-step retrosynthesis method, the method comprising the following steps: training a molecular characterization extraction model; extracting a product molecular characterization based on the molecular characterization extraction model; obtaining a first predicted reaction center corresponding to the product molecular characterization based on a first molecular single-step retrosynthesis model, and obtaining a first retrosynthetic loss based on the first predicted reaction center; obtaining a second predicted reaction center corresponding to the actual product molecular characterization based on a second molecular single-step retrosynthetic model, and obtaining a second retrosynthetic loss based on the second predicted reaction center; adjusting the parameters of the first molecular single-step retrosynthetic model and the second molecular single-step retrosynthetic model based on the sum of the first retrosynthetic loss and the second retrosynthetic loss, so as to perform molecular single-step retrosynthesis based on the trained molecular characterization extraction model and the first molecular single-step retrosynthetic model.
[0013] In an implementation of the first aspect, training the molecular representation extraction model comprises the following steps:
[0014] Constructing a molecular representation extraction model;
[0015] Get the mask of the molecule;
[0016] extracting a predicted molecular representation of the mask based on the molecular representation extraction model;
[0017] Calculating a loss function based on the predicted molecular representation and the actual molecular representation;
[0018] The parameters of the molecular representation extraction model are adjusted based on the loss function to obtain a trained molecular representation extraction model.
[0019] In an implementation of the first aspect, training the molecular representation extraction model comprises the following steps:
[0020] Constructing a molecular representation extraction model, wherein the molecular representation extraction model includes a first representation extraction module, a second representation extraction module, an interaction module, a third representation extraction module, and a fourth representation extraction module;
[0021] Extracting a first representation of a one-dimensional SMILES sequence of a molecule based on the first representation extraction module;
[0022] Extracting a second representation of the molecular two-dimensional graph based on the second representation extraction module;
[0023] fusing the first representation and the second representation based on the interaction module to obtain fusion information;
[0024] Extracting a one-dimensional molecular representation of the fusion information based on the third representation extraction module;
[0025] Extracting the two-dimensional molecular representation of the fusion information based on the fourth representation extraction module;
[0026] Calculating a one-dimensional loss based on the one-dimensional SMILES sequence of the molecule and the one-dimensional molecular representation;
[0027] calculating a two-dimensional loss based on the two-dimensional molecular map and the two-dimensional molecular representation;
[0028] The parameters of the molecular representation extraction module are adjusted based on the sum of the one-dimensional loss and the two-dimensional loss to obtain a trained molecular representation extraction model.
[0029] In an implementation of the first aspect, the one-dimensional molecular SMILES sequence includes a product SMILES sequence, a reactant SMILES sequence and a non-reactant SMILES sequence; the two-dimensional molecular graph includes a product molecular graph, a reactant molecular graph and a non-reactant molecular graph.
[0030] In an implementation of the first aspect, extracting product molecular representations based on the molecular representation extraction model includes the following steps:
[0031] Input the product into the trained first representation extraction module to obtain the corresponding first representation;
[0032] Input the product molecular graph into the trained second representation extraction module to obtain the corresponding second representation;
[0033] fusing the first representation and the second representation based on the interaction module to obtain fusion information;
[0034] Extracting a one-dimensional molecular representation of the fusion information based on the third representation extraction module;
[0035] A two-dimensional molecular representation of the fusion information is extracted based on the fourth representation extraction module.
[0036] In an implementation of the first aspect, obtaining a first predicted reaction center corresponding to the product molecular representation based on a first molecule single-step retrosynthesis model includes: inputting the one-dimensional molecular representation and the two-dimensional molecular representation into the first molecule single-step retrosynthesis model to obtain the first predicted reaction center; obtaining a second predicted reaction center corresponding to the actual product molecular representation based on a second molecule single-step retrosynthesis model includes: inputting the actual product molecular representation into the second molecule single-step retrosynthesis model to obtain the second predicted reaction center.
[0037] In an implementation of the first aspect, extracting a first representation of a molecular one-dimensional SMILES sequence based on the first representation extraction module includes: the first representation extraction module uses a Transformer-Encode module to obtain a first representation Embedding and Other-Embedding of the molecular one-dimensional SMILES sequence based on the Transformer-Encode module;
[0038] Extracting the second representation of the molecular two-dimensional graph based on the second representation extraction module includes: the second representation extraction module uses a GCN network to obtain a second representation Node-Embedding corresponding to the product molecular graph, the reactant molecular graph and the non-reactant molecular graph based on the GCN network;
[0039] The first representation and the second representation are fused based on the interaction module to obtain fusion information, including: taking the Embedding as Q and each Node-Embedding as K, calculating the product attention matrix, the reactant attention matrix and the non-reactant attention matrix; respectively calculating the Embedding fusion product information, the Embedding fusion reactant information and the Embedding fusion non-reactant information based on the product attention matrix, the reactant attention matrix and the non-reactant attention matrix, and adding the Embedding fusion product information, the Embedding fusion reactant information and the Embedding fusion non-reactant information to obtain the Embedding complete fusion information, and the Other-Embedding remains unchanged; respectively adding the second representation Node-Embedding corresponding to the product molecular graph, the reactant molecular graph and the non-reactant molecular graph to the Embedding to obtain the node expression; performing two-dimensional self-attention interaction on the node expressions and splicing them together to obtain the fusion information.
[0040] In an implementation of the first aspect, obtaining a second predicted reaction center corresponding to the actual product molecular characterization based on the second molecule single-step retrosynthesis model comprises the following steps:
[0041] The Transformer-Decode module is used as the single-step retrosynthesis model of the second molecule;
[0042] The product is encoded based on the Transformer-Decode module to obtain encoding information, and the encoding information and the product molecular representation are decoded to obtain the second predicted reaction center.
[0043] In a second aspect, the present invention provides a molecular single-step retrosynthesis system, the system comprising a first training module, an extraction module, a first retrosynthesis module, a second retrosynthesis module, and a second training module;
[0044] The first training module is used to train a molecular representation extraction model;
[0045] The extraction module is used to extract product molecular representation based on the molecular representation extraction model;
[0046] The first retrosynthesis module is used to obtain a first predicted reaction center corresponding to the product molecular characterization based on a first molecular single-step retrosynthesis model, and to obtain a first retrosynthesis loss based on the first predicted reaction center;
[0047] The second retrosynthesis module is used to obtain a second predicted reaction center corresponding to the actual product molecular characterization based on the second molecular single-step retrosynthesis model, and obtain a second retrosynthesis loss based on the second predicted reaction center;
[0048] The second training module is used to adjust the parameters of the first molecular single-step retrosynthetic model and the second molecular single-step retrosynthetic model based on the sum of the first retrosynthetic loss and the second retrosynthetic loss, so as to perform molecular single-step retrosynthesis based on the trained molecular characterization extraction model and the first molecular single-step retrosynthetic model.
[0049] In a third aspect, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned molecular single-step retrosynthesis method.
[0050] In a fourth aspect, the present invention provides an electronic device, comprising: a processor and a memory;
[0051] The memory is used to store computer programs;
[0052] The processor is used to execute the computer program stored in the memory so that the electronic device executes the above-mentioned molecular single-step reverse synthesis method.
[0053] As described above, the molecular single-step retrosynthesis method, system, medium, and electronic device of the present invention have the following beneficial effects:
[0054] (1) The innovative molecular representation extraction model-molecular retrosynthesis model framework is proposed, which enriches the molecular semantics, simplifies the modeling process, provides a strong theoretical basis for solving molecular retrosynthesis tasks, provides a basic paradigm for subsequent molecular retrosynthesis tasks, and improves modeling efficiency;
[0055] (2) Based on the molecular representation extraction model-molecular retrosynthesis model framework, a multimodal mechanism is introduced to construct a multimodal molecular representation extraction model-molecular retrosynthesis model, which provides efficient algorithm capabilities for molecular retrosynthesis tasks and improves the accuracy of retrosynthesis tasks. Compared with single-molecule retrosynthesis tasks, the accuracy of top 10 is improved by 5.2%;
[0056] (3) Within the multimodal model, a molecular multimodal bidirectional attention mechanism is proposed, which breaks through the organic combination of multimodality and attention to generate effective features with rich modal semantics, thereby improving the prediction accuracy of pre-training. Compared with the case without the multimodal bidirectional attention mechanism, the atomic classification accuracy is improved by 3.8%;
[0057] (4) While focusing on molecular characterization to extract effective features of the model, a dual-track information merging and fine-tuning strategy is proposed to further introduce the specificity of molecular retrosynthesis tasks, thereby improving the generalization performance of the model. Compared with the case without the dual-track strategy, the top 10 accuracy is improved by 1.8%. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 Shown is a schematic diagram of an application scenario of the molecular single-step retrosynthesis method of the present invention in one embodiment;
[0059] Figure 2 Shown is a flow chart of a molecular single-step retrosynthesis method in one embodiment of the present invention;
[0060] Figure 3 It is a schematic diagram showing a training method of a molecular representation extraction model of the present invention in one embodiment;
[0061] Figure 4 It is a schematic diagram showing a framework of a molecular single-step retrosynthesis method according to an embodiment of the present invention;
[0062] Figure 5 It is a schematic diagram showing a training method of a multimodal molecular representation extraction model of the present invention in one embodiment;
[0063] Figure 6 It is a schematic diagram showing a framework of a single-step retrosynthesis method of a multimodal molecule according to an embodiment of the present invention;
[0064] Figure 7 It is a schematic diagram showing a multimodal bidirectional attention mechanism in one embodiment of the present invention;
[0065] Figure 8 It is a schematic diagram showing a dual-track information merging and fine-tuning strategy in one embodiment of the present invention;
[0066] Fig. 9 Shown is a schematic structural diagram of a molecular single-step retrosynthesis system of the present invention in one embodiment;
[0067] Fig.10 It is a schematic structural diagram of an electronic device of the present invention in one embodiment. DETAILED DESCRIPTION
[0068] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0069] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0070] The following embodiments of the present invention provide a molecular single-step retrosynthesis method, which can be applied to Figure 1 The electronic device shown. The electronic device described in the present invention may include a mobile phone 11 with a wireless charging function, a tablet computer 12, a laptop computer 13, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiment of the present invention does not impose any restrictions on the specific type of the electronic device.
[0071] For example, the electronic device may be a station (STAION, ST) in a WLAN with a wireless charging function, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with a wireless charging function, a computing device or other processing device, a computer, a laptop computer, a handheld communication device, a handheld computing device, and / or other devices for communicating on a wireless system and a next generation communication system, such as a mobile terminal in a 5G network, a mobile terminal in a future evolved Public Land Mobile Network (PLMN), or a mobile terminal in a future evolved Non-terrestrial Network (NTN).
[0072] For example, the electronic device can communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobilecommunication (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), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS can include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS) and / or Satellite Based Augmentation Systems (SBAS).
[0073] The molecular single-step retrosynthesis method, system, medium, and electronic device of the present invention first adopt a molecular representation extraction model-molecular retrosynthesis model framework, and use pre-training and massive molecular data to enhance the semantic representation of molecules and obtain molecular representations; secondly, a multimodal molecular representation extraction model-molecular retrosynthesis model is constructed to compensate for the disadvantage of insufficient single-modal data information by introducing multimodal information; then a molecular multimodal bidirectional attention mechanism is proposed to fuse information of multiple modalities in an attention manner to further enhance semantics; finally, a dual-track information merging and fine-tuning strategy is proposed, which takes multiple products as input, constructs independent training branches, integrates pre-training information, and improves the generalization performance of the model.
[0074] The technical solutions in the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0075] like Figure 2 As shown, in one embodiment, the molecular single-step retrosynthesis method of the present invention comprises the following steps:
[0076] Step S1, training a molecular representation extraction model.
[0077] Specifically, the present invention pre-trains a molecular representation extraction model for extracting molecular representations.
[0078] like Figure 3 As shown, in one embodiment, training the molecular representation extraction model includes the following steps:
[0079] 11) Construct a molecular characterization extraction model.
[0080] 12) Get the mask of the molecule.
[0081] The training data is a set of molecules, and a mask operation needs to be performed on the molecules to obtain the corresponding masks.
[0082] 13) Extracting the predicted molecular representation of the mask based on the molecular representation extraction model.
[0083] The mask is input into the molecular representation extraction model to obtain the predicted molecular representation corresponding to the mask.
[0084] 14) Calculating a loss function based on the predicted molecular representation and the actual molecular representation.
[0085] 15) Adjusting the parameters of the molecular characterization extraction model based on the loss function to obtain a trained molecular characterization extraction model.
[0086] When the molecular representation extraction model is trained, a semantically rich molecular representation can be obtained.
[0087] Step S2: extracting product molecular representation based on the molecular representation extraction model.
[0088] Specifically, the product molecule mask is input into a trained molecular representation extraction model to obtain the product molecular representation.
[0089] Step S3, obtaining a first predicted reaction center corresponding to the product molecular characterization based on the first molecular single-step retrosynthesis model, and obtaining a first retrosynthetic loss based on the first predicted reaction center.
[0090] Step S4, obtaining a second predicted reaction center corresponding to the actual product molecular characterization based on the second molecular single-step retrosynthesis model, and obtaining a second retrosynthesis loss based on the second predicted reaction center.
[0091] Step S5, adjusting the parameters of the first molecular single-step retrosynthetic model and the second molecular single-step retrosynthetic model based on the sum of the first retrosynthetic loss and the second retrosynthetic loss, so as to perform molecular single-step retrosynthesis based on the trained molecular characterization extraction model and the first molecular single-step retrosynthetic model.
[0092] Specifically, Figure 4 As shown, in the present invention, a first molecular single-step retrosynthetic model and a second molecular single-step retrosynthetic model are constructed. Among them, the first molecular single-step retrosynthetic model generates a first predicted reaction center according to the product molecular characterization provided by the molecular characterization extraction model; the second molecular single-step retrosynthetic model generates a second predicted reaction center according to the actual product molecular characterization. The loss function of the first molecular single-step retrosynthetic model and the second molecular single-step retrosynthetic model is used to perform reverse adjustment of the model, and the molecular unidirectional retrosynthesis is realized with the finally trained molecular characterization extraction model and the first molecular single-step retrosynthetic model. That is, the product is sequentially input into the trained molecular characterization extraction model and the first molecular single-step retrosynthetic model to obtain the corresponding predicted reaction center.
[0093] In another embodiment, the present invention proposes a multimodal molecular characterization extraction model, which can aggregate multi-source information and enrich molecular characterization information. Figure 5 As shown, training a multimodal molecular representation extraction model includes the following steps:
[0094] 51) Constructing a molecular representation extraction model, wherein the molecular representation extraction model includes a first representation extraction module, a second representation extraction module, an interaction module, a third representation extraction module and a fourth representation extraction module.
[0095] 52) Extracting a first representation of a one-dimensional SMILES sequence of a molecule based on the first representation extraction module.
[0096] Among them, SMILESSMILES stands for Simplified Molecular Input Line Entry System, which is a linear symbol used to input and represent molecular reactions and is an ASCII code. The molecular one-dimensional SMILES sequence includes a product SMILES sequence, a reactant SMILES sequence and a non-reactant SMILES sequence. For example, the molecular one-dimensional SMILES sequence is expressed as: [CLS] product SMILE [SEP] reactant SMILE [SEP] non-reactant SMILE . Among them, [CLS] represents the overall identifier, [SEP] represents the molecule separator, and represents the end symbol.
[0097] 53) Extracting a second representation of the molecular two-dimensional graph based on the second representation extraction module.
[0098] The two-dimensional molecular graph includes a product molecular graph, a reactant molecular graph and a non-reactant molecular graph arranged in sequence.
[0099] 54) Based on the interaction module, the first representation and the second representation are fused to obtain fusion information.
[0100] 55) Extracting a one-dimensional molecular representation of the fusion information based on the third representation extraction module.
[0101] 56) Extracting the two-dimensional molecular representation of the fusion information based on the fourth representation extraction module.
[0102] 57) Calculating the one-dimensional loss based on the one-dimensional SMILES sequence of the molecule and the one-dimensional molecular representation.
[0103] 58) Calculating a two-dimensional loss based on the two-dimensional molecular map and the two-dimensional molecular representation.
[0104] 59) Adjusting the parameters of the molecular characterization extraction module based on the sum of the one-dimensional loss and the two-dimensional loss to obtain a trained molecular characterization extraction model.
[0105] like Figure 6As shown, for the multimodal molecular representation extraction model, when extracting the product molecular representation based on the molecular representation extraction model, first input the product into the trained first representation extraction module to obtain the corresponding first representation; input the product molecular graph into the trained second representation extraction module to obtain the corresponding second representation; fuse the first representation and the second representation based on the interaction module to obtain fusion information; extract the one-dimensional molecular representation of the fusion information based on the third representation extraction module; extract the two-dimensional molecular representation of the fusion information based on the fourth representation extraction module. When training the first molecule single-step retrosynthesis model and the second molecule single-step retrosynthesis model, input the one-dimensional molecular representation and the two-dimensional molecular representation into the first molecule single-step retrosynthesis model to obtain the first predicted reaction center, and input the actual product molecular representation into the second molecule single-step retrosynthesis model to obtain the second predicted reaction center; and then adjust the model parameters based on the loss and reverse of the first molecule single-step retrosynthesis model and the second molecule single-step retrosynthesis model.
[0106] In the multimodal molecular representation extraction model, multimodal input obtains multi-source information, and how to fuse them and enrich the semantics of molecular representation is the key to the multimodal molecular representation extraction model. Therefore, the present invention adopts a multimodal bidirectional attention mechanism.
[0107] like Figure 7 As shown, in one embodiment, the first representation extraction module uses a Transformer-Encode module. Based on the 12-layer Transformer-Encode module, the first representation [CLS]Embedding and Other-Embedding of the one-dimensional SMILES sequence of the molecule are obtained. The second representation extraction module uses a GCN network. Based on the GCN network, the product molecule is obtained Figure X 21 Reactant molecules Figure X 22 and non-reactant molecules Figure X 23 The corresponding second representations are Node-Embedding_1, Node-Embedding_2 and Node-Embedding_3.
[0108] The interaction module uses the [CLS]Embedding as Q, Node-Embedding_1, Node-Embedding_2 and Node-Embedding_3 as K, and calculates the product attention matrix Attention1, the reactant attention matrix Attention2 and the non-reactant attention matrix Attention. Based on the product attention matrix Attention1, the reactant attention matrix Attention2 and the non-reactant attention matrix Attention3, three fusion expressions of [CLS]Embedding are calculated respectively, namely: Embedding fusion product information ([CLS]Embedding-1), Embedding fusion reactant information ([CLS]Embedding-2) and Embedding fusion non-reactant information ([CLS]Embedding-3). The Embedding fusion product information, the Embedding fusion reactant information and the Embedding fusion non-reactant information are added to obtain the Embedding complete fusion information, and the Other-Embedding remains unchanged. The second representations Node-Embedding_1, Node-Embedding_2 and Node-Embedding_3 corresponding to the product molecular graph, the reactant molecular graph and the non-reactant molecular graph are respectively added to the first representation [CLS]Embedding to obtain a complete node expression. Since the node expressions do not obtain the interaction information between each other, the present invention performs two-dimensional self-attention interaction on the node expressions and splices them together to obtain the fusion information.
[0109] The present invention proposes a dual-track information merging and fine-tuning strategy for the specific task of molecular retrosynthesis. Figure 8 As shown, in one embodiment, first based on Figure 7 The multimodal bidirectional attention mechanism shown obtains the product molecular representation, and trains the first molecular single-step retrosynthesis model based on the product molecular representation to generate a first retrosynthesis loss. Next, the Transformer-Decode module is used as the second molecular single-step retrosynthesis model to encode the product to obtain the encoding information, and the encoding information and the product molecular representation are decoded to obtain the second predicted reaction center, and a second retrosynthesis loss is generated. Among them, the product may include multiple products. Finally, the model parameters are adjusted in reverse based on the first retrosynthesis loss and the second retrosynthesis loss. After the model training is completed, the molecular single-step retrosynthesis is performed based on the trained molecular representation extraction model and the first molecular single-step retrosynthesis model.
[0110] The protection scope of the molecular single-step retrosynthesis method described in the embodiment of the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions achieved by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.
[0111] An embodiment of the present invention also provides a molecular single-step retrosynthesis system, which can implement the molecular single-step retrosynthesis method described in the present invention. However, the implementation device of the molecular single-step retrosynthesis system described in the present invention includes but is not limited to the structure of the molecular single-step retrosynthesis system listed in this embodiment. All structural deformations and replacements of the prior art made according to the principles of the present invention are included in the protection scope of the present invention.
[0112] like Fig. 9 As shown, in one embodiment, the molecular single-step retrosynthesis system of the present invention includes a first training module 91 , an extraction module 92 , a first retrosynthesis module 93 , a second retrosynthesis module 94 and a second training module 95 .
[0113] The first training module 91 is used to train the molecular representation extraction model.
[0114] The extraction module 92 is connected to the first training module 91 and is used to extract product molecular representations based on a molecular representation extraction model.
[0115] The first retrosynthesis module 93 is connected to the extraction module 92, and is used to obtain a first predicted reaction center corresponding to the product molecular characterization based on a first molecular single-step retrosynthesis model, and to obtain a first retrosynthesis loss based on the first predicted reaction center.
[0116] The second retrosynthesis module 94 is used to obtain a second predicted reaction center corresponding to the actual product molecular characterization based on a second molecular single-step retrosynthesis model, and to obtain a second retrosynthesis loss based on the second predicted reaction center.
[0117] The second training module 95 is connected to the first retrosynthesis module 93 and the second retrosynthesis module 94, and is used to adjust the parameters of the first molecular single-step retrosynthesis model and the second molecular single-step retrosynthesis model based on the sum of the first retrosynthesis loss and the second retrosynthesis loss, so as to perform molecular single-step retrosynthesis based on the trained molecular characterization extraction model and the first molecular single-step retrosynthesis model.
[0118] Among them, the structures and principles of the first training module 91, the extraction module 92, the first retrosynthesis module 93, the second retrosynthesis module 94 and the second training module 95 correspond one by one to the steps of the above-mentioned molecular single-step retrosynthesis method, so they are not repeated here.
[0119] In the several embodiments provided by the present invention, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules / units is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or units 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 through some interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.
[0120] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention. For example, the functional modules / units in the various embodiments of the present invention may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0121] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0122] The embodiment of the present invention also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the molecular single-step reverse synthesis method of the above embodiment can be completed by a program to instruct a processor, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0123] An embodiment of the present invention further provides an electronic device, which includes a processor and a memory.
[0124] The memory is used to store computer programs.
[0125] The memory includes: ROM, RAM, disk, USB flash drive, memory card or CD and other media that can store program codes.
[0126] The processor is connected to the memory and is used to execute the computer program stored in the memory so that the electronic device executes the above-mentioned molecular single-step reverse synthesis method.
[0127] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0128] like Fig.10As shown, the electronic device of the present invention is in the form of a general computing device. The components of the electronic device may include but are not limited to: one or more processors or processing units 101, a memory 102, and a bus 103 connecting different system components (including the memory 102 and the processing unit 101).
[0129] Bus 103 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0130] Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, removable and non-removable media.
[0131] The memory 102 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 1021 and / or cache memory 1022. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 1023 may be used to read and write non-removable, non-volatile magnetic media ( Fig.10 not shown, usually called a "hard drive"). Although Fig.10 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 103 via one or more data medium interfaces. The memory 102 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0132] A program / utility 1024 having a set (at least one) of program modules 10241 may be stored, for example, in the memory 102, such program modules 10241 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 10241 generally perform the functions and / or methods of the embodiments described herein.
[0133] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, displays, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via input / output (I / O) interface 104. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 105. Fig.10 As shown, the network adapter 105 communicates with other modules of the electronic device via the bus 103. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0134] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A molecular single-step retrosynthesis method, characterized in that: The method comprises the following steps: Training a molecular representation extraction model; Extract product molecular representation based on molecular representation extraction model; Obtaining a first predicted reaction center corresponding to the product molecular characterization based on a first molecule single-step retrosynthesis model, and obtaining a first retrosynthesis loss based on the first predicted reaction center; Obtaining a second predicted reaction center corresponding to the actual product molecular characterization based on the second molecule single-step retrosynthesis model, and obtaining a second retrosynthesis loss based on the second predicted reaction center; The parameters of the first molecular single-step retrosynthetic model and the second molecular single-step retrosynthetic model are adjusted based on the sum of the first retrosynthetic loss and the second retrosynthetic loss, so as to perform molecular single-step retrosynthesis based on the trained molecular characterization extraction model and the first molecular single-step retrosynthetic model.
2. The molecular single-step retrosynthesis method according to claim 1, characterized in that: Training a molecular representation extraction model involves the following steps: Constructing a molecular representation extraction model; Get the mask of the molecule; extracting a predicted molecular representation of the mask based on the molecular representation extraction model; Calculating a loss function based on the predicted molecular representation and the actual molecular representation; The parameters of the molecular representation extraction model are adjusted based on the loss function to obtain a trained molecular representation extraction model.
3. The molecular single-step retrosynthesis method according to claim 1, characterized in that: Training a molecular representation extraction model involves the following steps: Constructing a molecular representation extraction model, wherein the molecular representation extraction model includes a first representation extraction module, a second representation extraction module, an interaction module, a third representation extraction module, and a fourth representation extraction module; Extracting a first representation of a one-dimensional SMILES sequence of a molecule based on the first representation extraction module; Extracting a second representation of the molecular two-dimensional graph based on the second representation extraction module; fusing the first representation and the second representation based on the interaction module to obtain fusion information; Extracting a one-dimensional molecular representation of the fusion information based on the third representation extraction module; Extracting the two-dimensional molecular representation of the fusion information based on the fourth representation extraction module; Calculating a one-dimensional loss based on the one-dimensional SMILES sequence of the molecule and the one-dimensional molecular representation; calculating a two-dimensional loss based on the two-dimensional molecular map and the two-dimensional molecular representation; The parameters of the molecular representation extraction module are adjusted based on the sum of the one-dimensional loss and the two-dimensional loss to obtain a trained molecular representation extraction model.
4. The molecular single-step retrosynthesis method according to claim 3, characterized in that: The one-dimensional molecular SMILES sequence includes a product SMILES sequence, a reactant SMILES sequence and a non-reactant SMILES sequence; the two-dimensional molecular graph includes a product molecular graph, a reactant molecular graph and a non-reactant molecular graph.
5. The molecular single-step retrosynthesis method according to claim 3, characterized in that: Extracting product molecular characterization based on the molecular characterization extraction model includes the following steps: Input the product into the trained first representation extraction module to obtain the corresponding first representation; Input the product molecular graph into the trained second representation extraction module to obtain the corresponding second representation; fusing the first representation and the second representation based on the interaction module to obtain fusion information; Extracting a one-dimensional molecular representation of the fusion information based on the third representation extraction module; A two-dimensional molecular representation of the fusion information is extracted based on the fourth representation extraction module.
6. The molecular single-step retrosynthesis method according to claim 5, characterized in that: Obtaining a first predicted reaction center corresponding to the product molecular characterization based on a first molecule single-step retrosynthesis model includes: inputting the one-dimensional molecular characterization and the two-dimensional molecular characterization into the first molecule single-step retrosynthesis model to obtain the first predicted reaction center; obtaining a second predicted reaction center corresponding to the actual product molecular characterization based on a second molecule single-step retrosynthesis model includes: inputting the actual product molecular characterization into the second molecule single-step retrosynthesis model to obtain the second predicted reaction center.
7. The molecular single-step retrosynthesis method according to claim 3, characterized in that: Extracting the first representation of the molecular one-dimensional SMILES sequence based on the first representation extraction module includes: the first representation extraction module adopts a Transformer-Encode module, and obtains the first representation Embedding and Other-Embedding of the molecular one-dimensional SMILES sequence based on the Transformer-Encode module; Extracting the second representation of the molecular two-dimensional graph based on the second representation extraction module includes: the second representation extraction module uses a GCN network to obtain a second representation Node-Embedding corresponding to the product molecular graph, the reactant molecular graph and the non-reactant molecular graph based on the GCN network; The first representation and the second representation are fused based on the interaction module to obtain fusion information, including: taking the Embedding as Q and each Node-Embedding as K, calculating the product attention matrix, the reactant attention matrix and the non-reactant attention matrix; respectively calculating the Embedding fusion product information, the Embedding fusion reactant information and the Embedding fusion non-reactant information based on the product attention matrix, the reactant attention matrix and the non-reactant attention matrix, and adding the Embedding fusion product information, the Embedding fusion reactant information and the Embedding fusion non-reactant information to obtain the Embedding complete fusion information, and the Other-Embedding remains unchanged; respectively adding the second representation Node-Embedding corresponding to the product molecular graph, the reactant molecular graph and the non-reactant molecular graph to the Embedding to obtain the node expression; performing two-dimensional self-attention interaction on the node expressions and splicing them together to obtain the fusion information.
8. The molecular single-step retrosynthesis method according to claim 1, characterized in that: Obtaining the second predicted reaction center corresponding to the actual product molecular characterization based on the second molecule single-step retrosynthesis model includes the following steps: The Transformer-Decode module is used as the single-step retrosynthesis model of the second molecule; The product is encoded based on the Transformer-Decode module to obtain encoding information, and the encoding information and the product molecular representation are decoded to obtain the second predicted reaction center.
9. A molecular single-step retrosynthesis system, characterized in that: The system comprises a first training module, an extraction module, a first retrosynthesis module, a second retrosynthesis module and a second training module; The first training module is used to train a molecular representation extraction model; The extraction module is used to extract product molecular representation based on the molecular representation extraction model; The first retrosynthesis module is used to obtain a first predicted reaction center corresponding to the product molecular characterization based on a first molecular single-step retrosynthesis model, and to obtain a first retrosynthesis loss based on the first predicted reaction center; The second retrosynthesis module is used to obtain a second predicted reaction center corresponding to the actual product molecular characterization based on the second molecular single-step retrosynthesis model, and obtain a second retrosynthesis loss based on the second predicted reaction center; The second training module is used to adjust the parameters of the first molecular single-step retrosynthetic model and the second molecular single-step retrosynthetic model based on the sum of the first retrosynthetic loss and the second retrosynthetic loss, so as to perform molecular single-step retrosynthesis based on the trained molecular characterization extraction model and the first molecular single-step retrosynthetic model.
10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the molecular single-step reverse synthesis method according to any one of claims 1 to 8 is implemented.
11. An electronic device, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory, so that the electronic device performs the molecular single-step retrosynthesis method according to any one of claims 1 to 8.
