A processing method for ab initio molecular dynamics trajectories in molecular crystals

Through the ab initio molecular dynamics trajectory processing method, the atom grouping method and the multi-cycle algorithm are used to eliminate the influence of periodic boundary conditions, solve the problem of bond formation and breakage judgment and visualization in molecular dynamics trajectory analysis, and improve the research efficiency and accuracy. Reduce dependence on foreign software.

CN114898814BActive Publication Date: 2024-10-15XIAN MODERN CHEM RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210591988.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2024-10-15
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

In the existing technology, the analysis of Born-Oppenheimer molecular dynamics trajectories has inconsistent criteria for judging whether atoms form and break bonds, the visualization of molecular dynamics trajectories is affected by periodic boundary conditions, and there is a lack of supporting molecular dynamics trajectory processing programs, resulting in chemical reactions. Research on pathways and decomposition mechanisms is limited.

Method used

Adopt ab initio molecular dynamics trajectory processing methods suitable for molecular crystals, eliminate the negative impact of periodic boundary conditions on trajectories through atomic grouping methods and multiple loop algorithms, restore atomic coordinates, form a complete molecular structure, and assist scientific researchers in chemical analysis Reaction pathways and statistical decomposition products.

Benefits of technology

It improves the efficiency of molecular dynamics trajectory processing, eliminates unreasonable molecular fragments, reduces dependence on foreign commercial software, improves the level of molecular dynamics research, and assists scientific researchers to more accurately capture chemical reaction mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114898814B_ABST
    Figure CN114898814B_ABST
Patent Text Reader

Abstract

A programmable processing method for molecular crystal ab initio molecular dynamics trajectory, for the atomic coordinates constrained by periodic boundary conditions in the system, through the first principle calculation method and atomic coordinate processing algorithm, restores the constrained atomic coordinates, eliminates unreasonable molecular fragments in the trajectory, makes the molecular structure without chemical reaction complete, and assists researchers to analyze chemical reaction paths more efficiently. This method has the advantages of high efficiency, good reliability, strong guidance, etc., reduces the dependence on expensive foreign commercial software, and improves the level of molecular dynamics research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to a molecular dynamics trajectory analysis method, and in particular relates to a processing method for ab initio molecular crystal dynamics trajectory. Background Art

[0002] Molecular dynamics is a type of molecular simulation method that integrates mathematics, physics and chemistry. It is a technique that simulates the equilibrium properties, transfer properties and microscopic dynamic behavior details of multi-body systems. Usually, molecular dynamics simulation is used to study the physical and chemical changes of certain substances under extreme conditions such as high temperature and high pressure, so as to obtain the material response characteristics and chemical reaction processes under extreme conditions that are difficult to capture through experimental techniques.

[0003] Molecular dynamics simulation can be divided into molecular dynamics based on classical molecular force fields and ab initio molecular dynamics according to their algorithms. The former only considers the motion of atomic nuclei in multi-body systems, while completely ignoring the motion and quantum effects of electrons; the latter focuses on the quantum effects of electrons, especially Born-Oppenheimer molecular dynamics, which uses the iterative method to solve the Kohn-Sham equation in each dynamics step to obtain the energy eigenvalue of the simulation system, calculate the forces on the ions, and obtain the motion speed and coordinates of the atomic nuclei in the next dynamics step through the Lagrangian equation of motion. Therefore, Born-Oppenheimer molecular dynamics simulation of chemical reaction processes is more accurate and reliable, but the use of density functional calculation methods also leads to a huge amount of calculation. In recent years, with the rapid development of computer hardware and the rapid improvement of computing power, Born-Oppenheimer molecular dynamics has gradually attracted the attention of scholars at home and abroad, and has been widely used in the study of molecular crystals. However, in the actual research process, there are some technical bottlenecks in the analysis of Born-Oppenheimer molecular dynamics trajectories:

[0004] 1. The criteria for judging the formation and breaking of atoms are not unified. Due to the large amount of calculation in Born-Oppenheimer molecular dynamics, mainstream software such as VASP and CP2K do not have the function of calculating the bond order in the system during the dynamics step. Therefore, it is impossible to use the bond order to quickly judge the formation and breaking of atoms, and it is also impossible to efficiently calculate the decomposition products and molecular fragments during the decomposition simulation process;

[0005] 2. The visualization of molecular dynamics trajectories is constrained by periodic boundary conditions. Ab initio molecular dynamics simulation software often uses fractional coordinate modeling. The atomic coordinates in the model are constrained by periodic boundary conditions. Atoms beyond the unit cell are considered to be in the next unit cell. The program places these atoms in the original unit cell by periodic coordinate transformation, resulting in a large number of molecular fragments or isolated atoms in the original unit cell. However, the current open source programs that can visualize molecular dynamics trajectories do not have the function of restoring the atomic coordinates constrained by periodic boundary conditions in the original unit cell, making it difficult for researchers to distinguish whether molecular fragments and isolated atoms are produced by decomposition reactions or by periodic coordinate transformations. This has greatly hindered researchers from efficiently analyzing molecular dynamics trajectories.

