Molecular energy prediction method, device, equipment and storage medium
Through the machine learning method based on quantum operators, the molecular energy prediction model is used to solve the problems of high cost of molecular energy prediction and poor mobility, and low-cost and high-precision molecular energy prediction is achieved, which is suitable for different molecular systems.
Patent Information
- Application Number
- CN202211274957.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-10-18
AI Technical Summary
In the prior art, molecular energy prediction methods have high calculation cost and poor mobility, making them difficult to effectively apply between different molecules.
Using a machine learning method based on quantum operators, a high-precision molecular energy prediction model is trained through a molecular energy prediction model using quantum operators as input, combined with an additional and Gaussian process regression algorithm.
It realizes low-cost and high-precision molecular energy prediction, is suitable for different molecular systems, and improves the universality and migration of computing efficiency and model.
Smart Images

Figure CN117253558B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of quantum technology, and in particular to a method, apparatus, device, and storage medium for predicting molecular energy. Background Art
[0002] In quantum chemistry, molecular energy is predicted to calculate molecular reaction mechanisms, molecular spectra, etc. Therefore, predicting molecular energy has far-reaching practical significance.
[0003] In related technologies, molecular energy is predicted by molecular structure information. Generally speaking, the molecular structure information, such as bonding type, bond length, bond angle, etc., is used as input to the molecular energy prediction model.
[0004] However, in related technologies, molecular energy is predicted based on the structural information of the molecule. Since each molecule has a lot of structural information and the structures of different molecules are inconsistent, not only is the calculation cost high, but the transferability is also poor. Summary of the Invention
[0005] The present invention provides a method, apparatus, device, and storage medium for predicting molecular energy. The technical solution is as follows:
[0006] According to one aspect of an embodiment of the present application, a method for predicting molecular energy is provided, the method comprising:
[0007] Using a first calculation method to obtain a first predicted energy of a molecule to be predicted and a quantum operator of the molecule to be predicted, wherein the quantum operator of the molecule to be predicted is used to describe a wave function of the molecule to be predicted;
[0008] Predicting energy information based on the quantum operator of the molecule to be predicted using a molecular energy prediction model; wherein the molecular energy prediction model is a machine learning model for predicting the energy information;
[0009] The final predicted energy of the molecule to be predicted is determined according to the energy information.
[0010] According to one aspect of an embodiment of the present application, a method for training a molecular energy prediction model is provided, the method comprising:
[0011] Using a first calculation method to obtain a first predicted energy of a sample molecule and a quantum operator of the sample molecule, where the quantum operator of the sample molecule is used to describe a wave function of the sample molecule;
[0012] Obtaining a second predicted energy of the sample molecule using a second calculation method, wherein the energy prediction accuracy of the second calculation method is higher than the energy prediction accuracy of the first calculation method;
[0013] Predicting energy information based on the quantum operator of the sample molecule using a molecular energy prediction model; wherein the molecular energy prediction model is a machine learning model for predicting the energy information;
[0014] Parameters of the molecular energy prediction model are adjusted according to the energy information, the first predicted energy, and the second predicted energy.
[0015] According to one aspect of an embodiment of the present application, a device for predicting molecular energy is provided, the device comprising:
[0016] a first energy prediction module, configured to obtain a first predicted energy of a molecule to be predicted and a quantum operator of the molecule to be predicted using a first calculation method, wherein the quantum operator of the molecule to be predicted is used to describe a wave function of the molecule to be predicted;
[0017] a second energy prediction module, configured to predict energy information based on the quantum operator of the molecule to be predicted using a molecular energy prediction model; wherein the molecular energy prediction model is a machine learning model for predicting the energy information;
[0018] The energy determination module is used to determine the final predicted energy of the molecule to be predicted based on the energy information.
[0019] According to one aspect of an embodiment of the present application, a training device for a molecular energy prediction model is provided, the device comprising:
[0020] a third energy prediction module, configured to obtain a first predicted energy of the sample molecule and a quantum operator of the sample molecule using the first calculation method, wherein the quantum operator of the sample molecule is used to describe a wave function of the sample molecule;
[0021] a fourth energy prediction module, which uses a second calculation method to obtain a second predicted energy of the sample molecule, wherein the energy prediction accuracy of the second calculation method is higher than the energy prediction accuracy of the first calculation method;
[0022] a fifth energy prediction module, configured to predict energy information based on the quantum operator of the sample molecule using a molecular energy prediction model; wherein the molecular energy prediction model is a machine learning model for predicting the energy information;
[0023] A parameter adjustment module is used to adjust the parameters of the molecular energy prediction model according to the energy information, the first predicted energy and the second predicted energy.
[0024] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the above-mentioned molecular energy prediction method, or to implement the above-mentioned molecular energy prediction model training method.
[0025] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned molecular energy prediction method, or to implement the above-mentioned molecular energy prediction model training method.
[0026] According to one aspect of an embodiment of the present application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the above-described molecular energy prediction method or implement the above-described molecular energy prediction model training method.
[0027] The technical solution provided by the embodiment of the present application may include the following beneficial effects: a first predicted energy of the molecule to be predicted and a quantum operator of the molecule to be predicted are obtained by a first calculation method (a calculation method with lower cost), and the quantum operator is input into the molecular energy prediction model to obtain energy information about the molecule to be predicted. By adding the energy information to the first predicted energy, the final predicted energy of the molecule to be predicted can be determined, wherein the final predicted energy of the molecule to be predicted is more accurate than the first predicted energy. That is, the technical solution provided by the embodiment of the present application takes the quantum operator of the molecule as input and predicts the energy of the molecule through the molecular energy prediction model. Since there are not many types of quantum operators and the types of quantum operators between different molecules are basically the same, the molecular energy prediction model has good portability and the molecular energy prediction method has good universal adaptability. At the same time, since the first energy to be measured is obtained by a calculation method of molecular energy with lower computational cost, the technical solution provided by the embodiment of the present application can achieve a prediction of molecular energy with higher accuracy at a lower computational cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of the coordinate relationship between the computational cost provided in the related art and the exact numerical solution of the Schrödinger equation of the corresponding system;
[0029] Figure 2 It is a schematic diagram of the application of machine learning in various subsidiary fields of computational chemistry provided in the related art;
[0030] Figure 3This is a schematic diagram of using a machine learning method to predict molecular energy according to an embodiment of the present application;
[0031] Figure 4 This is a schematic diagram of calculating the computational cost required for a catalyst using different methods provided in one embodiment of the present application;
[0032] Figure 5 This is a schematic diagram of a potential energy surface in an actual simple reaction provided in an embodiment of the present application;
[0033] Figure 6 This is a schematic diagram of an implementation environment for a solution provided by an embodiment of the present application;
[0034] Figure 7 This is a flow chart of a method for predicting molecular energy provided by one embodiment of the present application;
[0035] Figure 8 is a block diagram of a method for obtaining operator information provided by one embodiment of the present application;
[0036] Figure 9 This is a block diagram of a method for predicting molecular energy provided by one embodiment of the present application;
[0037] Figure 10 This is a flowchart of a method for training a molecular energy prediction model provided by one embodiment of the present application;
[0038] Figure 11 is a schematic diagram of the prediction results of electronic structure energy provided by one embodiment of the present application;
[0039] Figure 12 is a schematic diagram of the prediction results of a standardized data set of multiple molecules provided in one embodiment of the present application;
[0040] Figure 13 This is a block diagram of a molecular energy prediction device provided by one embodiment of the present application;
[0041] Figure 14 is a block diagram of a molecular energy prediction device provided by another embodiment of the present application;
[0042] Figure 15 This is a block diagram of a training device for a molecular energy prediction model provided by one embodiment of the present application;
[0043] Figure 16 is a block diagram of a training device for a molecular energy prediction model provided by another embodiment of the present application;
[0044] Figure 17 This is a structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0046] Before introducing the technical solutions of this application, some of the terms involved in this application are explained. The following related explanations can be combined with the technical solutions of the embodiments of this application as optional solutions, and they all fall within the scope of protection of the embodiments of this application. The embodiments of this application include at least part of the following contents.
[0047] Quantum simulation: Build a quantum computer that is similar or related to the quantum problem to be studied for simulation (natural evolution in an artificially established quantum operating environment).
[0048] Quantum computing: Solve specific problems using algorithms that are coherent and reversible.
[0049] An operator (also called an operator) is a function from one physical state space to another. This application primarily uses operators that describe wave functions in quantum chemistry calculations, including single-electron and two-electron operators. For example, the Fock operator (represented as a matrix) is a single-electron energy operator (matrix) that approximates a given quantum system within a given set of basis vectors.
[0050] Schrödinger equation ( equation, SE for short): It is a partial differential equation that describes the evolution of the quantum state of a physical system over time and is one of the basic equations of quantum mechanics.
[0051] Electronic structure: It is a scientific research method and field that uses the Born-Oppenheimer approximation to solve the electron wave function in order to solve the Schrödinger equation.
[0052] Wave function theory (WFT): a quantum mechanical approach to the electronic structure of multi-electron systems based on complex multi-electron wave functions.
[0053] Density functional theory (DFT) is a quantum mechanical method that uses electron density to study the electronic structure of multi-electron systems. Its main goal is to replace the wave function with electron density as the basic quantity of study.
[0054] Weakly correlated and strongly correlated describe the strength of interactions between electrons in a system. It's generally believed that low-precision quantum simulation methods can handle weakly correlated systems, but strongly correlated systems require high-precision electronic structure theory methods based on wave functions.
[0055] The self-consistent field method (SCF) is a fundamental method in quantum mechanics for iteratively solving the Schrödinger equation for multi-particle systems. In this embodiment, the particles are specifically electrons. The SCF method first estimates the electron density by providing an estimate of the wave function. The electron density is then used to derive the terms in the Hamiltonian related to interparticle interactions. The Schrödinger equation is then solved to obtain a set of improved estimates. There are many SCF methods that can be used in the technical solutions provided in this embodiment, such as the Hartree-Fock method.
[0056] Ground state and excited state: The ground state is the quantum state with the least energy among a series of quantum states possessed by a system, and the excited state is a series of quantum states in a system that are not the ground state.
[0057] A Gaussian process is a random process in which observations occur in a continuous domain (time or space). In a Gaussian process, every point in the continuous input space is associated with a normally distributed random variable, and any finite linear combination of the random variables is normally distributed.
[0058] Gaussian process regression: It is a non-parametric model that uses Gaussian process priors to perform regression analysis on data. It is also a probabilistic model that is versatile and analyzable.
[0059] Addition kernel, kernel matrix, and kernel-addition Gaussian process regression (KA-GPR): Assume that each small unit conforms to a unified Gaussian process, the sum of these small units is also a Gaussian process (called an additive Gaussian process), and the kernel function of this Gaussian process is an addition kernel function. The matrix obtained by inputting the information into the kernel function is represented as the kernel matrix.
[0060] Before introducing the technical solution of this application, some relevant background knowledge involved in this application is explained.
[0061] 1. Electronic structure methods in correlated quantum simulations
[0062] As a powerful and widely used computational tool, quantum simulation has been shown to deepen our understanding of chemical and biological processes and promote the discovery of new drugs and materials. The ultimate goal of quantum simulation is to find an accurate numerical solution to the Schrödinger equation for the corresponding system at a reasonable computational cost. Figure 1 As shown in the coordinate system 10, it shows the common method for solving the Schrödinger equation in computational chemistry and the system that can be calculated. It can be found that the computational cost and complexity increase with the improvement of the accuracy of the method, and the maximum system that can be processed also decreases significantly. Figure 1 It is a pyramid of commonly used methods in computational chemistry for solving the Schrödinger equation. In the field of electronic structure, the various theoretical calculation methods developed by physicists and chemists have faced a trade-off between cost and accuracy, making it difficult to balance both in calculations of actual systems. While the emergence of density functional theory (DFT) has partially addressed the difficulty of performing electronic structure calculations in actual systems, the accuracy of DFT's energy calculations is still insufficient to meet the practical requirements of some applications. Wave function theory is generally considered to provide a more accurate solution to the Schrödinger equation, but a more practical method is Kohn-Sham density functional theory. The emergence of density functional theory has enabled traditional electronic structure methods to address realistic chemical and biological systems. However, in many applications, density functional theory suffers from numerous quantitative and even qualitative errors. Therefore, how to quickly obtain numerical solutions that are nearly as accurate as those achieved with wave function theory or even complete configuration interaction methods is a crucial issue in the field of electronic structure research.
[0063] 2. Machine Learning in Computational Chemistry
[0064] As machine learning gradually demonstrates powerful computing efficiency in various industries, in order to strike a balance between accuracy and computing cost, the field of computational chemistry has also begun to introduce machine learning methods on a large scale for industrial upgrading and innovation. Figure 2 Demonstrates the various applications of machine learning in various areas of computational chemistry. Machine learning can be used to Figure 2 The various fields 20 shown in Figure 2 further promote the integration of computational chemistry and machine learning. Various different approaches to applying machine learning exist for the specialized field of electronic structure. In related technologies, two main categories of machine learning methods are applied to electronic structure and molecular energy learning: machine learning based on molecular structure information and machine learning based on quantum mechanics information.
[0065] 2.1 Machine Learning Based on Molecular Structure Information
[0066] The first type of machine learning methods based on molecular structure information focuses on achieving excellent accuracy in predicting molecular energies at the DFT level at the expense of computational costs using classical force fields. These methods typically use molecular structure information to describe chemical systems, such as atomic composition, bonding type, bond length, and bond angle, e.g. Figure 3 As shown in sub-figure a in Figure 1, it is shown that this method can replace more expensive electronic structure potential energy surfaces and facilitate detailed molecular dynamics simulations of large chemical systems with more than 100,000 atoms, with an accuracy comparable to that achieved by DFT. However, there are two notable drawbacks to this type of machine learning approach to molecular structure information representation. First, as the number of atom and bond types increases, the number of features grows rapidly, and the complexity of building a machine learning model that can accurately describe different elements and chemical substances also grows rapidly. In addition, due to the lack of relevant information, there is a significant loss of accuracy in the prediction of untrained element and chemical environment types. These two problems lead to the inevitable need for a large amount of reference data (typically more than 50,000 training molecules) in training to achieve the accuracy required for chemical applications, and the lack of transferability across different chemical problems.
[0067] 2.2 Machine Learning Based on Quantum Mechanical Information
[0068] The second class of machine learning methods based on quantum mechanical information aims to achieve accuracy on the wave function, using information from low-level electronic structure theory, such as Figure 3 As shown in sub-figure b in , chemical systems are usually described using physical information representations (or quantum representations) obtained from quantum simulation calculations, in which the physical information representation usually chosen is molecular or atomic orbital information. The quantum information used in this machine learning includes atomic orbitals, molecular orbitals, and Slater determinants obtained from HF (Hartree-Fock) or DFT, etc. Compared with machine learning methods represented by molecular structure information, machine learning methods using molecular or atomic orbital information usually require fewer data points (usually less than 5,000) to achieve the same accuracy. In addition, machine learning methods based on molecular or atomic orbital information can also achieve better model transferability, and this method usually performs better than methods based on molecular structure information on large standard data sets. There are many options for machine learning methods based on molecular or atomic orbital information, such as NeuralXC, DeePHF, DeePKS, PauliNet, and OrbNet.
[0069] 3. Deficiencies in Related Technologies
[0070] The above-mentioned related technologies still have the following problems:
[0071] 3.1 Small Data Model and Big Data Model
[0072] Although small data models can achieve extremely high accuracy for individual application scenarios or even individual specific chemical systems, they lack universality and good migration capabilities. Although big data models have good predictive capabilities for different systems and scenarios, they do not have the ability to update and iterate models for individual applications. Although some methods have the potential to be generally suitable for small data models and big data models, they need to rely on the development of deep machine learning algorithms. Taking the MOB-ML (Molecular orbital based machine learning) method as an example, the most direct MOB-ML method uses traditional Gaussian process regression. If it does not rely on deep development in machine learning, the kernel matrix needs to be recalculated in each loop during the parameter optimization process. Its bottleneck lies in the inversion of the kernel matrix (the complexity is O(N 3 ), where N is the number of training data points. Due to its unique training design, which decomposes total energy, it can only train a maximum of 200 molecules. Additional machine learning techniques such as clustering and approximation enable MOB-ML to train large data models.
[0073] 3.2 Single input and output, lack of versatility, cannot adapt to many application scenarios
[0074] Most models are developed for specific electronic structure theories and have fixed input and output target theories. For example, the model input is the result of semi-empirical theoretical calculations, and the output is the predicted value of the DFT theoretical calculation results. Since different chemical systems and application scenarios have different requirements for accuracy and target theories, users of the model need to determine in advance whether the output theoretical accuracy provided by the model meets the system and application that the user wants to study. In particular, most methods lack the modeling capabilities for extremely high-precision electronic structure theories, resulting in an inability to adapt to many application scenarios. Currently, the goal of most machine learning models is to achieve DFT-level accuracy. For many application scenarios, such as strongly correlated or excited state molecular systems, only quantum simulation calculation results with higher accuracy can accurately describe the corresponding chemical system. However, related technologies can only predict the energy of weakly correlated ground state molecular systems.
[0075] 3.3 Lack of transferability of small molecule system models to macromolecular systems
[0076] Most models lack transferability and predictability across molecular sizes. Generally speaking, most methods can produce highly accurate machine learning models for a dataset of a specific molecular size, but these models often suffer a significant loss in accuracy when predicting larger molecular systems.
[0077] 4. Advantages of the technical solution provided in the embodiments of this application
[0078] The technical solution provided in the embodiment of this application proposes an efficient and general machine learning method based on quantum representation (belonging to the second category of methods), such as Figure 3 As shown in sub-figure c of , it can be called a quantum operator-based machine learning (OBML) method. This method uses the matrix of quantum operators and the possible matrix operation results as input information and the summed Gaussian process as a machine learning fitting algorithm to provide an efficient, accurate, universal and transferable method for predicting the energy of general molecules. The technical solution provided in the embodiment of the present application has the following three significant features:
[0079] 4.1 Compatibility: Adapting small data customized models and big data general models
[0080] The technical solution provided in the embodiments of this application currently uses Gaussian processes as a machine learning algorithm. As an extremely precise machine learning method, Gaussian processes typically require very little data to achieve relatively high accuracy compared to neural networks. This provides users with the possibility of targeted local modeling using small amounts of data. Regarding big data models, although OBML is a brand-new technology and its current machine learning framework is still based on traditional Gaussian process regression, it already has the ability to learn from big data.
[0081] 4.2 Universality: Universal input and output with various target accuracies, adapting to a wider range of application scenarios
[0082] The technical solutions provided by the embodiments of this application can support any reasonable self-consistent field theory calculation information as input, and as long as the data of a reasonable ground state high-precision wave function theory is trained, an OBML model of corresponding accuracy can be obtained. There are no strict requirements for the input-end theory and the output-end theory. The technical solutions provided by the embodiments of this application can predict the results of high-precision quantum simulation theory and can also select appropriate input and output theories for problems in different chemical fields, thus adapting to a wider range of application scenarios.
[0083] 4.3 Transferability: Small molecule system models can also accurately predict the molecular energy of large molecule systems without directly including training data of large molecule systems.
[0084] The embodiments of this application can be used to improve the computational efficiency of various traditional quantum chemistry simulation problems and provide energy predictions for systems that are not computationally feasible using traditional quantum simulation methods. These traditional problems include high-precision single-molecule ground-state energy calculations, providing high-precision potential energy surfaces for efficient molecular dynamics simulations, and constructing a universal molecular energy prediction model for multiple molecules.
[0085] 1. High-precision single-molecule ground state energy calculation
[0086] Strong correlations exist in many practically valuable chemical systems, such as organometallic catalysts, materials, and superconductors. However, theoretical chemical calculations on strongly correlated systems are extremely challenging. First, calculations on strongly correlated systems require high precision. Since most of the highly correlated systems with practical applications require high-precision theoretical calculations and are also very large, it is impossible to calculate a practically meaningful system without making any approximations. Figure 4 The computational cost of using different exact wave function methods and approximate algorithms to calculate a catalyst in a small system is shown. Figure 4 Sub-figure a shows the time (in seconds) required for various high-precision wave function methods to calculate the N2 molecule. The five methods listed are all coupled cluster methods. The higher the number of excitations considered, the more accurate the energy of the molecule predicted by this method. They are S (singles), D (doubles), T (triples), Q (quadraples), P (pentaples), and H (hexaples). Figure 4 Subgraph b shows the time required to compute a small portion of Photosystem II using a low-complexity approximate algorithm. OBML requires only very inexpensive self-consistent field theory as input to achieve the same accuracy as exact wave function methods. Furthermore, by training on small systems with similar properties, models can be derived that are equally applicable to large systems. In this way, OBML can achieve computational speedups exceeding 1,000 times, making computations impossible with traditional methods possible.
[0087] 2. High-precision potential energy surface
[0088] Figure 5Figure 30 shows a potential energy surface for a simple reaction. In quantum simulation, molecular dynamics is an excellent tool for studying reaction mechanisms and processes. However, because molecular dynamics requires calculating the energy of millions of single-point systems during its process, the energy calculations used in molecular dynamics usually cannot achieve high accuracy within a reasonable computational time. At the same time, because the shapes of these potential energy surfaces are too complex, simple function fitting usually does not achieve good results or requires a large number of reference calculations. Because OBML can use semi-empirical self-consistent field theory as input information, the energy calculation speed of OBML is close to that of the potential energy surfaces used in traditional molecular dynamics, but OBML can provide more accurate energy, thereby improving the accuracy of the entire molecular dynamics simulation and ultimately achieving a more accurate description of the entire reaction mechanism.
[0089] 3. Multi-molecule universal molecular energy prediction model
[0090] Universal molecular property prediction models have been a hot topic in the field of electronic structure machine learning. By simultaneously training a variety of different molecules, rather than just training different configurations of the same molecule, a universal molecular energy prediction model can be constructed. By training on molecular energy data from different wave function theories, we can also construct molecular energy prediction models with the same target accuracy based on different wave function theories. Such a universal multi-molecule molecular energy prediction model can predict a wide range of different molecular energies in a variety of scenarios.
[0091] Therefore, in order to use machine learning methods to assist quantum chemical simulation calculations, the technical solution provided in the embodiment of the present application proposes an efficient, accurate and portable molecular energy model construction strategy. By using the various quantum operators and related operator operations that describe the properties of single electrons and double electrons provided by the low-precision self-consistent field method as input information, combined with the additive Gaussian process regression algorithm, the energy data of the high-precision wave function method is trained to obtain an accurate and physically meaningful high-precision molecular energy model. The technical solution provided in the embodiment of the present application aims to bring the computing power and accuracy of computational quantum chemistry based on machine learning to a new level, while the cost is significantly lower than that of traditional quantum simulation. In the technical solution provided in the embodiment of the present application, a variety of benchmark databases for different applications were tested for the common scenario of the ground state energy of molecular systems, and a systematic comparison was made with other state-of-the-art machine learning solutions to illustrate the advantages of the technical solution provided in the embodiment of the present application in terms of computing time and accuracy.
[0092] The technical solution that the embodiment of the present application provides is applied to the field of quantum chemistry. Meanwhile, the technical solution that the application provides can be applied to the energy prediction of any molecule, that is, the molecule mentioned in the technical solution that the embodiment of the present application provides can be any one or more of the existing molecules, or any one or more of the new molecules discovered in the future, and the specific molecular name or molecular type are not limited in this application. In certain embodiments, the molecule can be a ground state molecule (that is, the atoms constituting the molecule are ground state atoms), or it can be an excited state molecule (that is, the atoms constituting the molecule are excited state atoms). In certain embodiments, the molecule can be a macromolecule or a polymer, or it can be a small molecule. Alternatively, the molecule includes water molecules, carbon dioxide molecules, hydrogen molecules, etc.
[0093] Please refer to Figure 6 , which shows a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application. The implementation environment of the solution may include: a terminal device 100 and a server 200.
[0094] The terminal device 100 includes, but is not limited to, mobile phones, tablet computers, intelligent voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs (Personal Computers), vehicle-mounted terminals, smart home appliances, and other electronic devices. The client of the target application can be installed in the terminal device 100.
[0095] In the embodiment of the present application, the target application can be any application that provides molecular energy prediction, and specifically can be a quantum chemistry application, a virtual reality (VR) application, an augmented reality (AR) application, etc., which is not limited in the embodiment of the present application. Optionally, a client of the above application is running in the terminal device 100.
[0096] The server 200 is used to provide background services for the client of the target application in the terminal device 100. For example, the server 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited thereto.
[0097] The terminal device 100 and the server 200 can communicate with each other via a network, which can be a wired network or a wireless network.
[0098] The method provided in the embodiment of the present application may be performed by a computer device. The computer device may be any electronic device with data storage and processing capabilities. For example, the computer device may be Figure 6 The server 200 in the example may be Figure 6 The terminal device 100 in the example may also be another device other than the terminal device 100 and the server 200.
[0099] Please refer to Figure 7 , which shows a flow chart of a method for predicting molecular energy provided by an embodiment of the present application. The execution subject of each step of the method can be Figure 6 The terminal device 100 in the implementation environment of the solution shown can also be Figure 6 The server 200 in the implementation environment of the solution shown. In the following method embodiment, for ease of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (320-360):
[0100] Step 320: Using a first calculation method, obtain a first predicted energy of the molecule to be predicted and a quantum operator of the molecule to be predicted. The quantum operator of the molecule to be predicted is used to describe a wave function of the molecule to be predicted.
[0101] In some embodiments, step 320 includes step 320 - 2 (not shown).
[0102] Step 320 - 2 : Using any self-consistent field theory method, obtain a first predicted energy of the molecule to be predicted and a quantum operator of the molecule to be predicted.
[0103] In some embodiments, the HF method, a self-consistent field theory method, is used to obtain the first predicted energy of the molecule to be predicted, as well as the quantum operator of the molecule to be predicted. The first step is to estimate the wave function and the estimated linear combination coefficients of the basis functions in the molecular orbital. The second step is to estimate the electron density and calculate the density matrix; the third step is to calculate the interaction terms and the Focke matrix elements; the fourth step is to obtain an improved estimate, diagonalize the Focke matrix to obtain the eigenvalues and eigenvectors, as estimates of the new linear combination coefficients of the basis functions and return to the first step. The embodiment of the present application does not limit the specific form of the first calculation method, and any algorithm that can calculate the energy of a molecule can be considered as the first calculation method in the embodiment of the present application.
[0104] In some embodiments, the quantum operator may be expressed in at least one of the following forms: a structural operator, an atomic orbital operator, or a molecular orbital operator; the structural operator is determined based on the structure of the molecule to be predicted; the atomic orbital operator is determined based on the atomic orbital expression of the molecule to be predicted; and the molecular orbital operator is determined based on the molecular orbital expression of the molecule to be predicted. This application does not limit the specific expression of the operator.
[0105] In some embodiments, the type of quantum operator includes at least one of the following: overlap operator, kinetic energy operator, nuclear potential energy operator, density operator, Coulomb operator, exchange operator, Fokker operator. This application does not limit the type of operator.
[0106] In the technical solution provided in the embodiment of the present application, molecular characterization is not directly constructed, but an attempt is made to construct a sum kernel function of molecular characterization. The input end of its kernel function is constructed by single-electron and double-electron quantum operators under the molecular or atomic orbital basis set. The operators available include overlap (S), kinetic energy (T), nuclear potential energy (V), density (D), Coulomb (J), exchange (K) and Fock (F) operators. For any two electrons p and q of a molecule, the corresponding electronic operator is defined as:
[0107] S pq =<φ p |φ q >
[0108]
[0109]
[0110]
[0111] J pq =<pq|pq>
[0112] K pq =<pq|qp>
[0113]
[0114] Here φ is an atomic or molecular orbital, a + and a are the orbital creation and annihilation operators, Ψ0 is the Hartree-Fock (HF) ground state, <φ i φ j |φ k φ l > is the two-electron integral, h p is the Hamiltonian operator of a single electron, n is the number of electrons, m is the mass of the electron, p is the kinetic energy operator, r is the distance between q and p, R i is the distance from the ith electron to the nucleus.
[0115] In some embodiments, Coulomb, exchange, and Fock operators are used. In order to better describe the decay trend of long-range interactions, the Coulomb operator matrix itself is replaced by the cubic of the Coulomb operator matrix elements. In some embodiments, in the molecular orbital basis set, Boys localized molecular orbitals can be used instead of canonical molecular orbitals to obtain better migration capabilities of machine learning models. In some embodiments, in the atomic orbital basis set, symmetry-matched atomic orbitals (SAAO, |φ SAAO >) to eliminate the arbitrariness caused by the rotational covariance of the high angular momentum orbit. This application does not limit the specific orbital form, and other better orbits can also be used to optimize subsequent calculation results.
[0116] In some embodiments, there are many different theoretical options for molecular and atomic orbital generation methods. Figure 8 , which shows a block diagram of a method for obtaining operator information provided by an embodiment of the present application. Figure 8 As shown in block diagram 80, structural operators can be obtained directly before SCF calculations (e.g., the HF method). The HF method can be used to obtain low-precision SCF molecular energies and extract the atomic orbital representation of the wave function. The atomic orbitals can then be further transformed into molecular orbitals through matrix transformations. Operators such as D, F, J, and K can be derived from atomic orbitals or molecular orbitals, thus yielding molecular orbital operators or atomic orbital operators.
[0117] Step 340: predicting energy information based on the quantum operator of the molecule to be predicted using a molecular energy prediction model; wherein the molecular energy prediction model is a machine learning model for predicting energy information.
[0118] In some embodiments, the molecular energy prediction model includes an additive kernel function based on a Gaussian process, where the additive kernel function refers to the sum of at least two kernel functions related to two molecules, each kernel function being constructed based on an orbital pair in one molecule and an orbital pair in the other molecule.
[0119] In some embodiments, step 340 includes steps 340 - 2 to 340 - 8 (not shown in the figure).
[0120] Step 340-2: For each kernel function in the sum kernel function, obtain a first operator element from the quantum operator of the molecule to be predicted, and obtain a second operator element from the quantum operator of the sample molecule; wherein the first operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the molecule to be predicted, and the second operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the sample molecule.
[0121] In some embodiments, the kernel function is constructed based on an atomic orbital pair in one molecule and an atomic orbital pair in another molecule; or, the kernel function is constructed based on a molecular orbital pair in one molecule and a molecular orbital pair in another molecule.
[0122] In some embodiments, the kernel function is the product of at least two basic kernel functions, and different basic kernel functions are constructed for the same set of track pairs based on different kernel function algorithms.
[0123] Step 340 - 4 : Calculate the kernel function result based on the first operator element and the second operator element.
[0124] Step 340 - 6 , summing up the calculation results of each kernel function in the sum kernel function to obtain the calculation result of the sum kernel function.
[0125] Step 340-8: Obtain energy information based on the calculation result of the sum kernel function.
[0126] In some embodiments, the number of sample molecules is L.
[0127] In some embodiments, step 340 - 8 may also be to determine the energy information based on the calculation result of the sum kernel function of the L sample molecules.
[0128] The specific construction of the kernel function is described in the embodiment of the molecular energy prediction model training method below, which will not be repeated here. After the parameters (v, l) of the sum kernel function are determined by the molecular energy prediction model training method, the molecular energy prediction model can be used to predict molecular energy.
[0129] In some embodiments, the Gaussian joint probability distribution of the molecule to be predicted X′ is given, and its mean is:
[0130]
[0131] here Where I is the identity matrix. Where X is the quantum operator of the sample molecule, and the number of sample molecules is at least two. A kernel function matrix K(X′,X) is constructed for the molecule to be predicted X′ and the sample molecule X. The kernel function is calculated for each molecule in the molecule to be predicted X′ and each molecule in the sample molecule X, and the resulting matrix is K(X′,X). In some embodiments, a kernel function matrix is constructed and summed for each molecule to be predicted and each sample molecule to obtain K(X,X). The mean of the joint probability distribution is determined as the energy information.
[0132] In some embodiments, if the number of sample molecules is L and the number of molecules to be predicted is M, where M is a positive integer, then for each molecule to be predicted, a kernel function needs to be constructed with each of the L sample molecules. Thus, for each of the M molecules to be predicted, there is a calculation result of the sum of the kernel functions with the L sample molecules. Therefore, the final calculated K(X′,X) based on the M molecules to be predicted and the L sample molecules is an M*L matrix. Since the sample molecule is L at this time, Is an L*L matrix, Y is the label value of L sample molecules, so Y is an L*1 matrix. The L*1 matrix Y is multiplied to finally obtain an M*1 matrix, where the M numbers in the matrix correspond to the energy information of the M molecules to be tested.
[0133] Step 360: Determine the final predicted energy of the molecule to be predicted based on the energy information.
[0134] In some embodiments, the energy information includes an energy difference value, where the energy difference value refers to a difference value relative to the first predicted energy. In some embodiments, step 360 includes step 360-2 (not shown in the figure).
[0135] Step 360 - 2 : Determine the final predicted energy according to the energy difference and the first predicted energy.
[0136] In some embodiments, after the construction of the sum kernel function is completed, according to the Gaussian process formula, if the sample molecule (more than 2 molecules, X is the quantum operator of the sample molecule of the training input, Y is the difference between the high-precision theoretical energy and the low-precision self-consistent field theory energy) (X = {M u}, Y = E diff ) can construct the above sum kernel function matrix K add For any molecule X' to be predicted, a Gaussian distribution with a mean μ equal to the energy difference Y' predicted by machine learning can be obtained. pred , and compare it with the low-precision self-consistent field theory molecular energy (E SCF ) are added together to obtain the high-precision theoretical molecular energy (E' high,pred ), when the model is accurate, it is consistent with the actual high-precision theoretical energy value (E' high,true ) is very close:
[0137]
[0138] E' high,pred =Y′ pred +E SCF
[0139] E' high,pred ≈E' high,true
[0140] In the embodiments of the present application, the number of molecules to be predicted is not limited in this application, and the molecular energy prediction model trained in the embodiments of the present application can predict the energy information of multiple molecules at one time.
[0141] refer to Figure 9 , which shows a block diagram of a method for predicting molecular energy provided by an embodiment of the present application. Figure 9 As shown, the method includes steps N1 to N5.
[0142] Step N1, directly obtain the molecular energy of any self-consistent field accuracy.
[0143] The energy of any molecule with self-consistent field accuracy is also the first predicted energy.
[0144] Step N2, directly obtain the quantum operator.
[0145] In step N4, the quantum operator is input into the machine learning algorithm.
[0146] That is, the quantum operators are input into the molecular energy prediction model.
[0147] Step N5: Machine learning predicts the difference between the high-precision theoretical molecular energy and the self-consistent field theory molecular energy.
[0148] That is, energy information is determined through a molecular energy prediction model.
[0149] The difference between the self-consistent field theory molecular energy and the high-precision theoretical molecular energy predicted by machine learning and the self-consistent field theory molecular energy is added to obtain the final predicted energy of the molecule to be predicted.
[0150] In some embodiments, the final predicted energy of the molecule to be predicted can be used to determine relevant information about the molecule. The relevant information can be used to solve problems related to the molecule. In some embodiments, the final predicted energy of the molecule to be predicted is used to determine the configuration of the molecule to be predicted; or, the final predicted energy of the molecule to be predicted is used to determine the reaction mechanism of the molecule to be predicted; or, the final predicted energy of the molecule to be predicted is used to determine the spectrum of the molecule to be predicted. The molecular energy predicted by the technical solution provided in the embodiments of the present application can be applied to any field of quantum computing that requires the participation of molecular energy in calculations. Therefore, the technical solution provided in the embodiments of the present application has strong practical significance.
[0151] The technical solution provided by the embodiment of the present application may include the following beneficial effects: a first predicted energy of the molecule to be predicted and a quantum operator of the molecule to be predicted are obtained by a first calculation method (a calculation method with lower cost), and the quantum operator is input into the molecular energy prediction model to obtain energy information about the molecule to be predicted. By adding the energy information to the first predicted energy, the final predicted energy of the molecule to be predicted can be determined, wherein the final predicted energy of the molecule to be predicted is more accurate than the first predicted energy. That is, the technical solution provided by the embodiment of the present application predicts the energy of the molecule by using the quantum operator of the molecule as input through the molecular energy prediction model. Since there are not many types of quantum operators and the types of quantum operators between different molecules are basically the same, the molecular energy prediction model has good portability and the molecular energy prediction method has good universal adaptability. At the same time, since the first energy to be measured is obtained by a calculation method of molecular energy with lower computational cost, the technical solution provided by the embodiment of the present application can achieve the prediction of molecular energy with higher accuracy at a lower computational cost.
[0152] Please refer to Figure 10 , which shows a flow chart of a method for training a molecular energy model provided by an embodiment of the present application. The execution subject of each step of the method can be Figure 6 The terminal device 100 in the implementation environment of the solution shown can also be Figure 6 The server 200 in the implementation environment of the solution shown. In the following method embodiment, for ease of description, only the execution subject of each step is introduced as a "computer device". The method can include at least one of the following steps (420-480):
[0153] Step 420: Use a first calculation method to obtain a first predicted energy of the sample molecule and a quantum operator of the sample molecule. The quantum operator of the sample molecule is used to describe a wave function of the sample molecule.
[0154] In some embodiments, the expression form of the quantum operator includes at least one of the following: a structural operator, an atomic orbital operator, and a molecular orbital operator; the structural operator is determined based on the structure of the molecule to be predicted; the atomic orbital operator is determined based on the atomic orbital expression form of the molecule to be predicted; and the molecular orbital operator is determined based on the molecular orbital expression form of the molecule to be predicted.
[0155] In some embodiments, the type of quantum operator includes at least one of the following: an overlap operator, a kinetic energy operator, a nuclear potential energy operator, a density operator, a Coulomb operator, an exchange operator, and a Fock operator.
[0156] In some embodiments, step 420 includes step 420 - 2 (not shown).
[0157] Step 420 - 2 : Use any self-consistent field theory method to obtain a first predicted energy of the sample molecule and a quantum operator of the sample molecule.
[0158] Step 440: A second predicted energy of the sample molecule is obtained using a second calculation method, wherein the energy prediction accuracy of the second calculation method is higher than the energy prediction accuracy of the first calculation method.
[0159] In some embodiments, the first predicted energy can be considered as low-precision self-consistent field theory energy, and the second predicted energy can be considered as high-precision theoretical energy.
[0160] The embodiment of the present application does not limit the specific type of the second calculation method, which may be a wave function theory method or other methods for predicting molecular energy that are more accurate than the wave function theory method.
[0161] Step 460 , predicting energy information based on the quantum operator of the sample molecule using a molecular energy prediction model; wherein the molecular energy prediction model is a machine learning model for predicting energy information.
[0162] In some embodiments, the molecular energy prediction model includes an additive kernel function based on a Gaussian process, where the additive kernel function refers to the sum of at least two kernel functions related to two molecules, each kernel function being constructed based on an orbital pair in one molecule and an orbital pair in the other molecule.
[0163] A Gaussian process can fit a nonlinear function in a high-dimensional feature space, and its behavior is specified by its kernel function (covariance function). The purpose of the kernel function is to describe the differences between molecules by calculating the covariance function matrix, so that the Gaussian process regression model has the property of directly predicting molecular energy.
[0164] In some embodiments, the kernel function is constructed based on an atomic orbital pair in one molecule and an atomic orbital pair in another molecule; or, the kernel function is constructed based on a molecular orbital pair in one molecule and a molecular orbital pair in another molecule.
[0165] In some embodiments, the kernel function is the product of at least two basic kernel functions, and different basic kernel functions are constructed for the same set of track pairs based on different kernel function algorithms.
[0166] In some embodiments, step 460 includes steps 460 - 2 to 460 - 8 (not shown in the figure).
[0167] Step 460-2: For each kernel function in the sum kernel function, obtain a first operator element from the quantum operator of the first sample molecule, and obtain a second operator element from the quantum operator of the second sample molecule; wherein the first operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the first sample molecule, and the second operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the second sample molecule.
[0168] Step 460 - 4 : Calculate the kernel function result based on the first operator element and the second operator element.
[0169] Step 460 - 6 , summing up the calculation results of each kernel function in the sum kernel function to obtain the calculation result of the sum kernel function.
[0170] Step 460-8: Obtain energy information based on the calculation result of the sum kernel function.
[0171] In some embodiments, for a determined series of operators {M u} = {F, J, K, S, …}. The sum kernel function is implemented through the following steps, where I and J represent molecules. I can be considered the first sample molecule and J the second sample molecule. p and q represent electrons in molecule I, each with its own atomic or molecular orbital. r and s represent electrons in molecule J, each with its own atomic or molecular orbital. The first and second sample molecules can be the same or different.
[0172] In some embodiments, each kernel function in the sum kernel function may be at least one or more of a radial basis function kernel, a linear kernel, and a product kernel.
[0173] In some embodiments, the first step is to calculate the basic kernel function k between the orbital pairs: construct the orbital pair (p, q) of molecule I (hereinafter referred to as Ipq) and the orbital pair (r, s) of molecule J (hereinafter referred to as Jrs) instead of directly constructing the kernel function formed between molecules. Optionally, a radial basis function kernel (RBF) is used as the basic kernel function k for the molecular or atomic orbital pair Ipq and Jrs. RBF :
[0174]
[0175] Among them, l is the parameter of the basic kernel function, Can be considered as an operator element.
[0176] Or you can consider using a linear kernel as the basic kernel function k linear :
[0177]
[0178] In the second step, after completing the first step, we further calculate the product kernel K of the above two kernel functions prod to describe the long-range interactions between orbital pairs:
[0179] K prod (Ipq,Jrs)=k RBF (Ipq,Jrs)k linear (Ipq,Jrs)
[0180] The third step is to sum the product kernel functions of all orbital pairs to calculate the sum kernel function of the molecule:
[0181]
[0182] In some embodiments, the number of sample molecules is L, where L is a positive integer greater than 1, the first sample molecule is any one of the L sample molecules, and the second sample molecule is any one of the L sample molecules.
[0183] Optionally, an additive kernel function may be constructed between any two sample molecules (which may be the same) in the sample molecules, and thus calculation results of L*L additive kernel functions may be obtained.
[0184] In some embodiments, K(X,X) represents the calculation result of the sum kernel function constructed based on the input feature X. When X represents the quantum operator of L sample molecules, K(X,X) represents an L*L matrix, where the value of each position in the matrix can be considered as the calculation result of the sum kernel function of one sample molecule and another sample molecule.
[0185] In some embodiments, step 460 - 8 may also be to obtain energy information corresponding to the L sample molecules respectively based on calculation results of L*L sum kernel functions determined by the first sample molecule and the second sample molecule among the L sample molecules.
[0186] In some embodiments, the output result for X can be determined based on K(X,X) and Y. When X represents the quantum operator of L sample molecules, K(X,X) is an L*L matrix. Since the sample molecule is L at this time, Is an L*L matrix, Y is the label value of L sample molecules, so Y is an L*1 matrix. Multiplying the L*1 matrix Y, we finally get an L*1 matrix. The L numbers in the matrix correspond to the energy information corresponding to the L sample molecules.
[0187] Step 480: Adjust the parameters of the molecular energy prediction model according to the energy information, the first predicted energy, and the second predicted energy.
[0188] In some embodiments, the energy information includes an energy difference value, where the energy difference value refers to a difference value relative to the first predicted energy.
[0189] In some embodiments, step 480 includes steps 480 - 2 to 480 - 6 (not shown).
[0190] Step 480 - 2 , calculating the difference between the second predicted energy and the first predicted energy to obtain a difference result.
[0191] Step 480 - 4 , determining the loss function value of the molecular energy prediction model based on the difference result and the energy difference.
[0192] In some embodiments, the difference between the second predicted energy and the first predicted energy is calculated as Y, which is the label Y involved in the training and the difference between the high-precision theoretical molecular energy and the low-precision self-consistent field theoretical molecular energy.
[0193] In some embodiments, the difference between the predicted energy difference and the difference result as the label is the loss function value of the molecular energy prediction model. In some embodiments, the loss function value is the negative log marginal likelihood (-L θ ), by minimizing -L θ to adjust the parameters of the model.
[0194] Step 480-6, adjusting the parameters of the molecular energy prediction model with the goal of minimizing the loss function value.
[0195] In some embodiments, the Gaussian process is a non-parametric kernel function-based machine learning method. Assume that the output label Y is a random variable that follows a Gaussian distribution. For the training feature input X and its corresponding label Y, the variance Gaussian noise, and covariance function (or kernel function) K, which for any input feature X′, gives the prediction f(X′) as a Gaussian joint probability distribution with mean μ and variance σ 2 for:
[0196]
[0197]
[0198] here Where I is the identity matrix. The kernel function K of the Gaussian process can usually be parameterized as K θ , the θ parameter set contains the variance (variance, v / Var) and lengthscale (a parameter of the kernel function, l) of the kernel function (θ={v,l}), θ can be minimized by -L θ get:
[0199]
[0200] Among them, Y T Represents the transpose of Y, N represents the number of data participating in the training, in the embodiment of the present application, X represents the quantum operator of the sample molecule participating in the training, and Y represents the difference between the second predicted energy and the first predicted energy of the sample molecule.
[0201] In other embodiments, the parameters can be adjusted by setting the number of model training times or by setting the difference between the output results of any two consecutive models to be less than a threshold. Optionally, the number of model training times is set to 100, and after 100 training times, the model parameters are considered to have been trained. Optionally, the threshold is 0.01, and when the difference between the training result of the model and the training result of the previous model is less than 0.01, the model is considered to have been trained.
[0202] In some embodiments, the L-BFGS algorithm may be used to optimize the parameters. The specific optimization method is not limited in this application.
[0203] Figure 9 The training process of the molecular energy prediction model provided by an embodiment of the present application is also shown, and the steps are as follows.
[0204] Step N1, directly obtain the molecular energy of any self-consistent field accuracy.
[0205] The energy of any molecule with self-consistent field accuracy is also the first predicted energy.
[0206] Step N2, directly obtain the quantum operator.
[0207] Step N3: Obtain the difference between the high-precision theoretical molecular energy and the self-consistent field theory molecular energy, and use it as a label to train the molecular prediction model.
[0208] In step N4, the quantum operator is input into the machine learning algorithm.
[0209] The molecular energy prediction model can be trained by using quantum operators as input features and the difference between high-precision theoretical molecular energy and self-consistent field theory molecular energy as labels.
[0210] That is, quantum operators with the accuracy of self-consistent field theory are used to characterize the construction of the corresponding kernel function, and the difference between the high-precision theoretical molecular energy and the self-consistent field theory molecular energy is used as training data. They are input into the summed Gaussian process for training, and finally a machine learning model that can predict the difference between the high-precision theoretical molecular energy and the self-consistent field theory molecular energy is obtained, which is the molecular energy prediction model in the embodiment of the present application.
[0211] In order to use machine learning methods to assist quantum chemical simulation calculations, the technical solution provided in the embodiments of this application proposes an efficient, accurate and portable molecular energy model construction strategy. By using the various quantum operators and related operator operations provided by the low-precision self-consistent field method to describe the properties of single electrons and double electrons as input information, combined with the additive Gaussian process regression algorithm, the energy data of the high-precision wave function method is trained to obtain an accurate and physically meaningful high-precision molecular energy prediction model. The technical solution provided in the embodiments of this application can bring the computing power and accuracy of computational quantum chemistry based on machine learning to a new level, and the cost is significantly lower than traditional quantum simulation.
[0212] The technical solution provided in the embodiments of this application can be deployed on a server equipped with a Linux operating system or a Windows operating system and CPU (Central Processing Unit) / GPU (Graphics Processing Unit) computing resources based on the Python language and the Cupy library. In this solution, we propose a machine learning framework that can directly use quantum operators obtained from self-consistent field theory calculations as information. The complexity of the algorithm of the technical solution provided in the embodiments of this application is described as follows:
[0213] Table 1 compares the algorithmic complexity of OBML and the literature method MOB-ML in the machine learning part. Although both methods require the use of quantum information to construct the kernel function, that is, the computational cost of constructing the kernel function is similar, the bottleneck step in the operation process is the inversion of the kernel function. Since each molecule has many pairs of molecular orbital combinations (for example, an organic compound with 7 heavy atoms has more than 200 molecular orbital combinations), N pair (Number of paired molecular orbital combinations) is much larger than N mol For organic compounds with 7 heavy atoms, N pair 200~300, N mol 1. Therefore, from a design perspective, OBML can train larger datasets than MOB-ML. Future improvements within the OBML framework will enable OBML to train larger and larger datasets.
[0214] Table 1 Comparison of the complexity of machine learning algorithms between MOB-ML and OBML
[0215]
[0216] In order to verify the effectiveness of the proposed solution, the technical solution provided in the embodiments of this application was tested on general data sets with different theoretical and practical values: (1) multi-reference electronic structure calculation energy prediction of strongly correlated systems; (2) different high-precision theoretical calculation predictions of different free radical small molecules (open-shell systems); (3) multi-molecule universal energy model prediction on a large standard organic compound data set.
[0217] (1) Energy prediction of multi-reference electronic structure calculations for strongly correlated systems
[0218] Figure 11 A schematic diagram of the prediction results of electronic structure energy is shown in the figure, specifically the prediction results of high-precision multi-reference electronic structure energy calculation (MRCI+Q-F12) of a traditional strongly correlated system. The accuracy of the model is represented by the mean absolute error (MAE), and the smaller the value, the more accurate it is. Generally, DFT cannot accurately perform calculations on such problems. OBML represents the technical solution provided in the embodiment of the present application, MO (molecular orbital) or AO (atomic orbital) represents two common input expressions, HF / cc-pVTZ-F12, HF / STO-3G and GFN0-xTB represent three self-consistent field theory input terminals with different accuracy levels. The model calculation cost increases gradually from bottom to top. The test data set is the same, and it includes 9 randomly selected H 10Results for molecules. All different input combinations yield highly accurate machine learning models. This demonstrates the universality and accuracy of OBML. From the bottom to the top of the image, the computational cost of the input increases. Since MOB-ML only accepts MO inputs from the same basis set, only one set of results is available. While the HF / cc-pVTZ-F12 self-consistent field theory input is the most expensive, it also offers the highest accuracy, which aligns with our physical intuition. For AO input, small-basis-set self-consistent field theory inputs, such as HF / STO-3G and the semi-empirical GFN0-xTB, are more suitable. For AO, GFN0-Xtb (0.001s), while costing significantly less than HF / STO-3G (0.1s), yields results of similar accuracy, demonstrating that GFN0-xTB, while a semi-empirical theory, can provide input data with sufficient physical information. Furthermore, while AO and MO can be converted through certain computations, MO is generally considered to have superior physical properties. For the same basis set and input self-consistent field theory, the MO representation can obtain slightly better results compared with the AO representation.
[0219] (2) Different high-precision theoretical calculation predictions of different free radical small molecules (open-shell systems)
[0220] Calculations of free radical molecules also present challenges for traditional quantum simulation and machine learning of electronic structure. Many existing machine learning methods cannot efficiently and accurately predict the molecular energies of open-shell systems. For high-precision theoretical calculations, there are two commonly used wave function generation self-consistent field theory inputs: the restricted open-shell HF (Restricted Open-Shell Hartree-Fock, ROHF) method and the unrestricted HF (Unrestricted Hartree-Fock, UHF) method. Table 2 shows the results of using OBML for open-shell systems. Accuracy is expressed as MAE (the smaller the better), expressed in kcal / mol, and compared with the results obtained by the MOB-ML method. The test data sets all consist of 100 randomly selected corresponding molecular configurations. With the exception of the Hydroxyl radical, which was trained on only 10 molecular energies, the other three radicals were trained on 80 molecular energy data.
[0221] On the one hand, OBML can provide more diverse input theories and use different wave function representations on the input side. MOB-ML can only use ROHF and molecular orbital representations for prediction, but OBML can use ROHF or UHF as input theories and can also use atomic and molecular orbital representations. On the other hand, on the output side, given the same input and training size, such as ROHF / cc-pVTZ and MO, OBML can generally provide more accurate predicted energies than MOB-ML. For the two high-precision theories LUCCSD / cc-pVTZ and MRCI+Q / cc-pVTZ, OBML achieved better prediction accuracy on the three other free radical molecules except carbene.
[0222] Table 2 Different accuracies obtained by MOB-ML and OBML using different types of input SCF on four different radical molecules
[0223]
[0224]
[0225] (3) Prediction of a multi-molecule universal energy model on a large standard organic compound dataset
[0226] (1) and (2) are potential energy surface fittings of two single molecules. Although they are relatively challenging systems, they are still relatively simple machine learning problems. In this application scenario, we can continue to explore the performance of OBML in standard large data sets of organic compounds. The data sets used are QM7b-T and GDB-13-T, which have also appeared in different literatures for testing. The two data sets include molecules with 7 heavy atoms and 13 heavy atoms of C, N, O, S, and Cl, respectively, and the data sets include not only the optimal structure but also some thermodynamically reasonable structures. The best MOB-ML implementation requires some other high-precision theoretical calculation label information, that is, the energy corresponding to each pair of molecular orbital combinations is required, not just the total molecular energy. By adding Gaussian processes, MOB-ML can also avoid the need for a lot of further calculation information and can directly predict molecular energy.
[0227] The technical solution provided in the embodiments of the present application is tested on benchmark databases of various applications for the common scenario of the ground state energy of molecular systems, and is systematically compared with other most advanced machine learning solutions, illustrating the advantages of the technical solution provided in the embodiments of the present application in terms of computing time and accuracy.
[0228] Figure 12A schematic diagram of the prediction results of a standardized data set of multiple molecules is shown, including the results of the QML (Quantum Machine Learning) method, the MOB-ML method, and the technical solution (OBML) provided in the embodiments of the present application. The lower the value, the closer the model prediction is to the true value, and the higher the model accuracy. It can be seen that the technical solution provided in the embodiments of the present application can provide better accuracy than QML and MOB-ML. Figure 12 OBML was compared with two other machine learning methods of similar computational cost, and model accuracy was evaluated using Mean Average Equation (MAE). All machine learning methods achieved improved prediction accuracy with increasing training data. Figure (a) shows predictions for QM7b-T using a model trained on QM7b-T data. OBML's performance on large datasets still lags slightly behind the best MOB-ML approach. However, when focusing on predictions for large molecules using a model trained on small molecule data, the accuracy difference between OBML and the best MOB-ML approach is relatively small, and OBML performs better than MOB-ML trained using an additive Gaussian process. This demonstrates that OBML's small-molecule model is more transferable to large molecules than MOB-ML. Overall, OBML outperforms the QML (MO) approach in terms of accuracy and transferability. Furthermore, Figure (c) shows that the errors in the relative potential energy surface for large molecules between OBML and the best MOB-ML training method are very similar to the errors in the absolute energy in Figure (b), but the error is significantly reduced using MOB-ML trained using an additive Gaussian process. This indicates that the transferability loss of the additive Gaussian process based on MOB-ML is high, likely due to the lack of some representational information. Furthermore, the OBML error values in sub-images b and c are nearly identical, demonstrating that OBML meets our assumptions and requirements, and the error between the predicted results and the true value is nearly Gaussian.
[0229] While OBML still lags behind the best MOB-ML implementations, which require training for every pair of molecular orbital energies, its current results demonstrate its excellent transferability and potential for further improvement in model accuracy. Specific solutions may include improvements in kernel function representation design and machine learning algorithms.
[0230] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0231] Please refer to Figure 13, which shows a block diagram of a molecular energy prediction device provided by an embodiment of the present application. The device has the function of implementing the above method example, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the computer device described above, or it can be set in a computer device. Figure 13 As shown, the device 1300 may include: a first energy prediction module 1310 , a second energy prediction module 1320 and an energy determination module 1330 .
[0232] The first energy prediction module 1310 is configured to obtain a first predicted energy of the molecule to be predicted and a quantum operator of the molecule to be predicted using a first calculation method, wherein the quantum operator of the molecule to be predicted is used to describe a wave function of the molecule to be predicted.
[0233] The second energy prediction module 1320 is used to predict energy information based on the quantum operator of the molecule to be predicted using a molecular energy prediction model; wherein the molecular energy prediction model is a machine learning model used to predict the energy information.
[0234] The energy determination module 1330 is configured to determine the final predicted energy of the molecule to be predicted based on the energy information.
[0235] In some embodiments, the molecular energy prediction model includes an additive kernel function based on a Gaussian process, wherein the additive kernel function refers to the sum of at least two kernel functions related to two molecules, each kernel function being constructed based on an orbital pair in one molecule and an orbital pair in another molecule.
[0236] In some embodiments, as Figure 14 As shown, the second energy prediction module 1320 includes a first operator acquisition unit 1322 , a first kernel function calculation unit 1324 and a first energy prediction unit 1326 .
[0237] The first operator acquisition unit 1322 is used to obtain a first operator element from the quantum operator of the molecule to be predicted and a second operator element from the quantum operator of the sample molecule for each kernel function in the sum kernel function; wherein the first operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the molecule to be predicted, and the second operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the sample molecule.
[0238] The first kernel function calculation unit 1324 is configured to calculate a calculation result of the kernel function according to the first operator element and the second operator element.
[0239] The first kernel function calculation unit 1324 is further configured to sum the calculation results of the kernel functions in the sum kernel function to obtain the calculation result of the sum kernel function.
[0240] The first energy prediction unit 1326 is configured to obtain the energy information according to a calculation result of the sum kernel function.
[0241] In some embodiments, the number of the sample molecules is L, where L is a positive integer greater than 1.
[0242] The first energy prediction unit 1326 is configured to determine the energy information according to a calculation result of the sum kernel function of the L sample molecules.
[0243] In some embodiments, the kernel function is constructed based on an atomic orbital pair in one molecule and an atomic orbital pair in another molecule; or, the kernel function is constructed based on a molecular orbital pair in one molecule and a molecular orbital pair in another molecule.
[0244] In some embodiments, the kernel function is the product of at least two basic kernel functions, and different basic kernel functions are constructed for the same set of track pairs based on different kernel function algorithms.
[0245] In some embodiments, the energy information includes an energy difference value, where the energy difference value refers to a difference value relative to the first predicted energy.
[0246] In some embodiments, the energy determination module 1330 is configured to determine the final predicted energy based on the energy difference and the first predicted energy.
[0247] In some embodiments, the first energy prediction module 1310 is configured to obtain the first predicted energy of the molecule to be predicted and the quantum operator of the molecule to be predicted by using any self-consistent field theory method.
[0248] In some embodiments, the expression form of the quantum operator includes at least one of the following: a structural operator, an atomic orbital operator, and a molecular orbital operator; the structural operator is determined based on the structure of the molecule to be predicted; the atomic orbital operator is determined based on the atomic orbital expression form of the molecule to be predicted; and the molecular orbital operator is determined based on the molecular orbital expression form of the molecule to be predicted.
[0249] In some embodiments, the type of quantum operator includes at least one of the following: overlap operator, kinetic energy operator, nuclear potential energy operator, density operator, Coulomb operator, exchange operator, and Fock operator.
[0250] In some embodiments, the final predicted energy of the molecule to be predicted is used to determine the configuration of the molecule to be predicted; or, the final predicted energy of the molecule to be predicted is used to determine the reaction mechanism of the molecule to be predicted; or, the final predicted energy of the molecule to be predicted is used to determine the spectrum of the molecule to be predicted.
[0251] Please refer to Figure 15 , which shows a block diagram of a training device for a molecular energy prediction model provided by an embodiment of the present application. The device has the function of implementing the above method example, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the computer device described above, or it can be set in a computer device. Figure 15 As shown, the device 1500 may include: a third energy prediction module 1510 , a fourth energy prediction module 1520 , a fifth energy prediction module 1530 and a parameter adjustment module 1540 .
[0252] The third energy prediction module 1510 is configured to obtain a first predicted energy of a sample molecule and a quantum operator of the sample molecule using a first calculation method, where the quantum operator of the sample molecule is used to describe a wave function of the sample molecule.
[0253] The fourth energy prediction module 1520 is configured to obtain a second predicted energy of the sample molecule using a second calculation method, wherein the energy prediction accuracy of the second calculation method is higher than that of the first calculation method.
[0254] The fifth energy prediction module 1530 is used to predict energy information based on the quantum operator of the sample molecule using a molecular energy prediction model; wherein the molecular energy prediction model is a machine learning model used to predict the energy information.
[0255] The parameter adjustment module 1540 is configured to adjust the parameters of the molecular energy prediction model according to the energy information, the first predicted energy, and the second predicted energy.
[0256] In some embodiments, the molecular energy prediction model includes an additive kernel function based on a Gaussian process, wherein the additive kernel function refers to the sum of at least two kernel functions related to two molecules, each kernel function being constructed based on an orbital pair in one molecule and an orbital pair in another molecule.
[0257] In some embodiments, as Figure 16 As shown, the fifth energy prediction module 1530 includes a second operator acquisition unit 1532 , a second kernel function calculation unit 1534 and a second energy prediction unit 1536 .
[0258] The second operator acquisition unit 1532 is configured to acquire, for each kernel function in the sum kernel function, a first operator element from the quantum operator of the first sample molecule and a second operator element from the quantum operator of the second sample molecule; wherein the first operator element refers to an operator element of an orbital pair associated with the kernel function in the quantum operator of the first sample molecule, and the second operator element refers to an operator element of an orbital pair associated with the kernel function in the quantum operator of the second sample molecule; wherein the first sample molecule and the second sample molecule are the same or different sample molecules.
[0259] The second kernel function calculation unit 1534 is configured to calculate a calculation result of the kernel function according to the first operator element and the second operator element.
[0260] The second kernel function calculation unit 1534 is further configured to sum the calculation results of the kernel functions in the sum kernel function to obtain the calculation result of the sum kernel function.
[0261] The second energy prediction unit 1536 is configured to obtain the energy information according to a calculation result of the sum kernel function.
[0262] In some embodiments, the number of the sample molecules is L, the first sample molecule is any one of the L sample molecules, where L is a positive integer greater than 1, and the second sample molecule is any one of the L sample molecules.
[0263] The second energy prediction unit 1536 is configured to obtain energy information corresponding to each of the L sample molecules according to calculation results of the L*L sum kernel functions determined by the first sample molecule and the second sample molecule among the L sample molecules.
[0264] In some embodiments, the energy information includes an energy difference value, where the energy difference value refers to a difference value relative to the first predicted energy.
[0265] The parameter adjustment module 1540 is configured to calculate a difference between the second predicted energy and the first predicted energy to obtain a difference result.
[0266] The parameter adjustment module 1540 is used to determine the loss function value of the molecular energy prediction model according to the difference result and the energy difference.
[0267] The parameter adjustment module 1540 is used to adjust the parameters of the molecular energy prediction model with the goal of minimizing the loss function value.
[0268] In some embodiments, the third energy prediction module 1510 is configured to obtain the first predicted energy of the sample molecule and the quantum operator of the sample molecule by using any self-consistent field theory method.
[0269] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0270] Figure 17 A structural block diagram of a computer device provided by an exemplary embodiment of the present application is shown.
[0271] Typically, the computer device 1700 includes a processor 1701 and a memory 1702 .
[0272] The processor 1701 may include one or more processing cores, such as a 4-core processor, a 17-core processor, and the like. The processor 1701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU; the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1701 may be integrated with a GPU, which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1701 may also include an AI (Artificial Intelligence, referred to as AI) processor, which is used to process computing operations related to machine learning.
[0273] Memory 1702 may include one or more computer-readable storage media, which may be tangible and non-transitory. Memory 1702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1702 stores a computer program, which is loaded and executed by processor 1701 to implement the glue defect determination methods provided in the above-described method embodiments.
[0274] Those skilled in the art will understand that Figure 17 The structure shown in the figure does not constitute a limitation on the computer device 1700, and the computer device 1700 may include more or fewer components than shown in the figure, or combine some components, or adopt a different component arrangement.
[0275] In an exemplary embodiment, a computer-readable storage medium is further provided, wherein a computer program is stored in the storage medium. When the computer program is executed by a processor, the method for exploiting vulnerabilities in an application program is implemented.
[0276] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or an optical disk, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0277] In an exemplary embodiment, a computer program product is also provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned application vulnerability discovery method.
[0278] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application do not limit this.
[0279] The above description is merely an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for predicting molecular energy, characterized in that: The method comprises: Using a first calculation method to obtain a first predicted energy of a molecule to be predicted and a quantum operator of the molecule to be predicted, wherein the quantum operator of the molecule to be predicted is used to describe a wave function of the molecule to be predicted; For each kernel function in the sum kernel function based on the Gaussian process, a first operator element is obtained from the quantum operator of the molecule to be predicted, and a second operator element is obtained from the quantum operator of the sample molecule; wherein the sum kernel function refers to the sum of at least two kernel functions associated with two molecules, each kernel function is constructed based on an orbital pair in one molecule and an orbital pair in the other molecule, the first operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the molecule to be predicted, and the second operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the sample molecule; Calculating a calculation result of the kernel function according to the first operator element and the second operator element; Adding the calculation results of each kernel function in the sum kernel function to obtain the calculation result of the sum kernel function; Obtaining energy information according to the calculation result of the sum kernel function; The final predicted energy of the molecule to be predicted is determined according to the energy information.
2. The method according to claim 1, characterized in that The number of sample molecules is L, where L is a positive integer greater than 1. The energy information is obtained according to the calculation result of the sum kernel function, including: The energy information is determined according to calculation results of the sum kernel function of the L sample molecules.
3. The method according to claim 1, characterized in that The kernel function is constructed based on an atomic orbital pair in one molecule and an atomic orbital pair in another molecule; or, The kernel function is constructed based on a molecular orbital pair in one molecule and a molecular orbital pair in another molecule.
4. The method according to claim 1, wherein The kernel function is the product of at least two basic kernel functions, and different basic kernel functions are constructed for the same set of track pairs based on different kernel function algorithms.
5. The method according to claim 1, wherein The energy information includes an energy difference, where the energy difference refers to a difference relative to the first predicted energy; Determining the final predicted energy of the molecule to be predicted based on the energy information includes: The final predicted energy is determined according to the energy difference and the first predicted energy.
6. The method according to claim 1, characterized in that The step of using a first calculation method to obtain a first predicted energy of the molecule to be predicted and a quantum operator of the molecule to be predicted comprises: A first predicted energy of the molecule to be predicted and a quantum operator of the molecule to be predicted are obtained by using any self-consistent field theory method.
7. The method according to claim 1, characterized in that The quantum operator may be expressed in at least one of the following forms: a structural operator, an atomic orbital operator, or a molecular orbital operator; The structural operator is determined based on the structure of the molecule to be predicted; The atomic orbital operator is determined based on the atomic orbital expression of the molecule to be predicted; The molecular orbital operator is determined based on the molecular orbital expression form of the molecule to be predicted.
8. The method according to claim 1, characterized in that The types of the quantum operators include at least one of the following: overlap operator, kinetic energy operator, nuclear potential energy operator, density operator, Coulomb operator, exchange operator, and Fock operator.
9. The method according to claim 1, characterized in that The final predicted energy of the molecule to be predicted is used to determine the configuration of the molecule to be predicted; Alternatively, the final predicted energy of the molecule to be predicted is used to determine the reaction mechanism of the molecule to be predicted; Alternatively, the final predicted energy of the molecule to be predicted is used to determine the spectrum of the molecule to be predicted.
10. A method for training a molecular energy prediction model, characterized in that: The molecular energy prediction model includes a Gaussian process-based sum kernel function, wherein the sum kernel function refers to the sum of at least two kernel functions associated with two molecules, each kernel function being constructed based on an orbital pair in one molecule and an orbital pair in another molecule; the method includes: Using a first calculation method to obtain a first predicted energy of a sample molecule and a quantum operator of the sample molecule, where the quantum operator of the sample molecule is used to describe a wave function of the sample molecule; Obtaining a second predicted energy of the sample molecule using a second calculation method, wherein the energy prediction accuracy of the second calculation method is higher than the energy prediction accuracy of the first calculation method; For each kernel function in the sum kernel function, obtaining a first operator element from a quantum operator of a first sample molecule, and obtaining a second operator element from a quantum operator of a second sample molecule; wherein the first operator element refers to an operator element of an orbital pair associated with the kernel function in the quantum operator of the first sample molecule, and the second operator element refers to an operator element of an orbital pair associated with the kernel function in the quantum operator of the second sample molecule; wherein the first sample molecule and the second sample molecule are the same or different sample molecules; Calculating a calculation result of the kernel function according to the first operator element and the second operator element; Adding the calculation results of each kernel function in the sum kernel function to obtain the calculation result of the sum kernel function; Obtaining energy information according to the calculation result of the sum kernel function; Parameters of the molecular energy prediction model are adjusted according to the energy information, the first predicted energy, and the second predicted energy.
11. The method according to claim 10, characterized in that The number of the sample molecules is L, where L is a positive integer greater than 1, the first sample molecule is any one of the L sample molecules, and the second sample molecule is any one of the L sample molecules; Obtaining energy information according to the calculation result of the sum kernel function includes: Energy information corresponding to each of the L sample molecules is obtained according to calculation results of the L*L sum kernel functions determined by the first sample molecule and the second sample molecule among the L sample molecules.
12. The method according to claim 10, characterized in that The energy information includes an energy difference, where the energy difference refers to a difference relative to the first predicted energy; The adjusting the parameters of the molecular energy prediction model according to the energy information, the first predicted energy, and the second predicted energy includes: Calculating a difference between the second predicted energy and the first predicted energy to obtain a difference result; Determining a loss function value of the molecular energy prediction model according to the difference result and the energy difference; The parameters of the molecular energy prediction model are adjusted with the goal of minimizing the loss function value.
13. The method according to claim 10, characterized in that The step of obtaining a first predicted energy of a sample molecule and a quantum operator of the sample molecule by using a first calculation method includes: A first predicted energy of the sample molecule and a quantum operator of the sample molecule are obtained by using any self-consistent field theory method.
14. A molecular energy prediction device, characterized in that: The device comprises: a first energy prediction module, configured to obtain a first predicted energy of a molecule to be predicted and a quantum operator of the molecule to be predicted using a first calculation method, wherein the quantum operator of the molecule to be predicted is used to describe a wave function of the molecule to be predicted; a second energy prediction module, configured to obtain, for each kernel function in a sum kernel function based on a Gaussian process, a first operator element from the quantum operator of the molecule to be predicted, and a second operator element from the quantum operator of the sample molecule; wherein the sum kernel function refers to the sum of at least two kernel functions associated with two molecules, each kernel function being constructed based on an orbital pair in one molecule and an orbital pair in another molecule, the first operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the molecule to be predicted, and the second operator element refers to the operator element of the orbital pair associated with the kernel function in the quantum operator of the sample molecule; The second energy prediction module is further configured to calculate a calculation result of the kernel function based on the first operator element and the second operator element; The second energy prediction module is further configured to sum the calculation results of each kernel function in the sum kernel function to obtain a calculation result of the sum kernel function; The second energy prediction module is further configured to obtain energy information based on a calculation result of the sum kernel function; The energy determination module is used to determine the final predicted energy of the molecule to be predicted based on the energy information.
15. A training device for a molecular energy prediction model, characterized in that: The molecular energy prediction model includes a sum kernel function based on a Gaussian process, wherein the sum kernel function refers to the sum of at least two kernel functions associated with two molecules, each kernel function being constructed based on an orbital pair in one molecule and an orbital pair in another molecule; the apparatus includes: a third energy prediction module, configured to obtain a first predicted energy of the sample molecule and a quantum operator of the sample molecule using the first calculation method, wherein the quantum operator of the sample molecule is used to describe a wave function of the sample molecule; a fourth energy prediction module, configured to obtain a second predicted energy of the sample molecule using a second calculation method, wherein the energy prediction accuracy of the second calculation method is higher than the energy prediction accuracy of the first calculation method; a fifth energy prediction module, configured to, for each kernel function in the sum kernel function, obtain a first operator element from the quantum operator of the first sample molecule, and obtain a second operator element from the quantum operator of the second sample molecule; wherein the first operator element refers to an operator element of an orbital pair associated with the kernel function in the quantum operator of the first sample molecule, and the second operator element refers to an operator element of an orbital pair associated with the kernel function in the quantum operator of the second sample molecule; wherein the first sample molecule and the second sample molecule are the same or different sample molecules; The fifth energy prediction module is further configured to calculate a calculation result of the kernel function based on the first operator element and the second operator element; The fifth energy prediction module is further configured to sum the calculation results of each kernel function in the sum kernel function to obtain a calculation result of the sum kernel function; The fifth energy prediction module is further configured to obtain energy information based on a calculation result of the sum kernel function; A parameter adjustment module is used to adjust the parameters of the molecular energy prediction model according to the energy information, the first predicted energy and the second predicted energy.
16. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 9 or the method according to any one of claims 10 to 13.
17. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 9 or the method according to any one of claims 10 to 13.
18. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium. The processor reads and executes the computer program from the computer-readable storage medium to implement the method as described in any one of claims 1 to 9 above, or implements the method as described in any one of claims 10 to 13 above.