A method and apparatus for the bidirectional automatic conversion of the chemical structure and nomenclature of organic compounds.

The conversion model trained by deep learning solves the problem of low efficiency in the conversion of organic compound structure to name in existing technologies, and realizes fast and convenient conversion of chemical structure to name, avoiding model conflicts and failures.

CN113919290BActive Publication Date: 2025-10-31SHANGHAI INSTITUTE OF MATERIA MEDICA CHINESE ACADEMY OF SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010657382.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-09
Publication Date
2025-10-31
Estimated Expiration
2040-07-09

AI Technical Summary

Technical Problem

Existing technologies for the structure-nomenclature transformation of organic compounds suffer from problems such as long development cycles, high costs, difficult maintenance, difficulty in real-time updates, and slow transformation speed.

Method used

A target conversion model is trained using deep learning methods. Chemical structure files in SMILES, MOL2, SDF, and PDB formats are used, combined with IUPAC nomenclature, systematic nomenclature, and common names. The model performs bidirectional automatic conversion between chemical structures and names through character-number mapping tables and word embedding techniques.

Benefits of technology

It improves the conversion efficiency between chemical structure and nomenclature, avoids model conflicts and failures caused by the addition of new rules in traditional methods, and realizes a fast and convenient conversion process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_2
    Figure SMS_2
  • Figure SMS_3
    Figure SMS_3
Patent Text Reader

Abstract

This invention discloses a method and apparatus for the bidirectional automatic conversion of chemical structure and nomenclature of organic compounds. When the organic chemical structure file is stored in SMILES, MOL2, SDF, or PDB format, and the organic nomenclature follows the IUPAC-defined nomenclature system, the method includes: acquiring the chemical structure file of the target organic compound to be converted; converting the non-SMILES format chemical structure file to SMILES format using a preset chemical structure conversion tool; processing the SMILES format to obtain a target first vector; converting the target first vector using a preset target conversion model to obtain several second vectors; determining the target second vector based on the probability of each second vector; and determining the nomenclature corresponding to the target organic compound structure based on the target second vectors. The processing method and apparatus of this invention enable more convenient and faster conversion between chemical structure and nomenclature, improving conversion efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cheminformatics, and in particular to a processing method and apparatus for the transformation of the structure and name of organic compounds. Background Technology

[0002] The interconversion of chemical structure and nomenclature in organic compounds is of great significance in the field of chemistry. Attempts at chemical structure-nomenclature conversion can be traced back to 1962. Currently, the following software programs are commonly used for interconversion of chemical structure and nomenclature: ChemDraw, Lexichem ToolKit, NameExpert, Name=Struct(2), IUPAC DrawIt, ACD / Name, Instant Jchem, and OPSIN(3). However, the conversion methods used by these software programs have the following problems:

[0003] a. Existing technical methods require the extraction of transformation rules and the definition and summarization of syntax by experts, resulting in long development cycles, high development costs, and difficult maintenance.

[0004] b. Existing rule-based template methods are difficult to update in real time. The addition of new rules may cause conflicts and failures in the original conversion model, thus making accurate conversion impossible.

[0005] c. Existing methods do not support GPU acceleration, which may result in slow conversion speed and poor efficiency. Summary of the Invention

[0006] The purpose of this invention is to provide a processing method and apparatus for the transformation of the structure and name of organic compounds, in order to solve the problem of low efficiency in existing transformation methods.

[0007] To address the aforementioned technical problems, the embodiments of this application employ the following technical solution: a method for the bidirectional automatic conversion of the chemical structure and nomenclature of organic compounds. The storage formats for the organic chemical structure files include: Simplified Molecular Linear Input Specification (SMILES) format, MOL2 format, SDF format, and PDB format; the organic nomenclature methods include: the organic nomenclature method specified by the International Union of Pure and Applied Chemistry (IUPAC), systematic nomenclature, common names, and frequently used names; when the organic chemical structure file storage format is SMILES format, MOL2 format, SDF format, or PDB format, and when the organic nomenclature method is the organic nomenclature method specified by IUPAC, the method includes the following steps:

[0008] Obtain the chemical structure file of the target organic compound to be converted;

[0009] The chemical structure file, which is not in SMILES format, is converted to SMILES format using a preset chemical structure conversion tool.

[0010] The target first vector is obtained by processing the SMILES format;

[0011] The target first vector is transformed using a preset target transformation model to obtain several second vectors;

[0012] Based on the probabilities of each second vector, determine the target second vector;

[0013] The name corresponding to the structure of the target organic compound is determined based on the second target vector.

[0014] Optionally, the method further includes training the target transformation model using deep learning methods, specifically including:

[0015] Obtain the SMILES format of the structures of several sample organic compounds and their corresponding IUPAC nomenclature;

[0016] Based on a preset character-numeric mapping table, each character in each SMILES format is converted to obtain several first sample vectors, which are used as input vectors.

[0017] Based on the preset character-number mapping table, each character in each IUPAC name is converted to obtain several second sample vectors, which are used as the target output vector.

[0018] The target conversion model is obtained by training the model based on each input vector and the target output vector corresponding to each input vector.

[0019] Optionally, the configuration method of the character-numeric mapping table includes:

[0020] Obtain the SMILES format of several sample organic compounds to obtain the first sample set;

[0021] Obtain the IUPAC names of the organic compounds in each sample to obtain a second sample set;

[0022] Obtain the characters in each SMILES format from the first sample set to obtain the first character set;

[0023] Extract the characters from each IUPAC name in the second sample set to obtain the second character set;

[0024] The character-numeric mapping table is constructed based on the first character set and the second character set.

[0025] Optionally, processing the SMILES format to obtain the target first vector specifically includes:

[0026] Based on the character-number mapping table, each character in the SMILES format of the target organic compound structure is converted to obtain a first vector;

[0027] The first vector is converted into a word embedding vector using a word embedding method;

[0028] Sine coding is applied to each even-numbered position in the word embedding vector, and cosine coding is applied to each odd-numbered position in the word embedding vector to obtain the positional coding value corresponding to each position.

[0029] The word embedding value at each position in the word embedding vector is added to the position encoding value to obtain the target first vector.

[0030] Optionally, determining the name corresponding to the target organic compound based on the second target vector specifically includes:

[0031] Based on the character-number mapping table, each number in the target second vector is converted to obtain a name corresponding to the target organic compound.

[0032] To address the aforementioned technical problems, this application provides a method for the bidirectional automatic conversion of the chemical structure and nomenclature of organic compounds. The storage formats for the organic chemical structure files include SMILES, MOL2, SDF, and PDB formats. The organic nomenclature methods include IUPAC-specified nomenclature, systematic nomenclature, common names, and frequently used names. When the organic chemical structure file is stored in SMILES, MOL2, SDF, or PDB format, and the organic nomenclature method is IUPAC-specified nomenclature, the method includes the following steps:

[0033] Obtain the IUPAC name of the target organic compound to be converted;

[0034] The IUPAC naming is processed to obtain the target first vector;