[0006] 3. Mainstream software such as VASP, CP2K and Quantum Espresso do not have supporting molecular dynamics trajectory processing programs, while foreign software such as Materials Studio and ADF that have molecular dynamics simulation and analysis functions are expensive and incompatible with trajectory files of other computing software.

[0007] Limited by the bottleneck of existing technology, there are few reports on the discussion of specific chemical reaction paths and decomposition mechanisms in the study of ab initio molecular dynamics simulation of chemical reactions. Therefore, it is necessary to invent a processing method for molecular crystal ab initio molecular dynamics trajectory that can be implemented through programming, which can restore the atomic coordinates constrained by periodic boundary conditions in the molecular dynamics trajectory, eliminate unreasonable molecular fragments in the trajectory, make the molecular structure of no chemical reaction complete, assist scientific researchers to analyze chemical reaction paths more efficiently, capture chemical reaction mechanisms more accurately, reduce dependence on expensive foreign commercial software, and improve the level of molecular dynamics research. Summary of the invention

[0008] In view of the shortcomings of the prior art, the present invention provides a processing method that can be implemented by programming and is suitable for ab initio calculation of molecular dynamics trajectories in molecular crystals, which is used to restore the molecular fragments generated when the atomic coordinates in the system are constrained by periodic boundary conditions during the simulation process, and assist researchers in analyzing dynamic trajectories, including but not limited to observing chemical reaction paths and statistical chemical decomposition products.

[0009] In order to achieve the above objectives, the present invention adopts the following technical solution: a processing method suitable for ab initio molecular dynamics trajectories of molecular crystals, which is aimed at the coordinate transformation of atomic coordinates in the system constrained by periodic boundary conditions during the simulation process, characterized in that the method comprises the following steps:

[0010] Compared with the prior art, the present invention has the following technical advantages:

[0011] 1. A processing method for ab initio molecular dynamics trajectories of molecular crystals, for the coordinate transformation of atomic coordinates in the system constrained by periodic boundary conditions during the simulation process, the method comprising the following steps:

[0012] Step 1: Obtain the maximum distance L between two atoms of different types in the crystal. max ; Define the set of bonded atomic groups;

[0013] Step 2, obtaining the lattice length of the molecular crystal, the types of atoms in the molecular crystal, the number of each type of atoms, the fractional coordinates of all atoms, and numbering the atoms in the molecular crystal;

[0014] Step 3, converting the fractional coordinates of all atoms in the molecular crystal into Cartesian coordinates;

[0015] Step 4: According to the distance between atoms in the molecular crystal and L max Determine whether atoms are bonded to each other;

[0016] Step 5, classify the atoms that can form bonds into an atomic group, generate an atomic group set from multiple atomic groups, further count the number of atomic groups N1 in the molecular crystal and the number of atoms in each atomic group, and sort the atomic groups in the atomic group set in order according to the number of atoms in the atomic group;

[0017] Step 6, defining the states of all atoms in the molecular crystal as mobile or fixed, marking all atoms in the crystal as mobile;

[0018] Step 7, selecting an atomic group GA according to the order of the atomic groups in the atomic group set obtained in step 5;

[0019] Step 8, select an atom A from the atom group GA selected in step 7, and check the state of the atom;

[0020] Step 9: If the state of atom A is fixed, return to step 7 to select other atom groups; if the state of atom A is moving, the moving direction needs to be determined based on the initial fractional coordinates of atom A;

[0021] Step 10, calculating the new fractional coordinates of the moved atom A according to the moving direction of the atom A, further calculating the new Cartesian coordinates of the moved atom A, and judging whether there are other atoms B that form a bond with the moved atom A according to the distance between the moved atom A and other atoms in the crystal;

[0022] Step 11: If there are other atoms B that form bonds with the moved atom A, calculate the new fractional coordinates of all atoms in the atomic group GA where atom A is located according to the moving direction of atom A, and replace the original fractional coordinates. Mark all atoms in GA and all atoms in the atomic group GB where atom B is located as fixed, and proceed to step 12.

[0023] If no other atom B forms a bond with the moved atom A, then return to step 10 to select another moving direction of atom A. If no other atom forms a bond with the moved atom A after step 10 traverses all moving directions, then return to step 8. If no other atom forms a bond with the selected and moved atom after step 8 traverses all atoms in the atomic group GA, then proceed to step 12.

[0024] Step 12, looping steps 7 to 11 until all atomic groups are traversed to obtain new fractional coordinates of all atoms in the crystal;

[0025] Step 13, all atoms in the crystal with new fractional coordinates are classified according to step 5 to obtain a new set of atomic groups in sequence, and the new set of atomic groups, the number N2 of atomic groups in the molecular crystal and the number of atoms in each atomic group are further statistically obtained, and the atomic groups in the new set of atomic groups are sorted in sequence according to the number of atoms in the atomic groups;

[0026] Step 14, if N2<N1, return to step S12, first replace the atomic group set read in step S7 with the new atomic group set and mark all atoms in the crystal as moving, then loop steps 7 to 11 in the manner of step 12; if N2≥N1, output the new fractional coordinates of all atoms in the crystal obtained in step 12 according to the standard format of the corresponding molecular dynamics trajectory file.

