A molecular optimization method, system, terminal device and readable storage medium

By cutting the source molecule to retain its common structure with the target molecule and generating the target molecule, the problem of similarity and attribute improvement in the generation of complex target molecules in the existing technology is solved, and efficient molecular optimization is achieved.

CN112509644BActive Publication Date: 2024-09-20SHENZHEN INST OF ADVANCED TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011502775.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2024-09-20
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

Existing molecular optimization methods cannot guarantee the chemical structure similarity and attribute improvement of the generated molecules when generating complex target molecules, and at the same time consume too much computing resources.

Method used

By clipping the source molecule to retain its common molecular substructure with the target molecule, and converting the non-common parts with the target molecule into simplified molecular linear input specification strings, splicing to generate the target molecule reduces the scale and errors in generating the remaining molecular structures. Rate.

Benefits of technology

The accuracy and efficiency of molecule generation are improved, the consumption of computing resources is reduced, and the system error rate is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112509644B
    Figure CN112509644B
Patent Text Reader

Abstract

The present application belongs to the field of data synthesis technology, and in particular, relates to a molecular optimization method, system, terminal device and readable storage medium. When the chemical structure of the target molecule is relatively complex, the existing system performs poorly. The present application provides a molecular optimization method, the method comprising: obtaining a source molecule, cutting the source molecule according to the target molecule to obtain a source molecule retention area, the source molecule retention area being the common molecular substructure of the source molecule and the target molecule; converting the source molecule into a simplified molecular linear input specification string, the simplified molecular linear input specification string being the non-common molecular substructure part of the target molecule; splicing the source molecule retention area with the simplified molecular linear input specification string to obtain the target molecule. Greatly reduce the system error rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of data synthesis, and in particular, relates to a molecular optimization method, system, terminal device and readable storage medium. Background Art

[0002] Definition of the molecular optimization task: Given a source molecule, input a molecular optimizer (generator), which can convert the source molecule into another molecule (target molecule), and the target molecule is chemically similar to the source molecule, but some other chemical properties have been greatly improved (such as molecular water solubility).

[0003] Existing methods convert the graph generation task into a serialized decision-making process. Each element in this sequence is a specific decision, and there are three different optional decisions: 1) whether to add a new node at the current moment (if no new nodes are added, the generation process is considered to be over); 2) whether to add a new edge at the current moment; 3) select a node to connect to the current new node. The complete generation process starts with an empty molecular graph, and more than one decision is executed at each moment. Based on this graph generation paradigm, some people further added the factors of reinforcement learning and defined the state space, action space and reward function used by the standard reinforcement learning model. However, the overall molecular generation logic has not changed.

[0004] The solution space of the target molecule is too large (any modification to the source molecule will result in an alternative target molecule). These methods all use a source molecule as a clue, and then optimize the model from scratch, starting from an empty molecular graph, generating a node each time and establishing a chemical bond connection with the previously generated node until a generation end signal is obtained. Since the target molecule is often large in size (containing more nodes), the existing optimization system can neither guarantee the similarity between the generated molecule and the source molecule, nor guarantee the improvement of the properties; and it consumes too many computing resources. Summary of the invention

[0005] 1. Technical issues to be solved

[0006] Based on the existing molecular optimization methods, all of them can be classified as a "from scratch" molecular generation process. The generation of the optimized target molecule is a process starting from an empty graph until a complete target molecule is obtained. When the chemical structure of the target molecule is more complex, there is a problem of poor performance of the existing system. This application provides a molecular optimization method, system, terminal device and readable storage medium.

[0007] 2. Technical solution

[0008] In order to achieve the above-mentioned purpose, the present application provides a molecular optimization method, which includes: obtaining a source molecule, trimming the source molecule according to a target molecule to obtain a source molecule retained region, wherein the source molecule retained region is a common molecular substructure of the source molecule and the target molecule; converting the source molecule into a new simplified molecular linear input specification string, wherein the new simplified molecular linear input specification string is a non-common molecular substructure portion of the target molecule; and splicing the source molecule retained region with the new simplified molecular linear input specification string to obtain the target molecule.

[0009] Another implementation manner provided by the present application is that the cropping includes: parsing the area to be cropped of the source molecule, determining a cropping center according to the cropping area, determining a cropping branch according to the cropping center, and cropping the cropping branch to obtain the retained area of ​​the source molecule.

[0010] Another implementation manner provided by the present application is: the parsing of the area to be cropped of the source molecule includes: traversing node one in the source molecule, traversing node two in the target molecule, the chemical element of node one is the same as that of node two; traversing branch one of node one to obtain a first branch, traversing branch two of node two to obtain a second branch, the first branch is the same as the second branch, and recording the number of nodes in the first branch or the second branch; taking the node one with the largest value in the number of nodes, the first branch is the reserved area; branches other than the first branch are the area to be cropped.

