A molecular characterization model training method and device, and an electronic device

By generating two-dimensional and three-dimensional molecular maps and adjusting model parameters using the similarity of two-dimensional and three-dimensional features, the problem of deep learning models being unable to recognize molecular formulas is solved, enabling effective training and high-accuracy molecular characterization of unlabeled molecules.

CN114566232BActive Publication Date: 2026-02-10BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210147537.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-17
Publication Date
2026-02-10
Estimated Expiration
2042-02-17

AI Technical Summary

Technical Problem

Existing deep learning models cannot effectively identify molecular formulas, resulting in insufficient training and low accuracy of molecular representation models. Furthermore, reinforcement learning methods using virtual molecular structures struggle to determine the consistency of chemical properties, leading to inaccurate model parameter adjustments.

Method used

By generating two-dimensional and three-dimensional molecular diagrams, and adjusting model parameters based on the similarity between two-dimensional and three-dimensional features, a molecular characterization model is generated. The two-dimensional molecular diagram represents chemical bonds, and the three-dimensional molecular diagram represents atomic positional relationships. A loss function is constructed to improve model accuracy.

Benefits of technology

It enables effective training on unlabeled molecules, improves the accuracy of molecular characterization models, and can comprehensively characterize molecules from both chemical semantics and spatial structure aspects, thereby improving the accuracy of chemical property prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114566232B_ABST
    Figure CN114566232B_ABST
Patent Text Reader

Abstract

The present disclosure provides a molecular characterization model training method and device and electronic equipment, relating to the technical field of computers, in particular to the technical field of deep learning. The specific implementation scheme is: for each sample molecule, according to the molecular formula of the sample molecule, generating a two-dimensional molecular graph and a three-dimensional molecular graph of the sample molecule, wherein the two-dimensional molecular graph is used to represent the chemical bonds between atoms in the sample molecule, and the three-dimensional molecular graph is used to represent the positional relationship between atoms in the sample molecule; for each sample molecule, inputting the two-dimensional molecular graph and the three-dimensional molecular graph of the sample molecule into an original model to obtain the two-dimensional features of the two-dimensional molecular graph and the three-dimensional features of the three-dimensional molecular graph output by the original model; according to the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features respectively, adjusting the model parameters of the original model to obtain a molecular characterization model. The accuracy of the trained molecular characterization model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more particularly to the field of deep learning technology. Background Technology

[0002] The property prediction model trained by deep learning can predict the chemical properties of molecules, thereby determining the chemical properties of molecules. This is of great significance in scenarios such as drug development. However, molecules are often represented by molecular formulas. The property prediction model cannot identify molecular formulas but can only identify feature vectors (hereinafter referred to as features). Therefore, it is necessary to extract features that can be used to characterize molecules based on molecular formulas. Summary of the Invention

[0003] This disclosure provides a method, apparatus, device, and storage medium for training molecular characterization models.

[0004] According to a first aspect of this disclosure, a method for training a molecular characterization model is provided, including:

[0005] For each sample molecule, a two-dimensional molecular diagram and a three-dimensional molecular diagram are generated based on the molecular formula of the sample molecule. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the sample molecule, and the three-dimensional molecular diagram is used to represent the positional relationships between atoms in the sample molecule.

[0006] For each sample molecule, the two-dimensional molecular map and the three-dimensional molecular map of the sample molecule are input into the original model to obtain the two-dimensional features of the two-dimensional molecular map and the three-dimensional features of the three-dimensional molecular map output by the original model;

[0007] Based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, the model parameters of the original model are adjusted to obtain a molecular characterization model.

[0008] According to a second aspect of this disclosure, a method for predicting molecular properties is provided, comprising:

[0009] Based on the molecular formula of the molecule to be predicted, a two-dimensional molecular diagram and a three-dimensional molecular diagram of the molecule to be predicted are generated. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the molecule to be predicted, and the three-dimensional molecular diagram is used to represent the positional relationships between atoms in the molecule to be predicted.

[0010] The two-dimensional molecular graph and the three-dimensional molecular graph of the molecule to be predicted are input into the molecular characterization model to obtain the two-dimensional features of the two-dimensional molecular graph and the three-dimensional features of the three-dimensional molecular graph output by the molecular characterization model.

[0011] Based on the preset mapping relationship between features and chemical properties, the chemical properties corresponding to the two-dimensional features and the three-dimensional features are determined as the chemical properties of the molecule to be predicted.

[0012] The molecular characterization model is obtained by training the molecular characterization model training method as described in any of the first aspects.

[0013] According to a third aspect of this disclosure, a molecular characterization model training apparatus is provided, comprising:

[0014] The first molecular diagram generation module is used to generate a two-dimensional molecular diagram and a three-dimensional molecular diagram for each sample molecule based on the molecular formula of the sample molecule. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the sample molecule, and the three-dimensional molecular diagram is used to represent the positional relationships between atoms in the sample molecule.

[0015] The first feature extraction module is used to input the two-dimensional molecular map and the three-dimensional molecular map of each sample molecule into the original model for each sample molecule, so as to obtain the two-dimensional features of the two-dimensional molecular map and the three-dimensional features of the three-dimensional molecular map output by the original model.

[0016] The feature comparison module is used to adjust the model parameters of the original model based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, so as to obtain a molecular characterization model.

[0017] According to a fourth aspect of this disclosure, a molecular property prediction device is provided, comprising:

[0018] The second molecular diagram generation module is used to generate a two-dimensional molecular diagram and a three-dimensional molecular diagram of the molecule to be predicted based on the molecular formula of the molecule to be predicted. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the molecule to be predicted, and the three-dimensional molecular diagram is used to represent the positional relationships between atoms in the molecule to be predicted.