[0027] Furthermore, the step 3 is as follows: the lattice length parameters are respectively a x 、a y 、a z , b x , b y , b z 、c x 、c y and c z , substitute into the formula X=a x ×A+b x ×B+c x ×C、Y=a y ×A+b y ×B+c y ×C and Z = a z ×A+b z ×B+c z×C, calculate the corresponding Cartesian coordinates (X, Y, Z) of each atom through its fractional coordinates (A, B, C).

[0028] Preferably, step 4: the condition for determining whether atoms are bonded to each other is: if the distance between two atoms in the molecular crystal is less than Lmax, they can form a bond, otherwise they cannot form a bond;

[0029] In step 5 or step 13, the atomic groups in the atomic group set are sorted in ascending order according to the number of atoms in the atomic groups.

[0030] In step 9, if the state of atom A is moving, the moving direction needs to be determined based on the initial fractional coordinates of atom A. If the fractional coordinates of atom A are less than 0.5, the new fractional coordinates of the moving atom are obtained by adding 1.0 to the fractional coordinates. Otherwise, the new fractional coordinates of the moving atom are obtained by subtracting 1.0 from the fractional coordinates.

[0031] In step 9, the moving direction of atom A is a combination of moving directions of the crystal's a-axis, b-axis and c-axis, that is, the a-axis moves, while the b-axis and c-axis remain stationary and the b-axis moves; the a-axis and c-axis remain stationary and the c-axis moves; the a-axis and b-axis remain stationary and the a-axis and b-axis moves; the c-axis remains stationary and the a-axis and c-axis moves; the b-axis remains stationary and the b-axis moves; the a-axis remains stationary and the a-axis and b-axis move simultaneously.

[0032] Compared with the prior art, the present invention has the following technical effects:

[0033] 1. The atomic grouping method and multi-cycle algorithm adopted in the present invention greatly improve the processing efficiency of molecular dynamics trajectories and effectively eliminate the negative impact of periodic boundary conditions on trajectory visualization;

[0034] 2. The processing method formed by the present invention can assist scientific researchers to efficiently analyze ab initio molecular dynamics trajectories, including but not limited to observing chemical reaction paths and statistical chemical decomposition products, etc., reduce dependence on expensive foreign commercial software, and improve the level of molecular dynamics research. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 is a comparison of the visualization effects of the molecular dynamics trajectory of tricarbohydrazide zinc perchlorate in Example 1 before and after processing, wherein Figure 1 a is the visualization trajectory diagram before treatment in Example 1, Figure 1 b is the visualized trajectory diagram after processing in Example 1.

[0036] Figure 2 This is a comparison of the visualization effects of the decomposition product trajectory of tricarbohydrazide zinc perchlorate before and after treatment in Example 2. Figure 2 a is the visualization trajectory diagram before treatment in Example 2, Figure 2 b is the visualized trajectory diagram after processing in Example 2.

[0037] Figure 3 is a comparison of the visualization effects of the molecular dynamics trajectory of carbohydrazide before and after processing in Example 3, Figure 3 a is the visualization trajectory diagram before treatment in Example 3, Figure 3 b is the visualized trajectory diagram after processing in Example 3. DETAILED DESCRIPTION

[0038] The present invention will be further described below in conjunction with embodiments, but the present invention is not limited by the following embodiments.

[0039] Example 1

[0040] This embodiment uses the initial state model of a 2×1×1 supercell of the transition metal complex zinc perchlorate tricarbohydrazide (Zn(CHZ)3(ClO4)2, hereinafter referred to as GTX) in the ab initio molecular dynamics simulation trajectory. The model contains 8 GTX complex molecules with 376 atoms. Figure 1 This is a comparison of the visualization effects of the molecular dynamics trajectory of the substance before and after processing.

[0041] Step 1: Obtain the maximum distance L between two atoms of different types in the GTX molecular crystal. max ; Define the set of atomic groups that form a bond; Taking the N-C bond as an example, the radius of the C atom is The atomic radius of N is The maximum distance between the bonds is defined as

[0042] Step 2, obtain the lattice length of the GTX molecular crystal, the types of atoms in the molecular crystal, the number of each type of atoms, and the fractional coordinates of all atoms, and number the atoms in the molecular crystal in sequence; the lattice lengths of the GTX molecular crystal are a x =10.037300, a y =0.000000, a z =0.000000, b x =0.000000, b y =16.657200, b z =0.000000, c x =-3.635150, c y = 0.000000 and c z =20.855768; there are 6 kinds of atoms, namely 8 Zn atoms, 88 O atoms, 96 N atoms, 144 H atoms, 24 C nuclei and 16 Cl atoms; taking a Zn atom as an example, its fractional coordinates are (0.39485585, 0.18463756, 0.62613754)

[0043] Step 3, convert the fractional coordinates of all atoms in the GTX molecular crystal into Cartesian coordinates; take the Zn atom selected in the previous step as an example, substitute the lattice length and the fractional coordinates of the Zn atom (A = 0.39485585, B = 0.18463756, C = 0.62613754) in the formula X = a x ×A+b x ×B+c x ×C、Y=a y ×A+b y ×B+c y ×C and Z = a z ×A+b z ×B+c z ×C, the Cartesian coordinates of the Zn atom are obtained as (X=1.68718274, Y=3.07554476, Z=13.05857927);

