Molecular recognition and extraction process method based on reaxff reaction kinetics simulation

By employing a molecular identification and extraction method based on ReaxFF reaction kinetics simulation, the problem of insufficient molecular structure analysis in existing technologies has been solved. This method enables efficient identification and extraction of characteristic molecular fragments from reaction kinetics simulations and establishes a connection between the microscopic properties of reaction kinetics simulation products and experimental macroscopic properties.

CN122090972APending Publication Date: 2026-05-26LULIANG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LULIANG UNIV
Filing Date
2026-01-14
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing reaction kinetics simulation methods mainly focus on obtaining the properties of reaction products from molecular structural formulas, but lack molecular structure analysis. This makes it difficult to link the microscopic properties of the reaction kinetics simulation products with the experimental macroscopic properties, thus requiring a molecular recognition and extraction processing scheme.

Method used

This paper presents a molecular identification and extraction method based on ReaxFF reaction kinetics simulation. The method obtains a dump source file containing bond order and coordinates from the ReaxFF simulation output, stores the bond order information at each time step, extracts and stores the atomic information of all molecules at the same time step, determines the characteristics of the target molecule and stores all its atomic information, iterates through the atomic coordinate information of all time steps, and finally stores the structural information of the target molecule over the entire time period.

Benefits of technology

It enables efficient identification and extraction of characteristic molecular fragments from reaction kinetic simulations, obtains molecular coordinate information of target products, and can rapidly identify and extract all molecular fragments from simulations, establishing a bridge between the microscopic properties of reaction kinetic simulation products and experimental macroscopic properties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122090972A_ABST
    Figure CN122090972A_ABST
Patent Text Reader

Abstract

This invention provides a molecular identification and extraction method based on ReaxFF reaction kinetics simulation, belonging to the field of molecular identification and extraction technology. To obtain molecular structure information from reaction kinetics simulations, this invention obtains a dump source file containing bond orders and coordinates from the ReaxFF simulation output. It stores the bond order information at each time step in the bond source file, extracts and stores the atomic information of all molecules at the same time step, determines the target molecule features, identifies and stores the target molecule features based on the obtained atomic ID information of all molecules at the same time step, stores the coordinate information of the dump source file at each time step, and iterates through the atomic coordinate information and atomic IDs of all target molecules at the same time step to obtain the atomic coordinate information of the target molecule. This invention is applied to the identification and extraction of molecular structure information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention provides a molecular recognition and extraction method based on ReaxFF reaction kinetics simulation, belonging to the field of molecular recognition and extraction technology. Background Technology

[0002] In recent years, reaction kinetics-based simulation methods have attracted widespread attention from researchers due to their advantages of high portability, high-precision DFT calculations, and large-scale simulations. These simulation methods can be widely used to reveal the reaction mechanisms in large-scale systems, especially in complex reaction systems such as coal pyrolysis, coal gasification, supercritical water gasification of coal, coal oxidation combustion, coal catalysis, and plastic pyrolysis.

[0003] However, current reaction kinetics simulation methods are limited to open-source scripts, and researchers mainly focus on obtaining reaction product properties based on molecular structural formulas. Molecular structure analysis specific to reaction kinetics simulations is severely lacking. There is an urgent need to develop a molecular recognition and extraction processing scheme to obtain molecular structure information from reaction kinetics simulations, thus linking the microscopic properties of reaction kinetics simulation products with Py-GC / MC, TG-MS, FTIR, and other analytical techniques. 13 Bridges are built between experimental macroscopic properties such as C-NMR and XRD. Summary of the Invention

[0004] To address the technical problems existing in the background art, the present invention provides a molecular recognition and extraction method based on ReaxFF reaction kinetics simulation, comprising the following processing steps:

[0005] Step 1: Obtain a dump source file containing the bond level and coordinates from the ReaxFF simulation output;

[0006] Step 2: Store the key-level information of the bond source files at each time step;

[0007] Step 3: Extract and store the atomic information of all molecules at the same time step;

[0008] Step 4: Determine the characteristics of the target molecule. Based on the atom ID information of all molecules at the same time step, identify the characteristics of the target molecule and store the atom ID information of the target molecule.

[0009] Step 5: Store the coordinate information of each time step in the dump source file;

[0010] Step 6: Traverse the atomic coordinate information and the atom IDs of all target molecules at the same time step to obtain the atomic coordinate information of all target molecules;

[0011] Step 7: Iterate through all time steps, repeating steps 3 through 6;

[0012] Step 8: Store the target molecule structure information over the entire time period.

[0013] The specific method for step two is as follows:

[0014] Step 2.1: Create files in Excel, Word, PDF, and ASSCII formats to store the key-level information of each time step in the bonds source file; open the bonds source file containing the key-level information; use a loop function to call each line of information in the bonds source file; set the number of rows occupied by the key-level information at each time step, and use a conditional function to write the key-level information matching the same time step into the corresponding Excel, Word, PDF, and ASSCII format files; write the key-level information of all time steps into the corresponding Excel, Word, PDF, and ASSCII format files and save them.

[0015] Step 2.2: Retrieve the corresponding Excel, Word, PDF, and ASCII format files that store key-level information for each time step; use a loop function to retrieve each line of key-level information from the file storing key-level information for each time step; use a conditional function to identify and delete blank lines in the corresponding Excel, Word, PDF, and ASCII format files; save the corresponding Excel, Word, PDF, and ASCII format files with blank lines removed.

[0016] The specific method for step three is as follows:

[0017] Step 3.1: Call the Excel, Word, PDF, and ASSCII format files that store bond-level information at the same time step, and create corresponding Excel, Word, PDF, and ASSCII format files that store the atom ID information of all molecules in the same molecule;

[0018] Create 7 lists or arrays to store atomic ID information, including a1=[], a2=[], a3=[], a4=[], a5=[], a6=[], a7=[], where:

[0019] List a1 includes: the IDs of atoms in the memory containing chemical bonds for all cycles;

[0020] List a2 includes: the row values ​​containing all bonded atoms;

