Simulation method, device, storage medium and electronic equipment for chemical reaction process
Patent Information
- Application Number
- CN202410140547.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2044-01-31
AI Technical Summary
[0005]本申请实施例提供了一种化学反应过程的模拟方法、系统、存储介质及电子设备,以至少解决相关技术中如何提升化学反应过程的模拟效率的问题
[0016]根据本申请的又一个实施例,还提供了一种电子设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。
Smart Images

Figure CN117953986B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of deep learning, and more specifically, to a method, apparatus, storage medium, and electronic device for simulating a chemical reaction process. Background Technology
[0002] With the rapid development of computer science, first-principles calculations based on density functional theory (DFT) and molecular dynamics (MD) simulations have become important tools in fields such as physical chemistry and materials science for studying the microstructure, properties, and dynamic characteristics of matter. However, classical MD simulations cannot accurately describe the dynamic changes of chemical bonds in chemical reactions, and DFT calculations require extremely high computational costs when predicting large dynamic changes in a system. In contrast, reaction force field-based molecular dynamics (ReaxFF-MD) simulations combine the advantages of first-principles calculations and classical molecular dynamics simulations, ensuring computational accuracy while reducing computational costs, thus gaining widespread application.
[0003] In existing technologies, the traditional Leonard-Jones potential (LJ potential) is used to simulate chemical reactions, employing simple harmonic relationships to describe the torsional effects of bond angles and dihedral angles, failing to distinguish bond strength. A novel potential function, ReaxFF, derived from quantum mechanics calculations, calculates bond angle parameters, dihedral angle parameters, and the formation and breaking of chemical bonds in the reaction force field using a bond-order approach. However, the bond-order calculation formula requires extensive first-principles calculations to fit empirical parameters, consuming significant time and computational resources. For complex systems with multiple atoms, the computational load increases exponentially.
[0004] Therefore, no effective solution has yet been proposed for the problem of how to improve the simulation efficiency of chemical reaction processes in related technologies. Summary of the Invention
[0005] This application provides a method, system, storage medium, and electronic device for simulating chemical reaction processes, to at least address the problem of how to improve the simulation efficiency of chemical reaction processes in related technologies.
[0006] According to one embodiment of this application, a method for simulating a chemical reaction process is provided, characterized by comprising: encoding a molecular chemical formula input to a target object to obtain an input atom vector; inputting the input atom vector into a first sub-network of a target neural network model to obtain a first output result, and inputting the input atom vector into a second sub-network of the target neural network model to obtain a second output result, wherein the first sub-network is used to calculate a first atomic bond angle parameter and a first atomic dihedral angle parameter according to the bond order formula corresponding to the input atom vector, and the second sub-network is used to directly calculate a second atomic bond angle parameter and a second atomic dihedral angle parameter according to the input atom vector; determining a target output result based on the first output result and the second output result, wherein the target output result includes at least: the atomic bond angle parameter of the potential function corresponding to the input atom vector, and the atomic dihedral angle parameter of the potential function corresponding to the input atom vector; and simulating the chemical reaction process corresponding to the molecular chemical formula based on the target output result.
[0007] In an exemplary embodiment, simulating the chemical reaction process corresponding to the molecular chemical formula based on the target output result includes: determining a first included angle in the molecular structure based on the atomic bond angle parameters in the target output result, wherein the molecular structure is the molecular structure corresponding to the molecular chemical formula, and the first included angle is the included angle formed by chemical bonds between different atoms in the molecular structure; determining a second included angle in the molecular structure based on the atomic dihedral angle parameters in the target output result, wherein the second included angle is the included angle formed between planes composed of different atoms in the molecular structure; and simulating the changes in molecular structure during the chemical reaction process based on the first included angle and the second included angle.
[0008] In an exemplary embodiment, encoding the molecular chemical formula input to the target object to obtain an input atom vector includes: determining the types of atoms contained in the molecular chemical formula; creating an N-dimensional vector based on the atom types, where N represents the number of atom types in the periodic table, and each dimension of the N-dimensional vector corresponds to an atom type; and determining the N-dimensional vector as the input atom vector.
[0009] In an exemplary embodiment, inputting the input atomic vector into a first sub-network of the target neural network model to obtain a first output result includes: obtaining the bond order formula corresponding to the input atomic vector from a database; performing first-principles calculations on the input atomic vector to obtain empirical parameters in the bond order formula; and determining the first atomic bond angle parameter and the first atomic dihedral angle parameter based on the bond order formula and the empirical parameters.
[0010] In an exemplary embodiment, inputting the input atom vector into a second sub-network of the target neural network model to obtain a second output result includes: obtaining the connection relationship between each atom in the input atom vector; and determining the second atom bond angle parameter and the second atom dihedral angle parameter based on the connection relationship.
[0011] In an exemplary embodiment, determining a target output result based on the first output result and the second output result includes: determining a first weight value of the first sub-network and a second weight value of the second sub-network, wherein the sum of the first weight value and the second weight value is 1; determining the sum of a first product and a second product as a third atomic bond angle parameter, wherein the first product is the product of the first atomic bond angle parameter and the first weight value, and the second product is the product of the second atomic bond angle parameter and the second weight value; determining the sum of a third product and a fourth product as a third atomic dihedral angle parameter, wherein the third product is the product of the first atomic dihedral angle parameter and the first weight value, and the fourth product is the product of the second atomic dihedral angle parameter and the second weight value; and determining the third atomic bond angle parameter and the third atomic dihedral angle parameter as the target output result.
[0012] In an exemplary embodiment, determining a first weight value of the first sub-network and a second weight value of the second sub-network includes: obtaining a plurality of known potential functions from the database, wherein each known potential function includes at least: a molecular chemical formula, an atomic bond angle parameter, and an atomic dihedral angle parameter; encoding the molecular chemical formulas of the plurality of known potential functions to obtain a plurality of input atom vectors; inputting the plurality of atom input vectors into the first sub-network to obtain a plurality of third output results, and inputting the plurality of atom input vectors into the second sub-network to obtain a plurality of fourth output results; determining a first matching rate of the first sub-network based on the plurality of known potential functions and the plurality of third output results, and determining a second matching rate of the second sub-network based on the plurality of known potential functions and the plurality of fourth output results; determining the sum of the first matching rate and the second matching rate; determining the ratio of the first matching rate to the sum as the first weight value, and determining the ratio of the second matching rate to the sum as the second weight value.
[0013] In an exemplary embodiment, after inputting the plurality of atomic input vectors into the first sub-network to obtain a plurality of third output results, and inputting the plurality of atomic input vectors into the second sub-network to obtain a plurality of fourth output results, the method further includes: calculating a first loss function value for the first sub-network by performing loss calculation on the plurality of third output results using a target loss function; calculating a second loss function value for the second sub-network by performing loss calculation on the plurality of fourth output results using a target loss function; and adjusting the first weight value and the second weight value according to the first loss function value and the second loss function value.
[0014] According to another embodiment of this application, a chemical reaction process simulation device is provided, characterized in that it includes: an encoding module for encoding a molecular chemical formula input as a target object to obtain an input atom vector; a calculation module for inputting the input atom vector into a first sub-network of a target neural network model to obtain a first output result, and inputting the input atom vector into a second sub-network of the target neural network model to obtain a second output result, wherein the first sub-network is used to calculate a first atomic bond angle parameter and a first atomic dihedral angle parameter according to the bond order formula corresponding to the input atom vector, and the second sub-network is used to directly calculate a second atomic bond angle parameter and a second atomic dihedral angle parameter according to the input atom vector; a determination module for determining a target output result based on the first output result and the second output result, wherein the target output result includes at least: the atomic bond angle parameter of the potential function corresponding to the input atom vector, and the atomic dihedral angle parameter of the potential function corresponding to the input atom vector; and simulating the chemical reaction process corresponding to the molecular chemical formula based on the target output result.
[0015] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0016] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0017] This application allows the chemical formula of the target object to be encoded into atomic vectors, which are then input into a target neural network model. A first sub-network calculates the atomic bond angle parameters and dihedral angle parameters using bond-order formulas, and a second sub-network directly calculates these parameters from the atomic vectors. The atomic bond angle parameters and dihedral angle parameters of the potential function corresponding to the final atomic vector are then determined based on the outputs of the two sub-networks. Therefore, this addresses the problem of improving the simulation efficiency of chemical reaction processes in related technologies. Attached Figure Description
[0018] Figure 1 This is a hardware structure block diagram of a server device for simulating a chemical reaction process according to an embodiment of this application;
[0019] Figure 2 This is a flowchart of a method for simulating a chemical reaction process according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of the potential function calculation device for the Al-Ni alloy catalytic ammonia decomposition reaction according to an embodiment of this application.
[0021] Figure 4 This is a diagram of the neural network training model architecture according to an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of parameter fusion according to an embodiment of this application;
[0023] Figure 6 This is a structural block diagram of a chemical reaction process simulation device according to an embodiment of this application. Detailed Implementation
[0024] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0026] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for simulating a chemical reaction process according to an embodiment of this application. For example... Figure 1 As shown, the server device may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0027] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the chemical reaction process simulation method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0028] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0029] This embodiment provides a method for simulating a chemical reaction process. Figure 2 This is a flowchart of a method for simulating a chemical reaction process according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0030] Step S202: Encode the molecular chemical formula input from the target object to obtain the input atom vector;
[0031] Step S204: Input the input atomic vector into the first sub-network of the target neural network model to obtain a first output result, and input the input atomic vector into the second sub-network of the target neural network model to obtain a second output result, wherein the first sub-network is used to calculate the first atomic bond angle parameter and the first atomic dihedral angle parameter according to the bond order formula corresponding to the input atomic vector, and the second sub-network is used to directly calculate the second atomic bond angle parameter and the second atomic dihedral angle parameter according to the input atomic vector;
[0032] Step S206: Determine the target output result based on the first output result and the second output result, wherein the target output result includes at least: the atomic bond angle parameter of the potential function corresponding to the input atomic vector, and the atomic dihedral angle parameter of the potential function corresponding to the input atomic vector;
[0033] Step S208: Simulate the chemical reaction process corresponding to the molecular chemical formula based on the target output result.
[0034] Through the above steps, the molecular chemical formula input to the target object can be encoded to obtain an input atom vector; the input atom vector is input into a first sub-network of the target neural network model to obtain a first output result, and the input atom vector is input into a second sub-network of the target neural network model to obtain a second output result. The first sub-network is used to calculate the first atomic bond angle parameter and the first atomic dihedral angle parameter according to the bond order formula corresponding to the input atom vector, and the second sub-network is used to directly calculate the second atomic bond angle parameter and the second atomic dihedral angle parameter according to the input atom vector; a target output result is determined based on the first output result and the second output result, wherein the target output result includes at least: the atomic bond angle parameter of the potential function corresponding to the input atom vector, and the atomic dihedral angle parameter of the potential function corresponding to the input atom vector; the chemical reaction process corresponding to the molecular chemical formula is simulated based on the target output result.
[0035] In an exemplary embodiment, step S208 above, which simulates the chemical reaction process corresponding to the molecular chemical formula based on the target output result, includes: determining a first included angle in the molecular structure based on the atomic bond angle parameter in the target output result, wherein the molecular structure is the molecular structure corresponding to the molecular chemical formula, and the first included angle is the included angle formed by chemical bonds between different atoms in the molecular structure; determining a second included angle in the molecular structure based on the atomic dihedral angle parameter in the target output result, wherein the second included angle is the included angle formed between planes composed of different atoms in the molecular structure; and simulating the changes in molecular structure during the chemical reaction process based on the first included angle and the second included angle.
[0036] In an exemplary embodiment, the specific implementation process of encoding the molecular chemical formula input to the target object to obtain the input atom vector in step S202 above includes: determining the types of atoms contained in the molecular chemical formula; creating an N-dimensional vector according to the atom types, where N represents the number of atom types in the periodic table, and each dimension of the N-dimensional vector corresponds to an atom type; and determining the N-dimensional vector as the input atom vector.
[0037] Optionally, in the above embodiments, when encoding the molecular chemical formula input to the target object, the geometric positional relationships between the atoms in the molecule, such as their coordinates in the same coordinate system, and the connection relationships between the atoms can also be encoded into the input atom vector.
[0038] In an exemplary embodiment, the implementation process of inputting the input atomic vector into the first sub-network of the target neural network model to obtain the first output result in step S204 specifically includes: obtaining the bond order formula corresponding to the input atomic vector from the database; performing first-principles calculations on the input atomic vector to obtain the empirical parameters in the bond order formula; and determining the first atomic bond angle parameter and the first atomic dihedral angle parameter according to the bond order formula and the empirical parameters.
[0039] Optionally, an exemplary bond-level formula is given in this embodiment as follows:
[0040]
[0041] Where BO is the bond order between atoms i and j, and r ij It is the distance between atoms, r o It is the balance bond length, p bo These are empirical parameters. For example, in the above embodiment, first-principles calculations and fitting are needed to obtain the empirical parameters p. bo Then, using the bond-level formula and empirical parameter p bo Further calculations yield parameters such as bond energy, bond angle, and dihedral angle, thereby enabling a description of the dynamic changes in bond strength, bond angle, and atomic distance during chemical reactions.
[0042] In an exemplary embodiment, the process of inputting the input atom vector into the second sub-network of the target neural network model to obtain the second output result in step S204 specifically includes: obtaining the connection relationship between each atom in the input atom vector; and determining the second atom bond angle parameter and the second atom dihedral angle parameter based on the connection relationship.
[0043] Optionally, in the above embodiments, the second sub-network is a potential function parameter prediction network based on deep learning. During the training process, the second sub-network can use atomic vectors containing atomic connections as input datasets, output bond angle and dihedral angle parameters, and use a publicly available parameter file of the reactive force field potential function as a validation dataset.
[0044] In an exemplary embodiment, the specific implementation process of determining the target output result based on the first output result and the second output result in step S206 above includes the following steps: Step S11, determining the first weight value of the first sub-network and the second weight value of the second sub-network, wherein the sum of the first weight value and the second weight value is 1; Step S12, determining the sum of the first product and the second product as the third atomic bond angle parameter, wherein the first product is the product of the first atomic bond angle parameter and the first weight value, and the second product is the product of the second atomic bond angle parameter and the second weight value; Step S13, determining the sum of the third product and the fourth product as the third atomic dihedral angle parameter, wherein the third product is the product of the first atomic dihedral angle parameter and the first weight value, and the fourth product is the product of the second atomic dihedral angle parameter and the second weight value; Step S14, determining the third atomic bond angle parameter and the third atomic dihedral angle parameter as the target output result.
[0045] Optionally, in the above embodiments, for example, the first output result is Thetaoli (first atomic bond angle parameter), Vli (equivalent to the first atomic dihedral angle parameter), and the second output result is Thetao2i (equivalent to the second atomic bond angle parameter), V2i (second atomic dihedral angle parameter), where i represents the i-th output result. If the first weight value of the first sub-network is λ, then the second weight value of the second sub-network is 1-λ. Therefore, the third atomic bond angle parameter Thetao′ i The calculation formula is: Thetao′ i =λThetao1i+(1-λ)Thetao2i, the formula for calculating the dihedral angle parameter V′i of the third atom is V′i=λV1i+(1-λ)V2i, and then Thetao′i and V′i are used as the target output results.
[0046] Through the above embodiments, the outputs of two neural networks can be weighted and fused, greatly reducing the computational errors that may be caused by a single calculation method.
[0047] In an exemplary embodiment, step S11 described above can be performed to determine the first weight value of the first sub-network and the second weight value of the second sub-network as follows: multiple known potential functions are obtained from the database, wherein each known potential function includes at least: a molecular chemical formula, an atomic bond angle parameter, and an atomic dihedral angle parameter; the molecular chemical formulas of the multiple known potential functions are encoded to obtain multiple input atom vectors; the multiple atom input vectors are input into the first sub-network to obtain multiple third output results, and the multiple atom input vectors are input into the second sub-network to obtain multiple fourth output results; a first matching rate of the first sub-network is determined based on the multiple known potential functions and the multiple third output results, and a second matching rate of the second sub-network is determined based on the multiple known potential functions and the multiple fourth output results; the sum of the first matching rate and the second matching rate is determined; the ratio of the first matching rate to the sum is determined as the first weight value, and the ratio of the second matching rate to the sum is determined as the second weight value.
[0048] Through the above embodiments, the accuracy of the first and second sub-networks is verified using the publicly available reaction force field potential function parameter file. The weight values of different sub-networks can be determined based on the accuracy, thereby improving the accuracy of the neural network model in calculating the potential function parameters. In turn, the chemical reaction process can be simulated more accurately based on the potential function.
[0049] In an exemplary embodiment, after performing the above-described steps of inputting the plurality of atomic input vectors into the first sub-network to obtain a plurality of third output results, and inputting the plurality of atomic input vectors into the second sub-network to obtain a plurality of fourth output results, the method further includes: calculating a first loss function value for the first sub-network by performing loss calculation on the plurality of third output results using a target loss function; calculating a second loss function value for the second sub-network by performing loss calculation on the plurality of fourth output results using a target loss function; and adjusting the first weight value and the second weight value according to the first loss function value and the second loss function value.
[0050] Optionally, in the above embodiments, the method further includes decreasing the first weight value and increasing the second weight value when the first loss function value is greater than the second loss function value, and increasing the first weight value and decreasing the second weight value when the first loss function value is less than the second loss function value.
[0051] The above embodiments allow for dynamic adjustment of weight values based on the loss function, thereby improving the robustness of the neural network model and reducing the deviation between the actual calculated values of the chemical reaction process and the model's computational capabilities.
[0052] Obviously, the embodiments described above are only some embodiments of this application, and not all embodiments. To better understand the simulation method of the above chemical reaction process, the process is described below with reference to embodiments, but is not intended to limit the technical solutions of the embodiments of this application. Specifically:
[0053] In one optional example, the decomposition of ammonia (NH3) catalyzed by Al-Ni alloy is taken as an example. Figure 3 This is a schematic diagram of the structure of a simulation calculation device for the Al-Ni alloy catalytic ammonia decomposition reaction according to an embodiment of this application, as shown below. Figure 3 As shown, the chemical formula of the Al-Ni alloy-catalyzed ammonia decomposition reaction contains four types of atoms: Al, Ni, N, and H. Therefore, these four atoms are encoded into atomic vectors and input into a neural network model. This model consists of two network branches. The first network branch (equivalent to the first sub-network) is composed of an empirical parameter calculation network and a bond angle and dihedral angle parameter calculation module. The second network branch (equivalent to the second sub-network) is composed of a bond angle and dihedral angle parameter direct learning network. After obtaining the output results of the two network branches, the two output results are fused by the bond angle and dihedral angle parameter fusion module. Finally, the bond angle parameters and dihedral angle parameters of the Al-Ni-NH system are output. Then, based on the above bond angle parameters and dihedral angle parameters, the Al-Ni alloy-catalyzed ammonia (NH3) decomposition reaction process is simulated to simulate the molecular trajectory and behavior.
[0054] Optionally, the aforementioned simulation computing device for the Al-Ni alloy-catalyzed ammonia decomposition reaction can be deployed based on an NF5488A5 server cluster. The storage architecture uses Lustre to build a high-performance parallel file system to support rapid data sharing and access between nodes. The scheduling software uses Slurm as the cluster management system and adopts deep learning frameworks such as PyTorch to utilize cluster resources for distributed training and model optimization.
[0055] The above embodiments reduce the computational and time costs required to develop new potential functions and enhance the scalability and reusability of reactive force field potential functions.
[0056] In an optional embodiment, the training process of the neural network model used to calculate the parameters of the potential function in this application is described. Figure 4 This is a neural network training model architecture diagram according to an embodiment of this application. Figure 4In this model, training is based on publicly available potential functions. The input atom type vector (equivalent to the input atom vector) can be represented by a 118-dimensional vector, which corresponds to the 118 elements in the periodic table. This vector corresponds to n^3 bond angle parameters Thetao and 3*n^4 dihedral angle parameters V, where n is the number of non-zero elements in the input atom type vector.
[0057] exist Figure 4 The branch of the network containing the empirical parameter learning network does not directly calculate the bond angle and dihedral angle parameters. Instead, it outputs empirical parameters through a deep learning neural network, and then calculates and outputs a vector y1 containing the bond angle and dihedral angle parameters using the bond-order formula and the empirical parameters. i In this branch, the loss function L1 can be Huber loss, which means that the loss is calculated using the mean squared error for smaller errors and the linear error for larger errors, as detailed below:
[0058] if
[0059] if
[0060] Where y i It is the actual value. These are the model's predicted values.
[0061] exist Figure 4 The network branch containing the direct learning network for bond angle and dihedral angle parameters calculates these parameters based on the input atom vector. It eliminates the need for computational steps and directly outputs a vector y2 containing both the bond angle and dihedral angle parameters. i Similarly, the loss function L2 for this network branch can also be Huber loss, the specific process of which will not be elaborated here.
[0062] After obtaining the bond angle and dihedral angle parameters output from the two network branches mentioned above, the bond angle and dihedral angle parameter fusion module is used to process y1. i y2 i Perform parameter fusion, the fusion formula is: y′ i =λy1 i +(1-λ)y2 i The loss function L3 for parameter fusion can be the mean squared error loss.
[0063] Among them, the weight parameter λ in the above fusion formula can also be learned, such as... Figure 5 As shown, by verifying y1 i y2 iBy comparing the model with publicly available potential function parameters and adjusting the weight parameters using a loss function, the training result of the neural network model can be made to approximate the publicly available potential function parameters. The trained model can then directly calculate unknown potential function parameters.
[0064] Optionally, the training model described above can be used not only to learn the calculation of bond angle parameters and dihedral angle parameters in chemical reactions, such as electrostatic interaction parameters used to describe the interaction between charged particles and van der Waals force parameters used to describe nonpolar interactions, but also to learn them with the help of deep learning neural networks.
[0065] Through the above embodiments, it is possible to learn from existing reactive force field potential functions by training a deep learning neural network model, continuously optimize the output results of the neural network model, thereby enabling the neural network model to have the ability to infer and calculate potential function parameters, improving the simulation efficiency of chemical reaction processes, and reducing the simulation calculation cost of chemical reactions.
[0066] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0067] This embodiment also provides a chemical reaction process simulation device. This system is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that performs a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0068] Figure 6 This is a structural block diagram of a chemical reaction process simulation device according to an embodiment of this application, such as... Figure 6 As shown, the device includes:
[0069] Encoding module 62 is used to encode the molecular chemical formula of the target object input to obtain the input atom vector;
[0070] The calculation module 64 is used to input the input atomic vector into a first sub-network of the target neural network model to obtain a first output result, and to input the input atomic vector into a second sub-network of the target neural network model to obtain a second output result. The first sub-network is used to calculate the first atomic bond angle parameter and the first atomic dihedral angle parameter according to the bond order formula corresponding to the input atomic vector, and the second sub-network is used to directly calculate the second atomic bond angle parameter and the second atomic dihedral angle parameter according to the input atomic vector.
[0071] The determining module 66 is used to determine a target output result based on the first output result and the second output result, wherein the target output result includes at least: the atomic bond angle parameter of the potential function corresponding to the input atomic vector, and the atomic dihedral angle parameter of the potential function corresponding to the input atomic vector;
[0072] The simulation module 68 is used to simulate the chemical reaction process corresponding to the molecular chemical formula based on the target output result.
[0073] The aforementioned device can encode the molecular chemical formula input from the target object to obtain an input atomic vector. The input atomic vector is then input into a first sub-network of the target neural network model to obtain a first output result, and into a second sub-network of the same model to obtain a second output result. The first sub-network calculates the first atomic bond angle parameter and the first atomic dihedral angle parameter based on the bond order formula corresponding to the input atomic vector. The second sub-network directly calculates the second atomic bond angle parameter and the second atomic dihedral angle parameter based on the input atomic vector. A target output result is determined based on the first and second output results. This target output result includes at least the atomic bond angle parameter of the potential function corresponding to the input atomic vector and the atomic dihedral angle parameter of the potential function corresponding to the input atomic vector. This solves the problem of improving the simulation efficiency of chemical reaction processes in related technologies.
[0074] In an exemplary embodiment, the simulation module 68 is further configured to: determine a first included angle in the molecular structure based on the atomic bond angle parameters in the target output result, wherein the molecular structure is the molecular structure corresponding to the molecular chemical formula, and the first included angle is the included angle formed by chemical bonds between different atoms in the molecular structure; determine a second included angle in the molecular structure based on the atomic dihedral angle parameters in the target output result, wherein the second included angle is the included angle formed between planes composed of different atoms in the molecular structure; and simulate the changes in molecular structure during the chemical reaction process based on the first included angle and the second included angle.
[0075] In an exemplary embodiment, the encoding module 62 is further configured to: determine the types of atoms contained in the molecular chemical formula; create an N-dimensional vector based on the atom types, wherein N represents the number of atom types in the periodic table, and each dimension of the N-dimensional vector corresponds to an atom type; and determine the N-dimensional vector as the input atom vector.
[0076] In an exemplary embodiment, the calculation module 64 is further configured to: obtain the bond order formula corresponding to the input atom vector from the database; perform first-principles calculations on the input atom vector to obtain empirical parameters in the bond order formula; and determine the first atom bond angle parameter and the first atom dihedral angle parameter based on the bond order formula and the empirical parameters.
[0077] In an exemplary embodiment, the calculation module 64 is further configured to: obtain the connection relationship between each atom in the input atom vector; and determine the second atomic bond angle parameter and the second atomic dihedral angle parameter based on the connection relationship.
[0078] In an exemplary embodiment, the determining module 66 includes: a first determining unit, configured to determine a first weight value of the first sub-network and a second weight value of the second sub-network, wherein the sum of the first weight value and the second weight value is 1; a second determining unit, configured to determine the sum of a first product and a second product as a third atomic bond angle parameter, wherein the first product is the product of the first atomic bond angle parameter and the first weight value, and the second product is the product of the second atomic bond angle parameter and the second weight value; a third determining unit, configured to determine the sum of a third product and a fourth product as a third atomic dihedral angle parameter, wherein the third product is the product of the first atomic dihedral angle parameter and the first weight value, and the fourth product is the product of the second atomic dihedral angle parameter and the second weight value; and a fourth determining unit, configured to determine the third atomic bond angle parameter and the third atomic dihedral angle parameter as the target output result.
[0079] In an exemplary embodiment, the first determining unit is further configured to: obtain a plurality of known potential functions from the database, wherein each known potential function includes at least: a molecular chemical formula, an atomic bond angle parameter, and an atomic dihedral angle parameter; encode the molecular chemical formulas of the plurality of known potential functions to obtain a plurality of input atom vectors; input the plurality of atom input vectors into the first sub-network to obtain a plurality of third output results, and input the plurality of atom input vectors into the second sub-network to obtain a plurality of fourth output results; determine a first matching rate of the first sub-network based on the plurality of known potential functions and the plurality of third output results, and determine a second matching rate of the second sub-network based on the plurality of known potential functions and the plurality of fourth output results; determine the sum of the first matching rate and the second matching rate; determine the ratio of the first matching rate to the sum as the first weight value, and determine the ratio of the second matching rate to the sum as the second weight value.
[0080] In an exemplary embodiment, the first determining unit is further configured to: calculate the loss of the plurality of third output results using a target loss function to obtain a first loss function value of the first sub-network; calculate the loss of the plurality of fourth output results using a target loss function to obtain a second loss function value of the second sub-network; and adjust the first weight value and the second weight value according to the first loss function value and the second loss function value.
[0081] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0082] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0083] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:
[0084] S1, encodes the molecular chemical formula of the target object to obtain the input atom vector;
[0085] S2, inputting the input atomic vector into the first sub-network of the target neural network model to obtain a first output result, and inputting the input atomic vector into the second sub-network of the target neural network model to obtain a second output result, wherein the first sub-network is used to calculate the first atomic bond angle parameter and the first atomic dihedral angle parameter according to the bond order formula corresponding to the input atomic vector, and the second sub-network is used to directly calculate the second atomic bond angle parameter and the second atomic dihedral angle parameter according to the input atomic vector;
[0086] S3, determine the target output result based on the first output result and the second output result, wherein the target output result includes at least: the atomic bond angle parameter of the potential function corresponding to the input atomic vector, and the atomic dihedral angle parameter of the potential function corresponding to the input atomic vector;
[0087] S4, simulate the chemical reaction process corresponding to the molecular chemical formula based on the target output result.
[0088] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0089] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0090] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0091] S1, encodes the molecular chemical formula of the target object to obtain the input atom vector;
[0092] S2, inputting the input atomic vector into the first sub-network of the target neural network model to obtain a first output result, and inputting the input atomic vector into the second sub-network of the target neural network model to obtain a second output result, wherein the first sub-network is used to calculate the first atomic bond angle parameter and the first atomic dihedral angle parameter according to the bond order formula corresponding to the input atomic vector, and the second sub-network is used to directly calculate the second atomic bond angle parameter and the second atomic dihedral angle parameter according to the input atomic vector;
[0093] S3, determine the target output result based on the first output result and the second output result, wherein the target output result includes at least: the atomic bond angle parameter of the potential function corresponding to the input atomic vector, and the atomic dihedral angle parameter of the potential function corresponding to the input atomic vector;
[0094] S4, simulate the chemical reaction process corresponding to the molecular chemical formula based on the target output result.
[0095] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0096] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for simulating a chemical reaction process, characterized in that, include: The molecular chemical formula of the target object is encoded to obtain the input atom vector; The input atomic vector is input into a first sub-network of the target neural network model to obtain a first output result, and the input atomic vector is input into a second sub-network of the target neural network model to obtain a second output result. The first sub-network is used to calculate the first atomic bond angle parameter and the first atomic dihedral angle parameter according to the bond order formula corresponding to the input atomic vector, and the second sub-network is used to directly calculate the second atomic bond angle parameter and the second atomic dihedral angle parameter according to the input atomic vector. The target output result is determined based on the first output result and the second output result, wherein the target output result includes at least: the atomic bond angle parameter of the potential function corresponding to the input atomic vector, and the atomic dihedral angle parameter of the potential function corresponding to the input atomic vector; The chemical reaction process corresponding to the molecular chemical formula is simulated based on the target output results.
2. The method according to claim 1, characterized in that, The chemical reaction process corresponding to the molecular chemical formula is simulated based on the target output results, including: The first included angle in the molecular structure is determined based on the atomic bond angle parameters in the target output result, wherein the molecular structure is the molecular structure corresponding to the molecular chemical formula, and the first included angle is the included angle formed by the chemical bonds between different atoms in the molecular structure; The second included angle in the molecular structure is determined based on the atomic dihedral angle parameter in the target output result, wherein the second included angle is the included angle formed between planes composed of different atoms in the molecular structure; The molecular structure changes during the chemical reaction process are simulated based on the first and second included angles.
3. The method according to claim 1, characterized in that, The input atomic vector is input into the first sub-network of the target neural network model to obtain the first output result, including: Retrieve the bond order formulas corresponding to the input atom vectors from the database; The empirical parameters in the bond order formula are obtained by performing first-principles calculations on the input atom vector; The first atomic bond angle parameter and the first atomic dihedral angle parameter are determined based on the bond order formula and the empirical parameters.
4. The method according to claim 1, characterized in that, The second output result is obtained by inputting the input atomic vector into the second sub-network of the target neural network model, including: Obtain the connection relationships between the atoms in the input atom vector; The second atomic bond angle parameter and the second atomic dihedral angle parameter are determined based on the connection relationship.
5. The method according to claim 1, characterized in that, Determine the target output result based on the first output result and the second output result, including: Determine the first weight value of the first sub-network and the second weight value of the second sub-network, wherein the sum of the first weight value and the second weight value is 1; The sum of the first product and the second product is determined as the third atomic bond angle parameter, wherein the first product is the product of the first atomic bond angle parameter and the first weight value, and the second product is the product of the second atomic bond angle parameter and the second weight value; The sum of the third product and the fourth product is determined as the third atomic dihedral angle parameter, wherein the third product is the product of the first atomic dihedral angle parameter and the first weight value, and the fourth product is the product of the second atomic dihedral angle parameter and the second weight value; The third atomic bond angle parameter and the third atomic dihedral angle parameter are determined as the target output result.
6. The method according to claim 5, characterized in that, Determining the first weight value of the first sub-network and the second weight value of the second sub-network includes: Multiple known potential functions are obtained from the database, wherein each known potential function includes at least: molecular chemical formula, atomic bond angle parameter, and atomic dihedral angle parameter; Encode the molecular chemical formulas of the known potential functions to obtain multiple input atom vectors; The multiple atomic input vectors are input into the first sub-network to obtain multiple third output results, and the multiple atomic input vectors are input into the second sub-network to obtain multiple fourth output results; The first matching rate of the first sub-network is determined based on the plurality of known potential functions and the plurality of third output results, and the second matching rate of the second sub-network is determined based on the plurality of known potential functions and the plurality of fourth output results; Determine the sum of the first matching rate and the second matching rate; The ratio of the first matching rate to the sum is determined as the first weight value, and the ratio of the second matching rate to the sum is determined as the second weight value.
7. The method according to claim 6, characterized in that, After inputting the plurality of atomic input vectors into the first sub-network to obtain a plurality of third output results, and inputting the plurality of atomic input vectors into the second sub-network to obtain a plurality of fourth output results, the method further includes: The first loss function value of the first sub-network is obtained by performing loss calculation on the multiple third output results using the target loss function; The second loss function value of the second sub-network is obtained by performing loss calculation on the multiple fourth output results using the target loss function; The first weight value and the second weight value are adjusted based on the first loss function value and the second loss function value.
8. A device for simulating a chemical reaction process, characterized in that, include: The encoding module is used to encode the molecular chemical formula of the target object input to obtain the input atom vector; The calculation module is used to input the input atomic vector into a first sub-network of the target neural network model to obtain a first output result, and to input the input atomic vector into a second sub-network of the target neural network model to obtain a second output result. The first sub-network is used to calculate the first atomic bond angle parameter and the first atomic dihedral angle parameter according to the bond order formula corresponding to the input atomic vector, and the second sub-network is used to directly calculate the second atomic bond angle parameter and the second atomic dihedral angle parameter according to the input atomic vector. The determining module is used to determine a target output result based on the first output result and the second output result, wherein the target output result includes at least: the atomic bond angle parameter of the potential function corresponding to the input atomic vector, and the atomic dihedral angle parameter of the potential function corresponding to the input atomic vector; The simulation module is used to simulate the chemical reaction process corresponding to the molecular chemical formula based on the target output results.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Molecular structure and chemical reaction energy function building method based on neural network
CN108804869A
Computer-aided simulation of chemical or biochemical reaction kinetics, involves specifying one or multiple molecular reactions of reaction kinetics by molecule types, reaction types and interaction constant, involved in molecular reaction
DE102007004624A1