[0044] Step 4: According to the interatomic distances in the GTX molecular crystal and L max Determine whether atoms are bonded to each other;

[0045] Step 5, classify the atoms that can form bonds into an atomic group, generate an atomic group set from multiple atomic groups, further count the number of atomic groups N1 in the molecular crystal and the number of atoms in each atomic group, and sort the atomic groups in the atomic group set in order according to the number of atoms in the atomic group; in this embodiment, the number of atomic group sets N1 before processing = 67;

[0046] Step 6, defining the states of all atoms in the GTX molecular crystal as mobile or fixed, marking all atoms in the GTX molecular crystal as mobile;

[0047] Step 7, selecting an atomic group GA according to the order of the atomic groups in the atomic group set obtained in step 5; this embodiment takes the atomic group GA with only one N atom as an example;

[0048] Step 8, select an atom A from the atom group GA selected in step 7, and check the state of the atom; in the atom group GA of this embodiment, there is only one N atom, namely, atom A, and its fractional coordinates are (0.04973235, 0.01250552, 0.25003133);

[0049] Step 9: If the state of atom A is fixed, return to step 7 to select other atom groups; if the state of atom A is moving, the moving direction needs to be determined based on the initial fractional coordinates of atom A; the state of N atom selected in step 8 is moving;

[0050] Step 10, calculate the new fractional coordinates of the moved atom A according to the moving direction of atom A, further calculate the new Cartesian coordinates of the moved atom A, and judge whether there are other atoms B that form a bond with the moved atom A according to the distance between the moved atom A and other atoms in the crystal; the fractional coordinate of the N atom selected in step 8 along the a-axis direction is 0.04973235, then the N atom can be moved along the a-axis direction to the fractional coordinate of 1.04973235; similarly, the N atom can be moved along the b-axis direction to the fractional coordinate of 1.01250552, and can be moved along the c-axis direction to the fractional coordinate of 1.25003133; under the constraints of the above movement conditions, the movement directions are: a-axis moves, b-axis and c-axis are stationary, b-axis moves, a-axis and c-axis are stationary, c-axis moves, a-axis and b-axis are stationary, a-axis and b-axis are moving, c-axis is stationary, a-axis and c-axis are moving, b-axis is stationary, b-axis and c-axis are moving, a-axis is stationary, a-axis and b-axis are moving,

[0051] Step 11: If there are other atoms B that form bonds with the moved atom A, calculate the new fractional coordinates of all atoms in the atomic group GA where atom A is located according to the moving direction of atom A, and replace the original fractional coordinates. Mark all atoms in GA and all atoms in the atomic group GB where atom B is located as fixed, and proceed to step 12.

[0052] If no other atom B forms a bond with the moved atom A, then return to step 10 to select another moving direction of atom A. If no other atom forms a bond with the moved atom A after step 10 traverses all moving directions, then return to step 8. If no other atom forms a bond with the selected and moved atom after step 8 traverses all atoms in the atomic group GA, then proceed to step 12. In this embodiment, the N atom selected in step 8 forms a bond with the C atom with fractional coordinates (0.11244351, 0.97758895, 0.20575611) when it moves to the position with fractional coordinates (0.04973235, 1.01250552, 0.25003133). At this time, all atoms in the atomic group GB where the N atom and the C atom are located are marked as fixed.

[0053] Step 12, looping steps 7 to 11 until all atomic groups are traversed to obtain new fractional coordinates of all atoms in the crystal;

[0054] Step 13: Classify all the atoms in the crystal with the new fractional coordinates according to Step 5 to obtain a new set of atomic groups in sequence. Further, count the number N2 of atomic groups in the new set of atomic groups and the number of atoms in each atomic group, and sort the atomic groups in the new set of atomic groups in ascending order of the number of atoms in each atomic group. In this embodiment, when processed to Step 13 for the first time, the number N2 of atomic groups in the GTX molecular crystal is 26. The number of atomic group sets is significantly reduced compared with that before processing, indicating that a large number of incomplete GTX molecules are gradually completed.

[0055] Step 14: If N2 < N1, return to Step S12. First, replace the set of atomic groups read in Step S7 with the new set of atomic groups and mark all the atoms in the crystal as in the moving state. Then, loop Steps 7-11 in the manner of Step 12. If N2 ≥ N1, output the new fractional coordinates of all the atoms in the crystal obtained in Step 12 in the standard format of the corresponding molecular dynamics trajectory file. In this embodiment, when processed to Step 13 for the first time, N2 = 26 < N1 = 67. Therefore, at Step S7, the new set of atomic groups obtained in Step 13 is read, and then Steps 7-11 are looped in the manner of Step 12. After two more loops in this embodiment, the number of the final set of atomic groups remains unchanged and is 24, which exactly matches the 8 GTX complex molecules (each complex molecule can be divided into 3 sets of atomic groups, namely 1 coordination cation and 2 perchlorate anions) in the supercell.

[0056] Visualize the trajectory file using the ASE (Atomic Simulation Environment) program ( Figure 1 ). From the comparison results of the visualization effects before and after, there was no complete GTX molecule before processing, and the molecular structure is complete and there are no unreasonable molecular fragments after processing. It can be shown through Example 1 that the present invention can effectively solve the negative impact of periodic boundary conditions on trajectory visualization and assist researchers in efficiently analyzing the dynamics trajectory.