[0021] List a3 includes: the remaining atom IDs after merging the atom IDs in lists a4 and a5 and removing duplicate atom IDs;

[0022] List a4 includes: storing list a1 data without duplicates or storing atom IDs in list a1 that have not been traversed by bonded atoms;

[0023] List a5 includes: the data in the first column of the row containing the bonded atoms;

[0024] List a6 includes: storing the atom IDs in list a1 that have not been traversed by bonded atoms;

[0025] List a7 includes: storing the row values ​​of all bonded atoms stored in the sorted list a2; and defining function 1 to remove duplicate atom IDs from list a1;

[0026] Step 3.2: Using the first atom as the starting atom of the molecule, a loop function is used to perform a first-level traversal to count the atoms with bond level information that are bonded to the first atom, and the bonded atom IDs are stored in list a1[]. A loop function is used to perform a second-level traversal to store all rows of the corresponding Excel, Word, PDF, and ASCII format files with bond level information at the same time step. A judgment function is used to determine whether the atom ID stored in the first column of each subsequent row is the same as the bonded atom ID of the starting atom, and the number of rows with the same ID is recorded. The number of rows, the atom IDs bonded to the first column atom in that row are stored in list a2[] and list a1[]. The atom IDs in the first column of that row are stored in list a5. At the same time, the di, type, charge, number of atoms bonded to the first column atom, and bonded atom IDs in that row are stored. The atom IDs in list a1[] are deduplicated and stored in list a4. All atom information bonded to the starting atom is obtained.

[0027] Step 3.3: Merge the atom IDs in lists a4 and a5, remove duplicates, and store them in list a3 for secondary linking; use a loop to store enough rows of bonded atoms; define the initial value of variable 1 as the number of atom IDs in list a5 + 1;

[0028] Step 3.4: In step 3.3, a conditional statement is used to determine whether the current value of variable 1 is lower than the length of list a3. When the return value is true, a loop function is used to traverse the number of atom IDs in list a3, and a loop function is used to traverse all rows of the corresponding Excel, Word, PDF, and ASCII format files that store the bond level information at the same time step. A conditional function is used to determine whether the atom ID in the first column of a certain row is consistent with the atom ID stored in list a3. If the return value is true, the row number and the atom ID bonded to the atom in the first column of the row are stored in list a2[] and list a1[], and the atom ID in the first column of the row is stored in list a5. All information of the row is stored to obtain the information of the atom ID, type, charge, number of atoms bonded to it, and atom ID bonded to it in the first column of the row.

[0029] Step 3.5: In step 3.4, store the atom IDs that are bonded to the first column of the row corresponding to the row stored in list a2[] in list a6, and use the defined function 1 to remove duplicate atom IDs in list a6 and store them in list a4; without overwriting the atom IDs in list a5, store the atom IDs that are bonded to the first column of the row stored in list a2[] in list a5;

[0030] Step 3.6: Repeat steps 3.3 to 3.5 until step 3.4, when the current value of variable 1 is not less than the length of list a3, sort the row values ​​stored in list a2 and store them in list a7. Use a loop function to delete and save the rows in the corresponding Excel, Word, PDF, and ASCII format files that store key-level information at the same time step that are identical to those in list a7.

[0031] Step 3.7: Repeat steps 3.1 to 3.6, and use a judgment function to determine whether the identification of a molecule has been completed, and obtain information on the ID, type, atomic charge, number of atoms bonded to it, ID of the atoms bonded to it, and bond order between the atoms bonded to it for all atoms of a single molecule at the same time step;

[0032] Step 3.8: Repeat steps 3.1 to 3.7 to obtain the atom ID information of all molecules at the same time step.

[0033] In step four, the target molecule features include hydrocarbon molecules, molecules containing specific atoms, molecules containing a specific number of atoms, and components containing a certain range of specific atomic numbers, wherein:

[0034] The specific atoms are all the different atoms of different components in the initial ReaxFF simulation model, such as O, N, S, O of environmental H2O, O of environmental CO2, and C of different components.

[0035] The specific method for step four is as follows:

[0036] Step 4.1: Retrieve the information of all atoms in all molecules at the same time step;

[0037] Step 4.2: Determine the characteristics of the target molecule, and then determine the specific atom ID, atom type, atom charge, number of bonded atoms, bonded atom ID, and bond order between bonded atoms of the target molecule;

[0038] Step 4.3: Based on the characteristic information of a specific atom, match the information of all atoms in all molecules at the same time step, and obtain and save the characteristic information of all atoms in the target molecule, including their ID, type, charge, number of atoms bonded to them, ID of the bonded atom, and bond order between the bonded atoms.

[0039] In step five, the step of storing the coordinate information of the dump source file at each time step is the same as in step two. The coordinate information includes the atom ID and coordinates (x, y, z), and the file storing the coordinate information includes the corresponding Excel, Word, PDF, and ASCII format files.

[0040] The specific method for step six is ​​as follows:

[0041] Step 6.1: Retrieve the atom IDs of all target molecules and the coordinate information of all atoms at the same time step;

[0042] Step 6.2: Use a loop function to store all atom IDs of all target molecules at the same time step; use a loop function to store the coordinate information of all atoms at the same time step; use a judgment function to determine whether the atom IDs of all target molecules are the same as the atom IDs in the atom coordinate information: if they are the same, store the coordinates (x, y, z) of the atom with the same atom ID; store all atom IDs and coordinates (x, y, z) of all target molecules.

[0043] In step seven, all time steps include atomic bond level information and coordinate information within all time steps in the ReaxFF simulation output source file containing bond level information and coordinate information.

[0044] In step eight, the storage method includes files in the corresponding Excel, Word, PDF, and ASSCII formats, and the target molecule structure information includes the IDs and coordinates (x, y, z) of all atoms in the target molecule.

