Crystal space structure transformation method and system
By converting the object-oriented data structure of the crystal into a new object data structure describing relative positions and angles, the discontinuity problem caused by flexible bond rotation in organic crystal structure optimization is solved, efficient crystal structure optimization is achieved, and the crystal structure is improved. Optimize process efficiency and intuitiveness.
Patent Information
- Application Number
- CN202011427695.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-09
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-12-09
AI Technical Summary
It is difficult to efficiently optimize the structure of organic crystals with existing technology, especially when the relative positions between atoms remain unchanged. The rotation of flexible bonds causes the crystal search and optimization process to become discontinuous, making it difficult to directly calculate the rotated crystal structure through algorithms. .
By converting the object-oriented data structure of the crystal into a new object data structure, describing the relative positions and angles between adjacent atoms in the crystal, the continuous transformation of the crystal structure is achieved, and the step size adjustment of the unit cell and flexible bonds is used to optimize the crystal. structure.
It improves the efficiency of the crystal optimization process and overcomes the discontinuity problem in parameter space, making it significantly more efficient when finding the crystal structure with the lowest local and global energy, and making it more intuitive in research and algorithm development.
Smart Images

Figure CN112466418B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to crystal display, and in particular to a crystal spatial structure transformation method and system. Background Art
[0002] The current method of describing the 3D microscopic spatial structure of a crystal is mainly to describe the unit cell parameters, the relative coordinates of each atom in the asymmetric unit of the crystal in the unit cell, and the space group. The specific method is described as follows:
[0003] Unit cell parameters
[0004] The most basic geometric unit that makes up a crystal is called a unit cell. Its shape and size are the same as the parallelepiped unit of the space lattice, retaining all the characteristics of the entire lattice.
[0005] Unit cell is a parallelepiped unit that can fully reflect the chemical-structural characteristics of the three-dimensional distribution of atoms or ions inside the crystal. The one that can maintain the symmetry of the crystal structure and has the smallest volume is called "unit cell", but it is often referred to as unit cell. Figure 1 As shown, its specific shape and size are characterized by its three sets of edge lengths a, b, c and the angles α, β, γ between edges (collectively referred to as "unit cell parameters"), which correspond to the unit parallelepiped in the space lattice.
[0006] The coordinates of atoms within a molecule.
[0007] The unit cell forms a reference coordinate system. The origin is the intersection of the three sets of edges, and the x, y, and z directions are respectively along the a, b, and c directions from the origin.
[0008] Within the smallest unit, the unit cell, every atom of every asymmetric molecule has coordinates in the above-mentioned reference coordinate system.
[0009] For example, for the molecule (C13 H16 N4 O), the coordinates of each atom can be described as follows
[0010]
[0011]
[0012]
[0013] The first column in each row is the name of the atom, the second column is the element type of the atom, and the third to fifth columns are the fractional coordinates of the atom in the coordinate system. The actual coordinates are the fractional coordinates multiplied by the edge lengths a, b, and c in the x, y, and z directions respectively. The last column is the weight value, which is usually 1.
[0014] Space group information of the crystal
[0015] The collection of all symmetry elements in the internal structure of a crystal is called the "space group".
[0016] There are only 230 different combinations of symmetry elements in all crystal structures, that is, 230 space groups. They were independently derived by Russian crystallographer Fedorov and German crystallographer Artur Moritz Schoenflies (1853-1928) between 1890 and 1891, so they are also called "230 Fedorov groups".
[0017] As long as the serial number of the space group of a crystal is given, it is possible to uniquely determine how the symmetry elements of the crystal are arranged in an orderly manner in space from asymmetric single molecules to form the entire crystal.
[0018] For example, if it is determined that the crystal is space group 2, then all the symmetry elements are the following two symmetry operations:
[0019] 1x, y, z
[0020] 2-x, -y, -z
[0021] Therefore, all molecules in the unit cell can be obtained from these two symmetry operations. For example, for each atom in the above molecule, these two symmetry operations are applied. When symmetry operation 1 is applied, the atomic coordinates in the molecule remain unchanged; when symmetry operation 2 is applied, the atomic coordinates in the molecule all become negative numbers of the original. In this way, a complete description of the 3D microstructure of the crystal is obtained.
[0022] Most current crystallography software, such as CCDC, supports such descriptions.
[0023] Although the current description method is relatively intuitive and the calculation is relatively simple, it is very inconvenient to describe the optimization process of organic crystals. This is because organic crystals usually include many flexible bonds, which can rotate freely in space. In the process of crystal optimization, it is usually necessary to keep the relative positions of other atoms unchanged and rotate one or several specified flexible bonds separately. Then, it is difficult to directly calculate the rotated crystal structure using the above description method. If the global optimization algorithm of crystal search is used, it is even more impossible to perform a specified flexible bond scan on the crystal structure. This will turn the entire crystal search and optimization process into a discontinuous process that can only be carried out by trial and error. Summary of the invention
[0024] Based on this, it is necessary to provide a crystal spatial structure transformation method that can improve the crystal optimization efficiency.
[0025] At the same time, a crystal space structure transformation system is provided which can improve the crystal optimization efficiency.
[0026] A method for transforming a crystal space structure, comprising:
[0027] Read: read the crystal file, convert the unit cell parameters, atomic coordinates and space group information in the crystal file into object-oriented data structure storage. The object-oriented data structure includes: crystal structure, molecular structure. The crystal structure includes: the unique identifier of the crystal instance, the corresponding unit cell properties, the IDs of all molecules in the asymmetric unit, and the space group properties corresponding to the crystal instance; the molecular structure includes: the unique identifier of the corresponding molecular instance and the position information of all atoms in the molecule;
[0028] Conversion: converting the object-oriented data structure into a new object data structure, which includes: a new crystal structure and a new molecular structure. The new crystal structure includes: a unique identifier of the crystal instance, corresponding unit cell properties, IDs of all molecules in the asymmetric unit, and space group properties corresponding to the crystal instance. The new molecular structure includes: an atomic chain corresponding to each atom in the molecule. The unit cell properties and space group properties in the crystal structure in the object-oriented data structure are copied to the corresponding properties in the new crystal structure. The position information of all atoms in the molecule in the molecular structure is read, and the atomic chain of each atom is determined based on the atomic position information.
[0029] Crystal evolution: Calculate the lattice energy of the crystal, adjust the unit cell attribute parameters and flexible bond values according to the set step length, adjust the unit cell attribute parameters according to the preset edge length and angle of the unit cell, assign the adjusted parameter values to the unit cell attribute parameter values, match the specified flexible bond for each atomic chain, and rotate and adjust the flexible bond according to the set step length. Adjust one parameter each time, calculate the adjusted crystal lattice energy, until the lowest crystal lattice energy no longer increases under the set stop times, and assign an ID to the evolution to form a new crystal;
[0030] Secondary conversion: converting the new object data structure into an object-oriented data structure;
[0031] Save: Write the unit cell properties and space group properties to a new file, traverse the properties of all molecules in the asymmetric unit, obtain the corresponding molecular structure parameters, and write the atomic array in each molecular structure to the file line by line.
[0032] In a preferred embodiment, the corresponding unit cell properties of the crystal structure record six parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and angles α, β, γ between edges, and the position information of all atoms in the molecules of the molecular structure is a two-dimensional array, each item in the two-dimensional array is a five-dimensional array, the first item of the five-dimensional number is the name of the atom, the second item is the element type of the atom, and the third to fifth items are the fractional coordinates of the atom in the unit cell.
[0033] In a preferred embodiment, the corresponding unit cell attributes of the new crystal structure package record the six parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and the angles α, β, γ between the edges; the new molecular structure uses a three-dimensional array to record the atomic chain corresponding to each atom in the molecule {[(cell_o, cell_o, 0, θ 01 ,0,θ 02 ),(an1,at1,d 11 ,θ 11 ,d 12 ,θ 12 ,),(an2,at2,d 21 ,θ 21 ,d 22 ,θ 22 ),…,(an n ,at n ,d n1 ,θ n1 ,d n2 ,θ n2 )],…,[(cell_o,cell_o,0,θ 01 ,0,0),(an1,at1,d 11 ,θ 11 ,d 12 ,θ 12 ),(an2,at2,d 21 ,θ 21 ,d 22 ,θ 22 ),…,(an m ,at m ,d m1 ,θ m1 ,d m2 ,θ m2 )]}, where each array in the first layer of arrays records an atomic chain, and the array in each atomic chain records the information of each atom in this atomic chain. The first array in each atomic chain records the coordinate information of the unit cell origin, where cell_o represents the unit cell origin, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom isi1 is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the x-axis of the local coordinate axis of this atom and the previous atom.
[0034] In a preferred embodiment, the local coordinate axis of the atom is the negative direction of the z-axis with the line between the atom and the previous atom as the line, the x-axis is the direction perpendicular to the plane where the atom and the previous and next atoms are located, the y-axis is the direction of the right-hand spiral rule with the z-axis and the x-axis, the previous atom of the first atom is the unit cell origin, and the next atom of the last atom is any non-skeleton atom in the molecule; the atomic chain: calculates the distance between each atom in the molecule and the unit cell origin, selects the atom with the closest distance as the starting atom, and for each atom in the molecule, finds a path connecting the atom and the starting atom in the topological structure of the molecule, the atoms in the molecule serve as nodes of the path, and the bonds between two atoms in the molecule serve as edges of the path.
[0035] In a preferred embodiment, the conversion further comprises: reading the fractional coordinates of each atom in the molecular structure corresponding to the crystal structure, determining the atomic chain of each atom, and storing the atomic chain as a three-dimensional array {[(cell_o, cell_o), (an1, at1), (an2, at2), ..., (an n ,at n )],…,[(cell_o,cell_o),(an1,at1),(an2,at2),…,(an m ,at m )]}, where an1 is the starting atom, an i For any atom in the molecule, each array records the connection link from each atom to the starting atom; calculate the vector from the unit cell origin to the first atom and the angle between the unit cell edges a and c to obtain θ 01 ,θ 02 ; Traverse the array and calculate the d for each atomic chain i1 ,θ i1 ,d i2 ,θ i2 ; Get the fractional coordinates of the previous and next atoms of the atom in the atomic chain. The previous atom of the first atom is the origin of the unit cell, and the next atom of the last atom is any atom in the molecule that is not collinear with the previous atom and the previous atom. Calculate the distance between the atom and the previous atom to get d i1 ; Calculate the angle between the atom and the atoms before and after it, and get θ i1; Determine the atomic local coordinate axis of each atom in the atomic chain, calculate the axis distance between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and obtain d i2 ; Calculate the angle between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and get θ i2 ; The array is stored as the property of the atomic chain corresponding to each atom in the molecule in the new molecular structure, and is associated with the corresponding new crystal structure.
[0036] In a preferred embodiment, the evolution step includes: accepting input or setting of a unit cell property parameter evolution range, accepting input or setting of a flexible bond evolution range, accepting a new object data structure, calculating the lattice energy of the crystal, copying a new crystal structure object, adjusting the unit cell property parameters according to the preset edge length and edge angle adjustment step of the unit cell, assigning the adjusted parameter value to the unit cell property parameter value, and then traversing the corresponding array of the atomic chain corresponding to each atom in the molecule in the new crystal structure, matching each atomic chain with a specified flexible bond, and if the names and order of two adjacent atoms in the matched atomic chain are the same as the atomic bond name and order of the specified flexible bond, then adjusting the latter atom according to the specified step size, Each time a parameter is adjusted, a positive adjustment is made by default, and then the lattice energy of the adjusted crystal is calculated. If the lattice energy of the adjusted crystal increases, a negative adjustment is made in the next adjustment cycle. If the lattice energy of the adjusted crystal decreases, a positive adjustment is continued in the next adjustment cycle. If the adjustment value exceeds the preset adjustment boundary, the boundary is used as the adjusted value, and the adjustment is repeated until the lowest crystal lattice energy no longer increases under the set stop times; the evolution order of the evolution steps is to adjust the unit cell parameters first, and then adjust the flexible bond parameters. The unit cell parameters are adjusted in the order of a, b, c, α, β, and γ, and the flexible bonds are adjusted in the order of the atomic chain array in the new molecular structure.
[0037] In a preferred embodiment, the secondary conversion includes: copying the cell properties and space group properties in the new crystal structure to the corresponding properties in the crystal structure, reading the cell origin array (cell_o, cell_o, 0, θ 01 ,0,θ 02 ) and the initial atomic array (an1, at1, d 11 ,θ 11 ,d 12 ,θ 12 ,), let the fractional coordinates of the initial atom in the unit cell be x, y, z, then x 2 +y 2 +z 2 =d 11 2 , cosθ 01 2 =x2 / (x 2 +y 2 +z 2 ), cosθ 02 2 =z 2 / (x 2 +y 2 +z 2 ), solving the equations can obtain the fractional coordinates of the initial atoms in the unit cell; read the next atomic array (an2, at2, d 21 ,θ 21 ,d 22 ,θ 22 ,), let the fractional coordinates of the atom in the unit cell be x, y, z, then x 2 +y 2 +z 2 =d 21 2 , cosθ 11 =(d 11 2 +d 21 2 -x 2 -y 2 -z 2 ) / 2d 11 d 21 ,cosθ 12 =(d 12 2 +d 22 2 -x 2 -y 2 -z 2 ) / 2d 12 d 22 , solve the equations to obtain the fractional coordinates of the atom in the unit cell; read the next atomic array (an i ,at i ,d i1 ,θ i1 ,d i2 ,θ i2 ), and repeatedly solve the system of equations x 2 +y 2 +z 2 =d i1 2 , cosθ (i-1)1 =(d (i-1)1 2 +d i1 2 -x 2 -y 2 -z 2 ) / 2d (i-1)1 d i1,
[0038] cosθ (i-1)2 =(d (i-1)2 2 +d i2 2 -x 2 -y 2 -z 2 ) / 2d (i-1)2 d i2 , obtain the fractional coordinates of the atom in the unit cell, where cell_o represents the origin of the unit cell, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1 is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the atom and the x-axis in the local coordinate axis of the previous atom; such iteration can obtain the fractional coordinates of each atom in the entire atomic chain; traverse the atomic chain array corresponding to each atom in the molecule in the new molecular structure, repeat the above solution operation for each atomic chain, and obtain the fractional coordinates of all atoms in the entire molecule, fill the atomic name, atomic type, and fractional coordinates of all atoms in the molecule into the position information attributes of all atoms in the molecule of the molecular structure, and the complete crystal structure is obtained.
[0039] A crystal space structure transformation system, comprising:
[0040] Reading module: reads crystal files, converts the unit cell parameters, atomic coordinates and space group information in the crystal files into object-oriented data structures for storage. The object-oriented data structures include: crystal structure and molecular structure. The crystal structure includes: the unique identifier of the crystal instance, the corresponding unit cell properties, the IDs of all molecules in the asymmetric unit, and the space group properties corresponding to the crystal instance; the molecular structure includes: the unique identifier of the corresponding molecular instance and the position information of all atoms in the molecule;
[0041] Conversion module: converting the object-oriented data structure into a new object data structure, the new object data structure includes: a new crystal structure, a new molecular structure, the new crystal structure includes: a unique identifier of the crystal instance, the corresponding unit cell attributes, the IDs of all molecules in the asymmetric unit, and the space group attributes corresponding to the crystal instance. The new molecular structure includes: an atomic chain corresponding to each atom in the molecule, copying the unit cell attributes and space group attributes in the crystal structure in the object-oriented data structure to the corresponding attributes in the new crystal structure, reading the position information of all atoms in the molecule in the molecular structure, and determining the atomic chain of each atom according to the position information of the atom;
[0042] Crystal evolution module: calculate the lattice energy of the crystal, adjust the unit cell attribute parameters and flexible bond values according to the set step length, adjust the unit cell attribute parameters according to the preset edge length and angle of the unit cell, assign the adjusted parameter values to the unit cell attribute parameter values, match the specified flexible bond for each atomic chain, rotate and adjust the flexible bond according to the set step length, adjust one parameter each time, calculate the adjusted crystal lattice energy, until the lowest crystal lattice energy no longer increases under the set stop times, and assign an ID to the evolution to form a new crystal;
[0043] Secondary conversion module: convert the new object data structure into an object-oriented data structure;
[0044] Saving module: write the unit cell properties and space group properties into a new file, traverse the properties of all molecules in the asymmetric unit, obtain the corresponding molecular structure parameters, and write the atomic array in each molecular structure into the file line by line.
[0045] In a preferred embodiment, the corresponding unit cell attributes of the crystal structure record six parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and angles α, β, γ between edges, and the position information of all atoms in the molecule of the molecular structure is a two-dimensional array, each item in the two-dimensional array is a 5-dimensional array, the first item of the 5-dimensional number is the name of the atom, the second item is the element type of the atom, and the third to fifth items are the fractional coordinates of the atom in the unit cell;
[0046] The secondary conversion module includes: copying the unit cell properties and space group properties in the new crystal structure into the corresponding properties in the crystal structure, reading the unit cell origin array (cell_o, cell_o, 0, θ 01 ,0,θ 02 ) and the initial atomic array (an1, at1, d 11 ,θ 11 ,d 12 ,θ 12 ,), let the fractional coordinates of the initial atom in the unit cell be x, y, z, then x 2 +y 2 +z 2=d 11 2 , cosθ 01 2 =x 2 / (x 2 +y 2 +z 2 ), cosθ 02 2 =z 2 / (x 2 +y 2 +z 2 ), solving the equations can obtain the fractional coordinates of the initial atoms in the unit cell; read the next atomic array (an2, at2, d 21 ,θ 21 ,d 22 ,θ 22 ,), let the fractional coordinates of the atom in the unit cell be x, y, z, then x 2 +y 2 +z 2 =d 21 2 , cosθ 11 =(d 11 2 +d 21 2 -x 2 -y 2 -z 2 ) / 2d 11 d 21 ,cosθ 12 =(d 12 2 +d 22 2 -x 2 -y 2 -z 2 ) / 2d 12 d 22 , solve the equations to obtain the fractional coordinates of the atom in the unit cell; read the next atomic array (an i ,at i ,d i1 ,θ i1 ,d i2 ,θ i2 ), and repeatedly solve the system of equations x 2 +y 2 +z 2 =d i1 2 , cosθ (i-1)1 =(d (i-1)1 2 +d i1 2 -x2 -y 2 -z 2 ) / 2d (i-1)1 d i1 ,
[0047] cosθ (i-1)2 =(d (i-1)2 2 +d i2 2 -x 2 -y 2 -z 2 ) / 2d (i-1)2 d i2 , obtain the fractional coordinates of the atom in the unit cell, where cell_o represents the origin of the unit cell, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1 is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the atom and the x-axis in the local coordinate axis of the previous atom; the fractional coordinates of each atom in the entire atomic chain can be obtained by iteration; the atomic chain array corresponding to each atom in the molecule in the new molecular structure is traversed, and the above solution operation is repeated for each atomic chain to obtain the fractional coordinates of all atoms in the entire molecule. The atomic names, atomic types, and fractional coordinates of all atoms in the molecule are filled into the position information attributes of all atoms in the molecule of the molecular structure to obtain the complete crystal structure.
[0048] In a preferred embodiment, the corresponding unit cell attributes of the new crystal structure package record the six parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and the angles α, β, γ between the edges; the new molecular structure uses a three-dimensional array to record the atomic chain corresponding to each atom in the molecule {[(cell_o, cell_o, 0, θ 01 ,0,θ 02 ),(an1,at1,d 11 ,θ 11 ,d 12 ,θ 12,),(an2,at2,d 21 ,θ 21 ,d 22 ,θ 22 ),…,(an n ,at n ,d n1 ,θ n1 ,d n2 ,θ n2 )],…,[(cell_o,cell_o,0,θ 01 ,0,0),(an1,at1,d 11 ,θ 11 ,d 12 ,θ 12 ),(an2,at2,d 21 ,θ 21 ,d 22 ,θ 22 ),…,(an m ,at m ,d m1 ,θ m1 ,d m2 ,θ m2 )]}, where each array in the first layer of arrays records an atomic chain, and the array in each atomic chain records the information of each atom in this atomic chain. The first array in each atomic chain records the coordinate information of the unit cell origin, where cell_o represents the unit cell origin, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1 is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the x-axis of the local coordinate axis of the atom and the previous atom;
[0049] The conversion module also includes: reading the fractional coordinates of each atom in the molecular structure corresponding to the crystal structure, determining the atomic chain of each atom, and storing the atomic chain as a three-dimensional array {[(cell_o, cell_o), (an1, at1), (an2, at2), ..., (an n ,at n )],…,[(cell_o,cell_o),(an1,at1),(an2,at2),…,(an m ,at m )]}, where an1 is the starting atom, an i For any atom in the molecule, each array records the connection link from each atom to the starting atom; calculate the vector from the unit cell origin to the first atom and the angle between the unit cell edges a and c to obtain θ 01 ,θ 02 ; Traverse the array and calculate the d for each atomic chain i1 ,θ i1 ,d i2 ,θ i2 ; Get the fractional coordinates of the previous and next atoms of the atom in the atomic chain. The previous atom of the first atom is the origin of the unit cell, and the next atom of the last atom is any atom in the molecule that is not collinear with the previous atom and the previous atom. Calculate the distance between the atom and the previous atom to get d i1 ; Calculate the angle between the atom and the atoms before and after it, and get θ i1 ; Determine the atomic local coordinate axis of each atom in the atomic chain, calculate the axis distance between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and obtain d i2 ; Calculate the angle between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and get θ i2 ; The array is stored as the property of the atomic chain corresponding to each atom in the molecule in the new molecular structure, and is associated with the corresponding new crystal structure.
[0050] The above-mentioned crystal space structure transformation method and system converts the object-oriented data structure into a new object data structure by converting, thereby converting the parameter space of the crystal from describing the fractional coordinates of each atom in the unit cell to describing the relative position between two adjacent atoms in the crystal, including the relative distance, the angle between them, and the axial distance and the axial angle between two adjacent molecular bonds. In this way, the entire parameter space changes continuously during the crystal evolution process, overcoming the problem that the evolution process could not smoothly find the local optimal solution due to the discontinuity of the parameter space. This greatly improves the efficiency of using the new parameter space in finding the crystal structure with the lowest local and global energy, and is also more intuitive in research and algorithm development. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a schematic diagram of the unit cell;
[0052] Figure 2 This is a partial flow chart of a method for transforming a crystal space structure according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] like Figure 1 As shown, a crystal spatial structure transformation method according to an embodiment of the present invention includes:
[0054] Step S101, reading: reading a crystal file, converting the unit cell parameters, atomic coordinates in the molecule and space group information in the crystal file into an object-oriented data structure for storage, the object-oriented data structure includes: crystal structure, molecular structure, the crystal structure includes: a unique identifier of the crystal instance, corresponding unit cell properties, IDs of all molecules in the asymmetric unit, and space group properties corresponding to the crystal instance; the molecular structure includes: a unique identifier of the corresponding molecular instance, and position information of all atoms in the molecule;
[0055] Step S103, conversion: converting the object-oriented data structure into a new object data structure, the new object data structure includes: a new crystal structure, a new molecular structure, the new crystal structure includes: a unique identifier of the crystal instance, corresponding unit cell attributes, IDs of all molecules in the asymmetric unit, and space group attributes corresponding to the crystal instance, the new molecular structure includes: an atomic chain corresponding to each atom in the molecule, copying the unit cell attributes and space group attributes in the crystal structure in the object-oriented data structure to the corresponding attributes in the new crystal structure, reading the position information of all atoms in the molecule in the molecular structure, and determining the atomic chain of each atom according to the position information of the atom;
[0056] Step S105, crystal evolution: calculate the lattice energy of the crystal, adjust the unit cell attribute parameters and flexible bond values of the crystal according to the set step length, adjust the unit cell attribute parameters according to the preset edge length and edge angle of the unit cell, assign the adjusted parameter values to the unit cell attribute parameter values, match the specified flexible bond for each atomic chain, rotate and adjust the flexible bond according to the set step length, adjust one parameter each time, calculate the adjusted crystal lattice energy, until the lowest crystal lattice energy no longer increases under the set stop times, and assign an ID to the evolution to form a new crystal;
[0057] Step S107, secondary conversion: converting the new object data structure into an object-oriented data structure;
[0058] Step S109, saving: writing the unit cell properties and space group properties into a new file, traversing the properties of all molecules in the asymmetric unit, obtaining the corresponding molecular structure parameters, and writing the atomic array in each molecular structure into the file line by line.
[0059] This embodiment supports reading traditional CIF crystal files in a standard line-by-line scanning manner. The module stores the unit cell parameters, atomic coordinates in the molecule and space group information in the CIF file according to the following object-oriented data structure.
[0060] The data structure includes two entity classes: crystal structure (Crystal) and molecular structure (Molecule). After the Crystal class is instantiated, it corresponds to a specific crystal structure. After the Molecule class is instantiated, it corresponds to a specific molecular structure. There is a one-to-many relationship between Crystal and Molecule, that is, each Crystal instance has one or more foreign keys pointing to the corresponding Molecule instance.
[0061] The Crystal class includes the attributes id, unit_cell, molecule_ids, and sym. Among them, id is the unique identifier of the corresponding crystal instance. Unit_cell is a unit cell attribute, which is a 6-bit array that records the 6 parameters of the corresponding unit cell: three sets of edge lengths a, b, c and the angles between edges α, β, γ. molecule_ids is a multidimensional array of indefinite length that records the ids of all molecules in the asymmetric unit. Sym is the space group corresponding to the crystal instance.
[0062] The Molecule class includes the attributes id and atoms. Among them, id is the unique identifier of the corresponding molecule instance. atoms is the position information of all atoms in the molecule, preferably a two-dimensional array of all atoms in the molecule, that is, each item in the array is a 5-dimensional array, the first item of this 5-dimensional array is the name of the atom, the second item is the element type of the atom, and the third to fifth items are the fractional coordinates of the atom in the unit cell. See background technology.
[0063] The new data structure includes two entity classes: new crystal structure (New_Crystal) and new molecular structure (New_Molecule). After the New_Crystal class is instantiated, it corresponds to a specific crystal structure. After the New_Molecule class is instantiated, it corresponds to a specific molecular structure. There is a one-to-many relationship between New_Crystal and New_Molecule, that is, each New_Crystal instance has one or more foreign keys pointing to the corresponding New_Molecule instance.
[0064] The New_Crystal class includes the attributes id, unit_cell, molecule_ids, and sym. Among them, id is the unique identifier of the corresponding crystal instance. Unit_cell is a unit cell attribute, a 6-bit array, which records the six parameters of the corresponding unit cell: three sets of edge lengths a, b, c and the angles between edges α, β, γ. molecule_ids is a multidimensional array of indefinite length, which records the ids of all molecules in the asymmetric unit. Sym is the space group corresponding to the crystal instance.
[0065] The New_Molecule class includes the attributes id and atoms_chains, where id is the unique identifier of the corresponding molecule instance.
[0066] atoms_chains records the atomic chain corresponding to each atom in the molecule, using a three-dimensional array. The structure is as follows: {[(cell_o, cell_o, 0, θ 01 ,0,θ 02 ),(an1,at1,d 11 ,θ 11 ,d 12 ,θ 12 ,),(an2,at2,d 21 ,θ 21 ,d 22 ,θ 22 ),…,(an n ,at n ,d n1 ,θ n1 ,d n2 ,θ n2 )],…,[(cell_o,cell_o,0,θ 01 ,0,0),(an1,at1,d 11 ,θ 11 ,d 12 ,θ 12 ),(an2,at2,d 21 ,θ 21 ,d 22 ,θ 22 ),…,(an m ,at m ,d m1 ,θ m1 ,d m2 ,θ m2 )]}, where each array in the first layer of arrays records an atomic chain, and the array in each atomic chain records the information of each atom in this atomic chain. The first array in each atomic chain records the coordinate information of the unit cell origin. Where cell_o represents the unit cell origin, θ 01is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item an in the atomic information array is the atom name, which uniquely corresponds to an atom in the molecule. The second item is the element type of the atom. The third item d i1 is the distance from the previous atom, and the third term of the first atom represents the distance from the origin of the unit cell. i1 is the angle between the atom and the previous and next atoms. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1 is 0. The fifth term d i2 is the axis distance between the x-axis of the atomic local coordinate axis of this atom and the previous atom. The sixth term θ i2 is the angle between the x-axis of the local coordinate axis of this atom and the previous atom.
[0067] Method for determining the local coordinate axis of an atom: The line between the atom and the previous atom is the negative direction of the z-axis. The x-axis is the direction perpendicular to the plane where the atom is located with the previous and next atoms. The y-axis is the direction that forms a right-handed spiral rule with the z-axis and the x-axis. The previous atom of the first atom is the unit cell origin, and the next atom of the last atom is any non-skeleton atom in the molecule.
[0068] The atomic chain determination method is:
[0069] 1. Calculate the distance between each atom in the molecule and the origin of the unit cell. Select the closest atom as the starting atom.
[0070] 2. For each atom in the molecule, find a path connecting the atom and the starting atom in the topological structure of the molecule. The nodes of the path are the atoms in the molecule, and the edges of the path are the bonds between the two atoms in the molecule.
[0071] Preferably, the data structure read from the CIF crystal file is converted into a new data structure according to the following rules.
[0072] 1. Copy the unit cell properties and space group properties in the Crystal object directly to the corresponding properties in the New_Crystal object.
[0073] 2. Perform the following operations on each corresponding Molecule object in the Crystal object.
[0074] 1) Read the fractional coordinates of each atom in the Molecule object. According to the above atomic chain determination method, find the atomic chain of each atom and store the atomic chain in a three-dimensional array. The storage structure is as follows. {[(cell_o,cell_o), (an1,at1), (an2,at2),…, (an n ,at n )],…,[(cell_o,cell_o),(an1,at1),(an2,at2),…,(an m ,at m )]}. An1 is the starting atom, an i For any atom in the molecule. Each array records the connection link from each atom to the starting atom.
[0075] 2) Calculate the angle between the vector from the origin of the unit cell to the first atom and the unit cell edges a and c, and get θ 01 ,θ 02 .
[0076] 3) Traverse this array and calculate the d of each atomic chain i1 ,θ i1 ,d i2 ,θ i2 First, obtain the fractional coordinates of the previous and next atoms of the atom in the atomic chain. The previous atom of the first atom is the origin of the unit cell, and the next atom of the last atom is any atom in the molecule that is not collinear with the previous atom and the previous atom. Calculate the distance between the atom and the previous atom to obtain d i1 . Calculate the angle between the atom and the atoms before and after it, and get θ i1 . According to the method of determining the local coordinate axis of the atom, determine the local coordinates of each atom on the atomic chain. Calculate the axis distance between the local x-axis of the previous atom and the local x-axis of this atom, and get d i2 Calculate the angle between the local x-axis of the previous atom and the local x-axis of this atom, and get θ i2 .
[0077] 4) Store this array as the atoms_chains property in the New_Molecule object. And associate the New_Molecule object with the New_Crystal object in step 1.
[0078] The crystal object under the new data structure is obtained.
[0079] Crystal evolution is to change the crystal structure by adjusting the unit cell in the crystal, the position and orientation of the molecules in the unit cell, and the flexible bonds in the molecules to obtain a crystal structure with better target properties. This embodiment supports evolution with crystal lattice energy as the target function. The specific evolution process is as follows.
[0080] 1. Specify the evolution range of the unit cell parameters.
[0081] The system provides an interface to support manual input of the evolution range of three sets of unit cell parameters: edge lengths a, b, c and edge angles α, β, γ. The input is a two-dimensional array [(a d ,a u ,a s ),(b d ,b u ,b s ),(c d ,c u ,c s ),(α d ,α u ,α s ),(β d ,β u ,β s ),(γ d ,γ u ,γ s )]. Where a d ,b d ,c d , is the lower limit of the edge length evolution range, the value range is [1%, 100%], a u ,b u ,c u , is the upper limit of the edge length evolution range, and its value range is [100%, 1000%]. d ,β d ,γ d is the lower limit of the angular evolution range, the value range is [-180°, 0°], α u ,β u ,γ u is the upper limit of the edge angle evolution range, and the value range is [0°,180°]. In the actual evolution process, the unit cell parameters will be (a*a d ,a*a u ),(b*b d ,b*b u ),(c*c d ,c*c u ),(α+α d ,α+α u ),(β+β d ,β+β u ),(γ+γ d ,γ+γ u ) range. s ,b s ,c s is the adjustment step of edge length, α s ,β d,γ s is the adjustment step size of the edge.
[0082] The system can set default parameters as needed. The default unit cell parameters are [(10%, 200%, 0.01%), (10%, 200%, 0.01%), (10%, 200%, 0.01%), (-10°, 10°, 0.01°), (-10°, 10°, 0.01°), (-10°, 10°, 0.01°)]
[0083] 2. Specify the evolution range of the flexible bond.
[0084] A flexible bond is a rotatable single bond within a molecule. Usually when a σ bond is formed between two atoms, the groups at both ends of the bond can rotate along the bond axis to form different molecular conformations.
[0085] In this embodiment, the system provides an interface to support manual specification of the evolution range of the molecular flexible bonds. The specific process is as follows.
[0086] 1) Input the names of atoms at both ends of the rotatable single bond in the molecule into the system in the form of an array. For example: [(an1,an3), (an7,an 10 )], indicating that there are two flexible bonds in the molecule, and the atoms at the two ends are named an1, an3 and an7, an 10 of atoms.
[0087] 2) Set the rotation range for each flexible bond, and input it as a two-dimensional array [(θ d1-3 ,θ u1-3 ,θ s1-3 ),(θ d7-10 ,θ u7-10 ,θ s7-10 )]. Where θ d1-3 ,θ d7-10 , is the lower limit of the flexible key rotation range, and its value range is
[0088] [-180°,0°] where θ u1-3 ,θ u7-10 , is the upper limit of the flexible key rotation range, and the value range is [0°, 180°]. The system default flexible key value range is [-180°, 180°]. s1-3 ,θ s7-10 Adjust the step size for the flexible key, the default value is 0.01°.
[0089] 3. Input initial crystal
[0090] The initial crystal of the evolution input is the New_Crystal crystal object converted by the crystal file conversion module.
[0091] 4. Calculate the lattice energy of the initial crystal. The system supports calculating the energy of the crystal using force field methods, semi-empirical methods, and high-precision quantitative methods. Standard methods in computational chemistry can also be used to calculate the crystal energy. Commonly used force field calculation tools include Amber, charmm, etc., semi-empirical calculation tools include DFTB, Dmacrys, and high-precision quantitative method calculation tools include VASP, Crystal09, etc.
[0092] 5. Adjust the crystal cell parameters and flexible bond values according to the preset step size. Copy a New_Crystal object, adjust the cell parameters according to the preset edge length and angle of the cell, and assign the adjusted parameter values directly to the cell parameter attribute values. Then traverse the atoms_chains array of the New_Crystal object and match the specified flexible bond to each atomic chain, such as [(an1, an3), (an7, an 10 )]. If the names and order of the two adjacent atoms in the matched atom chain are the same as the atomic bond name and order of the specified flexible bond, then for the latter atom, such as an3, an 10 , where the atomic array θ 32 ,θ 102 , adjusted according to the specified step size.
[0093] 6. In the previous step, only one parameter is adjusted each time, and the default is to make a positive adjustment, that is, to increase the step size based on the original value. Then calculate the lattice energy of the adjusted crystal. If the energy of the adjusted crystal increases, make a negative adjustment in the next adjustment cycle, that is, to reduce the step size based on the original value. If the energy of the adjusted crystal decreases, continue to make adjustments in the next adjustment cycle.
[0094] 7. If the adjustment value exceeds the preset adjustment boundary, the boundary will be used as the adjusted value.
[0095] 8. Repeat steps 5 to 7 until the lowest crystal energy does not increase at the given stop times. The default stop times is 2000, which means that if no crystal with lower energy appears within 2000 consecutive iterations, the evolution stops. The user can manually modify the stop times.
[0096] The secondary conversion in this embodiment is from the New_Crystal object to the Crystal object, and the specific conversion method is as follows.
[0097] 1. Copy the unit cell properties and space group properties in the New_Crystal object directly to the corresponding properties in the Crystal object.
[0098] 2. Perform the following operations on each corresponding New_Molecule object in the New_Crystal object.
[0099] 1) Read the cell origin array (cell_o, cell_o, 0, θ) in the first atomic chain 01 ,0,θ 02 ) and the initial atomic array (an1, at1, d 11 ,θ 11 ,d 12 ,θ 12 ,). Let the fractional coordinates of the initial atom in the unit cell be x, y, z. Then x 2 +y 2 +z 2 =d 11 2 , cosθ 01 2 =x 2 / (x 2 +y 2 +z 2 ), cosθ 02 2 =z 2 / (x 2 +y 2 +z 2 ). Solving the equation gives the fractional coordinates of the initial atoms in the unit cell.
[0100] 2) Read the next atomic array (an2, at2, d 21 ,θ 21 ,d 22 ,θ 22 ,), let the fractional coordinates of the atom in the unit cell be x, y, z. Then x 2 +y 2 +z 2 =d 21 2 , cosθ 11 =(d 11 2 +d 21 2 -x 2 -y 2 -z 2 ) / 2d 11 d 21 , cosθ 12 =(d 12 2 +d 22 2 -x 2 -y 2 -z 2 ) / 2d12 d 22 . Solving the equation can give the fractional coordinates of the atom in the unit cell.
[0101] 3) Read the next atomic array and repeat the previous step. This iteration can obtain the fractional coordinates of each atom in the entire atomic chain.
[0102] 4) Traverse the attribute atoms_chains array in the New_Molecule object. Repeat the above three steps for each atomic chain to obtain the fractional coordinates of all atoms in the entire molecule.
[0103] 3. Fill in the atomic names, atomic types, and fractional coordinates of all atoms in the molecule into the atoms property of the Molecule object to obtain a complete Crystal object.
[0104] Save, store all evolved crystals into files for research and other purposes. The specific process is as follows.
[0105] 1. The user can specify the id of the crystal structure to be saved through the interface. The user can specify the initial crystal, but usually specifies any structure in the evolution process. It is also possible to specify all evolved crystal structures.
[0106] 2. The module will retrieve the corresponding New_Crystal object in the system according to the id. Then call the function of converting New_Crystal into Crystal object in the crystal structure conversion module to obtain the Crystal object.
[0107] 3. The module will then write the unit cell parameter attribute unit_cell and the space group attribute sym of the Crystal object into a new CIF file in sequence. Then it will traverse the molecule_ids attribute, obtain the corresponding Molecule object, and write the atomic array in each Molecule into the CIF file line by line.
[0108] 4. The system supports saving CIF files directly on hard disk or other storage media.
[0109] A crystal spatial structure transformation system according to an embodiment of the present invention comprises:
[0110] Reading module: reads crystal files, converts the unit cell parameters, atomic coordinates and space group information in the crystal files into object-oriented data structures for storage. The object-oriented data structures include: crystal structure and molecular structure. The crystal structure includes: the unique identifier of the crystal instance, the corresponding unit cell properties, the IDs of all molecules in the asymmetric unit, and the space group properties corresponding to the crystal instance; the molecular structure includes: the unique identifier of the corresponding molecular instance and the position information of all atoms in the molecule;
[0111] Conversion module: converting the object-oriented data structure into a new object data structure, the new object data structure includes: a new crystal structure, a new molecular structure, the new crystal structure includes: a unique identifier of the crystal instance, the corresponding unit cell attributes, the IDs of all molecules in the asymmetric unit, and the space group attributes corresponding to the crystal instance. The new molecular structure includes: an atomic chain corresponding to each atom in the molecule, copying the unit cell attributes and space group attributes in the crystal structure in the object-oriented data structure to the corresponding attributes in the new crystal structure, reading the position information of all atoms in the molecule in the molecular structure, and determining the atomic chain of each atom according to the position information of the atom;
[0112] Crystal evolution module: calculate the lattice energy of the crystal, adjust the unit cell attribute parameters and flexible bond values according to the set step length, adjust the unit cell attribute parameters according to the preset edge length and angle of the unit cell, assign the adjusted parameter values to the unit cell attribute parameter values, match the specified flexible bond for each atomic chain, rotate and adjust the flexible bond according to the set step length, adjust one parameter each time, calculate the adjusted crystal lattice energy, until the lowest crystal lattice energy no longer increases under the set stop times, and assign an ID to the evolution to form a new crystal;
[0113] Secondary conversion module: convert the new object data structure into an object-oriented data structure;
[0114] Saving module: write the unit cell properties and space group properties into a new file, traverse the properties of all molecules in the asymmetric unit, obtain the corresponding molecular structure parameters, and write the atomic array in each molecular structure into the file line by line.
[0115] The corresponding unit cell properties of the crystal structure of this embodiment record 6 parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and angles α, β, γ between edges. The position information of all atoms in the molecules of the molecular structure is a two-dimensional array, and each item in the two-dimensional array is a five-dimensional array. The first item of the five-dimensional number is the name of the atom, the second item is the element type of the atom, and the third to fifth items are the fractional coordinates of the atom in the unit cell.
[0116] The corresponding unit cell attributes of the new crystal structure package of this embodiment record the six parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and the angles α, β, γ between the edges. The new molecular structure uses a three-dimensional array to record the atomic chain corresponding to each atom in the molecule {[(cell_o, cell_o, 0, θ 01 ,0,θ 02 ),(an1,at1,d 11 ,θ 11 ,d 12 ,θ 12 ,),(an2,at2,d 21 ,θ 21 ,d 22 ,θ 22 ),…,(an n ,at n ,d n1 ,θ n1 ,d n2 ,θ n2 )],…,[(cell_o,cell_o,0,θ 01 ,0,0),(an1,at1,d 11 ,θ 11 ,d 12 ,θ 12 ),(an2,at2,d 21 ,θ 21 ,d 22 ,θ 22 ),…,(an m ,at m ,d m1 ,θ m1 ,d m2 ,θ m2 )]}, where each array in the first layer of arrays records an atomic chain, and the array in each atomic chain records the information of each atom in this atomic chain. The first array in each atomic chain records the coordinate information of the unit cell origin, where cell_o represents the unit cell origin, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the x-axis of the local coordinate axis of this atom and the previous atom.
[0117] The local coordinate axis of the atom is the line between the atom and the previous atom as the negative direction of the z-axis, the x-axis is the direction perpendicular to the plane where the atom and the previous and next atoms are located, the y-axis is in the direction of the right-hand spiral rule with the z-axis and the x-axis, the previous atom of the first atom is the unit cell origin, and the next atom of the last atom is any non-skeleton atom in the molecule.
[0118] The atomic chain of this embodiment: calculate the distance between each atom in the molecule and the origin of the unit cell, select the atom with the closest distance as the starting atom, and for each atom in the molecule, find a path connecting the atom and the starting atom in the topological structure of the molecule. The atoms in the molecule serve as nodes of the path, and the bonds between two atoms in the molecule serve as edges of the path.
[0119] Furthermore, the conversion module of this embodiment also includes: reading the fractional coordinates of each atom in the molecular structure corresponding to the crystal structure, determining the atomic chain of each atom, and storing the atomic chain as a three-dimensional array {[(cell_o, cell_o), (an1, at1), (an2, at2), …, (an n ,at n )],…,[(cell_o,cell_o),(an1,at1),(an2,at2),…,(an m ,at m )]}, where an1 is the starting atom, an i For any atom in the molecule, each array records the connection link from each atom to the starting atom; calculate the vector from the unit cell origin to the first atom and the angle between the unit cell edges a and c to obtain θ 01 ,θ 02 ; Traverse the array and calculate the d for each atomic chain i1 ,θ i1 ,d i2 ,θ i2 ; Get the fractional coordinates of the previous and next atoms of the atom in the atomic chain. The previous atom of the first atom is the origin of the unit cell, and the next atom of the last atom is any atom in the molecule that is not collinear with the previous atom and the previous atom. Calculate the distance between the atom and the previous atom to get d i1 ; Calculate the angle between the atom and the atoms before and after it, and get θ i1; Determine the atomic local coordinate axis of each atom in the atomic chain, calculate the axis distance between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and obtain d i2 ; Calculate the angle between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and get θ i2 ; The array is stored as the property of the atomic chain corresponding to each atom in the molecule in the new molecular structure, and is associated with the corresponding new crystal structure.
[0120] Furthermore, the evolution module of this embodiment includes: accepting input or setting of the evolution range of unit cell property parameters, accepting input or setting of the evolution range of flexible bonds, accepting a new object data structure, calculating the lattice energy of the crystal, copying the new crystal structure object, adjusting the unit cell property parameters according to the preset edge length and edge angle adjustment step of the unit cell, assigning the adjusted parameter value to the unit cell property parameter value, and then traversing the corresponding array of the atomic chain corresponding to each atom in the molecule in the new crystal structure, matching the specified flexible bond for each atomic chain, if the name and order of two adjacent atoms in the matched atomic chain are the same as the atomic bond name and order of the specified flexible bond, then adjusting the latter atom according to the specified step, adjusting one parameter each time, and making a positive adjustment by default, and then calculating the lattice energy of the adjusted crystal, if the lattice energy of the adjusted crystal increases, then making a negative adjustment in the next adjustment cycle, if the lattice energy of the adjusted crystal decreases, then continuing to make a positive adjustment in the next adjustment cycle, if the adjustment value exceeds the preset adjustment boundary, then taking the boundary as the adjusted value, and repeating the adjustment until the lowest crystal lattice energy no longer increases under the set number of stop times. Preferably, the evolution order of the evolution module is to adjust the unit cell parameters first and then adjust the flexible bond parameters. The unit cell parameters are adjusted in the order of a, b, c, α, β, γ, and the flexible bonds are adjusted in the order of the atomic chain array in the new molecular structure.
[0121] The secondary conversion module includes: copying the cell properties and space group properties in the new crystal structure to the corresponding properties in the crystal structure, reading the cell origin array (cell_o, cell_o, 0, θ 01 ,0,θ 02 ) and the initial atomic array (an1, at1, d 11 ,θ 11 ,d 12 ,θ 12 ,), let the fractional coordinates of the initial atom in the unit cell be x, y, z, then x 2 +y 2 +z 2 =d 11 2 , cosθ 01 2 =x 2 / (x 2 +y 2 +z 2 ), cosθ 02 2 =z 2 / (x 2 +y 2 +z 2 ), solving the equations can obtain the fractional coordinates of the initial atoms in the unit cell; read the next atomic array (an2, at2, d 21 ,θ 21 ,d 22 ,θ 22 ,), let the fractional coordinates of the atom in the unit cell be x, y, z, then x 2 +y 2 +z 2 =d 21 2 , cosθ 11 =(d 11 2 +d 21 2 -x 2 -y 2 -z 2 ) / 2d 11 d 21 ,cosθ 12 =(d 12 2 +d 22 2 -x 2 -y 2 -z 2 ) / 2d 12 d 22 , solve the equations to obtain the fractional coordinates of the atom in the unit cell; read the next atomic array (an i ,at i ,d i1 ,θ i1 ,d i2 ,θ i2 ), and repeatedly solve the system of equations x 2 +y 2 +z 2 =d i1 2 , cosθ (i-1)1 =(d (i-1)1 2 +d i1 2 -x 2 -y 2 -z 2 ) / 2d (i-1)1 d i1 , cosθ(i-1)2 =(d (i-1)2 2 +d i2 2 -x 2 -y 2 -z 2 ) / 2d (i-1)2 d i2 , obtain the fractional coordinates of the atom in the unit cell, where cell_o represents the origin of the unit cell, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1 is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the atom and the x-axis in the local coordinate axis of the previous atom; such iteration can obtain the fractional coordinates of each atom in the entire atomic chain; traverse the atomic chain array corresponding to each atom in the molecule in the new molecular structure, repeat the above solution operation for each atomic chain, and obtain the fractional coordinates of all atoms in the entire molecule, fill the atomic name, atomic type, and fractional coordinates of all atoms in the molecule into the position information attributes of all atoms in the molecule of the molecular structure, and the complete crystal structure is obtained.
[0122] The storage module of this embodiment stores all the evolved crystals into files for research and other purposes. The specific process is as follows:
[0123] The user can specify the id of the crystal structure to be saved through the interface. The user can specify the initial crystal, but usually specifies any structure in the evolution process. It is also possible to specify all evolved crystal structures.
[0124] This module will retrieve the corresponding New_Crystal object in the system according to the id, and then call the function of converting New_Crystal into Crystal object in the crystal structure conversion module to obtain the Crystal object.
[0125] The module will then write the unit cell parameter attribute unit_cell and the space group attribute sym of the Crystal object into a new CIF file in sequence. Then it will traverse the molecule_ids attribute, obtain the corresponding Molecule object, and write the atomic array in each Molecule into the CIF file line by line.
[0126] The system supports directly saving CIF files in hard disk or other storage media.
[0127] The system architecture of the present invention adopts an architectural design in which the model layer and the control layer are separated.
[0128] The data storage of the model layer adopts a direct memory management architecture, and the control layer is developed in Python into a code script library that is easy to call and encapsulate.
[0129] The present invention can be deployed on a public cloud, a local cluster, or a user's personal computer. The system operating software environment can adopt: Linux 4 or higher kernel version, Python 2.7 operating environment.
[0130] The present invention converts the parameter space of the crystal from describing the fractional coordinates of each atom in the unit cell to describing the relative position between two adjacent atoms in the crystal, including the relative distance, the angle between them, and the axis distance and the axis angle between two adjacent molecular bonds. In this way, the entire parameter space changes continuously during the crystal evolution process. It overcomes the problem that the evolution process cannot smoothly find the local optimal solution due to the discontinuity of the parameter space. This greatly improves the efficiency of using the parameter space to find the crystal structure with the lowest local and global energy, and is also more intuitive in research and algorithm development.
[0131] Based on the above ideal embodiments of this application, the relevant staff can make various changes and modifications without departing from the technical concept of this application through the above description. The technical scope of this application is not limited to the content in the specification, and its technical scope must be determined according to the scope of the claims.
[0132] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0133] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
Claims
1. A method for transforming the spatial structure of a crystal, It is characterized in that include: Reading: reading the crystal file, converting the unit cell parameters, atomic coordinates in the molecule and space group information in the crystal file into an object-oriented data structure for storage. The object-oriented data structure includes: crystal structure and molecular structure. The crystal structure includes: the unique identifier of the crystal instance, the corresponding unit cell properties, the IDs of all molecules in the asymmetric unit, and the space group properties corresponding to the crystal instance; the molecular structure includes: the unique identifier of the corresponding molecular instance, and the position information of all atoms in the molecule; wherein the position information of all atoms in the molecule includes the fractional coordinates of each atom in the molecule in the unit cell; Conversion: converting the object-oriented data structure into a new object data structure, the new object data structure includes: a new crystal structure, a new molecular structure, the new crystal structure includes: a unique identifier of the crystal instance, the corresponding unit cell attributes, the IDs of all molecules in the asymmetric unit, and the space group attributes corresponding to the crystal instance, the new molecular structure includes: an atomic chain corresponding to each atom in the molecule, copying the unit cell attributes and space group attributes in the crystal structure in the object-oriented data structure to the corresponding attributes in the new crystal structure, reading the position information of all atoms in the molecule in the molecular structure, and determining the atomic chain of each atom according to the atomic position information; wherein the atomic chain corresponding to each atom in the molecule includes the distance between the atom and the previous atom, the angle formed by the atom with the previous atom and with the next atom, the axis distance between the atom and the x-axis in the local coordinate axis of the previous atom, and the angle between the atom and the x-axis in the local coordinate axis of the previous atom; Crystal evolution: using the objects in the new object data structure to calculate the lattice energy of the crystal, adjusting the unit cell attribute parameters and flexible bond values of the crystal according to the set step length, adjusting the unit cell attribute parameters according to the preset edge length and angle of the unit cell, assigning the adjusted parameter values to the unit cell attribute parameter values, matching the specified flexible bond for each atomic chain, rotating and adjusting the flexible bond according to the set step length, adjusting one parameter each time, calculating the adjusted crystal lattice energy, until the lowest crystal lattice energy no longer increases under the set number of stops, and assigning an ID to the evolution to form a new crystal; Secondary conversion: converting the evolved new object data structure into an object-oriented data structure; wherein the unit cell attributes and space group attributes in the new crystal structure in the evolved new object data structure are copied to the corresponding attributes in the crystal structure in the object-oriented data structure, the atomic chain corresponding to each atom in the molecule in the new molecular structure is read to determine the fractional coordinates of each atom in the unit cell, and the fractional coordinates of each atom in the molecule in the unit cell are stored in the molecular structure of the object-oriented data structure; Save: Write the unit cell properties and space group properties to a new file, traverse the properties of all molecules in the asymmetric unit, obtain the corresponding molecular structure parameters, and write the atomic array in each molecular structure to the file line by line.
2. The crystal spatial structure transformation method according to claim 1, It is characterized in that The corresponding unit cell properties of the crystal structure record 6 parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and angles α, β, γ between edges. The position information of all atoms in the molecules of the molecular structure is a two-dimensional array, and each item in the two-dimensional array is a 5-dimensional array. The first item of the 5-dimensional number is the name of the atom, the second item is the element type of the atom, and the third to fifth items are the fractional coordinates of the atom in the unit cell.
3. The crystal spatial structure transformation method according to claim 2, It is characterized in that The corresponding unit cell attributes of the new crystal structure package record the six parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and the angles α, β, γ between the edges; the new molecular structure uses a three-dimensional array to record the atomic chain corresponding to each atom in the molecule {[(cell_o, cell_o, 0, θ 01 , 0, θ 02 ), (an 1 , at 1 , d 11 ,θ 11 , d 12 ,θ 12 ,),(an 2 , at 2 , d 21 ,θ 21 , d 22 ,θ 22 ),...,(an n , at n , d n1 ,θ n1 , d n2 ,θ n2 )],...,[(cell_o,cell_o,0,θ 01 ,0,0),(an 1 , at 1 , d 11 ,θ 11 , d 12 ,θ 12 ), (an 2 , at 2 , d 21 ,θ 21 , d 22 ,θ 22 ),...,(an m , at m , d m1 ,θ m1 , d m2 ,θ m2 )]}, where each array in the first layer of arrays records an atomic chain, and the array in each atomic chain records the information of each atom in this atomic chain. The first array in each atomic chain records the coordinate information of the unit cell origin, where cell_o represents the unit cell origin, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1 is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the x-axis of the local coordinate axis of this atom and the previous atom.
4. The crystal spatial structure transformation method according to claim 3, It is characterized in that The local coordinate axis of the atom is a line between the atom and the previous atom as the negative direction of the z-axis, the x-axis direction is a direction perpendicular to the plane where the atom and the previous and next atoms are located, the y-axis is a direction that forms a right-hand spiral rule with the z-axis and the x-axis, the previous atom of the first atom is the unit cell origin, and the next atom of the last atom is any non-skeleton atom in the molecule; the atomic chain: calculates the distance between each atom in the molecule and the unit cell origin, selects the atom with the closest distance as the starting atom, and for each atom in the molecule, finds a path connecting the atom and the starting atom in the topological structure of the molecule, the atoms in the molecule are used as nodes of the path, and the bonds between two atoms in the molecule are used as edges of the path.
5. The crystal spatial structure transformation method according to claim 3, It is characterized in that The conversion further includes: reading the fractional coordinates of each atom in the molecular structure corresponding to the crystal structure, determining the atomic chain of each atom, and storing the atomic chain as a three-dimensional array {[(cell_o, cell_o), (an 1 , at 1 ), (an 2 ,at2),...,(an n , at n )],...,[(cell_o,cell_o),(an 1 , at 1 ), (an 2 , at 2 ),...,(an m , at m )]}, where an 1 is the starting atom, an i For any atom in the molecule, each array records the connection link from each atom to the starting atom; calculate the vector from the unit cell origin to the first atom and the angle between the unit cell edges a and c to obtain θ 01 ,θ 02 ; Traverse the array and calculate the d for each atomic chain i1 ,θ i1 , d i2 ,θ i2 ; Get the fractional coordinates of the previous and next atoms of the atom in the atomic chain. The previous atom of the first atom is the origin of the unit cell, and the next atom of the last atom is any atom in the molecule that is not collinear with the previous atom and the previous atom. Calculate the distance between the atom and the previous atom to get d i1 ; Calculate the angle between the atom and the atoms before and after it, and get θ i1 ; Determine the atomic local coordinate axis of each atom in the atomic chain, calculate the axis distance between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and obtain d i2 ; Calculate the angle between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and get θ i2 ; The array is stored as the property of the atomic chain corresponding to each atom in the molecule in the new molecular structure, and is associated with the corresponding new crystal structure.
6. The crystal spatial structure transformation method according to any one of claims 1 to 5, It is characterized in that The evolution step includes: accepting input or setting of the evolution range of unit cell property parameters, accepting input or setting of the evolution range of flexible bonds, accepting a new object data structure, calculating the lattice energy of the crystal, copying a new crystal structure object, adjusting the unit cell property parameters according to the preset edge length and edge angle adjustment step of the unit cell, assigning the adjusted parameter value to the unit cell property parameter value, and then traversing the corresponding array of the atomic chain corresponding to each atom in the molecule in the new crystal structure, matching each atomic chain with a specified flexible bond, if the names and order of two adjacent atoms in the matched atomic chain are the same as the atomic bond name and order of the specified flexible bond, then adjusting the latter atom according to the specified step, and each adjustment A parameter is adjusted positively by default, and then the lattice energy of the adjusted crystal is calculated. If the lattice energy of the adjusted crystal increases, a negative adjustment is made in the next adjustment cycle. If the lattice energy of the adjusted crystal decreases, a positive adjustment is continued in the next adjustment cycle. If the adjustment value exceeds the preset adjustment boundary, the boundary is used as the adjusted value, and the adjustment is repeated until the lowest crystal lattice energy no longer increases under the set stop times; the evolution order of the evolution steps is to adjust the unit cell parameters first, and then adjust the flexible bond parameters. The unit cell parameters are adjusted in the order of a, b, c, α, β, and γ, and the flexible bonds are adjusted in the order of the atomic chain array in the new molecular structure.
7. The crystal spatial structure transformation method according to any one of claims 2 to 5, It is characterized in that The secondary conversion includes: copying the unit cell properties and space group properties in the new crystal structure into the corresponding properties in the crystal structure, reading the unit cell origin array (cell_o, cell_o, 0, θ 01 , 0, θ 02 ) and the initial atomic array (an 1 , at 1 , d 11 ,θ 11 , d 12 ,θ 12 ,), let the fractional coordinates of the initial atom in the unit cell be x, y, z, then x 2 +y 2 +z 2 =d1 1 2 , cosθ 01 2 =x 2 / (x 2 +y 2 +z 2 ), cosθ 02 2 =z 2 / (x 2 +y 2 +z 2 ), solving the equations can obtain the fractional coordinates of the initial atoms in the unit cell; reading the next atomic array (an 2 , at 2 , d2 1 ,θ 21 , d 22 ,θ 22 ,), let the fractional coordinates of the atom in the unit cell be x, y, z, then x 2 +y 2 +z 2 =d 21 2 , cosθ 11 =(d 11 2 +d 21 2 -x 2 -y 2 -z 2 ) / 2d 11 d 21 , cosθ 12 =(d 12 2 +d 22 2 -x 2 -y 2 -z 2 ) / 2d 12 d 22 , solve the equations to obtain the fractional coordinates of the atom in the unit cell; read the next atomic array (an i , at i , d i1 ,θ i1 , d i2 ,θ i2 ), and repeatedly solve the system of equations x 2 +y 2 +z 2 =d i1 2 , cosθ (i-1)1 =(d (i-1)1 2 +d i1 2 -x 2 -y 2 -z 2 ) / 2d (i-1)1 d i1 , cosθ (i-1)2 =(d (i-1)2 2 +d i2 2 -x 2 -y 2 -z 2 ) / 2d (i-1)2 d i2 , obtain the fractional coordinates of the atom in the unit cell, where cell_o represents the origin of the unit cell, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1 is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the atom and the x-axis in the local coordinate axis of the previous atom; such iteration can obtain the fractional coordinates of each atom in the entire atomic chain; traverse the atomic chain array corresponding to each atom in the molecule in the new molecular structure, repeat the above solution operation for each atomic chain, and obtain the fractional coordinates of all atoms in the entire molecule, fill the atomic name, atomic type, and fractional coordinates of all atoms in the molecule into the position information attributes of all atoms in the molecule of the molecular structure, and the complete crystal structure is obtained.
8. A crystal space structure transformation system, It is characterized in that include: Reading module: reads the crystal file, converts the unit cell parameters, atomic coordinates in the molecule and space group information in the crystal file into an object-oriented data structure for storage, the object-oriented data structure includes: crystal structure, molecular structure, the crystal structure includes: the unique identifier of the crystal instance, the corresponding unit cell properties, the IDs of all molecules in the asymmetric unit, and the space group properties corresponding to the crystal instance; the molecular structure includes: the unique identifier of the corresponding molecular instance, the position information of all atoms in the molecule; wherein the position information of all atoms in the molecule includes the fractional coordinates of each atom in the molecule in the unit cell; Conversion module: converting the object-oriented data structure into a new object data structure, the new object data structure includes: a new crystal structure, a new molecular structure, the new crystal structure includes: a unique identifier of the crystal instance, the corresponding unit cell attributes, the IDs of all molecules in the asymmetric unit, and the space group attributes corresponding to the crystal instance, the new molecular structure includes: an atomic chain corresponding to each atom in the molecule, copying the unit cell attributes and space group attributes in the crystal structure in the object-oriented data structure to the corresponding attributes in the new crystal structure, reading the position information of all atoms in the molecule in the molecular structure, and determining the atomic chain of each atom according to the atomic position information; wherein the atomic chain corresponding to each atom in the molecule includes the distance between the atom and the previous atom, the angle formed by the atom with the previous atom and with the next atom, the wheelbase between the atom and the x-axis in the local coordinate axis of the previous atom, and the angle between the atom and the x-axis in the local coordinate axis of the previous atom; Crystal evolution module: using the objects in the new object data structure to calculate the lattice energy of the crystal, adjusting the unit cell attribute parameters and flexible bond values of the crystal according to the set step length, adjusting the unit cell attribute parameters according to the preset edge length and angle of the unit cell, assigning the adjusted parameter values to the unit cell attribute parameter values, matching the specified flexible bond for each atomic chain, rotating and adjusting the flexible bond according to the set step length, adjusting one parameter each time, calculating the adjusted crystal lattice energy, until the lowest crystal lattice energy no longer increases under the set stop times, and assigning an ID to the evolution to form a new crystal; Secondary conversion module: converting the evolved new object data structure into an object-oriented data structure; wherein the unit cell attributes and space group attributes in the new crystal structure in the evolved new object data structure are copied to the corresponding attributes in the crystal structure in the object-oriented data structure, the atomic chain corresponding to each atom in the molecule in the new molecular structure is read to determine the fractional coordinates of each atom in the unit cell, and the fractional coordinates of each atom in the molecule in the unit cell are stored in the molecular structure of the object-oriented data structure; Saving module: write the unit cell properties and space group properties into a new file, traverse the properties of all molecules in the asymmetric unit, obtain the corresponding molecular structure parameters, and write the atomic array in each molecular structure into the file line by line.
9. The crystal spatial structure transformation system according to claim 8, It is characterized in that The corresponding unit cell attributes of the crystal structure record six parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and angles α, β, γ between edges. The position information of all atoms in the molecule of the molecular structure is a two-dimensional array, and each item in the two-dimensional array is a five-dimensional array. The first item of the five-dimensional number is the name of the atom, the second item is the element type of the atom, and the third to fifth items are the fractional coordinates of the atom in the unit cell. The secondary conversion module includes: copying the unit cell attributes and space group attributes in the new crystal structure into the corresponding attributes in the crystal structure, reading the unit cell origin array (cell_o, cell_o, 0, θ 01 , 0, θ 02 ) and the initial atomic array (an 1 , at 1 , d 11 ,θ 11 , d 12 ,θ 12 ,), let the fractional coordinates of the initial atom in the unit cell be x, y, z, then x 2 +y 2 +z 2 =d 11 2 , cosθ 01 2 =x 2 / (x 2 +y 2 +z 2 ), cosθ 02 2 =z 2 / (x 2 +y 2 +z 2 ), solving the equations can obtain the fractional coordinates of the initial atoms in the unit cell; reading the next atomic array (an 2 , at 2 , d 21 ,θ 21 , d 22 ,θ 22 ,), let the fractional coordinates of the atom in the unit cell be x, y, z, then x 2 +y 2 +z 2 =d2 1 2 , cosθ 11 =(d 11 2 +d 21 2 -x 2 -y 2 -z 2 ) / 2d 11 d 21 , cosθ 12 =(d 12 2 +d 22 2 -x 2 -y 2 -z 2 ) / 2d 12 d 22 , solve the equations to obtain the fractional coordinates of the atom in the unit cell; read the next atomic array (an i , at i , d i1 ,θ i1 , d i2 ,θ i2 ), and repeatedly solve the system of equations x 2 +y 2 +z 2 =d i1 2 , cosθ (i-1)1 =(d (i-1)1 2 +d i1 2 -x 2 -y 2 -z 2 ) / 2d (i-1)1 d i1 , cosθ (i-1)2 =(d (i-1)2 2 +d i2 2 -x 2 -y 2 -z 2 ) / 2d (i-1)2 d i2 , obtain the fractional coordinates of the atom in the unit cell, where cell_o represents the origin of the unit cell, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1 is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the atom and the x-axis in the local coordinate axis of the previous atom; such iteration can obtain the fractional coordinates of each atom in the entire atomic chain; traverse the atomic chain array corresponding to each atom in the molecule in the new molecular structure, repeat the above solution operation for each atomic chain, and obtain the fractional coordinates of all atoms in the entire molecule, fill the atomic name, atomic type, and fractional coordinates of all atoms in the molecule into the position information attributes of all atoms in the molecule of the molecular structure, and the complete crystal structure is obtained.
10. The crystal spatial structure transformation system according to claim 8 or 9, It is characterized in that The corresponding unit cell attributes of the new crystal structure package record the six parameters of the corresponding unit cell, three sets of edge lengths a, b, c, and the angles α, β, γ between the edges; the new molecular structure uses a three-dimensional array to record the atomic chain corresponding to each atom in the molecule {[(cell_o, cell_o, 0, θ 01 , 0, θ 02 ), (an 1 , at 1 , d 11 ,θ 11 , d 12 ,θ 12 ,),(an 2 , at 2 , d 21 ,θ 21 , d 22 ,θ 22 ),...,(an n , at n , d n1 ,θ n1 , d n2 ,θ n2 )],...,[(cell_o,cell_o,0,θ 01 ,0,0),(an 1 , at 1 , d 11 ,θ 11 , d 12 ,θ 12 ), (an 2 , at 2 , d 21 ,θ 21 , d 22 ,θ 22 ),...,(an m , at m , d m1 ,θ m1 , d m2 ,θ m2 )]}, where each array in the first layer of arrays records an atomic chain, and the array in each atomic chain records the information of each atom in this atomic chain. The first array in each atomic chain records the coordinate information of the unit cell origin, where cell_o represents the unit cell origin, θ 01 is the angle between the vector from the origin of the unit cell to the first atom and the a-axis of the unit cell, θ 02 It is the angle between the vector from the origin of the unit cell to the first atom and the c-axis of the unit cell. The first item of the atomic information array is an i is the name of the atom, which uniquely corresponds to an atom in the molecule; the second item is the element type of the atom, and the third item d i1 is the distance from the previous atom, the third term of the first atom represents the distance from the origin of the unit cell; the fourth term θ i1 is the angle between the atom and the previous atom and the next atom. The previous atom of the first atom is the origin of the unit cell, and the θ of the last atom is i1 is 0; the fifth item d i2 is the axis distance between the x-axis of the local coordinate axis of the atom and the previous atom, and the sixth term θ i2 is the angle between the x-axis of the local coordinate axis of the atom and the previous atom; The conversion module also includes: reading the fractional coordinates of each atom in the molecular structure corresponding to the crystal structure, determining the atomic chain of each atom, and storing the atomic chain as a three-dimensional array {[(cell_o, cell_o), (an 1 , at 1 ), (an 2 , at 2 ),...,(an n , at n )],...,[(cell_o,cell_o),(an 1 , at 1 ), (an 2 , at 2 ),...,(an m , at m )]}, where an 1 is the starting atom, an i For any atom in the molecule, each array records the connection link from each atom to the starting atom; calculate the vector from the unit cell origin to the first atom and the angle between the unit cell edges a and c to obtain θ 01 ,θ 02 ; Traverse the array and calculate the d for each atomic chain i1 ,θ i1 , d i2 ,θ i2 ; Get the fractional coordinates of the previous and next atoms of the atom in the atomic chain. The previous atom of the first atom is the origin of the unit cell, and the next atom of the last atom is any atom in the molecule that is not collinear with the previous atom and the previous atom. Calculate the distance between the atom and the previous atom to get d i1 ; Calculate the angle between the atom and the atoms before and after it, and get θ i1 ; Determine the atomic local coordinate axis of each atom in the atomic chain, calculate the axis distance between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and obtain d i2 ; Calculate the angle between the x-axis of the atomic local coordinate axis of the previous atom and the x-axis of the atomic local coordinate axis of this atom, and get θ i2 ; The array is stored as the property of the atomic chain corresponding to each atom in the molecule in the new molecular structure, and is associated with the corresponding new crystal structure.