[0011] Another implementation method provided by the present application is: the determining of the cropping center includes: obtaining vector representation one of the node one; aggregating the vector representation one to obtain vector representation two of the source molecule; combining the vector representation one and the vector representation two to predict the probability of the node one being the cropping center, normalizing the number of nodes to obtain a node probability distribution, and the node with the largest value of the node probability distribution is the cropping center.

[0012] Another implementation manner provided by the present application is: the determining of the cropping branch includes: obtaining vector representation three of branch three, wherein branch three is the branch of the cropping center, predicting the retention probability of branch three through vector representation one, vector representation three and vector representation of the first branch, and making a decision on whether to retain branch three.

[0013] Another implementation manner provided by the present application is: converting the source molecule into a simplified molecular linear input specification string includes: converting the source molecule into a standard simplified molecular linear input specification representation to obtain an encoded representation of the source molecule; and processing the encoded representation of the source molecule to obtain a new simplified molecular linear input specification.

[0014] Another implementation method provided by the present application is: concatenating the source molecule retention region with the simplified molecule linear input specification string to obtain the target molecule includes: converting the new simplified molecule linear input specification into a molecular graph; merging the molecular graph with the source molecule retention region to generate the target molecule.

[0015] The present application also provides a molecular optimization system, which includes: a molecular trimming unit, used to determine a source molecule retention region, wherein the source molecule retention region is a common molecular substructure of the source molecule and the target molecule; a time series unit, used to convert the source molecule into a new simplified molecular linear input specification string, wherein the new simplified molecular linear input specification string is a non-common molecular substructure portion of the target molecule; and a molecular splicing unit, used to splice the source molecule retention region with the new simplified molecular linear input specification string to obtain the target molecule.

[0016] Optionally, the molecular trimming unit includes a parsing module and a molecular trimmer; the time series unit includes a first time series module and a second time series module, and the molecular splicing unit includes a molecular splicing module; the parsing module is used to parse the region to be trimmed of the source molecule; the molecular trimmer is used to predict the molecule retention region; the first time series module is used to obtain the encoding representation of the entire source molecule; the second time series module is used to obtain a new simplified molecular linear input specification; the molecular splicing module is used to generate a target molecule. The molecular trimming unit also includes a database and a molecular pair matching module, the database is used to provide molecular pair data; the molecular pair matching module is used to obtain qualified molecular pairs from the database, each of which includes a source molecule and a target molecule.

[0017] Optionally, the first time series unit is an encoder, and the second time series unit is a decoder; the molecular splicing module includes a molecular graph conversion submodule and a merging submodule, the molecular graph conversion submodule converts the new simplified molecular linear input specification into a molecular graph, and the merging submodule merges the molecular graph with the retained area to generate a target molecule.

[0018] The present application also provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method when executing the computer program.

[0019] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0020] 3. Beneficial effects

[0021] Compared with the prior art, the molecular optimization method, system, terminal device and readable storage medium provided by the present application have the following beneficial effects:

[0022] The molecular optimization system provided by the present application includes a molecular cutter. By obtaining the reserved area through the molecular cutter, the scale of the remaining molecular structures to be generated can be greatly reduced, and the system error rate can be greatly reduced.

[0023] The molecular optimization method provided in the present application uses a molecular tailoring strategy to find common molecular substructures in source molecules and target molecules, thereby improving the accuracy and efficiency of the final molecule generation.

[0024] The molecular optimization method provided in this application is based on a common phenomenon: there is often a strong graph structural correlation between the source molecules and the target molecules in the molecular optimization task, that is, there are a large number of identical sub-molecular structures. Therefore, retaining these identical structures and only generating the remaining different parts can greatly improve the accuracy of model optimization.

[0025] The molecular optimization method provided by the present application, the method of generating molecules "from scratch", still has a fatal problem of huge amount of calculation, but if the common sub-molecular structure in the source molecule and the target molecule can be retained in advance, then the remaining molecular parts that actually need to be generated will be greatly reduced, thereby reducing the method's consumption of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a schematic diagram of an example of a molecular pair of the present application;

[0027] Figure 2 It is a schematic diagram of the cutting process of this application;

[0028] Figure 3 It is a schematic diagram of the encoder-decoder framework of the present application;

[0029] Figure 4 is a schematic diagram of the molecular optimization system of the present application;

[0030] Figure 5 It is a schematic diagram of the terminal device structure of this application. DETAILED DESCRIPTION