[0045] The advantages of this invention compared to existing technologies are as follows: The molecular identification and extraction processing method based on ReaxFF reaction kinetics simulation provided by this invention obtains a dump source file containing bond levels and coordinates from the ReaxFF simulation output, stores the bond level information at each time step in the bond source file, extracts and stores all atomic information of all molecules at the same time step, determines the characteristics of the target molecule, identifies and stores all atomic information of the target molecule based on all atomic information of all molecules at the same time step, stores the coordinate information at each time step in the dump source file, traverses the atomic coordinate information at the same time step and the atomic IDs of all target molecules to obtain all atomic coordinate information of the target molecule, and traverses all time steps to store the structural information of the target molecule throughout the entire time period. These techniques enable the molecular processing method to be highly efficient and convenient, and can quickly identify and extract characteristic molecular fragments from reaction kinetics simulations and obtain the target product molecular coordinate information. In addition, this method can identify and extract all molecular fragments from the simulation. Attached Figure Description

[0046] The present invention will be further described below with reference to the accompanying drawings:

[0047] Figure 1 This is a flowchart of the molecular recognition and extraction processing method based on ReaxFF reaction kinetics simulation of the present invention;

[0048] Figure 2 This is a schematic diagram of the dump structure of kerogen before and after catalytic pyrolysis by montmorillonite catalysis via steam heating, as described in this invention.

[0049] Figure 3 This is a schematic diagram of the bonds and dump source files output by ReaxFF in this invention;

[0050] Figure 4 This is a schematic diagram illustrating the bond order and atom coordinate information stored at each time step throughout the entire time period according to the present invention.

[0051] Figure 5 This is a schematic diagram of the atomic bond level information of the present invention at 488 ps;

[0052] Figure 6 This is a schematic diagram of all atomic bond level information of the molecule extracted at 488 ps in this invention;

[0053] Figure 7 For this invention, all C5-C at 488 ps 13 With hydrocarbons C 14 -C 40 A schematic diagram illustrating the atomic bond order of a molecule;

[0054] Figure 8 For this invention, all C5-C at 488 ps 13 With hydrocarbons C 14 -C 40 A schematic diagram of the atomic coordinates of a molecule;

[0055] Figure 9 The hydrocarbons of this invention are C5-C 13 With hydrocarbons C 14 -C 40 Schematic diagram of molecular recognition and extraction results;

[0056] Figure 10 This is a schematic diagram showing the atomic coordinates of all carbon-containing molecules containing environmental vapor O atoms in this invention.

[0057] Figure 11 This is a schematic diagram of the molecular recognition and extraction results containing environmental vapor O atoms in this invention;

[0058] Figure 12This is a schematic diagram of the dump structure before and after the pyrolysis of Fushun kerogen by steam heating according to the present invention.

[0059] Figure 13 For all C5-C of this invention at 451 ps 13 A schematic diagram showing the bond order and coordinate information of all atoms in a molecule;

[0060] Figure 14 This is a schematic diagram of the light oil molecule recognition and extraction results of the present invention at 451.0 ps;

[0061] Figure 15 This is a schematic diagram showing the results of light oil molecule recognition and extraction at different time steps according to the present invention;

[0062] Figure 16 This is a schematic diagram showing the atomic coordinates of all carbon-containing molecules containing N and S atoms at 451 ps according to the present invention.

[0063] Figure 17 This is a schematic diagram showing the results of the identification and extraction of all N and S atoms in molecules at 451 ps according to the present invention. Detailed Implementation

[0064] The above solution will be further illustrated below with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. The preferred embodiments of the present invention are described in detail below:

[0065] Example 1

[0066] like Figure 1 As shown, this invention provides a method for molecular identification and extraction processing based on ReaxFF reaction kinetics simulation to obtain molecular structure information from reaction kinetics simulations over the entire time period. This includes a method for identifying and extracting target molecules from the calculation results of montmorillonite catalytic pyrolysis of kerogen under steam heating in ReaxFF simulations using Python. Specifically, the method includes the following steps:

[0067] Step 1: Obtain the dump source file containing the bond levels and coordinates from the ReaxFF simulation output:

[0068] A vapor / montmorillonite / kerogen pyrolysis model containing C / H / O / Si / Al / Na was established, and its reaction kinetics were simulated based on the ReaxFF force field. Figure 2 After simulation, the resulting source files are bonds containing key-level information and dump files containing coordinate information, such as... Figure 3 As shown.

[0069] Step 2: Store the key-level information of the bonds source files at each time step. This step includes the following sub-steps:

[0070] Step 2.1: Use the Workbook() and create_sheet() functions to create worksheets to store key-level information for each time step; use the open() function to call the bonds file containing key-level information; use the for() loop function to call each line of information in the bonds file; set the number of rows occupied by key-level information for each time step to 13047; use the if() function to write the key-level information matching the same time step into the worksheet constructed by the create_sheet() function; use the save() function to save the workbook created by Workbook(), resulting in 16 workbooks storing key-level information, each workbook containing 50 worksheets.

[0071] Step 2.2: Use the openpyxl.load_workbook() and wb[] functions to call the worksheet storing key-level information at each time step; use the for() function to call each row of key-level information in the worksheet storing key-level information at each time step; use the if() function to check for blank rows in the sheet and delete all blank rows to retain the key-level information stored at each time step; use the save() function to save the workbook called by openpyxl.load_workbook().

[0072] Step S2.3: Use the `openpyxl.load_workbook()` and `wb[]` functions to call the worksheet containing key-level information for each time step (without blank rows); use the `for()` function to call each row of key-level information in the above key-level information worksheet, use the `ws.cell().value.split()` function to split each row of key-level information (string), and rewrite the split strings into the key-level information worksheet; use the `save()` function to save the workbook called by `openpyxl.load_workbook()`, obtaining the split key-level information workbook (referred to as the key-level information workbook, e.g., ...). Figure 4 (As shown).

[0073] Step 3: Extract and store the atomic information of all molecules at the same time step. This step includes the following sub-steps:

[0074] Step 3.1: Use the openpyxl.load_workbook() and wb[] functions to call the key-level information workbook and worksheet; create_sheet() to create and store the atom ID information of all atoms in the same molecule; create lists a1=[], a2=[], a3=[], a4=[], a5=[], a6=[], and a7=[]; define the save_order() function to remove duplicate atom IDs in the lists and keep them as new lists;