[0019] The second feature extraction module is used to input the two-dimensional molecular map and the three-dimensional molecular map of the molecule to be predicted into the molecular characterization model to obtain the two-dimensional features of the two-dimensional molecular map and the three-dimensional features of the three-dimensional molecular map output by the molecular characterization model.

[0020] The property prediction module is used to determine the chemical properties corresponding to the two-dimensional features and the three-dimensional features based on the preset mapping relationship between features and chemical properties, and use these properties as the chemical properties of the molecule to be predicted.

[0021] The molecular characterization model is obtained by training the molecular characterization model training method as described in any of the first aspects.

[0022] According to a fifth aspect of this disclosure, an electronic device is provided, comprising:

[0023] At least one processor; and

[0024] A memory communicatively connected to the at least one processor; wherein,

[0025] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method described in either the first or second aspect.

[0026] According to a sixth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method according to any one of the first or second aspects.

[0027] According to a seventh aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to any one of the first or second aspects.

[0028] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0029] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0030] Figure 1 This is a flowchart illustrating a molecular characterization model training method provided in this disclosure;

[0031] Figure 2 This is another flowchart illustrating the molecular characterization model training method provided in this disclosure;

[0032] Figure 3 This is a schematic diagram of a structure based on the molecular characterization model provided in this disclosure;

[0033] Figure 4 This is a schematic diagram of a structure based on the molecular characterization model training framework provided in this disclosure.

[0034] Figure 5 This is a flowchart illustrating a molecular property prediction method provided in this disclosure;

[0035] Figure 6 This is a schematic diagram of a molecular characterization model training device provided in this disclosure;

[0036] Figure 7 This is a schematic diagram of a molecular property prediction device provided in this disclosure;

[0037] Figure 8 This is a block diagram of an electronic device used to implement the molecular characterization model training method or molecular property prediction method of the embodiments of this disclosure. Detailed Implementation

[0038] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0039] To more clearly illustrate the molecular characterization model training method provided in this disclosure, an application scenario of the molecular characterization model training method provided in this disclosure will be illustrated below. The following example is only one possible application scenario of the molecular characterization model training method provided in this disclosure. In other possible embodiments, the molecular characterization model training method provided in this disclosure can also be applied to other possible embodiments. The following example does not impose any limitations on this.

[0040] The efficacy of a drug depends on the chemical properties of its molecules; therefore, accurately predicting these properties is crucial in drug development. In related technologies, property prediction models trained using deep learning are used to predict the chemical properties of molecules. These models learn the mapping relationship between molecular characteristics and their chemical properties during the deep learning process, thus enabling the mapping of molecular characteristics to their chemical properties.

[0041] Molecules are typically represented by molecular formulas, but property prediction models often cannot recognize molecular formulas and can only identify features. Therefore, it is necessary to represent molecules as features. In related technologies, molecular representation models are trained using molecular formulas of labeled samples to learn the mapping relationship between molecular formulas and features. This allows the molecular representation model to map the molecular formula to the molecular features.

[0042] However, most molecular formulas are often not labeled and cannot be used to train molecular characterization models, resulting in insufficient training of molecular characterization models and thus relatively low accuracy.

[0043] Alternatively, reinforcement learning can be used to train molecular representation models using unlabeled sample molecular formulas. For example, the molecular structure diagram of a sample molecule is input into the original model to obtain the first feature output by the original model. The molecular structure diagram of the sample molecule is then enhanced, such as by randomly deleting atoms or altering the chemical bonds between atoms. The enhanced molecular structure diagram is then input into the original model to obtain the second feature output by the original model. If the molecule represented by the enhanced molecular structure diagram has the same chemical properties as the sample molecule, the model parameters of the original model are adjusted in a direction that reduces the difference between the first and second features. If the molecule represented by the enhanced molecular structure diagram has different chemical properties than the sample molecule, the model parameters of the original model are adjusted in a direction that increases the difference between the first and second features. The original model with adjusted parameters is then used as the molecular representation model. However, the molecules represented by the enhanced molecular structure diagram are often not real molecules, making it difficult to determine whether the molecules represented by the enhanced molecular structure diagram have the same chemical properties as the sample molecule. Therefore, it is difficult to accurately adjust the model parameters of the original model, which will also lead to an inaccurate molecular representation model.

[0044] Based on this, this disclosure provides a molecular characterization model training method, which can be applied to any electronic device with molecular characterization model training capabilities, such as servers and personal computers. The molecular characterization model training method provided in this disclosure is as follows: Figure 1 As shown, it includes:

[0045] S101 generates two-dimensional and three-dimensional molecular diagrams for each sample molecule based on its molecular formula.

[0046] S102, for each sample molecule, input the two-dimensional molecular map and three-dimensional molecular map of the sample molecule into the original model to obtain the two-dimensional features of the two-dimensional molecular map and the three-dimensional features of the three-dimensional molecular map output by the original model.

[0047] S103. Based on the similarity between the molecular properties represented by the two-dimensional and three-dimensional features, the model parameters of the original model are adjusted to obtain the molecular characterization model.

[0048] Two-dimensional molecular diagrams are used to represent the chemical bonds between atoms in a sample molecule, while three-dimensional molecular diagrams are used to represent the positional relationships between atoms in a sample molecule.