[0057] Example 2

[0058] In this embodiment, the trajectory model of the decomposition products after the ab initio molecular dynamics simulation of a 2×1×1 size supercell of the transition metal complex tris(carbohydrazide)zinc perchlorate (Zn(CHZ)3(ClO4)2, hereinafter referred to as GTX) is selected. This model contains decomposition products such as nitrogen, water, and carbon dioxide, and these decomposition products are all generated by the decomposition of 8 GTX complex molecules, with a total number of 376 atoms. Figure 2 It is a comparison of the visualization effects before and after the processing of the molecular dynamics trajectory of the decomposition products.

[0059] Step 1: Obtain the maximum distance L at which different types of atoms in the GTX molecular crystal can form bonds pairwisemax ; Define the set of atomic groups that form a bond; Taking the N-N bond as an example, the radius of the N atom is The maximum distance between the bonds is defined as

[0060] Step 2, obtain the lattice length of the GTX molecular crystal, the types of atoms in the molecular crystal, the number of each type of atoms, and the fractional coordinates of all atoms, and number the atoms in the molecular crystal in sequence; the lattice lengths of the GTX molecular crystal are a x =10.037300, a y =0.000000, a z =0.000000, b x =0.000000, b y =16.657200, b z =0.000000, c x =-3.635150, c y = 0.000000 and c z =20.855768; there are 6 kinds of atoms, namely 8 Zn atoms, 88 O atoms, 96 N atoms, 144 H atoms, 24 C nuclei and 16 Cl atoms; taking a Zn atom as an example, its fractional coordinates are (0.61562229, 0.92577598, 0.66034684);

[0061] Step 3, convert the fractional coordinates of all atoms in the GTX molecular crystal into Cartesian coordinates; take the Zn atom selected in the previous step as an example, substitute the lattice length and the fractional coordinates of the Zn atom (A = 0.61562229, B = 0.92577598, C = 0.66034684) in the formula X = a x ×A+b x ×B+c x ×C、Y=a y ×A+b y ×B+c y ×C and Z = a z ×A+b z ×B+c z ×C, the Cartesian coordinates of the Zn atom are obtained as (X=3.7787258, Y=15.42083565, Z=13.77204049);

[0062] Step 4: According to the interatomic distances in the GTX molecular crystal and L max Determine whether atoms are bonded to each other;

[0063] Step 5, classify the atoms that can form bonds into one atomic group, generate an atomic group set from multiple atomic groups, further count the number of atomic groups N1 in the molecular crystal and the number of atoms in each atomic group, and sort the atomic groups in the atomic group set in order according to the number of atoms in the atomic group; in this embodiment, the number of atomic group sets N1 before processing is 143;

[0064] Step 6, defining the states of all atoms in the GTX molecular crystal as mobile or fixed, marking all atoms in the GTX molecular crystal as mobile;

[0065] Step 7, selecting an atomic group GA according to the order of the atomic groups in the atomic group set obtained in step 5; this embodiment takes the atomic group GA with only one N atom as an example;

[0066] Step 8, select an atom A from the atom group GA selected in step 7, and check the state of the atom; in the atom group GA of this embodiment, there is only one N atom, namely, atom A, and its fractional coordinates are (0.06651380, 0.83617123, 0.99387827);

[0067] Step 9: If the state of atom A is fixed, return to step 7 to select other atom groups; if the state of atom A is moving, the moving direction needs to be determined based on the initial fractional coordinates of atom A; the state of N atom selected in step 8 is moving;

[0068] Step 10, calculate the new fractional coordinates of the moved atom A according to the moving direction of atom A, further calculate the new Cartesian coordinates of the moved atom A, and judge whether there are other atoms B that form bonds with the moved atom A according to the distance between the moved atom A and other atoms in the crystal; the fractional coordinate of the N atom selected in step 8 along the a-axis direction is 0.06651380, then the N atom can be moved along the a-axis direction to a position with a fractional coordinate of 1.06651380; conversely, the fractional coordinate of the N atom along the b-axis direction is 0.06651380. If the numerical coordinate is 0.83617123, the N atom can move along the b-axis to the fractional coordinate of -0.16382877; similarly, the N atom can move along the c-axis to the fractional coordinate of -0.00612173; under the constraints of the above movement conditions, the moving directions are: a-axis moves, b-axis and c-axis remain stationary, b-axis moves, a-axis and c-axis remain stationary, c-axis moves, a-axis and b-axis remain stationary, a-axis and b-axis moves, c-axis remain stationary, a-axis and c-axis move, b-axis remain stationary, b-axis and c-axis move, a-axis remain stationary, a-axis, b-axis and c-axis move at the same time.

[0069] Step 11. If there is another atom B bonding with the moved atom A, calculate the new fractional coordinates of all atoms within the atomic group GA where atom A is located in the moving direction of atom A, and replace the original fractional coordinates. Mark all atoms within GA and all atoms within the atomic group GB where atom B is located as fixed, and proceed to Step 12;