[0075] Step 3.2: Using the atom id in row 8, column 1 as the starting atom of the molecule ( Figure 5 The process involves using a while function to iterate through the number of atoms that have bond level information with the starting atom, storing the bonded atom IDs in list a1[]. Then, using a while function, the process iterates through all rows of the worksheet that store bond level information. An if function is used to check if the atom ID stored in the first column of each subsequent row is the same as the bonded atom ID of the starting atom, recording the number of rows with the same ID (m is a variable). This row number, along with the atom IDs bonded to the first column atom in that row, are stored in lists a2[] and a1[]. The atom IDs in the first column of that row are stored in list a5. Simultaneously, the di, type, charge, number of bondsed atoms, and atom IDs of the atoms in that row that are bonded to the first column atom are stored in the same worksheet created by create_sheet(). The atom IDs in list a1[] are deduplicated and stored in list a4. This process yields all the atom information bonded to the starting atom.

[0076] Step 3.3: Merge the atomic IDs in lists a4 and a5, remove duplicates, and store them in a3, then perform a secondary linking; set the maximum storage capacity of list a1[] to 3000; define the variable q with the initial value of the number of atomic IDs in list a5 + 1;

[0077] Step 3.4: In step 3.3, when the value of q is less than the length of list a3, a while loop is used to iterate through the number of atom IDs in list a3, with q as the loop variable; a loop is used to iterate through all rows of the bond level information worksheet that record bond level information, and an if() function is used to determine whether the atom ID in the first column of the corresponding row of the worksheet is consistent with the atom ID stored in list a3, and the number of rows with the same ID is recorded m. The number of rows and the atom ID bonded to the atom in the first column of the row are stored in list a2[] (without overwriting the row values ​​in list a2 in step S3.2) and list a1[] (without overwriting the atom IDs in list a1 in step S3.2), and the atom ID in the first column of the row is stored in list a5. At the same time, the atom in the first column of the row, but not limited to ID, type, charge, number of atoms bonded to it, and the atom ID bonded to it, are stored in the same worksheet created by create_sheet().

[0078] In steps 3.5 and 3.4, the atom IDs that are bonded to the atom in the mth row and 1st column of row m are stored in list a6, and duplicate atom IDs in list a6 are removed and stored in list a4; in step 3.4, the atom IDs in the mth row and 1st column of row m are stored in list a5.

[0079] Step 3.6: Repeat steps 3.3 to 3.5 until the value of q in step 3.4 is not less than the length of list a3. Sort the row values ​​of the bonded atoms stored in list a2 and store them in list a7. Use a loop to delete the corresponding rows in the bond level information worksheet and list a7, and use the wb.save() function to save it as a new bond level information worksheet.

[0080] Step 3.7: Repeat steps 3.1 to 3.6 to determine whether the identification of a molecule has been completed and obtain a worksheet that stores information such as the ID, type, atomic charge, number of atoms bonded to it, ID of the bonded atoms, and bond order between the bonded atoms of a single molecule at the same time step.

[0081] Step 3.8: Repeat steps 3.1 to 3.7 to obtain a workbook storing all atom IDs of all molecules at the same time step. Taking the molecule with initial atom ID 6613 as an example... Figure 6 As shown, 588 C-containing molecules were extracted at 488 ps.

[0082] Step 4: Determine the target molecule's characteristics. Based on the atomic information of all molecules at the same time step, identify and store all atomic information of the target molecule. The molecular characteristics are determined to be hydrocarbons (C5-C). 13 With hydrocarbons C 14 -C 40 Molecular feature identification and storage of all atomic information of a target molecule includes the following sub-steps:

[0083] Step 4.1: Use the function wb=openpyxl.load_workbook() to call the workbook that stores the atom ID information of all molecules at the same time step, and use, but not limited to, the function wb[] to call the worksheet that stores the atom ID information of all molecules at the same time step;

[0084] Step 4.2: Molecular characteristics identified as hydrocarbons (C5-C). 13 With hydrocarbons C 14 -C 40 The specific atomic characteristics of the target molecule are: 1) 1≤id≤5200 and 6277≤id≤12828, or the atom type is 1 and 2; 2) the number of carbon atoms is 5~13 and 14~40 respectively.

[0085] Step 4.3: Use a while function to iterate through the worksheet storing all atomic information of all molecules at the same time step. Use an if function to check if any atom IDs of a single molecule are not 1 or 2. If not, record the number of carbon atoms in that molecule. Use an if function to check if the number of carbon atoms is 5-13 or 14-40. If the number of carbon atoms is 5-13, classify the molecule as a hydrocarbon (C5-C). 13 A molecule with 14 to 40 carbon atoms is classified as a hydrocarbon (C). 14 -C 40 The molecule is classified and its characteristics are stored, including the number of carbon atoms, the ID, type, charge of all atoms, the number of atoms bonded to it, the IDs of the bondsed atoms, and the bond order between the bonds. The `nws.cell()` function is used to store all atomic information of the target molecule, such as... Figure 7 As shown, 43 hydrocarbon C5-C molecules were extracted at 488 ps. 13 The molecule and 6 hydrocarbon C 14 -C 40 molecular;

[0086] Step 5: Store the coordinate information of each time step in the dump source file. This step includes the following sub-steps:

[0087] Step 5.1: Use the Workbook() and create_sheet() functions to create worksheets to store atomic coordinate information at each time step; use the open() function to call the dump file containing atomic coordinate information; use the for() loop function to call each line of information in the dump file; set the number of rows occupied by key-level information at each time step to 13047, and use the if() function to write the key-level information matching the same time step into the worksheet constructed by the create_sheet() function; use the save() function to save the workbook created by Workbook(), resulting in 16 workbooks storing key-level information, each workbook containing 50 worksheets.

[0088] Step 5.2: Use the openpyxl.load_workbook() and wb[] functions to call the worksheet storing atomic coordinate information at each time step; use the for() function to call each row of atomic coordinate information in the worksheet storing key level information at each time step; use the if() function to check for blank rows in the sheet and delete all blank rows to retain the atomic coordinate information stored at each time step; use the save() function to save the workbook called by openpyxl.load_workbook().