[0035] The target first vector is transformed using a preset target transformation model to obtain several second vectors;

[0036] Based on the probabilities of each second vector, determine the target second vector;

[0037] Based on the target second vector, determine the SMILES format chemical structure file corresponding to the target organic compound;

[0038] Use the preset chemical structure conversion tool to convert SMILES format chemical structure files into target format chemical structure files.

[0039] Optional: The target transformation model is trained using deep learning methods, specifically including:

[0040] Obtain the SMILES format of the structures of several sample organic compounds and their corresponding IUPAC nomenclature;

[0041] Based on a preset character-numeric mapping table, each character in each IUPAC name is converted to obtain several first sample vectors, which are used as input vectors.

[0042] Based on the preset character-number mapping table, each character in each of the SMILES is converted to obtain several second sample vectors, which are used as the target output vector.

[0043] The target conversion model is obtained by training the model based on each input vector and the target output vector corresponding to each input vector.

[0044] Optionally, the configuration method of the character-numeric mapping table includes:

[0045] Obtain SMILES of several organic compounds to obtain the first sample set;

[0046] Obtain the IUPAC names of the organic compounds in each sample to obtain a second sample set;

[0047] Obtain the characters from each SMILES in the first sample set to obtain the first character set;

[0048] Extract the characters from each IUPAC name in the second sample set to obtain the second character set;

[0049] The character-numeric mapping table is constructed based on the first character set and the second character set.

[0050] Optionally, the process of processing the naming to obtain the target first vector specifically includes:

[0051] Based on the character-numeric mapping table, each character in the IUPAC name is converted to obtain a first vector;

[0052] The first vector is converted into a word embedding vector using a word embedding method;

[0053] Sine coding is applied to each even-numbered position in the word embedding vector, and cosine coding is applied to each odd-numbered position in the word embedding vector to obtain the positional coding value corresponding to each position.

[0054] The word embedding value at each position in the word embedding vector is added to the position encoding value to obtain the target first vector.

[0055] Optionally, determining the SMILES format chemical structure file corresponding to the target organic compound based on the second target vector specifically includes:

[0056] Based on the character-number mapping table, each number in the target second vector is converted to obtain a SMILES format chemical structure file corresponding to the target organic compound.

[0057] To address the aforementioned technical problems, this application provides a processing apparatus for the chemical structure and nomenclature transformation of organic compounds, comprising:

[0058] The acquisition module is used to acquire the chemical structure file of the target organic compound to be converted;

[0059] The first conversion module is used to convert the non-SMILES format chemical structure file into SMILES format using a preset chemical structure conversion tool.

[0060] The processing module is used to process the SMILES format to obtain the target first vector;

[0061] The second conversion module is used to convert the target first vector using a preset target conversion model to obtain several second vectors;

[0062] The first determining module is used to determine the target second vector based on the probability of each second vector;

[0063] The second determining module is used to determine the name corresponding to the structure of the target organic compound based on the target second vector.

[0064] To address the aforementioned technical problems, this application provides a processing apparatus for the naming and chemical structure transformation of organic compounds, comprising:

[0065] The acquisition module is used to acquire the IUPAC name of the target organic compound to be converted;

[0066] The processing module is used to process the IUPAC naming to obtain the target first vector;

[0067] The first conversion module is used to convert the target first vector using a preset target conversion model to obtain several second vectors;

[0068] The first determining module is used to determine the target second vector based on the probability of each second vector;

[0069] The second determining module is used to determine the SMILES format chemical structure file corresponding to the target organic compound based on the target second vector;

[0070] The second conversion module is used to convert SMILES format chemical structure files into target format chemical structure files using a preset chemical structure conversion tool.

[0071] The beneficial effects of this invention are as follows: By using a preset target transformation model to transform the first vector to obtain a target second vector, and then determining the name of the corresponding organic compound based on the target second vector, compared with traditional rule-based methods and devices, the processing method and device of this invention enable more convenient and faster conversion between chemical structures and names, improving conversion efficiency and avoiding the risk of model conflicts and failures caused by adding new rules in traditional methods. Attached Figure Description

[0072] Figure 1 This is a flowchart of a method for bidirectional automatic conversion of the chemical structure and nomenclature of organic compounds according to an embodiment of the present invention;

[0073] Figure 2 This is a schematic diagram of a target conversion model in one embodiment of the present invention;

[0074] Figure 3 This is a flowchart of a method for bidirectional automatic conversion of the chemical structure and nomenclature of organic compounds, according to another embodiment of the present invention.

[0075] Figure 4 This is a schematic diagram of a target transformation model in another embodiment of the present invention;

[0076] Figure 5 This is a structural block diagram of a processing device for the conversion of the structure and name of organic compounds, according to another embodiment of the present invention.

[0077] Figure 6 This is a structural block diagram of a processing device for the transformation of the structure and name of organic compounds, according to another embodiment of the present invention. Detailed Implementation

[0078] Various embodiments and features of this application are described herein with reference to the accompanying drawings.

[0079] It should be understood that various modifications can be made to the embodiments described herein. Therefore, the above description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this application will be apparent to those skilled in the art.

[0080] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0081] These and other features of this application will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0082] It should also be understood that although this application has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of this application, which have the features described in the claims and are therefore all within the scope of protection defined herein.

[0083] The above and other aspects, features and advantages of this application will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.

[0084] Specific embodiments of this application are described thereafter with reference to the accompanying drawings; however, it should be understood that the claimed embodiments are merely examples of this application, which can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the application. Therefore, the specific structural and functional details claimed herein are not intended to be limiting, but merely serve as the basis and representative basis for the claims to teach those skilled in the art to use this application in a variety of substantially any suitable detailed structures.

[0085] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in other embodiments,” all of which may refer to one or more of the same or different embodiments according to this application.

[0086] This invention provides a method for the bidirectional automatic conversion of the chemical structure and nomenclature of organic compounds. The storage formats of the organic chemical structure files include: Simplified molecular input line entry specification (SMILES) format, MOL2 (a file type) format, Standard Delay Format (SDF) format, and Program Database File (PDB) format. The organic nomenclature methods include: the organic nomenclature method specified by the International Union of Pure and Applied Chemistry (IUPAC), systematic nomenclature, common names, and frequently used names. When the organic chemical structure file is stored in SMILES, MOL2, SDF, or PDB format, and the organic nomenclature method is the organic nomenclature method specified by IUPAC, the method includes the following steps:

[0087] Step S101: Obtain the chemical structure file of the target organic compound to be converted;

[0088] The specific format of the chemical structure file in this step can be SMILES, MOL2, SDF, or PDB, etc.

[0089] Step S102: Use a preset chemical structure conversion tool to convert the non-SMILES format chemical structure file into SMILES format;

[0090] In this step, if the chemical structure file is not in SMILES format, it needs to be converted to SMILES format using a conversion tool. Specifically, if the chemical structure file is in MOL2, SDF, or PDB format, it needs to be converted to SMILES format. The chemical structure conversion tool used in this step includes OpenBabel software; however, other conversion software can also be used to convert non-SMILES format chemical structure files to SMILES format.