[0070] If there is no other atom B bonding with the moved atom A, return to Step 10 to select another moving direction for atom A. If no other atom bonds with the moved atom A after Step 10 has traversed all moving directions, return to Step 8. If no other atom bonds with the selected and moved atom after Step 8 has traversed all atoms within the atomic group GA, proceed to Step 12. In this embodiment, when the N atom (atom A) selected in Step 8 moves to the position with fractional coordinates (0.06651380, 0.83617123, -0.00612173), it bonds with the N atom (atom B) with fractional coordinates (0.09804023, 0.84921393, 0.04690389). At this time, mark all atoms within the atomic group GB where the N atom (atom A) and the N atom (atom B) are located as fixed. These two N atoms are actually a nitrogen molecule (N2);

[0071] Step 12. Loop through Steps 7 - 11 until all atomic groups have been traversed to obtain the new fractional coordinates of all atoms within the crystal;

[0072] Step 13. Classify all atoms within the crystal with the new fractional coordinates obtained according to Step 5 to obtain a new set of atomic groups in sequence. Further, count the new set of atomic groups, the number N2 of atomic groups within the molecular crystal, and the number of atoms in each atomic group. Sort the atomic groups in the new set of atomic groups in ascending order of the number of atoms in each atomic group. In this embodiment, when processed to Step 13 for the first time, the number N2 of atomic groups within the GTX molecular crystal is 110, and the number of atomic group sets is slightly reduced compared to before processing. This indicates that the decomposition products in the model are mostly scattered small - molecule compounds;

[0073] Step 14. If N2 < N1, return to Step S12. First, replace the set of atomic groups read in Step S7 with the new set of atomic groups and mark all atoms within the crystal as in a movable state. Then, loop through Steps 7 - 11 in the manner of Step 12. If N2 ≥ N1, output the new fractional coordinates of all atoms within the crystal obtained in Step 12 in the standard format of the corresponding molecular dynamics trajectory file. In this embodiment, when processed to Step 13 for the first time, N2 = 110 < N1 = 143. Therefore, in Step S7, read the new set of atomic groups obtained in Step 13, and then loop through Steps 7 - 11 in the manner of Step 12. After two more loops in this embodiment, the final number of atomic group sets remains unchanged and is 108.

[0074] Use ASE (Atomic Simulation Environment) to visualize the trajectory file ( Figure 2 ), from the comparison of the visualization effects before and after, the decomposition products before treatment are still molecular fragments, which makes it extremely difficult to count the types and quantities of the decomposition products; after treatment with the method of the present invention, the structure of each decomposition product is complete, and all molecular fragments with uncommon structures are decomposition products or polymers of decomposition products. Example 2 shows that the present invention can assist researchers in efficiently analyzing ab initio molecular dynamics trajectories, including but not limited to observing chemical reaction paths and counting chemical decomposition products.

[0075] Example 3

[0076] This embodiment uses an initial state model of a supercell of a carbohydrazide molecule (H2NNHCONHNH2, hereinafter referred to as CHZ) of 2×2×1 size in the ab initio molecular dynamics simulation trajectory. The model contains 16 CHZ molecules with a total of 192 atoms. Figure 3 This is a comparison of the visualization effects of the molecular dynamics trajectory of CHZ before and after processing.

[0077] Step 1: Obtain the maximum distance L between two atoms of different types in the CHZ molecular crystal. max ; Define the set of atoms that form a bond; Taking the N-C bond as an example, the radius of the C atom is The atomic radius of N is The maximum distance between the bonds is defined as

[0078] Step 2, obtain the lattice length of the CHZ molecular crystal, the types of atoms in the molecular crystal, the number of each type of atoms, and the fractional coordinates of all atoms, and number the atoms in the molecular crystal in sequence; the lattice lengths of the CHZ molecular crystal are a x =17.904699, a y =0.000000, a z =0.000000, b x =0.000000, b y =8.374400, b z =0.000000, c x =-0.666119, c y = 0.000000 and c z=10.431053; there are 4 types of atoms, namely 16 O atoms, 64 N atoms, 96 H atoms, and 16 C atoms; taking an O atom as an example, its fractional coordinates are (0.07775692, 0.22337864, 0.89482989)

[0079] Step 3, convert the fractional coordinates of all atoms in the CHZ molecular crystal into Cartesian coordinates; take the O atom selected in the previous step as an example, substitute the lattice length and the fractional coordinates of the O atom (A = 0.07775692, B = 0.22337864, C = 0.89482989) in the previous step into the formula X = a x ×A+b x ×B+c x ×C、Y=a y ×A+b y ×B+c y ×C and Z = a z ×A+b z ×B+c z ×C, the Cartesian coordinates of the Zn atom are obtained as (X=0.79615106, Y=1.87066208, Z=9.33401801);

[0080] Step 4: Based on the interatomic distances in the CHZ molecular crystal and L max Determine whether atoms are bonded to each other;

[0081] Step 5, classify the atoms that can form bonds into one atomic group, generate an atomic group set from multiple atomic groups, further count the number of atomic groups N1 in the molecular crystal and the number of atoms in each atomic group, and sort the atomic groups in the atomic group set in order according to the number of atoms in the atomic group; in this embodiment, the number of atomic group sets N1 before processing is 40;