[0089] Step 5.3: Use the `openpyxl.load_workbook()` and `wb[]` functions to call the worksheet containing atomic coordinate information for each time step (without blank lines); use the `for()` function to call each row of atomic coordinate information in the above atomic coordinate information worksheet, and use the `ws.cell().value.split()` function to split the key-level information (string) of each row, and rewrite the split strings into the atomic coordinate information worksheet; use the `save()` function to save the workbook called by `openpyxl.load_workbook()`, and obtain the split atomic coordinate information workbook (referred to as the atomic coordinate information workbook, e.g., ...). Figure 4 (As shown).

[0090] Step Six: Traverse the atomic coordinate information and atom IDs of all target molecules at the same time step to obtain the atomic coordinate information of all target molecules. This step includes the following sub-steps:

[0091] Step 6.1: Use the openpyxl.load_workbook() and wb[] functions to call the workbook and related worksheets that store all atomic bond level information and atomic coordinate information of the target molecule in steps four and five. Use the nwb=Workbook() and nwb.create_sheet() functions to create a new workbook and worksheet that store all atomic IDs and coordinate information of the target molecule.

[0092] Step 6.2: Use a while loop to iterate through all rows of the worksheet storing all atom IDs of the target molecule; use a while loop to iterate through all rows of the worksheet storing atom coordinate information; use an if function to check if the value of a cell in the first row and first column of the first worksheet is the same as the value of a cell in the first row and first column of the second worksheet; if they are the same, use the nw.cell() function to store all cell values ​​of a row in the second worksheet into a new worksheet; after the above two loop functions finish, use wb.save() to save the new worksheet storing all atom IDs and coordinate information of the target molecule. Figure 8 As shown, the molecules were visualized using OVITO software, as follows. Figure 9 As shown.

[0093] If the molecular characteristics can also be identified as carbon-containing molecules containing O atoms from environmental vapor, then the extraction and storage steps include the following:

[0094] The molecular characteristics can also be identified as carbon-containing molecules containing O atoms from the ambient vapor;

[0095] The atomic characteristics of the target molecule are: 1≤id≤5200 and 5290≤id≤6276;

[0096] A while loop iterates through a worksheet storing atomic information for all molecules at the same time step. An if function checks if any atom IDs of a single molecule are in the range of 1 ≤ id ≤ 5200 and 5290 ≤ id ≤ 6276. If so, the number of carbon atoms in that molecule is recorded. Another if function checks if the number of carbon atoms is 1-4, 5-13, 14-40, or 40+. If the number of carbon atoms is 1-4, the molecule is classified as a C molecule containing oxygen vapor. -4 If a molecule has 5 to 13 carbon atoms, it is classified as a C5-C molecule containing oxygen vapor. 13 A molecule with 14 to 40 carbon atoms is classified as a carbon atom of vapor O. 14 -C 40 A molecule with 40+ carbon atoms is classified as a carbon atom of vapor O. 40+ The molecule is used to record characteristic information such as the ID, type, number of atoms bonded to it, and ID of the bonded atoms of each atom. The `nws.cell()` function is used to store all atomic information of the target molecule, such as... Figure 10 As shown in (a);

[0097] Finally, the extracted and saved atomic IDs and coordinate information of all carbon molecules containing O atoms from ambient vapor can be found in [link to relevant documentation]. Figure 10 (b) The above molecules were visualized using OVITO software, such as... Figure 11 As shown.

[0098] Example 2

[0099] This invention provides a method for molecular identification and extraction based on ReaxFF reaction kinetics simulation to obtain molecular structure information from the full-time reaction kinetics simulation. The method includes a Python-based approach for identifying and extracting target molecules from the ReaxFF simulation results of steam-heated kerogen pyrolysis. Specifically, the method comprises the following steps:

[0100] Step 1: Obtain the dump source file containing the bond levels and coordinates from the ReaxFF simulation output:

[0101] A steam / kerogen pyrolysis model containing C / H / O was established, and its reaction kinetics were simulated based on the ReaxFF force field. Figure 2 After simulation, a bonds source file containing key-level information and a dump source file containing coordinate information are obtained.

[0102] Step 2: Store the key-level information of the bonds source files at each time step. This step includes the following sub-steps:

[0103] Step 2.1: Use the Workbook() and create_sheet() functions to create worksheets to store key-level information at each time step; use the open() function to call the bonds file containing key-level information; use the for() loop function to call each line of information in the bonds file; set the number of rows occupied by key-level information at each time step to 12791; use the if() function to write the key-level information matching the same time step into the worksheet constructed by the create_sheet() function; use the save() function to save the workbook created by Workbook(), resulting in 16 workbooks storing key-level information, each workbook containing 50 worksheets.

[0104] Step 2.2: Use the openpyxl.load_workbook() and wb[] functions to call the worksheet storing key-level information at each time step; use the for() function to call each row of key-level information in the worksheet storing key-level information at each time step; use the if() function to check for blank rows in the sheet and delete all blank rows to retain the key-level information stored at each time step; use the save() function to save the workbook called by openpyxl.load_workbook().

[0105] Step 2.3: Use the `openpyxl.load_workbook()` and `wb[]` functions to call the worksheet containing key-level information for each time step (without blank lines); use the `for()` function to call each row of key-level information in the above key-level information worksheet; use the `ws.cell().value.split()` function to split each row of key-level information (string), and rewrite the split strings into the key-level information worksheet; use the `save()` function to save the workbook called by `openpyxl.load_workbook()`, thus obtaining the split key-level information workbook (referred to as the key-level information workbook).

[0106] Step 3: Extract and store the atomic information of all molecules at the same time step. This step includes the following sub-steps:

[0107] Step 3.1: Use the openpyxl.load_workbook() and wb[] functions to call the key-level information workbook and worksheet; create_sheet() to create and store the atom ID information of all atoms in the same molecule; create lists a1=[], a2=[], a3=[], a4=[], a5=[], a6=[], and a7=[]; define the save_order() function to remove duplicate atom IDs in the lists and keep them as new lists;