[0049] Using this embodiment, sample molecules can be represented using two-dimensional (2D) and three-dimensional (3D) molecular diagrams, respectively. Since the 2D molecular diagram represents the chemical bonds between atoms in the sample molecule, it reflects the chemical semantics of the sample molecule. The 3D molecular diagram represents the positional relationships between atoms in the sample molecule, thus reflecting its spatial structure. In other words, 2D and 3D molecular diagrams represent sample molecules from two different perspectives. Therefore, the 2D features of the 2D molecular diagram and the 3D features of the 3D molecular diagram can be considered as two different forms of representation of the sample molecule. Although the forms of the 2D and 3D features are different, the 2D and 3D features of the same sample molecule represent the same sample molecule. Therefore, the molecular properties represented by the 2D and 3D features of the same sample molecule should be similar or even identical. Similarly, the 2D and 3D features of different sample molecules represent different sample molecules. Therefore, the molecular properties represented by the 2D and 3D features of different sample molecules should be dissimilar or even completely different. Therefore, by comparing the molecular properties represented by two-dimensional and three-dimensional features, the trained molecular representation model can learn the differences between the representations of different sample molecules. This allows the features output by the molecular representation model to accurately distinguish different molecules. Since labeled sample molecules are not required throughout the process, unlabeled sample molecules can be used to train the molecular representation model, ensuring that the molecular representation model is fully trained and effectively improving its accuracy.

[0050] On the other hand, the trained molecular characterization model can output two-dimensional and three-dimensional features of molecules, that is, it can more comprehensively characterize molecules from both chemical semantics and spatial structure aspects. This enables subsequent predictions of molecular properties more accurately based on more comprehensive features.

[0051] The steps S101-S103 described above will be explained in detail below:

[0052] In S101, the molecular formula of the sample molecule is represented in any form that can be recognized by electronic devices, such as SMILES (a specification that explicitly describes the molecular structure using ASCII strings).

[0053] A two-dimensional molecular graph can be viewed as a set of nodes, edges, and coordinates, where the number of nodes is equal to the number of atoms in the sample molecule, and each node represents one atom in the sample molecule, with different nodes representing different atoms.

[0054] Each edge in a two-dimensional molecular diagram is used to connect two nodes and to represent the chemical bond between the atoms represented by the two nodes. For example, if the first edge in a two-dimensional molecular diagram connects the first node and the second node, the first node represents the first atom, the second node represents the second atom, and there is a first chemical bond between the first atom and the second atom in the sample molecule, then the first edge is used to represent the first chemical bond.

[0055] Each coordinate corresponds to a node, and different coordinates correspond to different nodes. Each coordinate is used to represent the position of the atom represented by the corresponding node in the molecular structure diagram of the sample molecule. For example, if the first coordinate corresponds to the first node, the first node represents the first atom, and the first atom is located at the first position in the molecular structure diagram of the sample molecule, then the first coordinate represents the first position.

[0056] Understandably, molecular structure diagrams, for ease of observation, often only show the topological structure between atoms in a molecule, but cannot show the spatial relationship between atoms. For example, suppose there is a chemical bond between the first and second atoms in a molecule and the distance between them is the first distance, and there is a chemical bond between the second and third atoms and the distance between them is the second distance, and the first distance is much larger than the second distance. However, in molecular structure diagrams, for ease of observation, the distance between the first and second atoms is often equal to the distance between the second and third atoms.

[0057] Two-dimensional molecular graphs can be represented in the form of images or in other forms. For example, a two-dimensional molecular graph can be represented as a structure that can represent any set of nodes, edges, and coordinates.

[0058] Similarly, a three-dimensional molecular graph can also be viewed as a set of nodes, edges, and coordinates. The number of nodes is equal to the number of atoms in the sample molecule, and each node represents one atom in the sample molecule. Different nodes represent different atoms.

[0059] Each edge connects two nodes and represents the spatial relationship between the atoms represented by the two connected nodes. The number of edges can vary depending on the application scenario. For example, in one possible embodiment, there is an edge between every two nodes in the 3D molecular graph. In another possible embodiment, only some nodes in the 3D molecular graph have edges, while others do not. For instance, only nodes where the distance between the represented atoms is less than a preset distance threshold have edges, while nodes where the distance between the represented atoms is greater than the preset distance threshold do not have edges.

[0060] Each coordinate corresponds to a node, and different coordinates correspond to different nodes. Each coordinate is used to indicate the position of the atom represented by the corresponding node in the molecular structure diagram of the sample molecule.

[0061] Three-dimensional molecular graphs can be represented in the form of images or in other forms besides images. For example, a three-dimensional molecular graph can be represented as a structure that can represent any set of nodes, edges, and coordinates.

[0062] As explained above, since two-dimensional and three-dimensional molecular graphs can be viewed as sets of nodes, edges, and coordinates, for ease of description, the two-dimensional molecular graph will be denoted as {v, ε} in the following text. 2d c 2d Let the three-dimensional molecular diagram be denoted as {v, ε}. 3d c 3d}, where v is the set of nodes, ε 2d Let c be the set of edges in a two-dimensional molecular graph. 2d Let ε be the set of coordinates in a two-dimensional molecular diagram. 3d Let c be the set of edges in a three-dimensional molecular graph. 3d It is a set of coordinates in a three-dimensional molecular diagram.

[0063] In S102, the original model is any model capable of extracting features from the two-dimensional molecular graph and the three-dimensional molecular graph. For example, if the two-dimensional molecular graph and the three-dimensional molecular graph are represented in the form of a structural graph, then the original model is a GNN (Graph Neural Network). In other possible embodiments, the original model can also be other neural networks besides GNN, such as convolutional neural networks. This disclosure does not impose any restrictions on this.

[0064] In S103, in one possible embodiment, the molecular properties represented by the two-dimensional features are determined based on the two-dimensional features, and the molecular properties represented by the three-dimensional features are determined based on the three-dimensional features. The similarity between the molecular properties represented by the two-dimensional and three-dimensional features is obtained by comparing the determined molecular properties. The comparison methods include, but are not limited to, calculating the Euclidean distance, cosine distance, or inner product between molecular properties. For example, the Euclidean distance between molecular properties is calculated, and the calculated Euclidean distance is used to represent the similarity between molecular properties.