[0082] Step 6, defining the states of all atoms in the CHZ molecular crystal as mobile or fixed, marking all atoms in the CHZ molecular crystal as mobile;

[0083] Step 7, selecting an atomic group GA according to the order of the atomic groups in the atomic group set obtained in step 5; this embodiment takes an atomic group GA with 2 N atoms and 2 H atoms as an example;

[0084] Step 8, select an atom A from the atomic group GA selected in step 7, and check the state of the atom; the fractional coordinates of an atom N in the atomic group GA of this embodiment are (0.09578715, 0.03920234, 0.19603486);

[0085] Step 9: If the state of atom A is fixed, return to step 7 to select other atom groups; if the state of atom A is moving, the moving direction needs to be determined based on the initial fractional coordinates of atom A; the state of N atom selected in step 8 is moving;

[0086] Step 10, calculate the new fractional coordinates of the moved atom A according to the moving direction of atom A, further calculate the new Cartesian coordinates of the moved atom A, and judge whether there are other atoms B that form bonds with the moved atom A according to the distance between the moved atom A and other atoms in the crystal; the fractional coordinate of the N atom selected in step 8 along the a-axis direction is 0.09578715, then the N atom can be moved along the a-axis direction to the fractional coordinate of 1.09578715; similarly, the N atom can be moved along the b-axis and c-axis directions to the fractional coordinates of 1.03920234 and 1.19603486; under the constraints of the above movement conditions, the movement directions are: a-axis moves, b-axis and c-axis do not move, b-axis moves, a-axis and c-axis do not move, c-axis moves, a-axis and b-axis do not move, a-axis and b-axis moves, c-axis do not move, a-axis and c-axis move, b-axis do not move, b-axis and c-axis move, a-axis do not move, a-axis and b-axis move simultaneously.

[0087] Step 11: If there are other atoms B that form bonds with the moved atom A, calculate the new fractional coordinates of all atoms in the atomic group GA where atom A is located according to the moving direction of atom A, and replace the original fractional coordinates. Mark all atoms in GA and all atoms in the atomic group GB where atom B is located as fixed, and proceed to step 12.

[0088] If no other atom B forms a bond with the moved atom A, then return to step 10 to select another moving direction for atom A. If no other atom forms a bond with the moved atom A after step 10 has traversed all moving directions, then return to step 8. If no other atom forms a bond with the selected and moved atom after step 8 has traversed all atoms in the atomic group GA, then proceed to step 12.

[0089] In this embodiment, if the N atom selected in step 8 does not find an atom to bond with at all possible positions during movement, then return to step 8 to select a new N atom. The coordinates of the newly selected N atom are (0.06565819, 0.11710711, 0.08599817). When the newly selected N atom moves to the position with fractional coordinates (0.06565819, 0.11710711, 1.08599817), it bonds with the C atom (atom B) with fractional coordinates (0.10228022, 0.14103637, 0.99350166). At this time, according to the movement direction of the newly selected N atom, calculate the new fractional coordinates of all atoms in GA and replace the original fractional coordinates, and mark all atoms in GA and all atoms in the atomic group GB where atom B is located as fixed.

[0090] Step 12, loop through steps 7 to 11 until all atomic groups are traversed to obtain the new fractional coordinates of all atoms in the crystal;

[0091] Step 13, classify all atoms in the crystal with the new fractional coordinates obtained according to step 5 to obtain a new set of atomic groups in sequence, further count the number N2 of atomic groups in the new set of atomic groups and the number of atoms in each atomic group, and sort the atomic groups in the new set of atomic groups in ascending order of the number of atoms in the atomic group; in this embodiment, when processing to step 13 for the first time, the number N2 of atomic groups in the CHZ molecular crystal is 26, the number of atomic group sets decreases, and the incomplete CHZ molecules are gradually completed;

[0092] Step 14, if N2 < N1, return to step S12. First, replace the set of atomic groups read in step S7 with the new set of atomic groups and mark all atoms in the crystal as movable, and then loop through steps 7 to 11 in the manner of step 12; if N2 ≥ N1, output the new fractional coordinates of all atoms in the crystal obtained in step 12 in the standard format of the corresponding molecular dynamics trajectory file. In this embodiment, when processing to step 13 for the first time, N2 = 26 < N1 = 40. Therefore, in step S7, read the new set of atomic groups obtained in step 13, and then loop through steps 7 to 11 in the manner of step 12. After two more loops in this embodiment, the number of the final set of atomic groups remains unchanged and is 16, which exactly matches the 16 CHZ molecules in the supercell.

[0093] Use the ASE (Atomic Simulation Environment) program to visualize the trajectory file ( Figure 1 ), and from the comparison results of the visualization effects before and after, there was no complete CHZ molecule before processing, and the molecular structure is complete after processing, indicating that the present invention can effectively eliminate the negative impact of periodic boundary conditions on trajectory visualization.

[0094] Although the invention has been described herein with reference to a number of illustrative embodiments thereof, it should be understood that numerous other modifications and implementations can be devised by those skilled in the art that will fall within the scope and spirit of the principles disclosed herein.

Claims