[0108] Step 3.2: Using the atom ID in row 8, column 1 as the starting atom of the molecule, use a while function to perform a first-level traversal to count the number of atoms with bond level information that are bonded to this atom, and store the bonded atom IDs in list a1[]. Use a while function to perform a second-level traversal to all rows of the worksheet that store bond level information, and use an if function to determine whether the atom ID stored in the first column of each subsequent row is the same as the bonded atom ID of the starting atom, and record the number of rows with the same ID m (m is a variable), store the number of rows, the atom IDs bonded to the atom in the first column of the row in list a2[] and list a1[]. Store the atom IDs in the first column of the row in list a5. At the same time, store the di, type, charge, number of atoms bonded to the atom in the first column of the row, and the atom IDs bonded to the atom in the same row in the same worksheet created by create_sheet(). Remove duplicate atom IDs from list a1[] and store them in list a4. Obtain all atom information that is bonded to the starting atom.

[0109] Step 3.3: Merge the atomic IDs in lists a4 and a5, remove duplicates, and store them in a3, then perform a secondary linking; set the maximum storage capacity of list a1[] to 3000; define the variable q with the initial value of the number of atomic IDs in list a5 + 1;

[0110] Step 3.4: In step 3.3, when the value of q is less than the length of list a3, a while loop is used to iterate through the number of atom IDs in list a3, with q as the loop variable; a loop is used to iterate through all rows of the bond level information worksheet that record bond level information, and an if() function is used to determine whether the atom ID in the first column of the corresponding row of the worksheet is consistent with the atom ID stored in list a3, and the number of rows with the same ID is recorded m. The number of rows and the atom ID bonded to the atom in the first column of the row are stored in list a2[] (without overwriting the row values ​​in list a2 in step S3.2) and list a1[] (without overwriting the atom IDs in list a1 in step S3.2), and the atom ID in the first column of the row is stored in list a5. At the same time, the atom in the first column of the row, but not limited to ID, type, charge, number of atoms bonded to it, and the atom ID bonded to it, are stored in the same worksheet created by create_sheet().

[0111] In steps 3.5 and 3.4, the atom IDs that are bonded to the atom in the mth row and 1st column of row m are stored in list a6, and duplicate atom IDs in list a6 are removed and stored in list a4; in step 3.4, the atom IDs in the mth row and 1st column of row m are stored in list a5.

[0112] Step 3.6: Repeat steps 3.3 to 3.5 until the value of q in step 3.4 is not less than the length of list a3. Sort the row values ​​of the bonded atoms stored in list a2 and store them in list a7. Use a loop to delete the corresponding rows in the bond level information worksheet and list a7, and use the wb.save() function to save it as a new bond level information worksheet.

[0113] Step 3.7: Repeat steps 3.1 to 3.6 to determine whether the identification of a molecule has been completed and obtain a worksheet that stores information such as the ID, type, atomic charge, number of atoms bonded to it, ID of the bonded atoms, and bond order between the bonded atoms of a single molecule at the same time step.

[0114] Step 3.8: Repeat steps 3.1 to 3.7 to obtain a workbook storing all atom IDs of all molecules at the same time step. Taking the molecule with initial atom ID 6613 as an example... Figure 6 As shown, 588 C-containing molecules were extracted at 488 ps.

[0115] Step 4: Determine the target molecule's characteristics. Based on the atomic information of all molecules at the same time step, identify and store all atomic information of the target molecule. The molecular characteristics are determined to be light oil. The molecular characteristic identification and storage of all atomic information of the target molecule includes the following sub-steps:

[0116] Step 4.1: Use the function wb=openpyxl.load_workbook() to call the workbook that stores the atom ID information of all molecules at the same time step, and use, but not limited to, the function wb[] to call the worksheet that stores the atom ID information of all molecules at the same time step;

[0117] Step 4.2: Molecular characteristics identified it as a light oil, i.e., C5-C. 13 The specific atomic characteristics of the target molecule are: 1) 1 ≤ id ≤ 4560, or atom id = 1; 2) the number of carbon atoms is 5~13.

[0118] Step 4.3: Use a while function to iterate through the worksheet storing all atomic information of all molecules at the same time step. Use an if function to check if any atom ID of a single molecule is 1. If it is, record the number of carbon atoms in that molecule. Use another if function to check if the number of carbon atoms is between 5 and 13. If the number of carbon atoms is between 5 and 13, then classify the molecule as light oil C5-C. 13The molecule is classified, and its characteristic information is stored, including the number of carbon atoms, the ID of all atoms, their type, the number of atoms bonded to them, and the IDs of the bonds. The `nws.cell()` function is used to store all atomic information of the target molecule, such as... Figure 13 As shown in (a), 683 C5-C molecules were extracted at 488 ps. 13 molecular;

[0119] Step 5: Store the coordinate information of each time step in the dump source file. This step includes the following sub-steps:

[0120] Step 5.1: Use the Workbook() and create_sheet() functions to create worksheets to store atomic coordinate information at each time step; use the open() function to call the dump file containing atomic coordinate information; use the for() loop function to call each line of information in the dump file; set the number of rows occupied by key-level information at each time step to 12791, and use the if() function to write the key-level information matching the same time step into the worksheet constructed by the create_sheet() function; use the save() function to save the workbook created by Workbook(), resulting in 16 workbooks storing key-level information, each workbook containing 50 worksheets.

[0121] Step 5.2: Use the openpyxl.load_workbook() and wb[] functions to call the worksheet storing atomic coordinate information at each time step; use the for() function to call each row of atomic coordinate information in the worksheet storing key level information at each time step; use the if() function to check for blank rows in the sheet and delete all blank rows to retain the atomic coordinate information stored at each time step; use the save() function to save the workbook called by openpyxl.load_workbook().