[0065] Since two-dimensional and three-dimensional features can characterize the molecular properties of sample molecules to a certain extent, in another possible embodiment, the similarity between the molecular properties characterized by the two-dimensional and three-dimensional features is obtained by comparing them. The comparison methods include, but are not limited to, calculating the Euclidean distance, cosine distance, and inner product between the two-dimensional and three-dimensional features. For example, the inner product of the two-dimensional and three-dimensional features is calculated, and the calculated inner product is used to represent the similarity between molecular properties.

[0066] Since multiple sample molecules exist, the similarity between the molecular properties represented by two-dimensional and three-dimensional features includes: the similarity between the molecular properties represented by two-dimensional and three-dimensional features belonging to the same sample molecule, and the similarity between the molecular properties represented by two-dimensional and three-dimensional features belonging to different sample molecules. For ease of description, the similarity between the molecular properties represented by two-dimensional and three-dimensional features belonging to the same sample molecule is denoted as positive sample similarity, while the similarity between the molecular properties represented by two-dimensional and three-dimensional features belonging to different sample molecules is denoted as negative sample similarity.

[0067] The number of positive and negative sample similarities used in adjusting the model parameters of the original model can vary depending on the actual needs, but should include at least one positive sample similarity and at least one negative sample similarity.

[0068] The method for adjusting model parameters may vary depending on the application scenario, but it should generally aim to reduce the similarity of positive samples and increase the similarity of negative samples. For example, in one possible implementation, such as... Figure 2 As shown, the aforementioned S103 is implemented in the following way:

[0069] S1031, a loss function is constructed based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features.

[0070] The loss function can be any form of function, but it should satisfy the following conditions: the loss function is negatively correlated with the similarity of positive samples and positively correlated with the similarity of negative samples. That is, the more dissimilar the molecular properties represented by the two-dimensional and three-dimensional features of the same sample molecule are, the larger the loss function is; the more dissimilar the molecular properties represented by the two-dimensional and three-dimensional features of different sample molecules are, the smaller the loss function is.

[0071] For example, in one possible embodiment, for each sample molecule, N different sample molecules are selected from all sample molecules, where N is a positive integer ranging from [1, M], and M is the total number of sample molecules. For ease of description, the N different sample molecules selected for the i-th sample molecule are denoted as the i-th batch. The loss function is constructed according to formula (1):

[0072]

[0073] Where Loss is the loss function, and i is a positive integer ranging from [1, M]. As shown in formula (2):

[0074]

[0075] Where j is a positive integer ranging from [1, M], Let be the two-dimensional feature of the i-th sample molecule among all sample molecules. Let be the three-dimensional feature of the i-th sample molecule among all sample molecules. Let be the two-dimensional feature of the j-th sample molecule in the i-th batch. Let be the three-dimensional feature of the j-th sample molecule in the i-th batch, τ be a preset scale parameter, and <·> be a function used to calculate the inner product, for example... for and The inner product of.

[0076] S1032, adjust the model parameters of the original model in the direction that reduces the loss function to obtain the molecular characterization model.

[0077] Since the loss function is negatively correlated with positive sample similarity and positively correlated with negative sample similarity, adjusting the model parameters in the direction of decreasing the loss function can increase positive sample similarity and decrease negative sample similarity. In other words, the model parameters should be adjusted in the direction of increasing positive sample similarity and decreasing negative sample similarity.

[0078] By using this embodiment, the model parameters can be accurately adjusted by constructing a loss function, thereby further improving the accuracy of the trained molecular characterization model.

[0079] In S1032, the direction of loss function reduction can be any direction that makes the loss function decrease. In one possible embodiment, to improve training speed, the direction of loss function reduction is the direction of loss function gradient descent.

[0080] Furthermore, in the aforementioned S1031, when constructing the loss function, in addition to considering the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, other factors can also be considered. For example, in one possible embodiment, the aforementioned S1031 includes:

[0081] S1031a, based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, a first loss function is constructed.

[0082] The first loss function is negatively correlated with positive sample similarity and positively correlated with negative sample similarity. For example, the first loss function is: about Please refer to the relevant explanation of formula (2) above, which will not be repeated here. For ease of description, the first loss function will be denoted as Loss1 in the following text.

[0083] S1032a, based on the differences in model parameters in adjacent angular domains in the original model, construct a second loss function.

[0084] The second loss function is positively correlated with the differences in model parameters within adjacent angular domains of the original model. The second loss function can be of any form, but it must be positively correlated with the differences in model parameters within adjacent angular domains of the original model.

[0085] For example, in one possible embodiment, the second loss function is constructed according to formula (3):

[0086]

[0087] Where Loss2 is the second loss function, Let be the model parameters of the (i+1)th angle domain in the t-th layer of the original model. Let be the model parameter of the i-th angle domain in the t-th layer of the original model, where i is a positive integer in the range [1, n-1], n is the number of angle domains in the t-th layer, and any two consecutive angle domains in any layer of the original model are adjacent, such as the first angle domain of the first layer and the second angle domain of the first layer being adjacent, t is a positive integer in the range [1, T], and T is the number of layers in the original model.

[0088] S1032b: Construct a loss function based on the first loss function and the second loss function.

[0089] The loss function is positively correlated with both the first and second loss sub-functions. For example, the loss function can be the sum of the first and second loss sub-functions, or it can be a weighted sum of the first and second loss sub-functions, as shown in formula (4).

[0090] Loss=Loss1+Loss=Loss1+λLoss2…(4)

[0091] Wherein, λ is a preset coefficient, and λ is greater than 0.

[0092] By selecting this embodiment, a second loss function that is positively correlated with the difference in model parameters in adjacent angular domains is introduced when constructing the loss function. This allows the difference between model parameters in adjacent angular domains to be minimized as much as possible when adjusting model parameters according to the loss function, thereby enhancing the ability of the trained molecular representation model to perceive spatial location and further improving the accuracy of the output three-dimensional features.