[0031] Hereinafter, the specific embodiments of the present application will be described in detail with reference to the accompanying drawings. According to these detailed descriptions, those skilled in the art can clearly understand the present application and can implement the present application. Without violating the principles of the present application, the features in the various embodiments can be combined to obtain new implementations, or certain features in certain embodiments can be replaced to obtain other preferred implementations.

[0032] Because the entire generation process requires predicting additional nodes and chemical bonds at each step, the number of steps executed is proportional to the size of the target molecule. The larger the target molecule, the more severe the consumption of computing resources.

[0033] SMILES (Simplified molecular input line entry specification), simplified molecular linear input specification, is a specification that uses ASCII strings to clearly describe molecular structures. A string representation method and tool for molecular graphs are proposed. When a molecular graph structure is input, SMILES can give a corresponding character representation. The target molecule generation process of this application mainly relies on this molecular representation method, but it should be pointed out that SMILES itself cannot directly generate molecules. This application only uses SMILES to encode and represent source molecules and target molecules.

[0034] The molecular optimization method provided in the embodiments of the present application can be applied to terminal devices such as tablet computers, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The embodiments of the present application do not impose any restrictions on the specific types of terminal devices.

[0035] For example, the terminal device can be a station (STAION, ST) in a WLAN, a personal digital assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, or a wireless modem card.

[0036] See also Figures 1 to 5 The present application provides a molecular optimization method, the method comprising: obtaining a source molecule, cutting the source molecule according to the target molecule to obtain a source molecule retention region, the source molecule retention region being a common molecular substructure of the source molecule and the target molecule. A source molecule retention region is predicted, and all molecular substructures that are not in the source molecule retention region are cut and removed. Through this step, the scale of the remaining molecular structures generated can be reduced, and the error rate can be reduced.

[0037] In the training phase, molecular pair data is obtained, each of which includes a source molecule and a target molecule. An arbitrary molecular database is selected, which contains a variety of different molecules, such as the ZINC database. The target molecule in the training phase is known; when testing, the target molecule is unknown, and the given source molecule is used to process the source molecule according to the target molecule.

[0038] The source molecule is converted into a new simplified molecule linear input specification string, wherein the new simplified molecule linear input specification string is a non-common molecular substructure portion in the target molecule, that is, the remaining portion of the target molecule is generated.

[0039] The target molecule is obtained by concatenating the retained region of the source molecule with the new simplified molecule linear input specification string.

[0040] Furthermore, the cropping includes: parsing the to-be-cropped region of the source molecule, determining a cropping center according to the cropping region, determining a cropping branch according to the cropping center, and cropping the cropping branch to obtain the retained region of the source molecule.

[0041] Further, the region to be cropped of the source molecule for analysis includes:

[0042] Traverse the node 1 in the source molecule, traverse the node 2 in the target molecule, the node 1 and the node 2 have the same chemical element; the node 1 is as Figure 2 The source molecule C1 in the node is Figure 2 The target molecule C1 in the

[0043] Traverse branch 1 of node 1 to obtain a first branch, traverse branch 2 of node 2 to obtain a second branch, the first branch is the same as the second branch, and the number of nodes in the first branch or the second branch is recorded.

[0044] Here, branch one is all branches of node one, and branch two is all branches of node two.

[0045] The node one with the largest value among the node numbers is selected, and the first branch is the reserved area; the branches other than the first branch are the areas to be cut.

[0046] Specifically, all atoms i, i.e. nodes i, in the source molecule are traversed (e.g. Figure 1 or source molecule C1 in 2): traverse all atoms j in the target molecule, i.e., nodes j, which have the same chemical element as the atom i (e.g. Figure 1 Or the target molecule C1 in 2): traverse all branches of the atom i and the atom j, obtain the same branches in the branches of the atom i and the branches of the atom j, and record the total number of atoms in the same branch as s i,j .

[0047] Among them, a branch is an area surrounding a node and extending from another node connected to it. 2 , H 3 , H 4 , H 5 )、(H 6 )、(H 7 ) and (C 8 , H 9 ) are respectively Figure 1 or 2 source molecule node C 1 4 branches.

[0048] like Figure 1 Or as shown in 2, the source molecule C 1 and the target molecule C 1 There are two identical branches, namely (C 2 , H 3 , H 4 , H 5 ) and (H 6 ), then the total number of atoms in the same branch is s i,j =5.

[0049] The largest value s i,j As s i and record the atom j corresponding to the atom i.

[0050] The largest value s i The atom i in c is assigned te , the maximum value of s i The atom i in the image is the cropping center, and the same atom as c is recorded. te The corresponding atom j.

[0051] In addition, for all s i , convert it into a normalized probability distribution to facilitate model learning:

[0052]

[0053] Where V X represents the set of all atoms in the source molecule, and exp(.) is the exponential function.

[0054] s te i This is the normalized distribution. te The same branch (can be multiple) corresponding to the atom j in is the reserved area; the other branches are the areas to be pruned. Each branch is represented by 1 / 0 to indicate whether it is retained or deleted, and the whole is represented by a variable U, for example, U = {(C 2 , H 3, H 4 , H 5 ):1,(H 6 ):1,(H 7 ):0,(C 8 , H 9 ):0}, this distribution is the distribution that needs to be fitted for model training.

[0055] In addition, the existence of j but c te Branches that do not exist in are marked as "to be generated", such as Figure 2 The target molecule is centered around C 1 Branch O 7 , and convert the branch subgraph to be generated into a string representation of SMILES.

[0056] In summary, the molecular optimization method provided in this application can optimize the source molecule by generating the smallest molecular substructure.

[0057] The nodes here are represented by atoms.

[0058] During the training phase, since the target molecules are known, molecular pairs can be matched, and the molecular optimization task objectives can be determined to obtain molecular pairs that meet the conditions.

[0059] First, determine the molecular optimization task goal or constraint. The molecular optimization task goal or constraint of the present application may be a target molecule that needs to be generated with higher water solubility and is more similar to the source molecule, but it is not limited to other applications. Existing open source tools can provide the function of calculating the relevant properties and molecular similarity of a molecule. The open source tool may be RDKIT. According to the molecular optimization task goal or constraint, traverse the molecular database and obtain qualified molecular pairs. Figure 1 That is an extracted molecule pair.

[0060] Furthermore, determining the cropping center includes: obtaining vector representation one of the node one; aggregating the vector representation one to obtain vector representation two of the source molecule; combining the vector representation one and the vector representation two to predict the probability of the node one being the cropping center, normalizing the number of nodes to obtain a node probability distribution, and the node with the largest value of the node probability distribution is the cropping center.

[0061] Specifically, Graph message-passing networks (MPNs) are used to learn the representation of the source molecules. For example, a preset formula can be used:

[0062]

[0063]

[0064] The vector representation of each node (atom) is calculated, that is, the vector representation is one.

[0065] Among them, x i is the feature representation of node (atom) i, x i,j is the characteristic representation of the edge (chemical bond) between nodes i and j, m t i,j represents the information transmitted from node i to node j at time t, N(i) represents all neighboring nodes of i, N(i)\j represents all neighboring nodes of i except j, and f 1 and f 2 They are all neural networks. After cycles, we get the final representation h of node i. i The feature representation of atoms and chemical bonds can be encoded using simple one-hot encoding.

[0066] The vector representation 1 is aggregated again and again to obtain the vector representation of the entire source molecule, i.e., vector representation 2:

[0067]

[0068] Combining the vector representation one and the vector representation two, the probability of node i being the cropping center is predicted by the following formula:

[0069] s i =f 3 ([h X ,h i ])

[0070] Where [,] represents the vector concatenation operation, f 3 It is a standard neural network.

[0071] Same te i The same as the acquisition of s, s is obtained by the following formula i Normalize:

[0072]

[0073] where s st i The node with the largest value is the predicted crop center c st .

[0074] During the model training phase, s st i Need to fit s with loss function (such as KL divergence distance) te i The test phase only needs to output the value of s st iThe node corresponding to the maximum value is used as the clipping center c st That's it.

[0075] Furthermore, determining the cropping branch includes: obtaining vector representation three of branch three, wherein branch three is the branch of the cropping center, predicting the retention probability of branch three through vector representation one, vector representation three and vector representation of the first branch, and making a decision on whether to retain branch three.

[0076] Branch three here is any branch of the cropping center.

[0077] Specifically, the branches around the cropping center are predicted according to the cropping center, and the branches to be retained and the branches to be deleted are decided. The vector represents a h i The vector representation of any branch is obtained by the following formula:

[0078]

[0079] where c st is the cutting center, Represents the source molecule around the clipping center c st is the branch subgraph of . |.| is the number of atoms in the subgraph.

[0080] Then, the neural network is used to predict the retention probability of the branch j:

[0081]

[0082] Among them, f 4 is a standard neural network, σ is the sigmoid function, and They are the vector representation of the reaction center, the vector representation of the branch that is currently to be decided whether to keep, and the vector representation of the branch that has been determined to be kept. If the output is greater than or equal to 0.5, it is retained, and if it is less than 0.5, it is deleted. t-1 represents the last iteration number. Each iteration model needs to make a decision on whether to keep or delete a branch. If it is decided to keep it, the branch will be added to the set U. st t-1 ,Each element in this set is a subgraph.