1. A processing method for ab initio molecular dynamics trajectories of molecular crystals, which is aimed at the coordinate transformation of atomic coordinates in the system constrained by periodic boundary conditions during the simulation process, characterized in that: The method comprises the following steps: Step 1: Obtain the maximum distance L between two atoms of different types in the crystal. max ; Define the set of bonded atomic groups; Step 2, obtaining the lattice length of the molecular crystal, the types of atoms in the molecular crystal, the number of each type of atoms, the fractional coordinates of all atoms, and numbering the atoms in the molecular crystal; Step 3, converting the fractional coordinates of all atoms in the molecular crystal into Cartesian coordinates; Step 4: According to the distance between atoms in the molecular crystal and L max Determine whether atoms are bonded to each other; Step 5, classify the atoms that can form bonds into an atomic group, generate an atomic group set from multiple atomic groups, further count the number of atomic groups N1 in the molecular crystal and the number of atoms in each atomic group, and sort the atomic groups in the atomic group set in order according to the number of atoms in the atomic group; Step 6, defining the states of all atoms in the molecular crystal as mobile or fixed, marking all atoms in the crystal as mobile; Step 7, selecting an atomic group GA according to the order of the atomic groups in the atomic group set obtained in step 5; Step 8, select an atom A from the atom group GA selected in step 7, and check the state of the atom; Step 9: If the state of atom A is fixed, return to step 7 to select other atom groups; if the state of atom A is moving, the moving direction needs to be determined based on the initial fractional coordinates of atom A; Step 10, calculating the new fractional coordinates of the moved atom A according to the moving direction of the atom A, further calculating the new Cartesian coordinates of the moved atom A, and judging whether there are other atoms B that form a bond with the moved atom A according to the distance between the moved atom A and other atoms in the crystal; Step 11: If there are other atoms B that form bonds with the moved atom A, calculate the new fractional coordinates of all atoms in the atomic group GA where atom A is located according to the moving direction of atom A, and replace the original fractional coordinates. Mark all atoms in GA and all atoms in the atomic group GB where atom B is located as fixed, and proceed to step 12. If no other atom B forms a bond with the moved atom A, then return to step 10 to select another moving direction of atom A. If no other atom forms a bond with the moved atom A after step 10 traverses all moving directions, then return to step 8. If no other atom forms a bond with the selected and moved atom after step 8 traverses all atoms in the atomic group GA, then proceed to step 12. Step 12, looping steps 7 to 11 until all atomic groups are traversed to obtain new fractional coordinates of all atoms in the crystal; Step 13, all atoms in the crystal with new fractional coordinates are classified according to step 5 to obtain a new set of atomic groups in sequence, and the new set of atomic groups, the number N2 of atomic groups in the molecular crystal and the number of atoms in each atomic group are further statistically obtained, and the atomic groups in the new set of atomic groups are sorted in sequence according to the number of atoms in the atomic groups; Step 14, if N2<N1, return to step S12, first replace the atomic group set read in step S7 with the new atomic group set and mark all atoms in the crystal as moving, then loop steps 7 to 11 in the manner of step 12; if N2≥N1, output the new fractional coordinates of all atoms in the crystal obtained in step 12 according to the standard format of the corresponding molecular dynamics trajectory file.

2. The processing method for ab initio molecular dynamics trajectories of molecular crystals according to claim 1, characterized in that: The step 3 is as follows: the lattice length parameters are a x 、a y 、a z , b x , b y , b z 、c x 、c y and c z , substitute into the formula X=a x ×A+b x ×B+c x ×C、Y=a y ×A+b y ×B+c y ×C and Z = a z ×A+b z ×B+c z ×C, calculate the corresponding Cartesian coordinates (X, Y, Z) of each atom through its fractional coordinates (A, B, C).

3. The processing method for ab initio molecular dynamics trajectories of molecular crystals according to claim 1, characterized in that: The condition for determining whether atoms are bonded to each other in step 4 is: if the distance between two atoms in the molecular crystal is less than Lmax, they can form a bond, otherwise they cannot form a bond.

4. The processing method for ab initio molecular dynamics trajectories of molecular crystals according to claim 1, characterized in that: In step 5 or step 13, the atomic groups in the atomic group set are sorted in order from small to large according to the number of atoms in the atomic groups.

5. The processing method for ab initio molecular dynamics trajectories of molecular crystals according to claim 1, characterized in that: In step 9, if the state of atom A is moving, the moving direction needs to be determined based on the initial fractional coordinates of atom A. If the fractional coordinates of atom A are less than 0.5, the new fractional coordinates of the moving atom are obtained by adding 1.0 to the fractional coordinates. Otherwise, the new fractional coordinates of the moving atom are obtained by subtracting 1.0 from the fractional coordinates.

6. The processing method for ab initio molecular dynamics trajectories of molecular crystals according to claim 1 or 5, characterized in that: In the step 9, the moving direction of atom A is a combination of moving directions of the a-axis, b-axis and c-axis of the crystal, that is, the a-axis moves, the b-axis and c-axis remain stationary and the b-axis moves, the a-axis and c-axis remain stationary and the c-axis moves, the a-axis and b-axis remain stationary and the a-axis and b-axis moves, the c-axis remains stationary and the a-axis and c-axis moves, the b-axis remains stationary and the b-axis moves, and the a-axis remains stationary and the a-axis and b-axis move simultaneously.