[0093] The following will provide examples illustrating how to generate two-dimensional and three-dimensional molecular diagrams in the aforementioned S101:

[0094] For a three-dimensional molecular diagram, based on the molecular formula of the sample molecule, the spatial position of each atom in the sample molecule in three-dimensional space is determined according to the principle of energy approximation. Based on the spatial position, every two atoms with a distance less than a preset distance threshold are connected to obtain the three-dimensional molecular diagram of the sample molecule.

[0095] The energy approximation principle states that among atomic orbitals with similar symmetry within a molecule, only those orbitals with similar energies can combine to form effective molecular orbitals. A mapping relationship designed based on the energy approximation principle can be used to map the molecular formula of a sample molecule to its spatial position in three-dimensional space, thereby obtaining the spatial position of each atom in the sample molecule in three-dimensional space. The preset distance threshold can be set according to actual needs and / or user experience.

[0096] It is understandable that the molecular formula of the sample molecule is known, therefore the set of atoms v in the sample molecule is known. However, given the spatial positions of each atom in the sample molecule in three-dimensional space, the coordinate set c... 3d It is known that by connecting atoms whose distance is less than a preset distance threshold, a set of edges can be obtained. Since the connection is between atoms whose distance is less than the preset distance threshold, the edges formed by connecting atoms can represent that the connected atoms are relatively close. That is, the set of edges obtained by connecting atoms can serve as the edge set ε in the three-dimensional molecular graph. 3d That is, edges can represent spatial relationships. Therefore, by connecting atoms whose distance is less than a preset distance threshold, a three-dimensional molecular graph {v, ε} representing the positional relationships between atoms in a sample molecule can be obtained. 3d c 3d}

[0097] By using this embodiment, three-dimensional molecular maps can be generated relatively accurately based on the principle of energy approximation, thereby improving the accuracy of the molecular characterization model obtained through subsequent training.

[0098] It is understandable that, due to the inherent uncertainty of the energy approximation principle, the spatial position of each atom in a molecule within three-dimensional space cannot be uniquely determined based on the energy approximation principle. Therefore, in one possible embodiment, the aforementioned determination of the spatial position of each atom in a sample molecule within three-dimensional space based on the energy approximation principle is achieved in the following way:

[0099] Based on the principle of energy approximation, the predicted positions of each atom in the sample molecule in three-dimensional space are determined multiple times. Due to the inherent uncertainty of the energy approximation principle, the predicted positions determined multiple times are not exactly the same (or even completely different). For each atom in the sample molecule, the average of the predicted positions of that atom is determined as the spatial position of that atom in three-dimensional space.

[0100] For example, suppose a total of P predicted positions are determined, and the spatial coordinates of the first atom in the first predicted position are c1, the spatial coordinates of the first atom in the second predicted position are c2, and so on. Then the spatial position of the first atom is calculated by formula (5):

[0101]

[0102] Where c represents the spatial position of the first atom. Using this embodiment, the predicted position can be repeatedly determined based on the energy approximation principle, and the average of the predicted positions can be taken as the spatial position. This eliminates the uncertainty of the energy approximation principle to some extent, improves the accuracy of the obtained three-dimensional molecular map, and thus improves the accuracy of the molecular characterization model obtained through subsequent training.

[0103] For a two-dimensional molecular diagram, the two-dimensional molecular diagram of the sample molecule is obtained by connecting every two atoms connected by covalent bonds according to the molecular formula of the sample molecule.

[0104] It is understandable that since the molecular formula of the sample molecule is known, the set of atoms v in the sample molecule is known, and since the molecular structure diagram of the sample molecule is known, the positions of each atom in the molecular structure diagram are also known, i.e., the coordinate set c. 2d It is known that by connecting every two atoms connected by covalent bonds, we can obtain the set of edges. Since we are connecting atoms connected by covalent bonds, the edges formed by connecting atoms can represent the covalent bonds in the sample molecule. That is, the set of edges obtained by connecting atoms can serve as the edge set ε in the two-dimensional molecular graph. 2dTherefore, by connecting atoms that are covalently bonded, a two-dimensional molecular diagram {v, ε} can be obtained to represent the chemical bonds between atoms in a sample molecule. 2d c 2d}

[0105] By using this embodiment, two-dimensional molecular maps can be generated in a relatively simple way based on the chemical bonds in the sample molecules, saving the computational cost required to generate two-dimensional molecular maps and thus improving the training efficiency of molecular characterization models.

[0106] To more clearly explain the molecular representation model training method provided in this disclosure, the structures of the original model and the trained molecular representation model will be described below. Since the molecular representation model is obtained by adjusting the model parameters based on the original model, the model structure of the original model is the same as that of the molecular representation model. For the sake of convenience, the following description will only use the molecular representation model as an example.

[0107] See Figure 3 , Figure 3 The diagram shown is a schematic representation of a publicly available molecular characterization model, including:

[0108] The module includes Geometric embedding and Adaptive Geometric Message Passing Neural Networks.

[0109] The geometric encoding module includes: a 2D Angle Encoder module, a Local Distance Encoder module, a 3D Angle Encoder module, and a Global Distance Encoder module.

[0110] The adaptive geometric message passing neural network module includes: a 2D geometric message passing module, a 3D geometric message passing module, a first attention pooling module, and a second attention pooling module.

[0111] The input to the two-dimensional angle encoding module is a two-dimensional molecular diagram of the molecule. The two-dimensional angle encoding module is used to determine the relative directions between atoms in the molecule based on the two-dimensional molecular diagram, and outputs the determined directions to the two-dimensional geometric information transmission module.