[0083] Should The acquisition is done through the following formula:

[0084]

[0085] The complete cropped area can be obtained. Figure 2 As shown, the shaded part is the retained part, and the box area is the deleted part.

[0086] In the testing phase, the output can be obtained directly according to the above process. In the training phase, the output here needs to be fitted with U, and the cross entropy between the two can be used as the loss function.

[0087] Furthermore, converting the source molecule into a simplified molecule linear input specification character string includes: converting the source molecule into a standard simplified molecule linear input specification representation to obtain a coded representation of the source molecule; and processing the coded representation of the source molecule to obtain a new simplified molecule linear input specification.

[0088] Specifically, the source molecule is converted into a standard simplified molecular linear input specification (SMILES) representation, and the simplified molecular linear input specification characters are encoded according to the order of character appearance using a first long short-term memory network; the encoded representation of the source molecule is decoded into a new simplified molecular linear input specification character string through a second long short-term memory network.

[0089] Furthermore, concatenating the source molecule reserved region with the simplified molecule linear input specification string to obtain the target molecule includes: converting the new simplified molecule linear input specification into a molecular graph; and merging the molecular graph with the source molecule reserved region to generate the target molecule.

[0090] Specifically, the SMILES is converted into a molecular graph representation, and then the first atom (ie, the cropping center) in the SMILES representation is spliced ​​with the retained region of the source molecule to obtain the final complete target molecule.

[0091] like Figure 4 As shown, the present application also provides a molecular optimization system, which includes: a molecular tailoring unit 1, used to determine the source molecule retention area, wherein the source molecule retention area is a common molecular substructure of the source molecule and the target molecule; the molecular tailoring unit 1 includes a parsing module and a molecular tailor; the parsing module is used to parse the area to be trimmed of the source molecule; the molecular tailor is used to predict the molecular retention area.

[0092] The molecular tailoring unit 1 also includes a database and a molecular pair matching module, wherein the database is used to provide molecular pair data; the molecular pair matching module is used to obtain qualified molecular pairs from the database, each of which includes a source molecule and a target molecule; in the testing phase, since the target molecule is unknown, there is no need to call the molecular pair matching module, but in the training phase, the molecular pair needs to be selected through the molecular pair matching module.

[0093] Time series unit 2 is used to convert the source molecule into a new simplified molecular linear input specification string, and the new simplified molecular linear input specification string is the non-common molecular substructure part in the target molecule; the time series unit 2 includes a first time series module and a second time series module, the first time series module is used to obtain the encoded representation of the entire source molecule; the second time series module is used to obtain the new simplified molecular linear input specification.

[0094] The molecule splicing unit 3 is used to splice the source molecule reserved region with the new simplified molecule linear input standard string to obtain the target molecule. The molecule splicing unit 3 includes a molecule splicing module; the molecule splicing module is used to generate the target molecule.

[0095] The molecular splicing module includes a molecular graph conversion submodule and a merging submodule. The molecular graph conversion submodule converts the new simplified molecular linear input specification into a molecular graph, and the merging submodule merges the molecular graph with the reserved region to generate a target molecule.

[0096] The first time series unit is an encoder, and the second time series unit is a decoder.

[0097] This part generally adopts the decoder-encoder framework, such as Figure 3 shown.

[0098] Specifically, the encoder converts the input molecule into SMILES representation, and then uses a standard long short-term memory (LSTMs) network to encode the SMILES characters in the order in which the characters appear. The hidden state of the LSTMs at the last moment is used as the final output C of the encoder.

[0099] The decoder uses LSTMs different from the above encoder to decode a SMILES string, which is the remaining part that needs to be generated.

[0100] In this LSTMs decoder, the initial hidden state is C provided by the encoder, which has encoded the information of the source molecule. The output of LSTMs at each moment is a specific character, which is sampled from a character set consisting of all possible constituent letters or symbols of SMILES, such as Br, Cl, N, O, S, P... etc.

[0101] In the decoder, each character output at the current moment is used as the input of the next moment. For example, the character "C" predicted by the model at the t-1th moment is used as the input of the LSTMs at the next moment. In particular, the input at the first moment is The cropping center in the previously selected source molecule is fixed, and the generation starts; when the output string is "", it indicates that the generation ends. The input and output of the decoder can use a simple one-hot encoding, that is, the encoding vector constructed by the character set.

[0102] The SMILES string generated in this part of the training phase needs to fit the SMILES string of the molecular subgraph to be generated, and the cross entropy can also be used as the loss function.

[0103] The present application also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.

