Method for identifying molecular structure and constructing reaction network based on atomic coordinates
By identifying molecular structures through minimum mirror convention and depth-first search algorithms, and constructing reaction networks by combining time windows and reaction cancellation, the problems of long construction cycles and low efficiency in existing technologies for reaction network construction are solved, and efficient and widely applicable molecular structure and reaction network construction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ROCKET FORCE UNIV OF ENG
- Filing Date
- 2025-11-21
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies cannot efficiently construct reaction networks and are only suitable for single simulation systems, resulting in long reaction network construction cycles and low efficiency, making it difficult to meet the rapid analysis needs of high-throughput materials research and development.
Atomic coordinates are transformed and meshed using the minimum mirror convention. Molecular structures are identified by combining a depth-first search algorithm. A reaction network is constructed using time windows and reaction cancellation. RDKit is used to generate SMILES descriptors and HTML visualizations of the reaction network.
It enables efficient identification of molecular structures and construction of reaction networks, adapts to various simulation systems, significantly improves processing efficiency, and provides quantitative reaction correlation data support.
Smart Images

Figure CN122024911A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of materials simulation technology, specifically relating to a method for identifying molecular structures and constructing reaction networks based on atomic coordinates. Background Technology
[0002] In cutting-edge fields such as materials design, catalysis optimization, and biopharmaceuticals, obtaining panoramic information on the "atom-molecule-reaction network" is a core requirement. In recent years, multi-scale molecular simulation technology has made breakthrough progress. Techniques such as density functional theory (DFT), reaction molecular dynamics (ReaxFF-MD), and machine learning molecular dynamics (ML-MD) can now perform routine calculations on systems ranging from hundreds to millions of atoms with time spans from femtoseconds to nanoseconds. Moreover, they can generate massive amounts of trajectory data under conditions without any experimental priors, providing a rich data foundation for the study of reaction mechanisms.
[0003] However, existing technologies suffer from two major bottlenecks: First, trajectory files only record atomic coordinates and element types at discrete moments, and cannot directly output chemical semantic information such as molecular structure and chemical bond changes, requiring additional post-processing to extract reaction-related data. Second, traditional post-processing schemes have significant limitations. Specifically, they not only heavily rely on the molecular bond-level calculation modules and pre-processed product databases built into the simulation software, but are also only compatible with simulation data of ReaxFF reaction force fields, and cannot be compatible with trajectory files from other mainstream simulations such as DFT and ML-MD, thus limiting their application scope; they also lack the ability to construct complex reaction networks efficiently, requiring either manual screening of reaction events and manual organization of reaction relationships, or reliance on high-computing-power brute-force calculations, resulting in long and inefficient reaction network construction cycles, making it difficult to meet the needs of high-throughput materials research and development for rapid reaction analysis.
[0004] In summary, existing technologies struggle to establish reaction networks using fundamental simulation data such as atomic coordinates, resulting in long lead times and low efficiency. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method for identifying molecular structures and constructing reaction networks based on atomic coordinates, which addresses the shortcomings of the prior art and has high design efficiency, wide applicability, and is easy to promote and use.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for identifying molecular structures based on atomic coordinates includes the following steps: S1. Obtain trajectory data, which includes atom coordinates, atom type, and simulation box data; S2. Use the minimum mirror convention to perform coordinate transformation on all atomic coordinates to obtain the enclosed coordinates; The formula for calculating the minimum mirror convention is:
[0007] in, It is an atom and atoms The three-dimensional position vector, It is an atom Pointing to the atom The smallest mirror vector, It is the length vector of the periodic box. This is a function for rounding numbers. S3. Based on the package coordinates obtained in step S2, divide the grid according to the spatial truncation radius and assign the package coordinates to the corresponding grids; calculate the minimum mirror distance between an atom in the grid and other atoms in its own grid and neighboring grids. , ; S4. Compare the minimum mirror image distance between two atoms with the chemical bond cutoff value. If the minimum mirror image distance is less than or equal to the corresponding chemical bond cutoff value, the two atoms are determined to be bonded. Otherwise, the two atoms are determined not to be bonded. S5. A depth-first search (DFS) algorithm is used to traverse the bond relationships of all atoms, and the sets of atoms connected by bond relationships are divided into independent clusters. Each cluster corresponds to a molecular entity. By analyzing the atom types, numbers and bond relationships within the cluster, the structural description of the molecular entity is generated, and the molecular structure is obtained.
[0008] Furthermore, in step S3, the spatial cutoff radius is equal to the maximum value of the chemical bond distance cutoff value of all atoms.
[0009] Furthermore, in step S5, SMILES descriptors are generated using the RDKit software package as structural descriptions of molecular entities to characterize the molecular structure.
[0010] This invention also discloses a method for constructing reaction networks based on atomic coordinates, comprising the following steps: Based on the above-mentioned method for identifying molecular structures based on atomic coordinates, the structural description and molecular structure of each molecular entity in the trajectory data are identified frame by frame. Compare the structural descriptions of molecular entities in two consecutive frames frame by frame. If the structural description of any molecular entity in the current frame differs from the structural description of the corresponding molecular entity in the previous frame, then the molecular entity in the current frame is determined to be a product and the molecular entity in the previous frame is determined to be a reactant. Record the reaction relationship between the reactant and the product. A time window is formed every set number of consecutive frames. All reaction relationships recorded in the time window are canceled out by forward and reverse reactions to obtain the net reaction within the time window. The cumulative number of the same net reaction within all time windows is counted as the reaction frequency of each net reaction. The ratio of the cumulative number of a certain net reaction to the total cumulative number of all net reactions is used as the reaction probability of that net reaction. By using molecular structures as graph nodes and reaction frequencies as edge weights, a graph structure data is constructed; by traversing all net reactions and merging identical graph nodes, a reaction network is obtained.
[0011] Furthermore, the number of consecutive frames is set to 2000fs ÷ the time interval between adjacent frames of the trajectory.
[0012] Furthermore, the reaction network is visualized using HTML.
[0013] Compared with the prior art, the present invention has the following advantages: This invention presents a method for identifying molecular structures based on atomic coordinates. By acquiring trajectory data and performing coordinate transformations on atoms using a minimum mirror image convention, atoms located outside the "box" are moved inside. A grid is divided using a spatial cutoff radius to ensure accurate screening of potential bonding atoms when calculating the minimum mirror image distances between atoms within the grid and other atoms in their own and neighboring grids, avoiding redundant calculations of pairwise distances across the entire system. Bonding relationships are determined based on element-pair-specific chemical bond distance cutoff values, solving the structural identification ambiguity problem caused by existing technologies relying on bond-level output. Depth-first search is combined to quickly divide atomic clusters for molecular structure identification, significantly improving processing efficiency while maintaining identification accuracy, balancing the efficiency and cost of processing massive trajectory data. This invention, by reading atomic coordinate data from simulated trajectories, does not rely on post-processing modules in simulation software and determines bonding relationships based on bond-level criteria and traversal rules, overcoming the limitation of existing technologies that are only applicable to a single simulation system.
[0014] This invention provides a method for constructing reaction networks based on atomic coordinates. This method acquires molecular structure data by comparing the structural descriptions of molecular entities with those described above. It accurately identifies transient reactions and product changes in each frame, effectively filters out invalid reversible reactions by dividing the time window and canceling out forward and reverse reactions, and obtains the true net reaction. The number of net reactions is counted to obtain the reaction frequency of each net reaction. A network is constructed using molecular structures as nodes and reaction frequencies as edge weights. This clarifies the reaction correlations between molecules and quantifies the tendency of reactions to occur through reaction probabilities, providing quantitative data support for materials mechanism research.
[0015] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating an embodiment of the method for identifying molecular structures based on atomic coordinates according to the present invention. Figure 2 This is a flowchart illustrating an embodiment of the method for constructing reaction networks based on atomic coordinates according to the present invention; Figure 3 This is a schematic diagram of a reaction network in an embodiment of the method for constructing reaction networks based on atomic coordinates according to the present invention. Detailed Implementation
[0017] Example of a method for constructing reaction networks based on atomic coordinates: like Figure 2 As shown, the method for constructing reaction networks based on atomic coordinates includes the following steps: Based on the method of identifying molecular structure using atomic coordinates, the structural description and molecular structure of each molecular entity in the trajectory data are identified frame by frame.
[0018] Among them, such as Figure 1 As shown, the method for identifying molecular structures based on atomic coordinates includes the following steps: S1. Obtain trajectory data, which includes atom coordinates, atom types, and simulation box data. The trajectory file contains first-principles calculation results, ReaxFF simulation results, and machine learning potential simulation results, which can be obtained by simulation using software such as VASP, CP2K, LAMMPS, and GPUMD.
[0019] The simulation box is a three-dimensional spatial container used for molecular dynamics simulations. By setting periodic boundary conditions, it restricts the range of molecular motion and ensures that the simulation system evolves dynamically within a limited space.
[0020] S2. Use the minimum mirror convention to perform coordinate transformation on all atomic coordinates to obtain the enclosed coordinates; The formula for calculating the minimum mirror convention is:
[0021] in, It is an atom and atoms The three-dimensional position vector, It is an atom Pointing to the atom The smallest mirror vector, It is the length vector of the periodic box. This is a function for rounding numbers. All vectors involved in this formula are three-dimensional vectors.
[0022] S3. Based on the package coordinates obtained in step S2, divide the grid according to the spatial truncation radius and assign the package coordinates to the corresponding grids; calculate the minimum mirror distance between an atom in the grid and other atoms in its own grid and neighboring grids. , .
[0023] In step S3, the spatial cutoff radius is equal to the maximum value of the chemical bond distance cutoff for all atoms. The spatial cutoff radius limits the range of atoms for calculating the minimum mirror distance, ensuring accuracy without incurring excessive computational overhead. For example, the spatial cutoff radius for C, H, N, and O is 2.05 Å.
[0024] S4. Compare the minimum mirror image distance and the chemical bond cutoff value between two atoms. If the minimum mirror image distance is less than or equal to the corresponding chemical bond cutoff value, the two atoms are considered to be bonded; otherwise, they are considered not bonded. Taking the four common elements in organic molecules C, H, N, and O as examples, the following conditions must be met to form a bond: HH bond: interatomic distance ≤ 1.243 Å; HC bond: interatomic distance ≤ 1.7 Å; HN bond: interatomic distance ≤ 1.382 Å; HO bond: interatomic distance ≤ 1.52 Å; CC bond: interatomic distance ≤ 1.82 Å; CN bond: interatomic distance ≤ 2.05 Å; CO bond: interatomic distance ≤ 1.686 Å; NN bond: interatomic distance ≤ 1.876 Å; NO bond: interatomic distance ≤ 1.88 Å; OO bond: interatomic distance ≤ 1.63 Å.
[0025] S5. A depth-first search (DFS) algorithm is used to traverse the bond relationships of all atoms, dividing the sets of atoms interconnected by bond relationships into independent clusters. Each cluster corresponds to a molecular entity. By analyzing the atom types, numbers, and bond relationships within the cluster, a structural description of the molecular entity is generated, thus obtaining the molecular structure. SMILES descriptors are generated using the RDKit software package as structural descriptions of the molecular entities to characterize the molecular structure.
[0026] To identify chemical reaction relationships, the structural descriptions of molecular entities in two consecutive frames are compared frame by frame. If the structural description of any molecular entity in the current frame differs from that of the corresponding molecular entity in the previous frame, the molecular entity in the current frame is determined to be a product, and the molecular entity in the previous frame is determined to be a reactant. The reaction relationship between the reactant and the product is then recorded. A reaction relationship refers to a chemical reaction that occurs between two molecules.
[0027] To ensure the accuracy of calculated reaction probabilities, a time window is formed every set number of consecutive frames. All reaction relationships recorded within this time window are canceled out by forward and reverse reactions to obtain the net reaction within that time window. The cumulative number of identical net reactions across all time windows is counted as the reaction frequency of each net reaction. The ratio of the cumulative number of a particular net reaction to the total cumulative number of all net reactions is used as the intermolecular reaction probability within that net reaction. This method effectively filters out invalid reversible reactions, yielding the true net reaction.
[0028] The cancellation of forward and reverse reactions refers to the following: If there is one reaction equation A+B=E+D and another reaction equation E+D=A+B within a certain time window, then these two equations are forward and reverse reactions, and they cancel each other out, resulting in a net reaction of 0; that is, if the reactants and products of two reaction relationships are exactly opposite, then forward and reverse reactions can cancel each other out.
[0029] The number of consecutive frames is set to 2000 frames per second (fs) ÷ the time interval between adjacent frames of the track. For example, if the time interval between adjacent frames of the track is 200 fs, then the number of consecutive frames is set to 10 frames.
[0030] like Figure 3 As shown, a graph structure is constructed using molecular structures as graph nodes and reaction frequencies as edge weights. All net reactions are traversed, and identical graph nodes are merged to obtain the reaction network. The reaction network is visualized using HTML. Visualizing the reaction network through HTML intuitively presents reaction sites and frequencies, and the entire process requires no prior experimental knowledge, making it suitable for various scenarios such as high-throughput material discovery and combustion mechanism construction. This invention can be implemented using languages including, but not limited to, Python and C++. Figure 3 In this context, Freq represents the cumulative number of net reactions, i.e., the reaction frequency. Reaction frequency is used to construct reaction networks, while reaction probability is used by researchers for querying.
[0031] Examples of methods for identifying molecular structures based on atomic coordinates: like Figure 1 As shown, the method for identifying molecular structures based on atomic coordinates includes the following steps: S1. Obtain trajectory data, which includes atom coordinates, atom type, and simulation box data; S2. Use the minimum mirror convention to perform coordinate transformation on all atomic coordinates to obtain the enclosed coordinates; The formula for calculating the minimum mirror convention is:
[0032] in, It is an atom and atoms The three-dimensional position vector, It is an atom Pointing to the atom The smallest mirror vector, It is the length vector of the periodic box. This is a function for rounding numbers. S3. Based on the package coordinates obtained in step S2, divide the grid according to the spatial truncation radius and assign the package coordinates to the corresponding grids; calculate the minimum mirror distance between an atom in the grid and other atoms in its own grid and neighboring grids. , ; S4. Compare the minimum mirror image distance between two atoms with the chemical bond cutoff value. If the minimum mirror image distance is less than or equal to the corresponding chemical bond cutoff value, the two atoms are determined to be bonded. Otherwise, the two atoms are determined not to be bonded. S5. A depth-first search (DFS) algorithm is used to traverse the bond relationships of all atoms, and the sets of atoms connected by bond relationships are divided into independent clusters. Each cluster corresponds to a molecular entity. By analyzing the atom types, numbers and bond relationships within the cluster, the structural description of the molecular entity is generated, and the molecular structure is obtained.
[0033] In step S3, the spatial cutoff radius is equal to the maximum value of the chemical bond distance cutoff value of all atoms.
[0034] In step S5, SMILES descriptors are generated using the RDKit software package to characterize the molecular structure as a structural description of the molecular entity.
[0035] This embodiment is implemented with reference to the above-described method embodiment for constructing reaction networks based on atomic coordinates, and will not be repeated here.
[0036] The above description is merely a preferred embodiment of the present invention and does not constitute any limitation on the present invention. Any simple modifications, alterations, or equivalent structural changes made to the above embodiments based on the technical essence of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for identifying molecular structures based on atomic coordinates, characterized in that: Includes the following steps: S1. Obtain trajectory data, which includes atom coordinates, atom type, and simulation box data; S2. Use the minimum mirror convention to perform coordinate transformation on all atomic coordinates to obtain the enclosed coordinates; The formula for calculating the minimum mirror convention is: in, It is an atom and atoms The three-dimensional position vector, It is an atom Pointing to the atom The smallest mirror vector, It is the length vector of the periodic box. This is a function for rounding numbers. S3. Based on the package coordinates obtained in step S2, divide the grid according to the spatial truncation radius and assign the package coordinates to the corresponding grids; calculate the minimum mirror distance between an atom in the grid and other atoms in its own grid and neighboring grids. , ; S4. Compare the minimum mirror image distance between two atoms with the chemical bond cutoff value. If the minimum mirror image distance is less than or equal to the corresponding chemical bond cutoff value, the two atoms are determined to be bonded. Otherwise, the two atoms are determined not to be bonded. S5. A depth-first search (DFS) algorithm is used to traverse the bond relationships of all atoms, and the sets of atoms connected by bond relationships are divided into independent clusters. Each cluster corresponds to a molecular entity. By analyzing the atom types, numbers and bond relationships within the cluster, the structural description of the molecular entity is generated, and the molecular structure is obtained.
2. The method for identifying molecular structures based on atomic coordinates according to claim 1, characterized in that: In step S3, the spatial cutoff radius is equal to the maximum value of the chemical bond distance cutoff value of all atoms.
3. The method for identifying molecular structures based on atomic coordinates according to claim 1, characterized in that: In step S5, SMILES descriptors are generated using the RDKit software package to characterize the molecular structure as a structural description of the molecular entity.
4. A method for constructing reaction networks based on atomic coordinates, characterized in that: Includes the following steps: According to any one of claims 1-3, a method for identifying molecular structures based on atomic coordinates is used to identify the structural description and molecular structure of each molecular entity in trajectory data frame by frame. Compare the structural descriptions of molecular entities in two consecutive frames frame by frame. If the structural description of any molecular entity in the current frame differs from the structural description of the corresponding molecular entity in the previous frame, then the molecular entity in the current frame is determined to be a product and the molecular entity in the previous frame is determined to be a reactant. Record the reaction relationship between the reactant and the product. A time window is formed every set number of consecutive frames. All reaction relationships recorded in the time window are canceled out by forward and reverse reactions to obtain the net reaction within the time window. The cumulative number of the same net reaction within all time windows is counted as the reaction frequency of each net reaction. The ratio of the cumulative number of a certain net reaction to the total cumulative number of all net reactions is used as the reaction probability of that net reaction. By using molecular structures as graph nodes and reaction frequencies as edge weights, a graph structure data is constructed; by traversing all net reactions and merging identical graph nodes, a reaction network is obtained.
5. A method for constructing a reaction network based on atomic coordinates according to claim 4, characterized in that: Set the number of consecutive frames to 2000fs ÷ the time interval between adjacent frames of the trajectory.
6. A method for constructing a reaction network based on atomic coordinates according to claim 4, characterized in that: The reaction network is visualized using HTML.