[0112] The input to the local distance encoding module is a two-dimensional molecular diagram of the molecule. The local distance encoding module is used to determine the relative distance between each atom in the molecule based on the two-dimensional molecular diagram, and input the determined distance to the two-dimensional geometric information transmission module.

[0113] The input to the two-dimensional geometric information transmission module is the relative direction output by the two-dimensional angle encoding module and the distance output by the local distance encoding module. The two-dimensional geometric information transmission module is used to determine the geometric information based on the relative direction and relative distance, and input the determined geometric information into the first attention pooling module.

[0114] The input to the first attention pooling module is the geometric information output by the two-dimensional geometric information transfer module. The first attention pooling module is used to determine the two-dimensional features of the two-dimensional molecular graph based on the geometric information through the attention mechanism and pooling operation.

[0115] The input to the 3D angle encoding module is a 3D molecular diagram of the molecule. The 3D angle encoding module is used to determine the relative orientation between atoms in the molecule based on the 3D molecular diagram, and outputs the determined orientation to the 3D geometric information transmission module.

[0116] The input to the global distance encoding module is a three-dimensional molecular diagram of the molecule. The global distance encoding module is used to determine the relative distance between each atom in the molecule based on the three-dimensional molecular diagram, and input the determined distance to the three-dimensional geometric information transmission module.

[0117] The input to the 3D geometric information transmission module is the relative direction output by the 3D angle encoding module and the distance output by the global distance encoding module. The 3D geometric information transmission module is used to determine the geometric information based on the relative direction and relative distance, and input the determined geometric information into the second attention pooling module.

[0118] The second attention pooling module takes geometric information output from the three-dimensional geometric information transfer module as input and uses the attention mechanism and pooling operation to determine the three-dimensional features of the three-dimensional molecular graph based on the geometric information.

[0119] In one possible embodiment, when training the original model according to the molecular characterization model training method provided in this disclosure, a geometric graph contrastive module is added to the original model to obtain, as shown below. Figure 4 The training framework for the molecular characterization model is shown.

[0120] The geometric image comparison module includes a 2D projection head module, a 3D projection head module, and a comparison module. The 2D projection head module takes 2D features as input, maps these features to obtain mapped 2D features, and outputs the mapped 2D features to the comparison module. Similarly, the 3D projection head module takes 3D features as input, maps these features to obtain mapped 3D features, and outputs the mapped 3D features to the comparison module.

[0121] The comparison module takes as input the mapped two-dimensional features and the mapped three-dimensional features. The comparison module is used to compare the mapped two-dimensional features and the mapped three-dimensional features to obtain the similarity between the molecular properties represented by the mapped two-dimensional features and the mapped three-dimensional features. Based on the similarity, a loss function is constructed to adjust the model parameters of the original model according to the loss function, which is used to implement the steps of S1031a and S1031 mentioned above.

[0122] This disclosure also provides a molecular property prediction method. This method can be applied to any electronic device capable of predicting molecular properties. Furthermore, the executing entity of this molecular property prediction method can be the same as or different from the executing entity of the molecular characterization model training method provided in this disclosure. The molecular property prediction method provided in this disclosure is as follows: Figure 5 As shown, it includes:

[0123] S501, based on the molecular formula of the molecule to be predicted, generates a two-dimensional molecular diagram and a three-dimensional molecular diagram of the molecule to be predicted.

[0124] Two-dimensional molecular diagrams are used to represent the chemical bonds between atoms in the molecule to be predicted, and three-dimensional molecular diagrams are used to represent the chemical bonds between atoms in the molecule to be predicted. The method for generating two-dimensional and three-dimensional molecular diagrams of the molecule to be predicted is the same as the method for generating two-dimensional and three-dimensional molecular diagrams of the sample molecule, the only difference being the different molecules. Please refer to the relevant explanation in S101 above, which will not be repeated here.

[0125] S502, input the two-dimensional molecular map and the three-dimensional molecular map of the molecule to be predicted into the molecular characterization model, and obtain the two-dimensional features of the two-dimensional molecular map and the three-dimensional features of the three-dimensional molecular map output by the molecular characterization model.

[0126] The molecular characterization model is trained according to any molecular characterization model training method provided in this disclosure.

[0127] S503, based on the preset mapping relationship between features and chemical properties, determines the chemical properties corresponding to two-dimensional and three-dimensional features as the chemical properties of the molecule to be predicted.

[0128] The mapping relationship can refer to the mapping relationship between two-dimensional features, three-dimensional features and chemical properties, or it can refer to the mapping relationship between the fused features calculated based on two-dimensional features and three-dimensional features and chemical properties.

[0129] If the mapping relationship refers to the mapping relationship between two-dimensional features, three-dimensional features and chemical properties, then the two-dimensional features and three-dimensional features of the molecule to be predicted can be directly mapped using the mapping relationship to obtain the chemical properties of the molecule to be predicted.

[0130] If the mapping relationship refers to the mapping relationship between fusion features and chemical properties, then the fusion features are calculated based on the two-dimensional and three-dimensional features of the molecule to be predicted. The calculation methods include, but are not limited to, splicing, weighted addition, etc., and the mapping relationship is used to map the fusion features to obtain the chemical properties of the molecule to be predicted.

[0131] By using this embodiment, the chemical properties of the molecule to be predicted can be predicted by combining two-dimensional features and three-dimensional features. Since two-dimensional features can reflect the chemical semantics of the molecule to be predicted, while three-dimensional features can reflect the spatial structure of the molecule to be predicted, this embodiment can predict the chemical properties of the molecule to be predicted by combining the chemical semantics and spatial structure of the molecule to be predicted. Since the information referenced during prediction is more comprehensive, the accuracy of prediction can be effectively improved.

[0132] See Figure 6 , Figure 6 The diagram shown is a structural schematic of a molecular characterization model training device provided in this disclosure, comprising:

[0133] The first molecular diagram generation module 601 is used to generate a two-dimensional molecular diagram and a three-dimensional molecular diagram for each sample molecule according to the molecular formula of the sample molecule. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the sample molecule, and the three-dimensional molecular diagram is used to represent the positional relationship between atoms in the sample molecule.

[0134] The first feature extraction module 602 is used to input the two-dimensional molecular map and the three-dimensional molecular map of each sample molecule into the original model for each sample molecule, so as to obtain the two-dimensional features of the two-dimensional molecular map and the three-dimensional features of the three-dimensional molecular map output by the original model.

[0135] The feature comparison module 603 is used to adjust the model parameters of the original model based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, so as to obtain a molecular characterization model.

[0136] In one possible embodiment, the feature comparison module 603 adjusts the model parameters of the original model based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, to obtain a molecular characterization model, including:

[0137] A loss function is constructed based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, wherein the loss function is negatively correlated with the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features belonging to the same sample molecule, and the loss function is positively correlated with the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features belonging to different sample molecules.

[0138] The model parameters of the original model are adjusted in a direction that reduces the loss function to obtain the molecular characterization model.

[0139] In one possible embodiment, the feature comparison module 603 constructs a loss function based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, including:

[0140] Based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, a first loss function is constructed, wherein the first loss function is negatively correlated with the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features belonging to the same sample molecule, and the loss function is positively correlated with the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features belonging to different sample molecules;

[0141] Based on the differences in model parameters within adjacent angle domains in the original model, a second loss function is constructed. The second loss function is positively correlated with the differences in model parameters within adjacent angle domains in the original model.

[0142] A loss function is constructed based on the first loss function and the second loss function, wherein the loss function is positively correlated with the first loss function and positively correlated with the second loss function.

[0143] In one possible embodiment, the first molecular map generation module 601 generates a three-dimensional molecular map of the sample molecule based on the molecular formula of the sample molecule, including:

[0144] Based on the molecular formula of the sample molecule, the spatial position of each atom in the sample molecule in three-dimensional space is determined based on the principle of energy approximation.

[0145] Based on the spatial location, connect every two atoms that are less than a preset distance threshold to obtain a three-dimensional molecular map of the sample molecule.

[0146] In one possible embodiment, the first molecular map generation module 601 determines the position of each atom in the sample molecule in three-dimensional space based on the energy approximation principle, including:

[0147] The predicted positions of each atom in the sample molecule in three-dimensional space were determined multiple times based on the principle of energy approximation.

[0148] For each atom in the sample molecule, the mean of the predicted positions of the atom is determined as the spatial position of the atom in the three-dimensional space.

[0149] In one possible embodiment, the first molecular map generation module 601 generates a two-dimensional molecular map of the sample molecule based on the molecular formula of the sample molecule, including:

[0150] Based on the molecular formula of the sample molecule, connect every two atoms that are covalently linked to obtain a two-dimensional molecular diagram of the sample molecule.

[0151] See Figure 7 , Figure 7 The diagram shown is a schematic representation of a molecular property prediction device provided in this disclosure, comprising:

[0152] The second molecular diagram generation module 701 is used to generate a two-dimensional molecular diagram and a three-dimensional molecular diagram of the molecule to be predicted based on the molecular formula of the molecule to be predicted. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the molecule to be predicted, and the three-dimensional molecular diagram is used to represent the positional relationship between atoms in the molecule to be predicted.

[0153] The second feature extraction module 702 is used to input the two-dimensional molecular map and the three-dimensional molecular map of the molecule to be predicted into the molecular characterization model to obtain the two-dimensional features of the two-dimensional molecular map and the three-dimensional features of the three-dimensional molecular map output by the molecular characterization model.

[0154] Property prediction module 703 is used to determine the chemical properties corresponding to the two-dimensional features and the three-dimensional features based on the preset mapping relationship between features and chemical properties, and use them as the chemical properties of the molecule to be predicted.

[0155] The molecular characterization model is obtained by training using any of the molecular characterization model training methods described above.

[0156] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0157] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0158] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0159] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.

[0160] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0161] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as molecular characterization model training methods or molecular property prediction methods. For example, in some embodiments, the molecular characterization model training method or molecular property prediction method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the molecular characterization model training method or molecular property prediction method described above can be performed. Alternatively, in other embodiments, the computing unit 801 may be configured by any other suitable means (e.g., by means of firmware) to perform a molecular characterization model training method or a molecular property prediction method.

[0162] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0163] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0164] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0165] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0166] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0167] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0168] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0169] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for training a molecular characterization model, comprising: For each sample molecule, a two-dimensional molecular diagram and a three-dimensional molecular diagram are generated based on the molecular formula of the sample molecule. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the sample molecule, and the three-dimensional molecular diagram is used to represent the positional relationships between atoms in the sample molecule. For each sample molecule, the two-dimensional molecular graph and the three-dimensional molecular graph of the sample molecule are input into the original model to obtain the two-dimensional features of the two-dimensional molecular graph and the three-dimensional features of the three-dimensional molecular graph output by the original model; the original model can be any model capable of extracting the features of the two-dimensional molecular graph and the three-dimensional molecular graph. Based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, the model parameters of the original model are adjusted to obtain a molecular characterization model. The step of adjusting the model parameters of the original model based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features to obtain the molecular characterization model includes: Based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, a first loss function is constructed, wherein the first loss function is negatively correlated with the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features belonging to the same sample molecule, and the loss function is positively correlated with the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features belonging to different sample molecules; Based on the differences in model parameters within adjacent angle domains in the original model, a second loss function is constructed. The second loss function is positively correlated with the differences in model parameters within adjacent angle domains in the original model. A loss function is constructed based on the first loss function and the second loss function, wherein the loss function is positively correlated with the first loss function and positively correlated with the second loss function; The model parameters of the original model are adjusted in a direction that reduces the loss function to obtain the molecular characterization model.