[0104] The terminal device of this embodiment includes: at least one processor ( Figure 5 Only one is shown in the figure) a processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and when the processor executes the computer program, the steps in any of the following metabolic pathway prediction method embodiments are implemented.

[0105] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that this is merely an example of a terminal device and does not constitute a limitation on the terminal device. The terminal device may include more or fewer components than shown in the figure, or may combine certain components, or different components, and may also include, for example, input and output devices, network access devices, etc.

[0106] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0107] In some embodiments, the memory may be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device. In other embodiments, the memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (MC), a secure digital (SD) card, a flash card, etc., equipped on the terminal device.

[0108] Furthermore, the memory may include both an internal storage unit of the terminal device and an external storage device. The memory is used to store an operating system, an application, a boot loader, data, and other programs, such as program codes of the computer program. The memory may also be used to temporarily store data that has been output or is to be output.

[0109] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0110] The embodiment of the present application provides a computer program product, when the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present application implements all or part of the process in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk. In some jurisdictions, under legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunications signals.

[0111] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0113] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application is described in detail with reference to the above-described embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the above-described embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. In the above-described embodiments, the descriptions of each embodiment have their own emphasis. For parts that are not described or recorded in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0114] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. 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 this application.

Claims

1. A molecular optimization method, characterized in that: The method comprises: Acquire a source molecule, and cut the source molecule according to the target molecule to obtain a source molecule retention region, wherein the source molecule retention region is a common molecular substructure of the source molecule and the target molecule; predict a source molecule retention region, and cut and remove all molecular substructures that are not in the source molecule retention region; in the training phase, obtain molecular pair data, each of which includes a source molecule and a target molecule; select any molecular database, which contains various molecules; the target molecule in the training phase is known; when testing, the target molecule is unknown, and the given source molecule is used to process the source molecule according to the target molecule; Converting the source molecule into a new simplified molecular linear input specification string, wherein the new simplified molecular linear input specification string is a non-common molecular substructure portion of the target molecule; that is, generating the remaining portion of the target molecule; The target molecule is obtained by concatenating the source molecule retention region with the new simplified molecule linear input specification string; The cutting includes: Analyze the region to be cropped of the source molecule, determine a cropping center according to the region to be cropped, determine a cropping branch according to the cropping center, and crop the cropping branch to obtain the retained region of the source molecule; The region to be clipped of the source molecule for analysis includes: Traversing node 1 in the source molecule and traversing node 2 in the target molecule, wherein the chemical element of node 1 is the same as that of node 2; Traverse branch 1 of node 1 to obtain a first branch, traverse branch 2 of node 2 to obtain a second branch, the first branch is the same as the second branch, and the number of nodes in the first branch or the second branch is recorded; Specifically, all atoms i, i.e., nodes i, in the source molecule are traversed; all atoms j, i.e., nodes j, in the target molecule are traversed, and the chemical element of the atom j is exactly the same as that of the atom i; all branches of the atom i and the atom j are traversed to obtain the same branches in the branches of the atom i and the branches of the atom j, and the total number of atoms in the same branch is recorded as s i,j ; Among them, a branch is an area extending around a node and another node connected to it; The largest value s i,j As s i The value of and records the atom j corresponding to the atom i; The largest value s i The atom i in c is assigned te , the maximum value of s i The atom i in the image is the cropping center, and the same atom as c is recorded. te The corresponding atom j; In addition, for all s i , convert it into a normalized probability distribution to facilitate model learning: Where V X represents the set of all atoms in the source molecule, and exp(.) is the exponential function; s te i is the normalized distribution; the source molecule c te The same branch corresponding to the atom j is the reserved area; the other branches are the areas to be pruned; each branch is represented by 1 / 0 to indicate retention and deletion, and the whole is represented by the variable U, which is the distribution that needs to be fitted for model training; In addition, the existence of j but c te The branches that do not exist in are marked as "to be generated"; Determining the cropping center includes: obtaining a vector representation 1 of the node 1; aggregating the vector representation 1 to obtain a vector representation 2 of the source molecule; combining the vector representation 1 and the vector representation 2 to predict the probability of the node 1 being the cropping center, normalizing the number of nodes to obtain a node probability distribution, and the node with the largest value of the node probability distribution is the cropping center; Specifically, Graph message-passing networks (MPNs) are used to learn the representation of the source molecules, using a preset formula: The vector representation of each node is calculated, that is, the vector representation is one; Among them, x i is the feature representation of node i, x i,j is the feature representation of the edge between nodes i and j, m t i,j represents the information transmitted from node i to j at time t, N(i) represents all neighboring nodes of i, N(i)\j represents all neighboring nodes of i except j, f1 and f2 are both neural networks; after I cycles, the final representation h of node i is obtained i ; The feature representation of atoms and chemical bonds can be encoded using simple one-hot encoding; The vector representation 1 is aggregated again and again to obtain the vector representation of the entire source molecule, i.e., vector representation 2: Combining the vector representation one and the vector representation two, the probability of node i being the cropping center is predicted by the following formula: s i =f3([h X ,h i ]) Where [,] represents the vector concatenation operation, and f3 is a standard neural network; Same te i The same as the acquisition of s, s is obtained by the following formula i Normalize: where s st i The node with the largest value is the predicted crop center c st ; During the model training phase, s st i Need to fit the loss function s te i The tag value; in the test phase, only the output takes s st i The node corresponding to the maximum value is used as the clipping center c st That's it; The determining of the cropping branch comprises: obtaining a vector representation three of branch three, where branch three is the branch of the cropping center, predicting a retention probability of branch three through vector representation one, vector representation three and vector representation of the first branch, and making a decision on whether to retain branch three; Specifically, each branch around the cropping center is predicted according to the cropping center, and the decision of the retained branch and the deleted branch is made; the vector represents a h i The vector representation of any branch is obtained by the following formula: where c st is the cutting center, Represents the source molecule around the clipping center c st The branch subgraph of ; |.| is the number of atoms in the subgraph; Then, the neural network is used to predict the retention probability of the branch j: Among them, f4 is a standard neural network, σ is the sigmoid function, and They are the vector representation of the reaction center, the vector representation of the branch that is currently to be decided whether to keep, and the vector representation of the branch that has been determined to be kept; if the output is greater than or equal to 0.5, it is retained, and if it is less than 0.5, it is deleted; t-1 represents the last iteration number. Each iteration model needs to make a decision on whether to keep or delete a branch. If it is decided to keep it, the branch will be added to the set. Each element in this set is a subgraph; Should The acquisition is done through the following formula: You can get the complete cropped reserved area; In the testing phase, the output can be obtained directly according to the above process; in the training phase, the output here needs to be fitted with the U, and the cross entropy between the two can be used as the loss function; Converting the source molecule into a simplified molecule linear input specification string includes: converting the source molecule into a standard simplified molecule linear input specification representation to obtain a coded representation of the source molecule; processing the coded representation of the source molecule to obtain a new simplified molecule linear input specification; Specifically, the source molecule is converted into a standard simplified molecule linear input specification representation, and the simplified molecule linear input specification characters are encoded using a first long short-term memory network according to the order in which the characters appear; the encoded representation of the source molecule is decoded into a new simplified molecule linear input specification character string through a second long short-term memory network; The step of concatenating the source molecule retention region with the simplified molecule linear input specification string to obtain the target molecule includes: converting the new simplified molecule linear input specification into a molecule graph; and merging the molecule graph with the source molecule retention region to generate the target molecule.

