Reaction-diffusion process analysis method and system based on molecular dynamics simulation trajectory
Patent Information
- Application Number
- CN202311548670.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-11-20
AI Technical Summary
现有的第二类分析程序可以发现其中的H交换过程,但是不支持定量计算四种扩散机理的贡献
[0010] The main contributions and innovations of this invention are as follows:
Smart Images

Figure CN117594135B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of molecular dynamics simulation, and in particular to a method and system for analyzing reaction-diffusion processes based on molecular dynamics simulation trajectories. Background Technology
[0002] Molecular dynamics simulations, based on Newtonian mechanics principles, simulate the physical trajectories and states of atoms and molecules, and are an important tool for studying molecular reaction-diffusion processes. Classical molecular dynamics simulations preserve the molecular topology during the simulation, making them unable to describe reaction-diffusion processes involving bond formation and breaking. In contrast, reaction force field molecular dynamics, machine learning potential molecular dynamics, and first-principles molecular dynamics, as methods capable of describing both bond formation and breaking, offer a more comprehensive description of molecular diffusion processes. For example, regarding the diffusion of OH⁻ in H₂O, classical molecular dynamics simulations can only simulate the diffusion of OH⁻. - The physical movement of OH in water, which can be described by molecular dynamics methods of bond breaking, can be described by OH. - H-exchange processes that occur between H2O and H2O, such as the transfer of H from H2O to OH-. - , to make OH - Reacting with H2O to generate new H2O and OH- respectively - This forms a typical diffusion reaction process.
[0003] The topological structure of molecules in simulated trajectories obtained by molecular dynamics simulations that can be described as bond breaking is constantly changing, posing challenges to subsequent analysis. Therefore, trajectory analysis systems are needed to analyze diffusion processes and accelerate the research process. Existing molecular dynamics trajectory analysis programs can be divided into two main categories: the first type of analysis program cannot automatically generate molecular topological information frame by frame and can only be used for trajectories obtained from classical molecular dynamics simulations; the second type of analysis program can automatically generate molecular topological information based on criteria such as distance or bond order, and then analyze reaction information. However, this type of analysis program focuses on analyzing and statistically analyzing the species evolution and reaction network involved in the reaction process, and has limited analysis of the diffusion properties and mechanisms involved in the reaction diffusion process. (The last sentence appears to be incomplete and possibly refers to a separate topic.) - Diffusion in anion exchange membranes as an example: OH - The translation process is Vehicular diffusion, OH - In water, it undergoes H-exchange with H2O, resulting in Grotthuss diffusion, and OH-... - N in anion exchange membranes +Diffusion within the first hydration layer is considered associated diffusion; otherwise, it is free diffusion. Existing class II analysis programs can detect H-exchange processes, but they do not support quantitative calculations of the contributions of the four diffusion mechanisms. In other words, current molecular dynamics trajectory analysis programs cannot quantitatively calculate the contributions of various diffusion mechanisms based on kinetic simulation trajectories. Summary of the Invention
[0004] This application provides a method and system for analyzing reaction-diffusion processes based on molecular dynamics simulation trajectories, which can quantitatively calculate the contribution of various diffusion mechanisms based on species number, mean square displacement, or drift distance.
[0005] In a first aspect, embodiments of this application provide a method for analyzing reaction-diffusion processes based on molecular dynamics simulation trajectories, comprising the following steps:
[0006] Obtain the molecular dynamics simulation trajectory consisting of multiple dynamic frames, and select at least two dynamic frames as target frames;
[0007] Convert the text information of all target frames into atomic type variables and store them as an atomic dictionary; convert the atomic dictionary into a molecular dictionary; and convert the molecular dictionary into a reaction dictionary.
[0008] Select the target species and calculate the contribution of different diffusion modes based on the reaction dictionary.
[0009] Secondly, embodiments of this application 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 execute a reaction-diffusion process analysis method based on molecular dynamics simulation trajectories.
[0010] The main contributions and innovations of this invention are as follows:
[0011] This application provides a method and system for analyzing reaction-diffusion processes based on molecular dynamics simulation trajectories. It quantitatively describes the contribution of various diffusion mechanisms by the number of diffused species, the mean square displacement of species in the absence of an electric field, and the drift distance of species in an electric field, providing a reference for quantitative research on diffusion mechanisms.
[0012] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0013] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0014] Figure 1 A schematic diagram of bonding information for molecular dynamics trajectories in text form as described in this application;
[0015] Figure 2 A schematic diagram of the coordinate information of molecular dynamics trajectories in text form as described in this application;
[0016] Figure 3 The correspondence between Vehicular diffusion, Grotthuss diffusion, Associated diffusion and Free diffusion described in this application;
[0017] Figure 4 The analysis and processing flowchart described in this application;
[0018] Figure 5 A schematic diagram illustrating the contribution of different diffusion processes based on species numbers;
[0019] Figure 6 A schematic diagram illustrating the contribution of different diffusion processes based on drift distance;
[0020] Figure 7 A schematic diagram illustrating the contribution of different diffusion processes based on mean square displacement;
[0021] Figure 8 This is a schematic diagram of an electronic device for implementing a reaction-diffusion process analysis method based on molecular dynamics simulation trajectories. Detailed Implementation
[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same words in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0023] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0024] Example 1
[0025] To facilitate understanding of this plan, the technical terms involved will be explained before proceeding with the explanation:
[0026] Dynamics frames: In molecular dynamics simulations, dynamics frames are collections describing the state of a system at specific time points, containing atomic positions, charges, bonding information, and other relevant properties. Dynamics frames are snapshots of the system state recorded at discrete time steps during the simulation. At each time step, the simulation software updates information such as atomic positions and velocities according to the selected numerical integration algorithm. For molecular dynamics methods that can describe bond formation / breaking, a trajectory file containing bonding information is shown in the illustration. Figure 1 As shown in the diagram, the trajectory file containing coordinate information is as follows. Figure 2 As shown.
[0027] Time step: In molecular dynamics simulations, a time step is a unit of time within the simulation system. It is used to discretize time, transforming continuous time into discrete step sizes. Within each time step, the simulation program updates the position and velocity of each particle in the system to simulate the particle motion and interactions within the system.
[0028] Diffusion modes: The diffusion mechanism and methods of the target species. Taking the diffusion of hydroxide ions in anion exchange membranes as an example, there can be considered to be four diffusion modes. For example... Figure 3 As shown, this includes Free Vehicular diffusion, Associated Vehicular diffusion, Free Grotthuss diffusion, and Associated Grotthuss diffusion.
[0029] Free diffusion: Taking the diffusion of hydroxide ions in anion exchange membranes as an example, this refers to the diffusion of hydroxide ions without the influence of cationic groups in the anion exchange membrane. This type of diffusion often occurs in areas with wider pores, such as... Figure 3 As shown.
[0030] Associated diffusion: Taking the diffusion of hydroxide ions in anion exchange membranes as an example, it refers to the diffusion of hydroxide ions under the influence of cationic groups in the anion exchange membrane. This type of diffusion often occurs in narrower pores, such as... Figure 3 As shown.
[0031] Vehicular diffusion: Taking the diffusion of hydroxide ions in anion exchange membranes as an example, it refers to diffusion without chemical reactions, i.e., without bond formation or breaking. This is a physical diffusion, which can be further divided into Free Vehicular diffusion and Associated Vehicular diffusion based on whether it interacts with cationic groups. Figure 3 As shown.
[0032] Grotthuss diffusion: Taking the diffusion of hydroxide ions in anion exchange membranes as an example, it refers to the diffusion process in which proton exchange occurs, i.e., bond formation / breaking takes place. It can be further divided into Free Grotthuss diffusion and Associated Grotthuss diffusion based on whether it interacts with cationic groups. Figure 3 As shown.
[0033] Number of species: refers to the number of target diffusing species in the simulation system. Taking the diffusion of hydroxide ions in anion exchange membranes as an example, the diffusion of hydroxide ions is usually of concern.
[0034] Species drift distance under an electric field: When an external electric field is applied to a simulated system, the field will exert an electric force on charged ions. The drift of charged species under an electric field can be simulated by introducing an electric field into molecular dynamics simulations. Taking the diffusion of hydroxide ions in anion exchange membranes as an example, the directional drift behavior of hydroxide ions in anion exchange membranes in electrocatalytic systems can be simulated by introducing an electric field, thereby obtaining the conductivity of the anion exchange membrane.
[0035] The mean square displacement of a particle under no electric field describes the average distance a particle travels from its initial position over a period of time. It is calculated by squared distances between the particle's current position at different times and its initial position, and then averaged over time. Taking the diffusion of hydroxide ions in anion exchange membranes as an example, the mean square displacement obtained by simulating the self-diffusion behavior of hydroxide ions under no electric field can be used to calculate the diffusion coefficient. Based on the diffusion coefficient, the conductivity of the anion exchange membrane can be given.
[0036] This approach provides a method for analyzing reaction-diffusion processes based on molecular dynamics simulation trajectories. Unlike existing methods, this approach enables quantitative analysis of the contributions of various diffusion mechanisms. For example... Figure 4 As shown, the method includes the following steps:
[0037] Obtain the molecular dynamics simulation trajectory composed of multiple dynamic frames, and select at least two dynamic frames as target frames; convert the text information of all atoms in the target frames into atom types and store them as an atom dictionary, convert the atom dictionary into a molecular dictionary, and convert the molecular dictionary into a reaction dictionary;
[0038] Target species were selected, and the contributions of different diffusion modes were calculated based on the reaction dictionary.
[0039] Specifically, select the target species ( Figure 4 The target species is hydroxide. The contribution of different diffusion modes is calculated based on the reaction dictionary, and finally the species number, drift distance or mean square displacement of each diffusion mode is obtained.
[0040] In the step of "selecting at least two dynamic frames as target frames", such as Figure 4 As shown, a target frame is a dynamic frame whose time step is greater than or equal to the simulation start time step and less than or equal to the simulation end time step, and whose time step interval with the set initial time step is a multiple of the set analysis interval. The specific program is shown in Table 1 below. The system automatically selects dynamic frames that meet the relevant conditions from all dynamic frames based on the user-input initial time step, end time step, and analysis interval, and saves them in the target frame dictionary.
[0041] Table 1: Segmentation of the target frame from all frames
[0042]
[0043] In the step of "converting the text information of all target frame atoms into atomic types and storing them as an atomic dictionary", the initialization method of the Atom class is used to traverse and process the information of each atom in each target frame and obtain all atomic type variables of the current target frame. The specific program is shown in Table 2. First, a blank atomic dictionary is initialized, and then the dynamic frames of the target frame dictionary are traversed. For the current frame, the atomic dictionary of the current frame is initialized, and then all atoms in the current frame are traversed. For the current atom, the atomic ID, type, charge, bonding, coordinates, time step and other information in text form are embedded into the atomic type variable using Atom. The atomic dictionary of the current frame is constructed with the atomic ID as the key and the atomic type variable as the value. When the current frame is traversed, the atomic dictionary of the current frame is stored in the atomic dictionary of all target frames with the time step of the current frame as the key and the atomic dictionary of the current frame as the value.
[0044] Table 2: Target Frame Dictionary Converted to Atomic Dictionary
[0045]
[0046] In the step of "converting the atomic dictionary into a molecular dictionary", the undirected graph of the current target frame is constructed by traversing all atoms in each target frame of the atomic dictionary as nodes and atomic bonding information as edges. Multiple connected subgraphs of the undirected graph are obtained. Each connected subgraph is assigned a unique molecular ID, and the connected subgraph is stored as the topological information of the molecule in a molecular type variable of type Molecule. The molecular ID is added to the molecular dictionary of the current target frame with the molecular type variable as the value. The molecular dictionary of the current target frame is added to the molecular dictionary with the current time step as the key and the molecular dictionary of the current target frame as the value.
[0047] The specific process for creating a molecular dictionary from an atomic dictionary is shown in Table 3: First, initialize a blank molecular dictionary, then traverse all frames of the atomic dictionary (steps 1-2): For the current frame, first initialize the molecular dictionary of the current frame, initialize the molecular ID to 1, and construct a blank undirected graph. Then, traverse all atoms of the current frame (steps 3-4). For the current atom, since the atomic bonding information such as the atom's ID, charge, coordinates, and bonding is embedded in the atom type variable, this scheme directly uses these atoms as nodes of the undirected graph and adds the atomic bonding information as edges to the undirected graph of the current frame (steps 5-6). After traversing all atoms, the complete undirected graph of the current frame is obtained. Then, solve for all connected subgraphs of the complete undirected graph of the current frame. A connected subgraph is a subgraph composed of nodes and edges connected by paths in the undirected graph, and therefore these connected subgraphs correspond to each molecule (step 7).
[0048] It should be noted that the method for obtaining the connected subgraph in this scheme can be as follows: traverse every node in the undirected graph, perform a depth-first search or breadth-first search for each unvisited node to find all nodes that are directly or indirectly connected to that node, take the set of nodes visited during the search as a connected subgraph, and mark all visited vertices to ensure that they are not visited repeatedly.
[0049] After obtaining all connected subgraphs of the current frame, traverse them (step 8): For the current connected subgraph, embed it and the unique molecule ID into the molecule type variable using the Molecule initialization function. This is because the Molecule class in this scheme supports functions such as comparison, adding, deleting atoms and bonds, facilitating comparison and modification operations between molecules, which is beneficial for subsequent in-depth analysis (step 9). After obtaining the current molecule, add it to the molecular dictionary of the current frame with its ID as the key and the molecule type variable as the value. Update the molecule ID and traverse the next molecule (steps 10-11). After traversing all connected subgraphs of the current frame, add the current frame's molecular dictionary to the system's molecular dictionary with the current time step as the key and the current frame's molecular dictionary as the value (step 12). After traversing all frames of the atom dictionary, the molecular dictionary of all frames can be obtained.
[0050] Table 3 converts the atomic dictionary into a molecular dictionary.
[0051]
[0052]
[0053] In the step of "converting the molecular dictionary into a reaction dictionary", the adjacent two target frames in the molecular dictionary are traversed. In each pair of adjacent target frames, all molecules of the current target frame are obtained. Then, all molecules of the next frame that have the same atoms as the molecules of the current target frame are taken. The molecules of the current target frame and the molecules of the next frame are used as nodes of a directed graph, and the edges from the molecules of the current target frame to the molecules of the next frame are used as edges of a reaction directed graph to obtain the directed graph of the current target frame. The weakly connected subgraphs of the directed graph are obtained, where each connected subgraph corresponds to a unique reaction process. The initialization function of Reaction is used to embed the weakly connected subgraphs into the reaction type variable and assign each connected subgraph a unique reaction ID. The reaction ID is used as the key and the reaction type variable is used as the value to add to the reaction dictionary of the current frame. The reaction dictionary of all frames is obtained with the current time step as the key and the reaction dictionary of the current frame as the value.
[0054] The specific process of converting the molecular dictionary into a reaction dictionary is shown in Table 4. First, the reaction dictionary is initialized, and then all neighboring frames of the molecular dictionary are traversed (steps 1-2): For the current frame and the next frame, the reaction dictionary of the current frame is initialized first, and the reaction ID is initialized to 1, and a blank directed graph is constructed. Then, all molecules in the current frame are traversed (steps 3-4). For the current molecule, since the molecule ID and topological information are embedded in the molecule type variable, this scheme directly uses these molecules as nodes of the directed graph (step 5). The edges of the directed graph are formed by the transfer direction of atoms. Therefore, all molecules in the next frame are traversed to obtain all molecules that have common atoms with the current molecule. The directions from the current molecule to these molecules are added as edges to the directed graph of the current frame (steps 6-9).
[0055] After traversing all molecules in the current frame, the complete directed graph of the current frame is obtained. Then, all weakly connected subgraphs of the complete directed graph of the current frame are solved. These weakly connected subgraphs correspond to various reaction processes (step 10). After obtaining all weakly connected subgraphs of the current frame, they are traversed (step 11): For the current weakly connected subgraph, it and the unique reaction ID are embedded into the reaction type variable through the initialization function of the Reaction class. This is because the Reaction class in this scheme supports operations such as comparison, modification, and solving for the movement vector, which facilitates subsequent in-depth analysis (step 12). After obtaining the current reaction, it is added to the reaction dictionary of the current frame with the reaction ID as the key and the reaction type variable as the value. After updating the reaction ID, the next reaction is traversed (steps 13-14). After traversing all weakly connected subgraphs of the current frame, the reaction dictionary of the current frame is added to the reaction dictionary of the system with the current time step as the key and the reaction dictionary of the current frame as the value (step 15). After traversing all neighboring frames of the molecule dictionary, the reaction dictionary of all frames is obtained.
[0056] Table 4 converts the molecular dictionary into a reaction dictionary.
[0057]
[0058] In the step of “selecting target species and calculating the contribution of different diffusion modes based on the reaction dictionary”, the number of species in different diffusion modes in all diffusion reactions, the mean square displacement of the target species without electric field and the drift distance of the target species under electric field are calculated based on the reaction dictionary. Different diffusion modes include Grotthuss diffusion and Vehicular diffusion, which respectively include Free diffusion away from the material surface and Associated diffusion on the material surface.
[0059] In the "selecting target species" step, for the diffusion system of hydroxide ions in anion exchange membranes, the target species refers to hydroxide-related species, such as OH-. - H3O2 - and H5O3 - The criterion used to determine the associated interaction distance is the radius of the first hydration layer of the characteristic atoms on the surface of the anion exchange membrane pores, commonly the radius of the first hydration layer of nitrogen atoms. For proton diffusion in proton exchange membranes, the target species refers to H3O. + For species such as [list of species], the criterion used to determine the associated interaction distance is the radius of the first hydration layer of characteristic atoms on the surface of the proton ion exchange membrane pores, commonly the radius of the first hydration layer of S atoms.
[0060] In the step of "calculating the contribution of different diffusion modes based on the reaction dictionary," this scheme classifies the movement vectors of target species in each reaction to obtain the movement vectors included in various diffusion modes. Then, based on the movement vectors, it calculates the number distribution of various diffusion modes, the drift distance of target species, and the mean square displacement, facilitating the calculation of the membrane material's conductivity. Specifically, based on the reaction dictionary, it calculates the number of species in different diffusion modes in all diffusion reactions, the mean square displacement of target species without an electric field, and the drift distance of target species under an electric field. The different diffusion modes include Grotthuss diffusion and Vehicular diffusion, both of which respectively include Free diffusion away from the material surface and Associated diffusion at the material surface.
[0061] In the step of "selecting target species and calculating the contribution of different diffusion modes based on the reaction dictionary", all reactions in adjacent frames are traversed based on the reaction dictionary. The species vector of the target species in the reaction containing the target species is calculated. The species vector of the species is included in each diffusion mode based on whether the atomic ID of the target species changes and the distance to the surface group. The number of species vectors in each diffusion mode is counted to obtain the number of species in different diffusion modes. The mean square displacement or drift distance of each diffusion mode is calculated in combination with the molecular dynamics simulation to determine whether an electric field is used. If there is no electric field, the mean square displacement is calculated; otherwise, the drift distance of the target species is calculated.
[0062] In the step of "incorporating the species vector into each diffusion mode based on whether the atomic ID of the target species changes and the distance to the surface groups", if the atomic ID of the target species changes during the diffusion reaction, it is marked as Grotthuss diffusion; otherwise, it is Vehicular diffusion. Then, the distance between the target species and the surface is calculated. If the distance is greater than the radius of the first hydration layer, it is marked as Free diffusion; otherwise, it is Associated diffusion. Finally, four diffusion modes are classified: Free Grotthuss, Free Vehicular, Associated Grotthuss, and Associated Vehicular. The first hydration layer is obtained based on the radial distribution function of water molecules and atoms on the material surface. The distance corresponding to the first peak and valley of the RDF is the radius of the first hydration layer.
[0063] Specific methods for calculating and classifying movement vectors include: Figure 4 As shown in the mechanistic analysis section, for the diffusion of hydroxide ions in the anion exchange membrane, hydroxide ions are first obtained from the reactants (hydroxyl ions). R ) and hydroxide ions in the products (hydroxyl ions) P The movement vector of hydroxide ions within the current analytical interval can be calculated by combining their coordinates with the periodic boundary. Since the characteristic atom of the anion exchange membrane in this example is the N atom, the radius of the first hydration layer of the N atom (R0) needs to be obtained based on the radial distribution function (RDF) of NO. 1st ), and calculate the distance L between the hydroxide ion and the N atom. If L is greater than R 1st If the diffusion rate is 0, it is considered Free diffusion; otherwise, it is Associated diffusion. Then, the id (id value) of the target species in the reactants is compared. R ) and the target species id in the product (id) P If they are consistent, it is Grothuss diffusion; otherwise, it is Vehicular diffusion.
[0064] In the step of "finally obtaining the number of species, drift distance, or mean square displacement for various diffusion modes," the number of species for each diffusion mechanism is obtained by statistically analyzing the number of diffusion vectors corresponding to each mechanism. The drift distance for each diffusion mechanism is obtained by calculating the average movement vector of each diffusion mechanism frame by frame and summing the vectors. The drift distance required to calculate the conductivity of the membrane material is obtained by summing the average movement vectors of all frames. The mean square displacement for each diffusion mechanism is obtained by squaring and averaging the diffusion vectors of each mechanism. The mean square displacement used to solve for the diffusion coefficient is obtained by squaring and averaging all diffusion vectors.
[0065] Results of evaluating the contributions of various dispersal modes through species abundance, such as Figure 5 As shown, in this example, the system contains approximately 39 hydroxide ions, with an average of 31.35 hydroxide ions undergoing Associated Grotthuss diffusion per frame. Therefore, this mechanism is absolutely dominant, followed by Associated Vehicular diffusion, Free Grotthuss diffusion, and Free Vehicular diffusion. The results of evaluating the contributions of various diffusion modes by drift distance are as follows... Figure 6 As shown, under the electric field, the Free Grotthuss and Associated Grotthuss mechanisms of hydroxide species exhibit the longest drift distances, indicating their fastest drift speeds, while the Associated Vehicular and Free Vehicular mechanisms show the slowest drift speeds. The results of evaluating the contributions of various diffusion modes using mean square displacement are as follows... Figure 7 As shown, in the absence of an electric field, Associated Grotthuss diffusion of hydroxide species exhibits the largest mean square displacement, followed by Free Grotthuss, Associated Vehicular, and Free Vehicular diffusion. Overall, Associated Grotthuss diffusion is the dominant diffusion mechanism in this example system.
[0066] It is worth noting that simulation results obtained from different AEM systems, different simulation methods, or different modeling approaches will vary. There is currently no unified simulation method, and this example is designed only to demonstrate the functionality of this system.
[0067] Example 2
[0068] This embodiment also provides an electronic device, see reference. Figure 8 It includes a memory 304 and a processor 302, the memory 304 storing a computer program and the processor 302 being configured to run the computer program to perform the steps in any of the above embodiments of the reaction-diffusion process analysis method based on molecular dynamics simulation trajectories.
[0069] Specifically, the processor 302 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0070] The memory 304 may include a mass storage device for data or instructions. For example, and not limitingly, the memory 304 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 304 may include removable or non-removable (or fixed) media. Where appropriate, the memory 304 may be internal or external to a data processing device. In a particular embodiment, the memory 304 is non-volatile memory. In a particular embodiment, the memory 304 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0071] The memory 304 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 302.
[0072] The processor 302 reads and executes computer program instructions stored in the memory 304 to implement any of the reaction-diffusion process analysis methods based on molecular dynamics simulation trajectories in the above embodiments.
[0073] Optionally, the electronic device may further include a transmission device 306 and an input / output device 308, wherein the transmission device 306 is connected to the processor 302 and the input / output device 308 is connected to the processor 302.
[0074] The transmission device 306 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device 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 306 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0075] The input / output device 308 is used to input or output information. In this embodiment, the input information may be molecular dynamics simulation trajectories, etc., and the output information may be the contributions of different diffusion modes, etc.
[0076] Optionally, in this embodiment, the processor 302 can be configured to perform the following steps via a computer program:
[0077] Obtain the molecular dynamics simulation trajectory consisting of a neighbor list of multiple dynamic frames;
[0078] Select at least one dynamic frame as the target frame;
[0079] Convert all atoms in the target frame into atom type variables and store them as an atom dictionary; convert the atom dictionary into a molecule dictionary; and convert the molecule dictionary into a reaction dictionary.
[0080] Target species were selected, and the contributions of different diffusion modes were calculated based on molecular and reaction dictionaries.
[0081] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0082] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0083] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products), including software routines, applets, and / or macros, can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer-executable components configured to perform embodiments when the program is run. One or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted that any block in the logical flow of the figures may represent a program step, or interconnected logical circuitry, blocks and functions, or a combination of program steps and logical circuitry, blocks and functions. The software may be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0084] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0085] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for analyzing reaction-diffusion processes based on molecular dynamics simulation trajectories, characterized in that, Includes the following steps: Obtain the molecular dynamics simulation trajectory consisting of multiple dynamic frames; Select at least two dynamic frames as target frames; Convert all atoms in the target frame into atom type variables and store them as an atom dictionary; convert the atom dictionary into a molecule dictionary; and convert the molecule dictionary into a reaction dictionary. Select the target species and calculate the contribution of different diffusion modes based on the reaction dictionary; In the step of "selecting at least two dynamic frames as target frames", the target frame time step should simultaneously satisfy the condition that it is greater than or equal to the simulation start time step and less than or equal to the simulation end time step, and the time step interval between the time step and the set initial time step satisfies the multiple relationship of the set analysis interval. In the step of "converting the atoms of all target frames into atom type variables and storing them as an atom dictionary", the initialization method of the Atom class is used to traverse and process the information of each atom in each target frame to obtain the atom type variable of the current target frame. The atom dictionary of the current frame is constructed with the atom id as the key and the atom type variable as the value. The atom dictionary of the current frame is stored in the atom dictionary of all target frames with the time step of the current frame as the key and the atom dictionary of the current frame as the value. In the step of "converting the atomic dictionary into a molecular dictionary", the undirected graph of the current target frame is constructed by traversing all atoms in each target frame of the atomic dictionary as nodes and atomic bonding information as edges. Multiple connected subgraphs of the undirected graph are obtained. Each connected subgraph is assigned a unique molecular ID, and the connected subgraph is stored as the topological information of the molecule in a molecular type variable of type Molecule. The molecular ID is added to the molecular dictionary of the current target frame with the molecular type variable as the value. The molecular dictionary of the current target frame is added to the molecular dictionary with the current time step as the key and the molecular dictionary of the current target frame as the value.
2. The reaction-diffusion process analysis method based on molecular dynamics simulation trajectories according to claim 1, characterized in that, In the step of "converting the molecular dictionary into a reaction dictionary", the molecular dictionary is traversed between adjacent target frames. In each pair of adjacent target frames, all molecules of the current frame in the current target frame are obtained. Then, all molecules of the next frame that have the same atoms as the molecules of the current target frame in the next target frame are taken. The molecules of the current target frame and the molecules of the next frame are used as nodes of a directed graph, and the edges from the molecules of the current target frame to the molecules of the next frame are used as edges of a reaction directed graph to obtain the directed graph of the current target frame. All weakly connected subgraphs of the directed graph are obtained. The initialization function of the reaction is used to embed the weakly connected subgraphs into the reaction type variable and assign a unique reaction ID to each connected subgraph. The reaction ID is used as the key and the reaction type variable is used as the value to add to the reaction dictionary of the current frame. The reaction dictionary of all frames is obtained with the current time step as the key and the reaction dictionary of the current frame as the value.
3. The reaction-diffusion process analysis method based on molecular dynamics simulation trajectories according to claim 1, characterized in that, In the step of "selecting target species and calculating the contribution of different diffusion modes based on the reaction dictionary", the number of species in different diffusion modes in all diffusion reactions, the mean square displacement of the target species without electric field, and the drift distance of the target species under electric field are calculated based on the reaction dictionary. Different diffusion modes include Grotthuss diffusion and Vehicular diffusion, which respectively include Free diffusion away from the material surface and Associated diffusion on the material surface.
4. The reaction-diffusion process analysis method based on molecular dynamics simulation trajectories according to claim 1, characterized in that, In the step of "selecting target species and calculating the contribution of different diffusion modes based on the reaction dictionary", all reactions in adjacent frames are traversed based on the reaction dictionary. The moving species vector of the target species in the reaction containing the target species is calculated. The moving species vector of the species is included in each diffusion mode based on whether the atomic ID of the target species changes and the distance to the characteristic atoms on the material surface of the diffusion system. The number of species vectors in each diffusion mode is counted to obtain the number of species in different diffusion modes. The mean square displacement or drift distance of each diffusion mode is calculated in combination with the molecular dynamics simulation to determine whether an electric field is used. If there is no electric field, the mean square displacement is calculated; otherwise, the drift distance of the target species is calculated.
5. The reaction-diffusion process analysis method based on molecular dynamics simulation trajectories according to claim 4, characterized in that, In the step of "incorporating the species vector into each diffusion mode based on whether the atomic ID of the target species changes and the distance to the surface groups", if the atomic ID of the target species changes during the diffusion reaction, it is marked as Grotthuss diffusion; otherwise, it is Vehicular diffusion. Then, the distance between the target species and the characteristic atoms on the material surface of the diffusion system is calculated. If the distance is greater than the radius of the first hydration layer, it is marked as Free diffusion; otherwise, it is Associated diffusion. Finally, four diffusion modes are classified: Free Grotthuss, Free Vehicular, Associated Grotthuss, and Associated Vehicular.
6. The reaction-diffusion process analysis method based on molecular dynamics simulation trajectories according to claim 5, characterized in that, In the step of "if the distance is greater than the radius of the first hydration layer, it is marked as Free diffusion, otherwise it is Associated diffusion", the first hydration layer is obtained according to the radial distribution function of water molecules and atoms on the material surface, where the distance corresponding to the first peak and valley of the RDF is the radius of the first hydration layer.
7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the reaction-diffusion process analysis method based on molecular dynamics simulation trajectories as described in any one of claims 1 to 6.