[0122] Step 5.3: Use the `openpyxl.load_workbook()` and `wb[]` functions to call the worksheet containing atomic coordinate information for each time step (without blank lines); use the `for()` function to call each row of atomic coordinate information in the above atomic coordinate information worksheet; use the `ws.cell().value.split()` function to split the key-level information (string) of each row, and rewrite the split strings into the atomic coordinate information worksheet; use the `save()` function to save the workbook called by `openpyxl.load_workbook()`, and obtain the split atomic coordinate information workbook (referred to as the atomic coordinate information workbook).

[0123] Step Six: Traverse the atomic coordinate information and atom IDs of all target molecules at the same time step to obtain the atomic coordinate information of all target molecules. This step includes the following sub-steps:

[0124] Step 6.1: Use the openpyxl.load_workbook() and wb[] functions to call the workbook and related worksheets that store all atomic bond level information and atomic coordinate information of the target molecule in steps four and five. Use the nwb=Workbook() and nwb.create_sheet() functions to create a new workbook and worksheet that store all atomic IDs and coordinate information of the target molecule.

[0125] Step 6.2: Use a while loop to iterate through all rows of the worksheet storing all atom IDs of the target molecule; use a while loop to iterate through all rows of the worksheet storing atom coordinate information; use an if function to check if the value of a cell in the first row and first column of the first worksheet is the same as the value of a cell in the first row and first column of the second worksheet; if they are the same, use the nw.cell() function to store all cell values ​​of a row in the second worksheet into a new worksheet; after the above two loop functions finish, use wb.save() to save the new worksheet storing all atom IDs and coordinate information of the target molecule. Figure 13 As shown in (b), the above molecules were visualized using OVITO software, as follows: Figure 14 As shown.

[0126] Step 7: Traverse the target time step, and determine the remaining target time steps as 440.0, 445.0 and 450.0 ps, ​​and repeat steps 3 to 6 for each ps;

[0127] Step 8: Obtain the molecular structure information of light oil at the target time steps (440.0, 445.0, and 450.0 ps). The identification and extraction results are shown in [link to relevant documentation]. Figure 15 .

[0128] If the molecular characteristics can also be identified as carbon-containing molecules containing N and S, then the extraction and storage steps include the following:

[0129] Molecular characteristics determine N- and S-containing C-4 and C5-C molecules. 13 With C 14 -C 40 molecular;

[0130] The atomic characteristics of the target molecule are: 1≤id1≤4560 and 5042≤id2≤5221;

[0131] A while loop iterates through a worksheet storing atomic information for all molecules at the same time step. An if function checks if any atom IDs of a single molecule fall into the range of 1 ≤ id1 ≤ 4560 and 5042 ≤ id2 ≤ 5221. If so, the number of carbon atoms in that molecule is recorded. Another if function checks if the number of carbon atoms is 1-4, 5-13, or 14-40. If the number of carbon atoms is 1-4, the molecule is classified as a C molecule containing N and S. -4 If a molecule has 5 to 13 carbon atoms, it is classified as a C5-C molecule containing both nitrogen and sulfur. 13 A molecule with 14 to 40 carbon atoms is classified as a carbon-based molecule containing N and S atoms. 14 -C 40 The molecule is used to record characteristic information such as the ID, type, number of atoms bonded to it, and ID of the bonded atoms of each atom. The `nws.cell()` function is used to store all atomic information of the target molecule, such as... Figure 16 As shown;

[0132] Finally, the extracted and saved atom IDs and coordinate information of all carbon molecules containing N and S atoms can be found in [link to relevant documentation]. Figure 17 (a), and the above molecules were visualized using OVITO software, such as Figure 17 As shown in (b).