2. The method according to claim 1, wherein, The step of generating a three-dimensional molecular map of the sample molecule based on its molecular formula includes: Based on the molecular formula of the sample molecule, the spatial position of each atom in the sample molecule in three-dimensional space is determined based on the principle of energy approximation. Based on the spatial location, connect every two atoms that are less than a preset distance threshold to obtain a three-dimensional molecular map of the sample molecule.

3. The method according to claim 2, wherein, The determination of the position of each atom in the sample molecule in three-dimensional space based on the energy approximation principle includes: The predicted positions of each atom in the sample molecule in three-dimensional space were determined multiple times based on the principle of energy approximation. For each atom in the sample molecule, the mean of the predicted positions of the atom is determined as the spatial position of the atom in the three-dimensional space.

4. The method according to claim 1, wherein, The step of generating a two-dimensional molecular map of the sample molecule based on its molecular formula includes: Based on the molecular formula of the sample molecule, connect every two atoms that are covalently linked to obtain a two-dimensional molecular diagram of the sample molecule.

5. A method for predicting molecular properties, comprising: Based on the molecular formula of the molecule to be predicted, a two-dimensional molecular diagram and a three-dimensional molecular diagram of the molecule to be predicted are generated. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the molecule to be predicted, and the three-dimensional molecular diagram is used to represent the positional relationships between atoms in the molecule to be predicted. The two-dimensional molecular graph and the three-dimensional molecular graph of the molecule to be predicted are input into the molecular characterization model to obtain the two-dimensional features of the two-dimensional molecular graph and the three-dimensional features of the three-dimensional molecular graph output by the molecular characterization model. Based on the preset mapping relationship between features and chemical properties, the chemical properties corresponding to the two-dimensional features and the three-dimensional features are determined as the chemical properties of the molecule to be predicted. The molecular characterization model is obtained by training the molecular characterization model training method as described in any one of claims 1-4.

6. A molecular characterization model training device, comprising: The first molecular diagram generation module is used to generate a two-dimensional molecular diagram and a three-dimensional molecular diagram for each sample molecule based on the molecular formula of the sample molecule. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the sample molecule, and the three-dimensional molecular diagram is used to represent the positional relationships between atoms in the sample molecule. The first feature extraction module is used to input the two-dimensional molecular map and the three-dimensional molecular map of each sample molecule into the original model for each sample molecule, and obtain the two-dimensional features of the two-dimensional molecular map and the three-dimensional features of the three-dimensional molecular map output by the original model; the original model is any model that can extract the features of the two-dimensional molecular map and the three-dimensional molecular map. The feature comparison module is used to adjust the model parameters of the original model based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, so as to obtain a molecular characterization model. The feature comparison module adjusts the model parameters of the original model based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, to obtain a molecular characterization model, including: Based on the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features, a first loss function is constructed, wherein the first loss function is negatively correlated with the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features belonging to the same sample molecule, and the loss function is positively correlated with the similarity between the molecular properties represented by the two-dimensional features and the three-dimensional features belonging to different sample molecules; Based on the differences in model parameters within adjacent angle domains in the original model, a second loss function is constructed. The second loss function is positively correlated with the differences in model parameters within adjacent angle domains in the original model. A loss function is constructed based on the first loss function and the second loss function, wherein the loss function is positively correlated with the first loss function and positively correlated with the second loss function; The model parameters of the original model are adjusted in a direction that reduces the loss function to obtain the molecular characterization model.

7. The apparatus according to claim 6, wherein, The first molecular map generation module generates a three-dimensional molecular map of the sample molecule based on the molecular formula of the sample molecule, including: Based on the molecular formula of the sample molecule, the spatial position of each atom in the sample molecule in three-dimensional space is determined based on the principle of energy approximation. Based on the spatial location, connect every two atoms that are less than a preset distance threshold to obtain a three-dimensional molecular map of the sample molecule.

8. The apparatus according to claim 7, wherein, The first molecular map generation module determines the position of each atom in the sample molecule in three-dimensional space based on the energy approximation principle, including: The predicted positions of each atom in the sample molecule in three-dimensional space were determined multiple times based on the principle of energy approximation. For each atom in the sample molecule, the mean of the predicted positions of the atom is determined as the spatial position of the atom in the three-dimensional space.

9. The apparatus according to claim 6, wherein, The first molecular map generation module generates a two-dimensional molecular map of the sample molecule based on the molecular formula of the sample molecule, including: Based on the molecular formula of the sample molecule, connect every two atoms that are covalently linked to obtain a two-dimensional molecular diagram of the sample molecule.

10. A molecular property prediction device, comprising: The second molecular diagram generation module is used to generate a two-dimensional molecular diagram and a three-dimensional molecular diagram of the molecule to be predicted based on the molecular formula of the molecule to be predicted. The two-dimensional molecular diagram is used to represent the chemical bonds between atoms in the molecule to be predicted, and the three-dimensional molecular diagram is used to represent the positional relationships between atoms in the molecule to be predicted. The second feature extraction module is used to input the two-dimensional molecular map and the three-dimensional molecular map of the molecule to be predicted into the molecular characterization model to obtain the two-dimensional features of the two-dimensional molecular map and the three-dimensional features of the three-dimensional molecular map output by the molecular characterization model. The property prediction module is used to determine the chemical properties corresponding to the two-dimensional features and the three-dimensional features based on the preset mapping relationship between features and chemical properties, and use these properties as the chemical properties of the molecule to be predicted. The molecular characterization model is obtained by training the molecular characterization model training method as described in any one of claims 1-4.

11. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4 or 5.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-4 or 5.

13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-4 or 5.