2. A system corresponding to the molecular optimization method according to claim 1, characterized in that: The system comprises: A molecule clipping unit is used to determine a source molecule retention region, where the source molecule retention region is a common molecular substructure of the source molecule and the target molecule; predict a source molecule retention region, and clip and remove all molecular substructures that are not in the source molecule retention region; In the training phase, molecular pair data are obtained, each of which includes a source molecule and a target molecule; an arbitrary molecular database is selected, which contains various molecules; the target molecule in the training phase is known; when testing, the target molecule is unknown, and a given source molecule is used to process the source molecule according to the target molecule; The cutting includes: Analyze the region to be cropped of the source molecule, determine a cropping center according to the region to be cropped, determine a cropping branch according to the cropping center, and crop the cropping branch to obtain the retained region of the source molecule; The region to be clipped of the source molecule for analysis includes: Traversing node 1 in the source molecule and traversing node 2 in the target molecule, wherein the chemical element of node 1 is the same as that of node 2; Traverse branch 1 of node 1 to obtain a first branch, traverse branch 2 of node 2 to obtain a second branch, the first branch is the same as the second branch, and the number of nodes in the first branch or the second branch is recorded; Specifically, all atoms i, i.e., nodes i, in the source molecule are traversed; all atoms j, i.e., nodes j, in the target molecule are traversed, and the chemical element of the atom j is exactly the same as that of the atom i; all branches of the atom i and the atom j are traversed to obtain the same branches in the branches of the atom i and the branches of the atom j, and the total number of atoms in the same branch is recorded as s i,j ; Among them, a branch is an area extending around a node and another node connected to it; The largest value s i,j As s i The value of and records the atom j corresponding to the atom i; The largest value s i The atom i in c is assigned te , the maximum value of s i The atom i in the image is the cropping center, and the same atom as c is recorded. te The corresponding atom j; In addition, for all s i , convert it into a normalized probability distribution to facilitate model learning: Where V X represents the set of all atoms in the source molecule, and exp(.) is the exponential function; s te i is the normalized distribution; the source molecule c te The same branch corresponding to the atom j is the reserved area; the other branches are the areas to be pruned; each branch is represented by 1 / 0 to indicate retention and deletion, and the whole is represented by the variable U, which is the distribution that needs to be fitted for model training; In addition, the existence of j but c te The branches that do not exist in are marked as "to be generated"; Determining the cropping center includes: obtaining a vector representation 1 of the node 1; aggregating the vector representation 1 to obtain a vector representation 2 of the source molecule; combining the vector representation 1 and the vector representation 2 to predict the probability of the node 1 being the cropping center, normalizing the number of nodes to obtain a node probability distribution, and the node with the largest value of the node probability distribution is the cropping center; Specifically, Graph message-passing networks (MPNs) are used to learn the representation of the source molecules, using a preset formula: The vector representation of each node is calculated, that is, the vector representation is one; Among them, x i is the feature representation of node i, x i,j is the feature representation of the edge between nodes i and j, m t i,j represents the information transmitted from node i to node j at time t, N(i) represents all neighboring nodes of i, N(i)\j represents all neighboring nodes of i except j, f1 and f2 are both neural networks; After cycles, we get the final representation h of node i. i ; The feature representation of atoms and chemical bonds can be encoded using simple one-hot encoding; The vector representation 1 is aggregated again and again to obtain the vector representation of the entire source molecule, i.e., vector representation 2: Combining the vector representation one and the vector representation two, the probability of node i being the cropping center is predicted by the following formula: s i =f3([h X ,h i ]) Where [,] represents the vector concatenation operation, and f3 is a standard neural network; Same te i The same as the acquisition of s, s is obtained by the following formula i Normalize: where s st i The node with the largest value is the predicted crop center c st ; During the model training phase, s st i Need to fit the loss function s te i The tag value; in the test phase, only the output takes s st i The node corresponding to the maximum value is used as the clipping center c st That's it; The determining of the cropping branch comprises: obtaining a vector representation three of branch three, where branch three is the branch of the cropping center, predicting a retention probability of branch three through vector representation one, vector representation three and vector representation of the first branch, and making a decision on whether to retain branch three; Specifically, each branch around the cropping center is predicted according to the cropping center, and the decision of the retained branch and the deleted branch is made; the vector represents a h i The vector representation of any branch is obtained by the following formula: where c st is the cutting center, Represents the source molecule around the clipping center c st The branch subgraph of ; |.| is the number of atoms in the subgraph; Then, the neural network is used to predict the retention probability of the branch j: Among them, f4 is a standard neural network, σ is the sigmoid function, and They are the vector representation of the reaction center, the vector representation of the branch that is currently to be decided whether to keep, and the vector representation of the branch that has been determined to be kept; if the output is greater than or equal to 0.5, it is retained, and if it is less than 0.5, it is deleted; t-1 represents the last iteration number. Each iteration model needs to make a decision on whether to keep or delete a branch. If it is decided to keep it, the branch will be added to the set. Each element in this set is a subgraph; Should The acquisition is done through the following formula: You can get the complete cropped reserved area; In the testing phase, the output can be obtained directly according to the above process; in the training phase, the output here needs to be fitted with the U, and the cross entropy between the two can be used as the loss function; A time series unit, used for converting the source molecule into a new simplified molecule linear input specification string, wherein the new simplified molecule linear input specification string is a non-common molecular substructure portion of the target molecule; that is, generating the remaining portion of the target molecule; Converting the source molecule into a simplified molecule linear input specification string includes: converting the source molecule into a standard simplified molecule linear input specification representation to obtain a coded representation of the source molecule; processing the coded representation of the source molecule to obtain a new simplified molecule linear input specification; Specifically, the source molecule is converted into a standard simplified molecule linear input specification representation, and the simplified molecule linear input specification characters are encoded using a first long short-term memory network according to the order in which the characters appear; the encoded representation of the source molecule is decoded into a new simplified molecule linear input specification character string through a second long short-term memory network; A molecule splicing unit, used for splicing the source molecule reserved region with the new simplified molecule linear input specification string to obtain the target molecule; The step of concatenating the source molecule retention region with the simplified molecule linear input specification string to obtain the target molecule includes: converting the new simplified molecule linear input specification into a molecule graph; and merging the molecule graph with the source molecule retention region to generate the target molecule.

3. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to claim 1 is implemented.

4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to claim 1 is implemented.