[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A molecular recognition and extraction method based on ReaxFF reaction kinetics simulation, characterized in that: The processing steps include the following: Step 1: Obtain a dump source file containing the bond level and coordinates from the ReaxFF simulation output; Step 2: Store the key-level information of the bond source files at each time step; Step 3: Extract and store the atomic information of all molecules at the same time step; Step 4: Determine the characteristics of the target molecule. Based on the atom ID information of all molecules at the same time step, identify the characteristics of the target molecule and store the atom ID information of the target molecule. Step 5: Store the coordinate information of each time step in the dump source file; Step 6: Traverse the atomic coordinate information and the atom IDs of all target molecules at the same time step to obtain the atomic coordinate information of all target molecules; Step 7: Iterate through all time steps, repeating steps 3 through 6; Step 8: Store the target molecule structure information over the entire time period.

2. The molecular recognition and extraction method based on ReaxFF reaction kinetics simulation according to claim 1, characterized in that: The specific method for step two is as follows: Step 2.1: Create files in Excel, Word, PDF, and ASCII formats to store key-level information at each time step in the bonds source files; Open the bonds source file containing key-level information; The function uses a loop to call each line of information in the bonds source file; Set the number of rows occupied by key-level information at each time step, and use a conditional function to write key-level information that meets the same time step into the corresponding Excel, Word, PDF, and ASCII format files; write the key-level information at all time steps into the corresponding Excel, Word, PDF, and ASCII format files and save them. Step 2.2: Retrieve the corresponding Excel, Word, PDF, and ASCII format files that store the key-level information for each time step; The program uses a loop function to call each line of key-level information in the file storing key-level information at each time step. It also uses a conditional function to identify and delete blank lines in the corresponding Excel, Word, PDF, and ASCII format files. Finally, it saves the corresponding Excel, Word, PDF, and ASCII format files with the blank lines removed.

3. The molecular recognition and extraction method based on ReaxFF reaction kinetics simulation according to claim 2, characterized in that: The specific method for step three is as follows: Step 3.1: Call the Excel, Word, PDF, and ASSCII format files that store bond-level information at the same time step, and create corresponding Excel, Word, PDF, and ASSCII format files that store the atom ID information of all molecules in the same molecule; Create 7 lists or arrays to store atomic ID information, including a1=[], a2=[], a3=[], a4=[], a5=[], a6=[], a7=[], where: List a1 includes: the IDs of atoms in the memory containing chemical bonds for all cycles; List a2 includes: the row values ​​containing all bonded atoms; List a3 includes: the remaining atom IDs after merging the atom IDs in lists a4 and a5 and removing duplicate atom IDs; List a4 includes: storing list a1 data without duplicates or storing atom IDs in list a1 that have not been traversed by bonded atoms; List a5 includes: the data in the first column of the row containing the bonded atoms; List a6 includes: storing the atom IDs in list a1 that have not been traversed by bonded atoms; List a7 includes: storing the row values ​​of all bonded atoms stored in the sorted list a2; and defining function 1 to remove duplicate atom IDs from list a1; Step 3.2: Using the first atom as the starting atom of the molecule, a loop function is used to perform a first-level traversal to count the atoms with bond level information that are bonded to the first atom, and the bonded atom IDs are stored in list a1[]. A loop function is used to perform a second-level traversal to store all rows of the corresponding Excel, Word, PDF, and ASCII format files with bond level information at the same time step. A judgment function is used to determine whether the atom ID stored in the first column of each subsequent row is the same as the bonded atom ID of the starting atom, and the number of rows with the same ID is recorded. The number of rows, the atom IDs bonded to the first column atom in that row are stored in list a2[] and list a1[]. The atom IDs in the first column of that row are stored in list a5. At the same time, the di, type, charge, number of atoms bonded to the first column atom, and bonded atom IDs in that row are stored. The atom IDs in list a1[] are deduplicated and stored in list a4. All atom information bonded to the starting atom is obtained. Step 3.3: Merge the atom IDs in lists a4 and a5, remove duplicates, and store them in list a3 for secondary linking; use a loop to store enough rows of bonded atoms; define the initial value of variable 1 as the number of atom IDs in list a5 + 1; Step 3.4: In step 3.3, a conditional statement is used to determine whether the current value of variable 1 is lower than the length of list a3. When the return value is true, a loop function is used to traverse the number of atom IDs in list a3, and a loop function is used to traverse all rows of the corresponding Excel, Word, PDF, and ASCII format files that store the bond level information at the same time step. A conditional function is used to determine whether the atom ID in the first column of a certain row is consistent with the atom ID stored in list a3. If the return value is true, the row number and the atom ID bonded to the atom in the first column of the row are stored in list a2[] and list a1[], and the atom ID in the first column of the row is stored in list a5. All information of the row is stored to obtain the information of the atom ID, type, charge, number of atoms bonded to it, and atom ID bonded to it in the first column of the row. Step 3.5: In step 3.4, store the atom IDs that are bonded to the first column of the row corresponding to the row stored in list a2[] in list a6, and use the defined function 1 to remove duplicate atom IDs in list a6 and store them in list a4; without overwriting the atom IDs in list a5, store the atom IDs that are bonded to the first column of the row stored in list a2[] in list a5; Step 3.6: Repeat steps 3.3 to 3.5 until step 3.4, when the current value of variable 1 is not less than the length of list a3, sort the row values ​​stored in list a2 and store them in list a7. Use a loop function to delete and save the rows in the corresponding Excel, Word, PDF, and ASCII format files that store key-level information at the same time step that are identical to those in list a7. Step 3.7: Repeat steps 3.1 to 3.6, and use a judgment function to determine whether the identification of a molecule has been completed, and obtain information on the ID, type, atomic charge, number of atoms bonded to it, ID of the atoms bonded to it, and bond order between the atoms bonded to it for all atoms of a single molecule at the same time step; Step 3.8: Repeat steps 3.1 to 3.7 to obtain the atom ID information of all molecules at the same time step.

4. The molecular recognition and extraction method based on ReaxFF reaction kinetics simulation according to claim 3, characterized in that: In step four, the target molecule features include hydrocarbon molecules, molecules containing specific atoms, molecules containing a specific number of atoms, and components containing a certain range of specific atomic numbers, wherein: The specific atoms are all the different atoms of different components in the initial ReaxFF simulation model, such as O, N, S, O of environmental H2O, O of environmental CO2, and C of different components.

5. The molecular recognition and extraction method based on ReaxFF reaction kinetics simulation according to claim 4, characterized in that: The specific method for step four is as follows: Step 4.1: Retrieve the information of all atoms in all molecules at the same time step; Step 4.2: Determine the characteristics of the target molecule, and then determine the specific atom ID, atom type, atom charge, number of bonded atoms, bonded atom ID, and bond order between bonded atoms of the target molecule; Step 4.3: Based on the characteristic information of a specific atom, match the information of all atoms in all molecules at the same time step, and obtain and save the characteristic information of all atoms in the target molecule, including their ID, type, charge, number of atoms bonded to them, ID of the bonded atom, and bond order between the bonded atoms.

6. The molecular recognition and extraction method based on ReaxFF reaction kinetics simulation according to claim 5, characterized in that: In step five, the step of storing the coordinate information of the dump source file at each time step is the same as in step two. The coordinate information includes the atom ID and coordinates (x, y, z), and the file storing the coordinate information includes the corresponding Excel, Word, PDF, and ASCII format files.

7. The molecular recognition and extraction method based on ReaxFF reaction kinetics simulation according to claim 6, characterized in that: The specific method for step six is ​​as follows: Step 6.1: Retrieve the atom IDs of all target molecules and the coordinate information of all atoms at the same time step; Step 6.2: Use a loop function to store all atom IDs of all target molecules at the same time step; use a loop function to store the coordinate information of all atoms at the same time step; use a judgment function to determine whether the atom IDs of all target molecules are the same as the atom IDs in the atom coordinate information: if they are the same, store the coordinates (x, y, z) of the atom with the same atom ID; store all atom IDs and coordinates (x, y, z) of all target molecules.

8. The molecular recognition and extraction method based on ReaxFF reaction kinetics simulation according to claim 7, characterized in that: In step seven, all time steps include atomic bond level information and coordinate information within all time steps in the ReaxFF simulation output source file containing bond level information and coordinate information.

9. The molecular recognition and extraction method based on ReaxFF reaction kinetics simulation according to claim 8, characterized in that: In step eight, the storage method includes files in the corresponding Excel, Word, PDF, and ASSCII formats, and the target molecule structure information includes the IDs and coordinates (x, y, z) of all atoms in the target molecule.