[0091] Step S103: Process the SMILES format to obtain the target first vector;

[0092] In this specific implementation process, the characters in the SMILES format of the target organic compound structure are converted based on a character-number mapping table to obtain a first vector; then, the first vector is converted into a word embedding vector using a word embedding method; sine coding is used for each even position in the word embedding vector, and cosine coding is used for each odd position in the word embedding vector to obtain the positional coding value corresponding to each position; the word embedding value and the positional coding value at each position in the word embedding vector are added to obtain the target first vector.

[0093] Step S104: The target first vector is transformed using a preset target transformation model to obtain several second vectors;

[0094] In this step, the target transformation model is pre-trained and includes convolutional neural network models, recurrent neural network models, and Transformer models. Specifically, deep learning methods can be used to train the target transformation model, including: obtaining the SMILES format of several sample organic compound structures and their corresponding IUPAC names; based on a preset character-numeric mapping table, converting each character in each SMILES format to obtain several first sample vectors as input vectors; based on the preset character-numeric mapping table, converting each character in each IUPAC name to obtain several second sample vectors as target output vectors; and training the model based on each input vector and the target output vector corresponding to each input vector to obtain the target transformation model.

[0095] Furthermore, before training the target conversion model, a character-numeric mapping table is configured. The specific configuration method includes: obtaining the SMILES format of several sample organic compounds to obtain a first sample set; obtaining the IUPAC name of each sample organic compound to obtain a second sample set; obtaining the characters in each SMILES format in the first sample set to obtain a first character set; obtaining the characters in each IUPAC name in the second sample set to obtain a second character set; and constructing the character-numeric mapping table based on the first character set and the second character set.

[0096] Step S105: Determine the target second vector based on the probability of each second vector;

[0097] Step S106: Determine the name corresponding to the target organic compound structure based on the target second vector.

[0098] In the specific implementation process, this step involves converting each number in the target second vector based on a preset character-number mapping table to obtain the name corresponding to the target organic compound.

[0099] In the specific implementation process of this embodiment, the conversion of any chemical structure file format to any name can be realized based on the above-mentioned SMILES format-IUPAC naming conversion principle. For example, the conversion of SMILES format to common name, MOL2 format to IUPAC name, MOL2 format to common name, SDF format to common name, PDB format to common name, etc. will not be elaborated here.

[0100] This embodiment uses a preset target conversion model to convert the first vector to obtain the target second vector, and then determines the name of the corresponding organic compound based on the target second vector. Compared with traditional rule-based methods and devices, the processing method and device of the present invention can make the conversion between chemical structure and name more convenient and faster, improve the conversion efficiency, and avoid the risk of model conflict and failure caused by the addition of new rules in traditional methods.

[0101] To further explain the above embodiments, the conversion of aspirin's SMILES format to IUPAC naming is used as an example. The specific conversion process is as follows:

[0102] Step 1: First, configure the character-to-number mapping table. This involves obtaining the SMILES formats of several sample organic compounds to obtain a first sample set; obtaining the IUPAC names of each sample organic compound to obtain a second sample set; extracting characters from each SMILES format in the first sample set to obtain a first character set; extracting characters from each IUPAC name in the second sample set to obtain a second character set; and constructing the character-to-number mapping table based on the first and second character sets. The character-to-number mapping table in this embodiment can be shown in Table 1 below. Table 1 only shows a portion of the character-to-number mapping relationships.

[0103] Table 1:

[0104]

[0105]

[0106] Step 2: After obtaining the character-to-number mapping table mentioned above, we can use this mapping table to convert each character in the SMILES format of each sample to obtain several first sample vectors, which can be used as input vectors.

[0107] Based on the character-numeric mapping table mentioned above, each character in each IUPAC name corresponding to the sample SMILES format is converted to obtain several second sample vectors, which are used as the target output vector.

[0108] The target transformation model is obtained by training the model based on the input vectors and the corresponding target output vectors. Specifically, the target transformation model can be a convolutional neural network model, a recurrent neural network model, or a Transformer model. This example uses a Transformer model as the target transformation model. Figure 2 As shown, the Transformer model adopts the classic encoder-decoder architecture. Figure 2 The left half is the coding layer. Figure 2 The right half is the decoding layer. The encoding layer consists of N identical layers, each including a multi-head attention layer and a feedforward layer. The encoder's output serves as the decoder's input. The decoding layer consists of N identical layers, each including two multi-head attention layers and a feedforward layer.

[0109] Step 3: When converting the chemical structure file of aspirin, first obtain the SMILES format of aspirin, i.e., "O=C(C)Oc1ccccc1C(=O)O". Then, convert "O=C(C)Oc1ccccc1C(=O)O" using the character-number mapping table mentioned above to obtain the first vector [1,2,3,6,3,7,1,4,5,4,4,4,4,4,5,3,6,2,1,7,1]. The output sequence of the target transformation model is initialized as "(['mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask','mask'],". Similarly, after configuring the character-numeric mapping table, it can also be written as [25,25,25,25,25, 25, ...

[0110] Then, word embedding technology is used to convert the input sequence and output sequence into word embeddings. Specifically, the first vector is converted into a word embedding vector using word embedding methods. For the word embedding vector, sine coding is used at even positions and cosine coding is used at odd positions. The positional coding value is added to the word embedding value to obtain the target first vector, which is used as the input to the target conversion model. Let the input be x, and let x be:

[0111] [[0.3374, -0.1778, -0.3035],

[0112] [-0.5880, 0.3486, 0.6603],

[0113] [-0.2196, -0.3792, 0.7671],

[0114] [-1.1925, 0.6984, -1.4097],

[0115] [0.1794, 1.8951, 0.4954],

[0116] [0.2692, -0.0770, -1.0205],

[0117] [-0.1690, 0.9178, 1.5810],

[0118] [1.3010, 1.2753, -0.2010],

[0119] [0.4965, -1.5723, 0.9666],

[0120] [-1.1481,-1.1589,0.3255],

[0121] [-0.6315, -2.8400, -1.3250],

[0122] [0.1784, -2.1338, 1.0524],

[0123] [-0.3885,-0.9343,-0.4991],

[0124] [-1.0867, 0.8805, 1.5542],

[0125] [0.6266, -0.1755, 0.0983],

[0126] [-0.0935, 0.2662, -0.5850],

[0127] [0.8768, 1.6221, -1.4779],

[0128] [1.1331, -1.2203, 1.6236],

[0129] [-2.3229, 1.0878, -0.0635],

[0130] [-0.4486,-1.2785,-1.1440],

[0131] [0.2436, 0.1167, 0.4403],

[0132] [-1.4465, -0.5581, -0.0517],

[0133] [-0.9083, 0.3507, 1.5434]]

[0134] For ease of explanation, the multi-head attention mechanism of the Transformer model in this embodiment is simplified to single-head attention. Each input must have three representations, called keys, queries, and values. Each input needs to be multiplied by a set of weights for the keys, a set of weights for the queries, and a set of weights for the values, denoted as w&key, w&query, and w&value, respectively. Let...

[0135] w&key is:

[0136] [[-0.8800,0.0642,-0.3424],

[0137] [0.2524, 0.2091, -1.9297],

[0138] [-0.2152,-0.5500,1.1138]]

[0139] w&query is:

[0140] [[-1.2306,1.4138,-0.2184],

[0141] [2.4353, -0.2603, -0.7742],

[0142] [-0.8148, -1.0141, 0.2453]]

[0143] w&value is:

[0144] [[-0.7604,0.3005,1.2888],

[0145] [0.1139, 0.1683, 0.2774],

[0146] [0.8915, -0.0480, -1.1167]

[0147] k = x w&key

[0148] k is:

[0149] [[-0.2764,0.1514,-0.1105],

[0150] [0.4633, -0.3281, 0.2641],

[0151] [-0.0675, -0.5153, 1.6613],

[0152] [1.5291, 0.8448, -2.5095],

[0153] [0.2139, 0.1353, -3.1667],

[0154] [-0.0367, 0.5625, -1.0801],

[0155] [0.0401, -0.6885, 0.0476],

[0156] [-0.7798, 0.4608, -3.1302],

[0157] [-1.0418, -0.8285, 3.9407],

[0158] [0.6478, -0.4951, 2.9919],

[0159] [0.1241, 0.0943, 4.2210],

[0160] [-0.9221,-1.0135,5.2286],

[0161] [0.2135, 0.0542, 1.3801],

[0162] [0.8440, -0.7405, 0.4038],

[0163] [-0.6169, -0.0505, 0.2336],

[0164] [0.2754, 0.3714, -1.1333],

[0165] [-0.0441, 1.2084, -5.0766],

[0166] [-1.6546, -1.0754, 3.7751],

[0167] [2.3323, 0.1132, -1.3747],

[0168] [0.3183, 0.3331, 1.3466],

[0169] [-0.2797, -0.2021, 0.1817],

[0170] [1.1432, -0.1812, 1.5146],

[0171] [0.5556, -0.8339, 1.3532]]

[0172] v = x w & value

[0173] v is:

[0174] [[-0.5474,0.0860,0.7244],

[0175] [1.0755, -0.1497, -1.3985],

[0176] [0.8077, -0.1666, -1.2449],

[0177] [-0.2704, -0.1731, 0.2310],

[0178] [0.5212, 0.3490, 0.2037],

[0179] [-1.1232,0.1169,1.4651],

[0180] [1.6425, 0.0278, -1.7286],

[0181] [-1.0232, 0.6152, 2.2550],

[0182] [0.3051, -0.1619, -0.8756],

[0183] [1.0312, -0.5556, -2.1647],

[0184] [-1.0246, -0.6040, -0.1222],

[0185] [0.5594, -0.3560, -1.5371],

[0186] [-0.2560,-0.2500,-0.2025],

[0187] [2.3122, -0.2530, -2.8917],

[0188] [-0.4089, 0.1540, 0.6492],

[0189] [-0.4201, 0.0448, 0.6066],

[0190] [-1.7996, 0.6074, 3.2304],

[0191] [0.4468, 0.0571, -0.6911],

[0192] [1.8336, -0.5118, -2.6210],

[0193] [-0.8244,-0.2950,0.3446],

[0194] [0.2205, 0.0717, -0.1453],

[0195] [0.9903, -0.5261, -1.9614],

[0196] [2.1065, -0.2880, -2.7967]]

[0197] q = x w & query

[0198] The value of q is:

[0199] [[-0.6008,0.8310,-0.0105],

[0200] [1.0345, -1.5917, 0.0205],

[0201] [-1.2782,-0.9897,0.5297],

[0202] [4.3169, -0.4381, -0.6260],

[0203] [3.9909, -0.7421, -1.3849],

[0204] [0.3127, 1.4355, -0.2495],

[0205] [1.1548, -2.0810, -0.2859],

[0206] [1.6684, 1.7112, -1.3207],

[0207] [-5.2277, 0.1309, 1.3459],

[0208] [-1.6745, -1.6516, 1.2277],

[0209] [-5.0596, 1.1900, 2.0116],

[0210] [-6.2735, -0.2596, 1.8711],

[0211] [-1.3906, 0.2001, 0.6858],

[0212] [2.2153, -3.3415, -0.0632],

[0213] [-1.2786, 0.8319, 0.0231],

[0214] [1.2401, 0.3918, -0.3292],

[0215] [4.0757, 2.3162, -1.8098],

[0216] [-5.6892, 0.2731, 1.0955],

[0217] [5.5596, -3.5027, -0.3505],

[0218] [-1.6292, 0.8586, 0.8071],

[0219] [-0.3742,-0.1324,-0.0356],

[0220] [0.4632, -1.8474, 0.7353],

[0221] [0.7142, -2.9404, 0.3054]]

[0222] because

[0223]

[0224] v2 = values ​​* attention T

[0225] outputs = v2.sum(dim = 0)

[0226] The outputs are:

[0227] [[-3.0202e-01,7.4368e-02,4.6584e-01],

[0228] [1.2313e+00,-2.8870e-01,-1.8154e+00],

[0229] [4.4742e-01,-1.4190e-01,-1.0151e+00],

[0230] [1.7390e+00,-4.9607e-01,-2.4924e+00],

[0231] [1.5993e+00,-4.6972e-01,-2.2962e+00],

[0232] [-6.8762e-01,1.9802e-01,1.2488e+00],

[0233] [1.4221e+00,-2.7544e-01,-1.9373e+00],

[0234] [-1.3077e+00,4.0557e-01,2.3484e+00],

[0235] [4.5480e-01,-5.5058e-03,-8.0749e-01],

[0236] [4.8872e-01,-1.9441e-01,-1.1714e+00],

[0237] [4.7320e-01,-8.3997e-02,-9.6444e-01],

[0238] [4.5787e-01,-8.7128e-04,-8.0365e-01],

[0239] [3.7686e-01,-1.7359e-01,-9.8649e-01],

[0240] [1.7767e+00,-3.7649e-01,-2.4750e+00],

[0241] [-2.5628e-01,8.9516e-02,3.7987e-01],

[0242] [5.2646e-01,-1.8131e-01,-6.9625e-01],

[0243] [7.7772e-02,-1.2320e-01,-5.7441e-02],

[0244] [4.4941e-01,2.0711e-02,-7.5609e-01],

[0245] [1.8309e+00,-5.1050e-01,-2.6169e+00],

[0246] [3.3528e-01,-1.8607e-01,-9.6349e-01],

[0247] [1.9284e-01,-4.2051e-02,-3.2262e-01],

[0248] [5.7685e-01,-2.8830e-01,-1.3664e+00],

[0249] [9.9143e-01,-2.5950e-01,-1.6761e+00]]

[0250] Step four: In the decoding stage, each step outputs one element from the output sequence. In the decoder, the self-attention layer is only allowed to pay attention to earlier positions in the output sequence. This is achieved by masking future positions, i.e., the attention to future positions is 0. The calculation of the self-attention layer is similar to the calculation process in step three.

[0251] Step 5: Finally, the target transformation model, i.e., the fully connected layer of the Transformer model, outputs the first vector of each target and the probability corresponding to each first vector. After obtaining the output probability of each first vector, in order to obtain the output sequence, the category corresponding to the highest output probability is selected, thus obtaining the final output target vector, i.e., the second vector of the target [8,9,10,4,16,13,14,21,19,22,14, 15,16,17,18,19,20,4,23,10,4,20,24]. Finally, the characters in the second vector of the target are converted using the character-number mapping table mentioned above to obtain the IUPAC name of aspirin, "2-acetyloxybenzoic acid". This completes the conversion from the SMILES format of aspirin, "O=C(C)Oc1ccccc1C(=O)O", to the IUPAC name "2-acetyloxybenzoic acid".

[0252] Furthermore, the conversion of salicylic acid from SMILES format to IUPAC naming will be used as an example. The specific conversion process is as follows:

[0253] Step 1: First, configure the character-number mapping table. This involves obtaining the SMILES format of several sample organic compounds to obtain a first sample set; obtaining the IUPAC name of each sample organic compound to obtain a second sample set; extracting characters from each SMILES format in the first sample set to obtain a first character set; extracting characters from each IUPAC name in the second sample set to obtain a second character set; and constructing the character-number mapping table based on the first character set and the second character set. The character-number mapping table in this embodiment can be shown in Table 2 below. Table 2 only shows a portion of the character-number mapping relationships.

[0254] Table 1:

[0255]

[0256]

[0257] Step 2: After obtaining the character-to-number mapping table mentioned above, we can use this mapping table to convert each character in the SMILES format of each sample to obtain several first sample vectors, which can be used as input vectors.

[0258] Based on the character-numeric mapping table mentioned above, each character in each IUPAC name corresponding to the sample SMILES format is converted to obtain several second sample vectors, which are used as the target output vector.

[0259] The target transformation model is obtained by training the model based on the input vectors and the corresponding target output vectors. Specifically, the target transformation model can be a convolutional neural network model, a recurrent neural network model, or a Transformer model. This example uses a Transformer model as the target transformation model. Figure 2 As shown, the Transformer model adopts the classic encoder-decoder architecture. Figure 2 The left half is the coding layer. Figure 2 The right half is the decoding layer. The encoding layer consists of N identical layers, each including a multi-head attention layer and a feedforward layer. The encoder's output serves as the decoder's input. The decoding layer consists of N identical layers, each including two multi-head attention layers and a feedforward layer.

[0260] Step 3: When converting the chemical structure file of salicylic acid, first obtain the SMILES format of salicylic acid, i.e., "O=C(O)C1=CC=CC=C1O". Then, use the character-to-number mapping table mentioned above to convert "O=C(O)C1=CC=CC=C1O" to obtain the first vector, i.e., [1,2,3,6,1,7, 3,5,2,3,3,2,3,3,2,3,5,1]. The output sequence is initialized as "(['mask', ... 'mask','mask','mask','mask','mask'],". Similarly, after configuring the character-numeric mapping table, it can also be written as [25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25].

[0261] Then, word embedding technology is used to convert the input sequence and output sequence into word embeddings. Specifically, the first vector is converted into a word embedding vector using word embedding methods. For the word embedding vector, sine coding is used at even positions and cosine coding is used at odd positions. The positional coding value is added to the word embedding value to obtain the target first vector, which is used as the input to the target conversion model. Let the input be x, and let x be:

[0262] [0.3374, -0.1778, -0.3035],

[0263] [-0.5880, 0.3486, 0.6603],

[0264] [-0.2196, -0.3792, 0.7671],

[0265] [-1.1925, 0.6984, -1.4097],

[0266] [0.1794, 1.8951, 0.4954],

[0267] [0.2692, -0.0770, -1.0205],

[0268] [-0.1690, 0.9178, 1.5810],

[0269] [1.3010, 1.2753, -0.2010],

[0270] [0.4965, -1.5723, 0.9666],

[0271] [-1.1481,-1.1589,0.3255],

[0272] [-0.6315, -2.8400, -1.3250],

[0273] [0.1784, -2.1338, 1.0524],

[0274] [-0.3885, -0.9343, 1.0533],

[0275] [0.1388, -0.2044, -2.2685],

[0276] [-0.9133,-0.4204,1.3111],

[0277] [-0.2199, 0.1838, 0.2293],

[0278] [0.6177, -0.2876, 0.8218],

[0279] [0.1512, 0.1036, -2.1996]]

[0280] For ease of explanation, the multi-head attention mechanism of the Transformer model in this embodiment is simplified to single-head attention. Each input must have three representations, called keys, queries, and values. Each input needs to be multiplied by a set of weights for the keys, a set of weights for the queries, and a set of weights for the values, denoted as w&key, w&query, and w&value, respectively. Let...

[0281] w&key is:

[0282] [[-0.8800,0.0642,-0.3424],

[0283] [0.2524, 0.2091, -1.9297],

[0284] [-0.2152,-0.5500,1.1138]]

[0285] w&query is:

[0286] [[-1.2306,1.4138,-0.2184],

[0287] [2.4353, -0.2603, -0.7742],

[0288] [-0.8148, -1.0141, 0.2453]

[0289] The w&value is:

[0290] [[-0.7604, 0.3005, 1.2888],

[0291] [0.1139, 0.1683, 0.2774],

[0292] [0.8915, -0.0480, -1.1167]

[0293] k = x w&key

[0294] k is:

[0295] [[-1.1228e-01, 4.9153e-01, 2.8029e-01],

[0296] [2.0234e-01, -1.0809e+00, -6.4555e-01],

[0297] [9.0495e-01, -1.3864e+00, 4.3754e-01],

[0298] [-7.0082e-01, 2.6146e+00, 4.0272e-01],

[0299] [-2.2018e+00, -6.0465e-01, -4.1604e+00],

[0300] [-4.8568e-01, 1.7626e+00, 5.7631e-01],

[0301] [-3.6456e-01, -2.6276e+00, -2.6477e+00],

[0302] [-2.4126e+00, 4.7847e-01, -3.3648e+00],

[0303] [1.9990e+00, -1.9347e+00, 2.1131e+00],

[0304] [2.2300e+00, -6.8609e-01, 2.9437e+00],

[0305] [3.2809e+00, 1.9400e+00, 6.8687e+00],

[0306] [2.9062e+00,-2.1513e+00,3.4030e+00],

[0307] [1.7962e+00,-1.9588e+00,1.4785e+00],

[0308] [-7.6181e-01,3.9328e+00,1.6947e+00],

[0309] [1.5958e+00,-2.3147e+00,7.0878e-01],

[0310] [3.7464e-03,-3.6583e-01,-3.3545e-01],

[0311] [3.1054e-01,-1.5040e+00,-4.1064e-01],

[0312] [-1.1144e+00,3.8556e+00,1.0383e+00]]

[0313] v = x w & value

[0314] v is:

[0315] [[0.0513,0.6183,-0.8752],

[0316] [-0.2248,-0.9258,1.8475],

[0317] [-0.4205,0.7727,0.5021],

[0318] [2.1356,-5.6827,-1.2221],

[0319] [-1.1913,-0.3102,5.1122],

[0320] [0.7544,-0.6364,-1.9565],

[0321] [-1.6214,1.0264,4.8419],

[0322] [-1.3065,2.2016,2.7019],

[0323] [-0.8603,3.8906,-1.6384],

[0324] [1.0235,-1.7114,-2.1915],

[0325] [2.6436, -1.3113, -8.7787],

[0326] [-0.5001, 3.5977, -2.7844],

[0327] [-0.3785, 1.1512, -0.2409],

[0328] [2.0796, -2.6160, -4.5100],

[0329] [-0.3279, -0.2930, 1.2589],

[0330] [-0.0836, -0.4123, 0.7773],

[0331] [-1.2149, 3.0129, 0.9618],

[0332] [1.​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​[3.2179e+00,-1.3807e+00,1.2557e-02],

[0344] [2.6528e+00,-1.9930e+00,3.6700e-01],

[0345] [5.2888e+00,-2.9118e+00,-4.3931e-01],

[0346] [4.4190e+00,-2.1648e+00,9.3302e-02],

[0347] [2.2360e+00,-1.3990e+00,3.6968e-01],

[0348] [-3.2221e-01,3.7846e-01,-7.5698e-01],

[0349] [1.4521e+00,-1.3220e+00,6.5587e-01],

[0350] [-2.3060e-01,-2.3966e-02,1.5462e-01],

[0351] [6.4447e-01,-2.1014e-02,3.4523e-02],

[0352] [-9.0375e-01,6.7096e-01,-7.1464e-01]]

[0353] Since

[0354] [[ID=3४]]

[0355] v2 = values * attention T

[0356] outputs = v2.sum(dim = 0)

[0357] The outputs are:

[0358] [[0.0291,-0.1391,0.0565],

[0359] [0.4676,0.1459,-2.0996],

[0360] [-0.0412,2.0644,-2.6466],

[0361] [-0.4684, 0.1679, 1.8492],

[0362] [1.8054, -2.5082, -3.5716],

[0363] [-0.1924, -0.3073, 1.2902],

[0364] [1.7518, -2.5194, -3.4095],

[0365] [1.6500, -2.3024, -3.2242],

[0366] [-0.4525, 3.3710, -2.6861],

[0367] [-0.4890, 3.4592, -2.6539],

[0368] [-0.5008, 3.5687, -2.7456],

[0369] [-0.4964, 3.5624, -2.7543],

[0370] [-0.4076, 3.2377, -2.6926],

[0371] [-0.9170, 0.4574, 3.1853],

[0372] [-0.2851, 2.9763, -2.8393],

[0373] [0.3384, -0.2725, -0.9898],

[0374] [0.5032, 0.5576, -2.8291],

[0375] [-0.8180, 0.5614, 2.7261]]

[0376] Step four: In the decoding stage, each step outputs one element from the output sequence. In the decoder, the self-attention layer is only allowed to pay attention to earlier positions in the output sequence. This is achieved by masking future positions, i.e., the attention to future positions is 0. The calculation of the self-attention layer is similar to the calculation process in step three.

[0377] Step 5: Finally, the first vector of each target and its corresponding probability are output through the fully connected layer of the target transformation model, i.e., the Transformer model. After obtaining the output probabilities of each target's first vector, the category corresponding to the highest output probability is selected to obtain the output sequence, thus obtaining the final output target vector, i.e., the second target vector [8,9,26,14,24,27,19,22,14,15,16, 17,18,19,20,4,23,10,4,20,24]. Finally, the numbers in the second target vector are converted using the character-number mapping table mentioned above to obtain the IUPAC name of salicylic acid, "2-hydroxybenzoic acid". This completes the conversion of salicylic acid's SMILES format "O=C(C)Oc1ccccc1C(=O)O" to the IUPAC name "2-hydroxybenzoic acid".

[0378] Another embodiment of the present invention provides a method for the bidirectional automatic conversion of the chemical structure and nomenclature of organic compounds. The storage format of the organic chemical structure file includes: SMILES format, MOL2 format, SDF format, and PDB format; the organic nomenclature method includes: IUPAC-specified organic nomenclature, systematic nomenclature, common name, and frequently used name; when the storage format of the organic chemical structure file is SMILES format, MOL2 format, SDF format, or PDB format, and when the organic nomenclature method is IUPAC-specified organic nomenclature, such as... Figure 3 As shown, the conversion method includes the following steps:

[0379] Step S201: Obtain the IUPAC name of the target organic compound to be converted;

[0380] Step S202: Process the IUPAC naming to obtain the target first vector;

[0381] In this specific implementation process, the characters in the IUPAC name are converted based on a character-numeric mapping table to obtain a first vector; then, the first vector is converted into a word embedding vector using a word embedding method; sine coding is used for each even position in the word embedding vector, and cosine coding is used for each odd position in the word embedding vector to obtain the positional coding value corresponding to each position; the word embedding value and the positional coding value at each position in the word embedding vector are added to obtain the target first vector.

[0382] Step S203: The target first vector is transformed using a preset target transformation model to obtain several second vectors;

[0383] In this step, the target transformation model is pre-trained and includes convolutional neural network models, recurrent neural network models, and Transformer models. Specifically, deep learning methods can be used to train the target transformation model, including: obtaining the SMILES format of several sample organic compound structures and their corresponding IUPAC names; based on a preset character-numeric mapping table, converting each character in each IUPAC name to obtain several first sample vectors as input vectors; based on the preset character-numeric mapping table, converting each character in each of the SMILES to obtain several second sample vectors as target output vectors; and training the model based on each input vector and the target output vector corresponding to each input vector to obtain the target transformation model.

[0384] This example uses the Transformer model as the target transformation model. Figure 4 As shown, the Transformer model adopts the classic encoder-decoder architecture. Figure 4 The left half is the coding layer. Figure 4 The right half is the decoding layer. The encoding layer consists of N identical layers, each including a multi-head attention layer and a feedforward layer. The encoder's output serves as the decoder's input. The decoding layer consists of N identical layers, each including two multi-head attention layers and a feedforward layer.

[0385] Furthermore, before training the target conversion model, the process includes configuring a character-numeric mapping table. Specifically, this configuration involves: obtaining the SMILES format of several sample organic compounds to obtain a first sample set; obtaining the IUPAC name of each sample organic compound to obtain a second sample set; obtaining characters from each SMILES format in the first sample set to obtain a first character set; obtaining characters from each IUPAC name in the second sample set to obtain a second character set; and constructing the character-numeric mapping table based on the first character set and the second character set.

[0386] Step S204: Determine the target second vector based on the probability of each second vector;

[0387] Step S205: Determine the SMILES format chemical structure file corresponding to the target organic compound based on the target second vector;

[0388] In practice, this step involves converting the numbers in the target second vector based on the character-number mapping table to obtain a SMILES format chemical structure file corresponding to the target organic compound.

[0389] Step S206: Use a preset chemical structure conversion tool to convert the SMILES format chemical structure file into the target format chemical structure file.

[0390] In the specific implementation of this step, the chemical structure conversion tools include OpenBabel software. Of course, other conversion software can also be used to convert SMILES format chemical structure files into non-SMILES format.

[0391] In the specific implementation process of this embodiment, the conversion between any name and any chemical structure file format can be realized based on the above-mentioned IUPAC naming-SMILES format conversion principle. For example, the conversion between common name-SMILES format, IUPAC naming-MOL2 format, common name-MOL2 format, common name-SDF format, common name-PDB format, etc. will not be elaborated here.

[0392] This embodiment uses a preset target conversion model to convert the first vector to obtain the target second vector, and then determines the corresponding SMILES format chemical structure file based on the target second vector. Compared with traditional rule-based methods and devices, the processing method and device of the present invention can make the conversion between chemical structure and nomenclature more convenient and faster, improve the conversion efficiency, and avoid the risk of model conflict and failure caused by adding new rules in traditional methods.

[0393] Another embodiment of the present invention provides a processing apparatus for the chemical structure and nomenclature transformation of organic compounds, such as... Figure 5 As shown, it includes:

[0394] The acquisition module is used to acquire the chemical structure file of the target organic compound to be converted;

[0395] The first conversion module is used to convert the non-SMILES format chemical structure file into SMILES format using a preset chemical structure conversion tool.

[0396] The processing module is used to process the SMILES format to obtain the target first vector;

[0397] The second conversion module is used to convert the target first vector using a preset target conversion model to obtain several second vectors;

[0398] The first determining module is used to determine the target second vector based on the probability of each second vector;

[0399] The second determining module is used to determine the name corresponding to the structure of the target organic compound based on the target second vector.

[0400] In this embodiment, the specific implementation process further includes a training module for training the target conversion model using deep learning methods. The training module is specifically used for: acquiring the SMILES format of several sample organic compound structures and their corresponding IUPAC names; converting each character in each SMILES format based on a preset character-numeric mapping table to obtain several first sample vectors as input vectors; converting each character in each IUPAC name based on the preset character-numeric mapping table to obtain several second sample vectors as target output vectors; and training the model based on each input vector and the target output vector corresponding to each input vector to obtain the target conversion model.

[0401] Specifically, this embodiment also includes a configuration module for configuring the character-numeric mapping table. The configuration module is specifically used for: obtaining the SMILES format of several sample organic compounds to obtain a first sample set; obtaining the IUPAC name of each sample organic compound to obtain a second sample set; obtaining characters in each SMILES format in the first sample set to obtain a first character set; obtaining characters in each IUPAC name in the second sample set to obtain a second character set; and constructing the character-numeric mapping table based on the first character set and the second character set.

[0402] In this embodiment, the processing module is specifically used to: convert each character in the SMILES format of the target organic compound structure based on the character-number mapping table to obtain a first vector; convert the first vector into a word embedding vector using a word embedding method; apply sine encoding to each even position in the word embedding vector and cosine encoding to each odd position in the word embedding vector to obtain a position encoding value corresponding to each position; and add the word embedding value and the position encoding value at each position in the word embedding vector to obtain the target first vector.

[0403] In this embodiment, the second determining module is specifically used to: convert each number in the target second vector based on the character-number mapping table to obtain a name corresponding to the target organic compound.

[0404] This embodiment uses a preset target conversion model to convert the first vector to obtain the target second vector, and then determines the name of the corresponding organic compound based on the target second vector. Compared with traditional rule-based methods and devices, the processing method and device of the present invention can make the conversion between chemical structure and name more convenient and faster, improve the conversion efficiency, and avoid the risk of model conflict and failure caused by the addition of new rules in traditional methods.

[0405] Another embodiment of the present invention provides a processing apparatus for the naming and chemical structure transformation of organic compounds, such as... Figure 6 As shown, it includes:

[0406] The acquisition module is used to acquire the IUPAC name of the target organic compound to be converted;

[0407] The processing module is used to process the IUPAC naming to obtain the target first vector;

[0408] The first conversion module is used to convert the target first vector using a preset target conversion model to obtain several second vectors;

[0409] The first determining module is used to determine the target second vector based on the probability of each second vector;

[0410] The second determining module is used to determine the SMILES format chemical structure file corresponding to the target organic compound based on the target second vector;

[0411] The second conversion module is used to convert SMILES format chemical structure files into target format chemical structure files using a preset chemical structure conversion tool.

[0412] In this embodiment, the device further includes a training module for training the target conversion model using deep learning. Specifically, the training module is used to: acquire the SMILES format of several sample organic compound structures and their corresponding IUPAC names; convert each character in each IUPAC name based on a preset character-numeric mapping table to obtain several first sample vectors as input vectors; convert each character in each SMILES based on the preset character-numeric mapping table to obtain several second sample vectors as target output vectors; and train the model based on each input vector and the target output vector corresponding to each input vector to obtain the target conversion model.

[0413] In this specific implementation, the device further includes a configuration module for configuring the character-numeric mapping table. The configuration module is specifically used for: acquiring several sample organic compounds (SMILES) to obtain a first sample set; acquiring the IUPAC names of each sample organic compound to obtain a second sample set; acquiring characters from each SMILES in the first sample set to obtain a first character set; acquiring characters from each IUPAC name in the second sample set to obtain a second character set; and constructing the character-numeric mapping table based on the first character set and the second character set.

[0414] In this embodiment, the processing module is specifically used to: convert each character in the IUPAC naming based on the character-number mapping table to obtain a first vector; convert the first vector into a word embedding vector using a word embedding method; apply sine encoding to each even position in the word embedding vector and cosine encoding to each odd position in the word embedding vector to obtain a position encoding value corresponding to each position; and add the word embedding value and the position encoding value at each position in the word embedding vector to obtain the target first vector.

[0415] In this embodiment, the second determining module is specifically used to: convert each number in the target second vector based on the character-number mapping table to obtain a SMILES format chemical structure file corresponding to the target organic compound.

[0416] The above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the present invention. The scope of protection of the present invention is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to the present invention within its spirit and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of the present invention.

Claims

1. A method for the bidirectional automatic conversion of the chemical structure and nomenclature of organic compounds, wherein the storage format of the organic chemical structure file includes: Simplified molecular linear input specifications include SMILES format, MOL2 format, SDF format, and PDB format; The naming methods for organic compounds include: the organic compound nomenclature system prescribed by the International Union of Pure and Applied Chemistry (IUPAC), systematic nomenclature, common names, and frequently used names; characterized in that, when the organic compound chemical structure file is stored in SMILES, MOL2, SDF, or PDB format, and when the organic compound nomenclature system is prescribed by IUPAC, the method includes the following steps: Obtain the chemical structure file of the target organic compound to be converted; The chemical structure file, which is not in SMILES format, is converted to SMILES format using a preset chemical structure conversion tool. The target first vector is obtained by processing the SMILES format; The target first vector is transformed using a preset target transformation model to obtain several second vectors; Based on the probabilities of each second vector, determine the target second vector; The naming corresponding to the structure of the target organic compound is determined based on the second target vector; The method further includes training the target conversion model using deep learning methods, specifically including: Obtain the SMILES format of the structures of several sample organic compounds and their corresponding IUPAC nomenclature; Based on a preset character-numeric mapping table, each character in each SMILES format is converted to obtain several first sample vectors, which are used as input vectors. Based on the preset character-number mapping table, each character in each IUPAC name is converted to obtain several second sample vectors, which are used as the target output vector. The target conversion model is obtained by training the model based on each input vector and the target output vector corresponding to each input vector.

2. The method as described in claim 1, characterized in that, The configuration methods for the character-numeric mapping table include: Obtain the SMILES format of several sample organic compounds to obtain the first sample set; Obtain the IUPAC names of the organic compounds in each sample to obtain a second sample set; Obtain the characters in each SMILES format from the first sample set to obtain the first character set; Extract the characters from each IUPAC name in the second sample set to obtain the second character set; The character-numeric mapping table is constructed based on the first character set and the second character set.

3. The method as described in claim 2, characterized in that, The process of processing the SMILES format to obtain the target first vector specifically includes: Based on the character-number mapping table, each character in the SMILES format of the target organic compound structure is converted to obtain a first vector; The first vector is converted into a word embedding vector using a word embedding method; Sine coding is applied to each even-numbered position in the word embedding vector, and cosine coding is applied to each odd-numbered position in the word embedding vector to obtain the positional coding value corresponding to each position. The word embedding value at each position in the word embedding vector is added to the position encoding value to obtain the target first vector.

4. The method as described in claim 2, characterized in that, The process of determining the name corresponding to the target organic compound based on the second target vector specifically includes: Based on the character-number mapping table, each number in the target second vector is converted to obtain a name corresponding to the target organic compound.

5. A method for the bidirectional automatic conversion of the chemical structure and nomenclature of organic compounds, wherein the storage format of the organic chemical structure file includes: SMILES format, MOL2 format, SDF format, and PDB format; The naming methods for organic compounds include: IUPAC-specified organic compound nomenclature, systematic nomenclature, common names, and frequently used names; characterized in that, when the storage format of the organic compound chemical structure file is SMILES format, MOL2 format, SDF format, or PDB format, and when the organic compound nomenclature method is IUPAC-specified, the method includes the following steps: Obtain the IUPAC name of the target organic compound to be converted; The IUPAC naming is processed to obtain the target first vector; The target first vector is transformed using a preset target transformation model to obtain several second vectors; Based on the probabilities of each second vector, determine the target second vector; Based on the target second vector, determine the SMILES format chemical structure file corresponding to the target organic compound; Use the preset chemical structure conversion tool to convert SMILES format chemical structure files into target format chemical structure files; The method further includes: training the target conversion model using deep learning methods, specifically including: Obtain the SMILES format of the structures of several sample organic compounds and their corresponding IUPAC nomenclature; Based on a preset character-numeric mapping table, each character in each IUPAC name is converted to obtain several first sample vectors, which are used as input vectors. Based on the preset character-number mapping table, each character in each of the SMILES is converted to obtain several second sample vectors, which are used as the target output vector. The target conversion model is obtained by training the model based on each input vector and the target output vector corresponding to each input vector.

6. The method as described in claim 5, characterized in that, The configuration methods for the character-numeric mapping table include: Obtain SMILES of several organic compounds to obtain the first sample set; Obtain the IUPAC names of the organic compounds in each sample to obtain a second sample set; Obtain the characters from each SMILES in the first sample set to obtain the first character set; Extract the characters from each IUPAC name in the second sample set to obtain the second character set; The character-numeric mapping table is constructed based on the first character set and the second character set.

7. The method as described in claim 6, characterized in that, The process of processing the naming to obtain the target first vector specifically includes: Based on the character-numeric mapping table, each character in the IUPAC name is converted to obtain a first vector; The first vector is converted into a word embedding vector using a word embedding method; Sine coding is applied to each even-numbered position in the word embedding vector, and cosine coding is applied to each odd-numbered position in the word embedding vector to obtain the positional coding value corresponding to each position. The word embedding value at each position in the word embedding vector is added to the position encoding value to obtain the target first vector.

8. The method as described in claim 6, characterized in that, The step of determining the SMILES format chemical structure file corresponding to the target organic compound based on the target second vector specifically includes: Based on the character-number mapping table, each number in the target second vector is converted to obtain a chemical structure file in SMILES format corresponding to the target organic compound.

9. A processing apparatus for the chemical structure and nomenclature transformation of organic compounds, characterized in that, include: The acquisition module is used to acquire the chemical structure file of the target organic compound to be converted; The first conversion module is used to convert the non-SMILES format chemical structure file into SMILES format using a preset chemical structure conversion tool. The processing module is used to process the SMILES format to obtain the target first vector; The second conversion module is used to convert the target first vector using a preset target conversion model to obtain several second vectors; The first determining module is used to determine the target second vector based on the probability of each second vector; The second determining module is used to determine the name corresponding to the structure of the target organic compound based on the target second vector; The processing device is further configured to train the target conversion model using deep learning methods, specifically including: Obtain the SMILES format of the structures of several sample organic compounds and their corresponding IUPAC nomenclature; Based on a preset character-numeric mapping table, each character in each SMILES format is converted to obtain several first sample vectors, which are used as input vectors. Based on the preset character-number mapping table, each character in each IUPAC name is converted to obtain several second sample vectors, which are used as the target output vector. The target conversion model is obtained by training the model based on each input vector and the target output vector corresponding to each input vector.

10. A processing apparatus for naming and chemical structure transformation of organic compounds, characterized in that, include: The acquisition module is used to acquire the IUPAC name of the target organic compound to be converted; The processing module is used to process the IUPAC naming to obtain the target first vector; The first conversion module is used to convert the target first vector using a preset target conversion model to obtain several second vectors; The first determining module is used to determine the target second vector based on the probability of each second vector; The second determining module is used to determine the SMILES format chemical structure file corresponding to the target organic compound based on the target second vector; The second conversion module is used to convert SMILES format chemical structure files into target format chemical structure files using a preset chemical structure conversion tool; The target conversion model is trained using deep learning methods, specifically including: Obtain the SMILES format of the structures of several sample organic compounds and their corresponding IUPAC nomenclature; Based on a preset character-numeric mapping table, each character in each IUPAC name is converted to obtain several first sample vectors, which are used as input vectors. Based on the preset character-number mapping table, each character in each of the SMILES is converted to obtain several second sample vectors, which are used as the target output vector. The target conversion model is obtained by training the model based on each input vector and the target output vector corresponding to each input vector.

Citation Information

Patent Citations

  • Method and device for editing organic chemical structural formula

    CN102855230A

  • Biomedicine named entity recognition and protein interactive relationship extracting on-line system based on deep learning

    CN104298651A