A crystal structure search method based on genetic algorithm iteration site combination

CN118298982BActive Publication Date: 2026-10-16DALIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410572784.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-10
Publication Date
2026-10-16
Estimated Expiration
2044-05-10

AI Technical Summary

Technical Problem

[0003]为了克服传统方法难以应对多组分合金材料开发中晶体结构模型近乎无限大的构型空间所带来的挑战、计算成本高等问题,本发明提供了一种基于遗传算法迭代位点组合的晶体结构搜索方法

Benefits of technology

[0031] This invention directly iterates the site combinations of multi-component alloy materials using an evolutionary strategy based on a genetic algorithm. When applied to extremely complex doped systems, it can directly disregard the overall configuration space and use a limited number of sites to continuously evolve and obtain better site combinations, thereby obtaining the crystal structure model with the lowest energy. This method enables users to perform structure search and analyze the performance and mechanism of multi-component alloy materials at low cost and high efficiency, and can provide guidance for the design and development of novel multi-component alloy materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118298982B_ABST
    Figure CN118298982B_ABST
Patent Text Reader

Abstract

The application discloses a crystal structure searching method based on genetic algorithm iteration site combination, which comprises the following steps: step one, reading a base structure file; step two, assigning index numbers to all sites in a base crystal structure model; step three, applying mutation to generate a series of site combinations as a first generation population; step four, generating a structure based on the site combinations, generating an input file for first principle calculation, completing the first principle calculation, and completing the output of the calculation results; and step five, based on the evolution strategy of the genetic algorithm, applying hybridization, mutation and mutation to generate new site combinations as an Nth generation (N >= 2) population; the application has the beneficial effect that users can realize structure searching of multi-component alloy materials at low cost and high efficiency, analyze the performance and mechanism of the materials, and provide guidance for the design and development of new multi-component alloy materials.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of crystal material computation, specifically relating to a crystal structure search method based on iterative site combination using a genetic algorithm. Background Technology

[0002] In the past, the development of new materials was conducted solely in laboratories through trial and error, relying heavily on researchers' experience and intuition. However, with the advancement of computing power, computer simulation has become an indispensable part of materials design. Since simulation calculations are based on crystal structure models, this process requires obtaining a reasonable crystal structure model before making accurate predictions about the various properties of crystalline materials. Currently, in the development of crystalline materials, especially in the field of new energy applications, research is trending towards diversified elemental doping, i.e., the development of multi-component alloy materials. Traditional methods such as Cluster Expansion and enumeration methods struggle to address the challenges posed by the near-infinite configuration space of crystal structure models in the development of multi-component alloy materials. Their practical application in searching for the structure of multi-component alloy materials suffers from a sharp increase in computational cost, rendering them impractical. Summary of the Invention

[0003] To overcome the challenges and high computational costs posed by traditional methods in dealing with the near-infinite configuration space of crystal structure models in the development of multi-component alloy materials, this invention provides a crystal structure search method based on iterative site combination using a genetic algorithm.

[0004] The technical solution adopted by the present invention to achieve the above objectives is as follows: The specific steps are as follows:

[0005] Step 1: Read the substrate structure file; The substrate structure file is input by the user and is used to define and help the program create the substrate crystal structure model for the structure search. It needs to include various types of atoms and their corresponding quantities, the fractional coordinates or Cartesian coordinates of each atom, and a 3×3 unit cell basis matrix; The substrate crystal structure model created based on the substrate structure file will serve as a template for creating new structure models when this method performs structure search. All new crystal structure models will be obtained by replacing existing atoms or embedding new atoms on the substrate crystal structure model;

[0006] Step 2: Assign index numbers to all sites in the substrate crystal structure model. Sites in the substrate crystal structure model are divided into two categories. The first category of sites is named substitution sites, which are sites in the substrate crystal structure model whose element and coordinate information have been specified. The second category of sites is named embedding sites, which require the coordinate information of the sites to be calculated based on the elements in the crystal structure and the chemical properties of the embedded elements.

[0007] Specifically:

[0008] Step 201: Based on the substrate crystal structure model created in Step 1, traverse all sites in the substrate crystal structure model and assign index numbers to all sites starting from 0. When assigning index numbers, the element information and coordinate data of the sites are counted at the same time. These sites with real element information are named substitution sites.

[0009] Step 202: Based on the site information obtained in step 201, and combined with the properties of various chemical elements and the properties of the elements to be embedded, statistically analyze all possible spatial coordinate data of the embedded elements, extract these coordinate data as empty sites, and continue to assign index numbers based on the last index number in step 201. At the same time, use "AM" to refer to the element information. These element information are referred to as "AM sites are named embedding sites".

[0010] Step 203: Merge the substitution class site and embedding class site information created in steps 201 and 202, and store this information in a separate file in order of index number for fixed preservation.

[0011] Step 204: When iterating to the second generation and beyond, read the independent file created in step 203 and assign index numbers to all sites of the basal structure model;

[0012] Step 3: Apply mutation to generate a series of site combinations as the first generation population; since the first-principles calculation was not completed when the program was started, the fitness of the sites could not be evaluated. Therefore, the site combinations can only be obtained through mutation, i.e., completely random combinations.

[0013] Specifically:

[0014] Step 301: Obtain available site index numbers; determine the elements and type information that need to be combined with sites according to the calculation requirements, and extract all index numbers of the corresponding sites from the basal structure model as available site index numbers;

[0015] Step 302: Obtain site combinations from the available site index numbers through mutation; for the element types set according to the calculation requirements {Ele1, Ele2, ..., Ele...} n} and the number of sites corresponding to the element type {Num1, Num2, ... Num n Let the available site index numbers include M index numbers. Extract Num1 index numbers from them using random sampling and label them Ele1. Then remove the extracted index numbers from the available site index numbers, leaving M-Num1 index numbers. Extract Num2 index numbers from these remaining M-Num1 index numbers using random sampling, and so on, until the index numbers for Ele1 are completely extracted. nRandom sampling of elements, and finally merging all the extracted index numbers and corresponding marked elements to generate a site combination and checking if the site combination exists. If the check fails, the site combination is discarded and the same step is repeated to generate a site combination. If the check passes, the site combination is output.

[0016] Step 303: Based on the calculated and set population size for the first generation, repeat step 301 continuously to obtain a combination of loci equal to the set population size, and output all the loci combinations.

[0017] Step 4: Generate the structure based on the site combination, generate the input file for the first-principles calculation, complete the first-principles calculation, and output the calculation results;

[0018] Specifically:

[0019] Step 401: Read each site combination in sequence, locate the site in the basal structure model according to the index number in each site combination, and edit the basal structure model according to the site type and the element information marked by the index number in the site combination. If it is a substitution site, change the element of the original site to the element marked by the index number. If it is an embedding site, embed an atom at the coordinates of the site, and the element type is the element marked by the index number. After the editing operation is completed, save the structure model as a new structure model and store all the new structure models obtained according to the site combination in a new structure model list.

[0020] Step 402: Read the list of new structural models, create a corresponding folder for each structural model, and generate the corresponding first-principles calculation input files in the folder. For example, VASP calculation requires POSCAR, INCAR, POTCAR, and KPOINTS files.

[0021] Step 403 involves step-by-step calculations. The number of steps varies depending on the stage. Let n be the number of steps. When the number of iterations is less than n, it's the coarse calculation stage, with a larger population size. The calculation is divided into two steps: the first step is low-precision structure optimization, and the second step is high-precision single-point calculation to output electronic structure information. When the number of iterations is greater than or equal to n, it enters the fine calculation stage. The population size is reduced, and the calculation is divided into four parts: the first three steps are low, medium, and high-precision structure optimization, and the fourth step is high-precision single-point calculation to output electronic structure information.

[0022] Step 404: Statistically analyze the first-principles calculation results. The energy of the calculated structural model will be used as a parameter to evaluate the quality of site combinations. The lower the energy, the more stable the structural model, meaning that the site combination as an individual is more excellent in the population. A site combination as an individual is composed of multiple sites, and fitness evaluation is needed to determine the quality of the sites. The data generated by the first-principles calculation is assigned to each site in the structural model. The linear relationship between each data point or multiple data points fitted and the energy obtained from the first-principles calculation is evaluated. The data with the strongest linear relationship is selected as the data for evaluating the fitness of the site. Finally, the energy, site combinations, and fitness evaluation data corresponding to each site in the site combination are stored in a file.

[0023] In step 404, the fitness evaluation data for the sites includes multiple data related to the energy of the structural model generated by first-principles calculations, which can be assigned to each site. These include Bader charge and magnetic moment obtained using the Bader software package, band center of s, p, d orbitals obtained through band structure and density of states calculations, and torque on each site. For the fitness of the data evaluation sites, depending on the material system, the fitness evaluation data can be normalized through temporary analysis of the calculated data. Single-element single-parameter, single-element multi-parameter, and multi-element multi-parameter methods can be selected for linear fitting to obtain data. The normalization method with the strongest linear relationship to the energy of the structural model is selected as the fitness evaluation data.

[0024] Step 5: Based on the evolutionary strategy of genetic algorithm, new site combinations are generated by combining crossover, mutation and mutation to form the Nth generation (N≥2) population.

[0025] Specifically:

[0026] Step 501: Obtain site combinations through hybridization. This step requires inputting site combinations containing energy information and site fitness data. Based on computational requirements, all input site combinations should include the index numbers of the defined element types and the number of sites. From all input site combinations, select the site combination with the lowest energy as the parent and the site combination with the second lowest energy as the parent. From the parent and parent site combinations, select half of the sites with the highest fitness for each element, extract their index numbers, and then merge all extracted index numbers to generate a site combination. Check if the site combination exists. If the check fails, replace the parent or parent and regenerate. If the check passes, output the site combination.

[0027] Step 502: Obtain site combinations through mutation. This step requires inputting site combinations with energy information and site fitness data. Based on computational requirements, all input site combinations should include the index numbers of the defined element types and the number of sites. Select the site combination with the lowest energy from all input site combinations as the parent. Within the parent site combination, select half of the sites with the highest fitness from each element's sites and extract their index numbers. Then, remove the extracted index numbers from all available site index numbers. Assume the remaining available site index numbers contain N index numbers. Extract Num1 / 2 index numbers using a random sampling method and label them as Ele1. Then update the available site index numbers and remove the extracted index numbers. At this point, the available site index numbers contain N-Num1 / 2 index numbers. Continue to randomly extract Num2 / 2 index numbers from these and label them as Ele2, and so on, until all element Ele1 / 2 is obtained. n Num n Extracting two index numbers; then merging all extracted index numbers to generate a site combination, and checking if the site combination exists; if the check fails, resampling or changing the parent site to regenerate; if the check passes, outputting the site combination.

[0028] Step 503: Generate the number of site combinations through hybridization and mutation according to the set requirements, and repeat steps 501 and 502 until the number of site combinations equal to the set value is obtained or the set cycle limit is reached.

[0029] Step 504: Based on the population size of the Nth generation (N≥2) calculated and set, subtract the number of site combinations that have been generated through hybridization and mutation to obtain the number of site combinations that need to be generated through mutation. Repeat step 301 continuously to obtain site combinations that are equal to the number of site combinations that need to be generated through mutation, and output all site combinations generated through hybridization, mutation and mutation.

[0030] Step 6: Continuously iterate to generate better site combinations of offspring. Once the set requirements are met, complete the structure search and output the crystal structure model with the lowest energy.

[0031] This invention directly iterates the site combinations of multi-component alloy materials using an evolutionary strategy based on a genetic algorithm. When applied to extremely complex doped systems, it can directly disregard the overall configuration space and use a limited number of sites to continuously evolve and obtain better site combinations, thereby obtaining the crystal structure model with the lowest energy. This method enables users to perform structure search and analyze the performance and mechanism of multi-component alloy materials at low cost and high efficiency, and can provide guidance for the design and development of novel multi-component alloy materials. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of a crystal structure search method based on iterative site combination using a genetic algorithm, according to the present invention.

[0033] Figure 2 This is a schematic diagram illustrating the principle of step 302 of the search method of the present invention, which obtains site combinations from the available site index numbers through mutation.

[0034] Figure 3 This is a schematic diagram illustrating the principle of obtaining site combinations through hybridization in step 501 of the search method of the present invention.

[0035] Figure 4 This is a schematic diagram illustrating the principle of obtaining site combinations through mutation in step 502 of the search method of the present invention. Detailed Implementation

[0036] The present invention will be described in detail below with reference to the embodiments and accompanying drawings.

[0037] This invention proposes a crystal structure search method based on iterative site combinations using a genetic algorithm, enabling the search of Na+ crystal structures. 0.8 Zn 0.1 Ni 0.2 Mn 0.7 The structure search for O2 involves the following steps:

[0038] Step 1: Read the substrate structure file; The substrate structure file is input by the user and is used to define and help the program create the substrate crystal structure model for the structure search. It needs to include various types of atoms and their corresponding quantities, the fractional coordinates or Cartesian coordinates of each atom, and a 3×3 unit cell basis matrix; The substrate crystal structure model created based on the substrate structure file will serve as a template for creating new structure models when this method performs structure search. All new crystal structure models will be obtained by replacing existing atoms or embedding new atoms on the substrate crystal structure model;

[0039] In the example, Na is read 0.8 Zn 0.1 Ni 0.2 Mn 0.7 The crystal structure file of the Mn-based material with an O2-like crystal structure is used as the base structure file and named base_POSCAR. The base_POSCAR file includes the fractional coordinate information of 36 oxygen atoms and 18 manganese atoms, as well as a 3×3 unit cell basis vector matrix. The unit cell basis vector matrix is ​​as follows:

[0040]

[0041] The corresponding base structure model is created using the base_POSCAR file. The base structure model contains the elements and coordinate information of each existing atom.

[0042] Step 2: Assign index numbers to all sites in the substrate crystal structure model. Sites in the substrate crystal structure model are divided into two categories: the first category is called substitution sites, which are sites in the substrate crystal structure model whose elemental and coordinate information has already been specified; the second category is called embedding sites, whose coordinate information needs to be calculated based on the elements in the crystal structure and the chemical properties of the embedded elements. The specific steps are as follows:

[0043] Step 201: Based on the substrate crystal structure model created in Step 1, traverse all sites in the substrate crystal structure model and assign index numbers to all sites starting from 0. When assigning index numbers, the element information and coordinate data of the sites are counted at the same time. These sites with real element information are named substitution sites.

[0044] Step 202: Based on the site information obtained in step 201, and combined with the properties of various chemical elements and the properties of the elements to be embedded, statistically analyze all possible spatial coordinate data of the embedded elements, extract these coordinate data as empty sites, and continue to assign index numbers based on the last index number in step 201. At the same time, use "AM" to refer to the element information. These element information are referred to as "AM sites are named embedding sites".

[0045] Step 203: Merge the substitution class site and embedding class site information created in steps 201 and 202, and store this information in a separate file in order of index number for fixed preservation.

[0046] Step 204: When iterating to the second generation and beyond, read the independent file created in step 203 and assign index numbers to all sites of the basal structure model.

[0047] In this embodiment, the base structure model created in step one is read, and index numbers are assigned to all substitution and embedding sites in the base structure model in steps 201 and 202. Further, in step 203, an index number file is created with the following format:

[0048]

[0049] The Index is the index number of the site, while the element, layer index, and Frac_coords are the element, layer, and fractional coordinate information of the corresponding site, respectively. Sites with index numbers 0-37 have elements O and Mn, which are substitution sites, while sites with index numbers 38-71 have elements "AM", which are embedding sites.

[0050] Step 3: Obtain available site index numbers and apply mutations to generate a series of site combinations as the first-generation population; since first-principles calculations were not completed at the start of the program, fitness assessment of sites is not possible. Therefore, the site combinations for the first-generation population can only be obtained through mutation, i.e., completely random combinations; the specific steps are as follows:

[0051] Step 301: Obtain available site index numbers; determine the elements and type information that need to be combined with sites according to the calculation requirements, and extract all index numbers of the corresponding sites from the basal structure model as available site index numbers;

[0052] Step 302: Obtain site combinations from the available site index numbers through mutation; for the element types set according to the calculation requirements {Ele1, Ele2, ..., Ele...} n} and the number of sites corresponding to the element type {Num1, Num2, ... Num n Let the available site index numbers include M index numbers. Extract Num1 index numbers from them using random sampling and label them Ele1. Then remove the extracted index numbers from the available site index numbers, leaving M-Num1 index numbers. Extract Num2 index numbers from these remaining M-Num1 index numbers using random sampling, and so on, until the index numbers for Ele1 are completely extracted. n Random sampling of elements, and finally merging all the extracted index numbers and corresponding marked elements to generate a site combination and checking if the site combination exists. If the check fails, the site combination is discarded and the same step is repeated to generate a site combination. If the check passes, the site combination is output.

[0053] Step 303: Based on the calculated population size of the first generation, repeat step 301 continuously to obtain a combination of loci equal to the set population size, and output all the loci combinations.

[0054] In this embodiment, Na 0.8 Zn 0.1 Ni 0.2 Mn 0.7 The structure search for O2 needs to be completed in two steps. The first step is to search for Na0Zn. 0.1 Ni 0.2 Mn 0.7 In the O2 search, during this structural search step, the input substrate structure model is a layered oxide based on Mn. Since the Na atom content is 0, it is not necessary to embed sodium ions between the layers. It is only necessary to replace some Mn atoms in the transition metal layer with Zn and Ni atoms. At this point, step 301 is applied to obtain the index numbers of available sites, i.e., to obtain the index numbers of all Mn atom sites in the substrate structure model. The second step is Na... 0.06 Zn 0.1 Ni0.2 Mn 0.7 O2-Na 0.8 Zn 0.1 Ni 0.2 Mn 0.7 The structure search for O2 requires, in this step, a foundation based on the previous step's analysis of Na0Zn. 0.1 Ni 0.2 Mn 0.7 The search results for O2 were used as the basis structure model. In this basis structure model, 1, 2…14 sodium atoms were sequentially embedded between the alkali metal layers, corresponding to Na… 0.06 Zn 0.1 Ni 0.2 Mn 0.7 O2-Na 0.8 Zn 0.1 Ni 0.2 Mn 0.7 The change in sodium content in O2 is used to search for the arrangement of sodium atoms in the alkali metal layer under different contents. At this time, it is not necessary to replace the atoms in the transition metal layer, but only to embed a certain number of sodium atoms. Then, step 301 is applied to obtain the index number of available sites, that is, to obtain the index number of all embedding sites. After obtaining the available site index numbers required in this embodiment, step 302 is applied to generate site combinations for the first generation population using a mutation method. In the first step of structure search, according to the atomic ratio, the number of Zn atoms to be replaced is 2, and the number of Ni atoms is 4. There are a total of 18 Mn atomic site index numbers. First, 2 index numbers are randomly selected and marked as Zn. Then, the 2 index numbers that have been selected are deleted from these 18 Mn atomic site index numbers. Then, 4 index numbers are randomly selected from the remaining 16 site index numbers. Finally, these 6 site index numbers are merged into a site combination. Then, a detection program is executed to check whether the site combination already exists. If it exists, the site combination is discarded, and a new site combination is generated by random sampling. If the site combination does not exist, the site combination is output and saved. In this embodiment, the number of the first generation population is set to 30. Therefore, step 301 needs to be repeated until 30 different site combinations are obtained.

[0055] Step 4: Generate the structure based on site combinations, generate the input file for first-principles calculations, complete the first-principles calculations, and output the calculation results; the specific steps are as follows:

[0056] Step 401: Read each site combination in sequence, locate the site in the basal structure model according to the index number in each site combination, and edit the basal structure model according to the site type and the element information marked by the index number in the site combination. If it is a substitution site, change the element of the original site to the element marked by the index number. If it is an embedding site, embed an atom at the coordinates of the site, and the element type is the element marked by the index number. After the editing operation is completed, save the structure model as a new structure model and store all the new structure models obtained according to the site combination in a new structure model list.

[0057] Step 402: Read the list of new structural models, create a corresponding folder for each structural model, and generate the corresponding first-principles calculation input files in the folder. For example, VASP calculation requires POSCAR, INCAR, POTCAR, and KPOINTS files.

[0058] Step 403 involves step-by-step calculations. The number of steps varies depending on the stage. Let n be the number of steps. When the number of iterations is less than n, it's the coarse calculation stage, with a larger population size. The calculation is divided into two steps: the first step is low-precision structure optimization, and the second step is high-precision single-point calculation to output electronic structure information. When the number of iterations is greater than or equal to n, it enters the fine calculation stage. The population size is reduced, and the calculation is divided into four parts: the first three steps are low, medium, and high-precision structure optimization, and the fourth step is high-precision single-point calculation to output electronic structure information.

[0059] Step 404: Statistically analyze the first-principles calculation results. The energy of the calculated structural model will be used as a parameter to evaluate the quality of site combinations. The lower the energy, the more stable the structural model, meaning that the site combination as an individual is more excellent in the population. A site combination as an individual is composed of multiple sites, and fitness evaluation is needed to determine the quality of the sites. The data generated by the first-principles calculation is assigned to each site in the structural model. The linear relationship between each data point or multiple data points fitted and the energy obtained from the first-principles calculation is evaluated. The data with the strongest linear relationship is selected as the data for evaluating the fitness of the site. Finally, the energy, site combinations, and fitness evaluation data corresponding to each site in the site combination are stored in a file.

[0060] In step 404, the fitness evaluation data for the sites includes multiple data related to the energy of the structural model generated by first-principles calculations, which can be assigned to each site. These include Bader charge and magnetic moment obtained using the Bader software package, band center of s, p, d orbitals obtained through band structure and density of states calculations, and torque on each site. For the fitness of the data evaluation sites, depending on the material system, the fitness evaluation data can be normalized through temporary analysis of the calculated data. Single-element single-parameter, single-element multi-parameter, and multi-element multi-parameter methods can be selected for linear fitting to obtain data. The normalization method with the strongest linear relationship to the energy of the structural model is selected as the fitness evaluation data.

[0061] In this embodiment, the input site combinations will be read and corresponding structures will be created. Taking the first step of structure search as an example, in the first generation, which is the coarse calculation stage, the population size is 30, so there are 30 site combinations. In step 401, a new structure model is created for each site combination and stored in the list. Finally, the list of new structure models will contain 30 new structure models. Then, in steps 402 and 403, a first-principles calculation file that conforms to the coarse calculation setting is created for these 30 new structure models and the calculation is submitted. Finally, in step 404, the data generated by the first-principles calculation is allocated to each site in the structure model, and the linear relationship between the data fitted by each data item or multiple data items and the energy obtained by the first-principles calculation is evaluated. In this embodiment, Bader charge is selected as the data for evaluating site fitness. The smaller the Bader charge, the higher the fitness. The energy, site combination, and fitness evaluation data corresponding to each site in the site combination are stored in the file for preservation.

[0062] Step 5: Based on the evolutionary strategy of genetic algorithm, new locus combinations are generated using crossover, mutation, and mutation methods to form the Nth generation (N≥2) population; the specific steps are as follows:

[0063] Step 501: Obtain site combinations through hybridization. This step requires inputting site combinations containing energy information and site fitness data. Based on computational requirements, all input site combinations should include the index numbers of the defined element types and the number of sites. From all input site combinations, select the site combination with the lowest energy as the parent and the site combination with the second lowest energy as the parent. From the parent and parent site combinations, select half of the sites with the highest fitness for each element, extract their index numbers, and then merge all extracted index numbers to generate a site combination. Check if the site combination exists. If the check fails, replace the parent or parent and regenerate. If the check passes, output the site combination.

[0064] Step 502: Obtain site combinations through mutation. This step requires inputting site combinations with energy information and site fitness data. Based on computational requirements, all input site combinations should include the index numbers of the defined element types and the number of sites. Select the site combination with the lowest energy from all input site combinations as the parent. Within the parent site combination, select half of the sites with the highest fitness from each element's sites and extract their index numbers. Then, remove the extracted index numbers from all available site index numbers. Assume the remaining available site index numbers contain N index numbers. Extract Num1 / 2 index numbers using a random sampling method and label them as Ele1. Then update the available site index numbers and remove the extracted index numbers. At this point, the available site index numbers contain N-Num1 / 2 index numbers. Continue to randomly extract Num2 / 2 index numbers from these and label them as Ele2, and so on, until all element Ele1 / 2 is obtained. n Num n Extracting two index numbers; then merging all extracted index numbers to generate a site combination, and checking if the site combination exists; if the check fails, resampling or changing the parent site to regenerate; if the check passes, outputting the site combination.

[0065] Step 503: Generate the number of site combinations through hybridization and mutation according to the set requirements, and repeat steps 501 and 502 until the number of site combinations equal to the set value is obtained or the set loop limit is reached.

[0066] Step 504: Based on the population size of the Nth generation (N≥2) calculated and set, subtract the number of site combinations that have been generated through hybridization and mutation to obtain the number of site combinations that need to be generated through mutation. Repeat step 301 continuously to obtain site combinations with a number equal to the number of site combinations that need to be generated through mutation, and output all site combinations generated through hybridization, mutation and mutation.

[0067] In this embodiment, a file containing energy, site combinations, and fitness evaluation data (i.e., Bader charge data) for each site in a site combination is read. First, step 501 is applied to obtain site combinations through hybridization. Taking the structure search in the first step as an example, each input site combination contains 2 Zn site index numbers and 4 Ni site index numbers. The site combination with the lowest energy is selected as the parent, and the site combination with the second lowest energy is selected as the parent. In the parent site combinations, since a smaller Bader charge indicates higher fitness, the Zn site index number with the smallest Bader charge is extracted, followed by the two Ni site index numbers with the smallest Bader charge. Then, the site combinations with the smallest Bader charge are also extracted from the parent site combinations. The Zn site index and the two Ni site indexes with the smallest Bader charge are used to generate a site combination. All site indexes taken from the parent and parent sources are then combined again to form a site combination containing two Zn site indexes and four Ni site indexes. A detection program is then executed to check if this site combination already exists. If it does, it is discarded, and the third-ranked site combination in terms of energy (lowest to highest) is used as the parent to regenerate a new site combination. If this site combination does not exist, it is output and saved. In this embodiment, the number of site combinations generated by hybridization is set to 50% of the population size in each generation. For the rough calculation stage, the population size in each generation is 30, and the number of site combinations generated by hybridization is 15. For the precise calculation stage, the population size in each generation is 10, and the number of site combinations generated by hybridization is 5.

[0068] In this embodiment, after generating the site combinations for intrapopulation hybridization, step 502 is applied to obtain site combinations through mutation. Taking the first step of structure search as an example, each input site combination contains 2 Zn site index numbers and 4 Ni site index numbers. The site combination with the lowest energy is selected as the parent from all input site combinations. Among the site combinations in the parent, since the smaller the Bader charge of the site, the higher the fitness of the site, it is necessary to extract the Zn site index number with the smallest Bader charge, and then extract the 2 Ni site index numbers with the smallest Bader charge. Then, the extracted index numbers are removed from the available site index numbers obtained in step 301. Then, from the remaining available site index numbers, one index number is randomly selected and marked as Zn, and then removed from the available site index numbers. The newly extracted index number is then used to randomly select two index numbers from the remaining available site index numbers and label them as Ni. Finally, the site index numbers extracted from the parent and the subsequently randomly extracted index numbers are merged to generate a site combination containing two Zn site index numbers and four Ni site index numbers. Then, a detection program is executed to check whether the site combination already exists. If it exists, the site combination is discarded, and a new site combination is generated by random sampling. If the site combination does not exist, the site combination is output and saved. In this embodiment, the number of site combinations generated by mutation is set to 30% of the population size in each generation. For the coarse calculation stage, the population size in each generation is 30, and the number of site combinations generated by mutation is 9. For the fine calculation stage, the population size in each generation is 10, and the number of site combinations generated by mutation is 3.

[0069] In this embodiment, after generating site combinations through hybridization and mutation within the population, step 503 is applied to obtain site combinations through mutation. The execution process of this step is the same as obtaining site combinations through mutation in the first generation population. However, the number of site combinations generated by mutation is set to 20% of the population size in each generation. For the rough calculation stage, the population size in each generation is 30, and the number of site combinations generated by mutation is 6. For the precise calculation stage, the population size in each generation is 10, and the number of site combinations generated by mutation is 2. After generating site combinations through mutation, all site combinations generated through hybridization, mutation, and mutation are output.

[0070] Step Six: Apply the site combinations obtained in Step Five to Step Four to complete the first-principles calculations. Then, use the calculated data to iterate the site combinations. During the continuous iteration, generate more and more excellent site combination progeny. When the set requirements are met, terminate the iteration. Finally, complete the structure search and output the crystal structure model with the lowest energy.

[0071] In this embodiment, the site combinations produced in step five are continuously used to complete first-principles calculations in step four, and more excellent site combination offspring are continuously generated iteratively. The calculation cutoff condition set in this embodiment is to iterate to the tenth generation. After completing the first-principles calculations and data processing of the structural model corresponding to the tenth generation site combination, the entire structure search will end, and the crystal structure model with the lowest energy obtained from the search will be output.

Claims

1. A crystal structure search method based on iterative site combination using a genetic algorithm, characterized in that: The specific steps are as follows: Step 1: Read the substrate structure file; The substrate structure file is input by the user and is used to define and help the program create the substrate structure model for the structure search, including various types of atoms and their corresponding quantities, fractional coordinates or Cartesian coordinates of each atom, and a 3×3 unit cell basis matrix; The substrate structure model created based on the substrate structure file will serve as a template for creating new structure models when performing the structure search. All new structure models will be obtained by replacing existing atoms or embedding new atoms on the substrate structure model; Step 2: Assign index numbers to all sites in the substrate structure model. Sites in the substrate structure model are divided into two categories. The first category is called substitution sites, which are sites in the substrate structure model whose elements and coordinate information have been specified. The second category is called embedding sites, which require the coordinate information of the site to be calculated based on the elements in the crystal structure and the chemical properties of the embedded elements. Step 3: Apply mutation to generate a series of site combinations as the first generation population; since the first-principles calculation was not completed when the program was started, the fitness of the sites could not be evaluated. Therefore, the site combinations can only be obtained through mutation, i.e., completely random combinations. Step 4: Generate the structure based on the site combination, generate the input file for the first-principles calculation, complete the first-principles calculation, and output the calculation results; Step 5: Based on the evolutionary strategy of genetic algorithm, use crossover, mutation and mutation to generate new site combinations as the Nth generation, N≥2 population; Step 6: Continuously iterate to generate better site combination progeny. Finally, after meeting the set requirements, complete the structure search and output the structure model with the lowest energy. Step four specifically involves: Step 401: Read each site combination in sequence, locate the site in the basal structure model according to the index number in each site combination, and edit the basal structure model according to the site type and the element information marked by the index number in the site combination. If it is a substitution site, change the element of the original site to the element marked by the index number. If it is an embedding site, embed an atom at the coordinates of the site, and the element type is the element marked by the index number. After the editing operation is completed, save the structure model as a new structure model and store all the new structure models obtained according to the site combination in a new structure model list. Step 402: Read the list of new structural models, create a corresponding folder for each structural model, and generate the corresponding first-principles calculation input file in the folder; Step 403 involves step-by-step calculation. The number of steps varies depending on the stage. Let n be the number of steps. When the number of iterations is less than n, it is the coarse calculation stage, with a larger population size. The calculation is divided into two steps: the first step is low-precision structure optimization, and the second step is high-precision single-point calculation to output electronic structure information. When the number of iterations is greater than or equal to n, it enters the fine calculation stage, with a reduced population size. The calculation is divided into four steps: the first three steps are low, medium, and high-precision structure optimization, and the fourth step is high-precision single-point calculation to output electronic structure information. Step 404: Statistically analyze the first-principles calculation results. The energy of the calculated structural model will be used as a parameter to evaluate the quality of site combinations. The lower the energy, the more stable the structural model, meaning that the site combination as an individual is more excellent in the population. A site combination as an individual is composed of multiple sites, and fitness evaluation is needed to determine the quality of the sites. The data generated by the first-principles calculation is assigned to each site in the structural model. The linear relationship between each data point or multiple data points fitted and the energy obtained from the first-principles calculation is evaluated. The data with the strongest linear relationship is selected as the data for evaluating the fitness of the site. Finally, the energy, site combinations, and fitness evaluation data corresponding to each site in the site combination are stored in a file for safekeeping.

2. The crystal structure search method based on iterative site combination using a genetic algorithm according to claim 1, characterized in that: Step two specifically involves: Step 201: Based on the basal structure model created in Step 1, traverse all sites in the basal structure model and assign index numbers to all sites starting from 0. When assigning index numbers, simultaneously count the element information and coordinate data of the sites. These sites with real element information are named substitution sites. Step 202: Based on the site information obtained in step 201, and combined with the properties of various chemical elements and the properties of the elements to be embedded, count all possible spatial coordinate data of the embedded elements, extract these coordinate data as empty sites, and continue to assign index numbers based on the last index number in step 201. At the same time, use "AM" to refer to the element information, and these element information are set as "the sites of AM are named embedding sites". Step 203: Merge the substitution class site and embedding class site information created in steps 201 and 202, and store this information in a separate file in order of index number for fixed preservation. Step 204: When iterating to the second generation and beyond, read the independent file created in step 203 and assign index numbers to all sites of the basal structure model.

3. The crystal structure search method based on iterative site combination using a genetic algorithm according to claim 1, characterized in that: Step three specifically involves: Step 301: Obtain available site index numbers; determine the elements and type information that need to be combined with sites according to the calculation requirements, and extract all index numbers of the corresponding sites from the basal structure model as available site index numbers; Step 302: Obtain site combinations from the available site index numbers through mutation; for the element types set according to the calculation requirements {Ele1, Ele2, ... Ele...} n } and the number of sites corresponding to the element types {Num1, Num2, ... Num n Let the available site index numbers include M index numbers. Extract Num1 index numbers from them using random sampling and label them Ele1. Then remove the extracted index numbers from the available site index numbers, leaving M-Num1 index numbers. Extract Num2 index numbers from these remaining M-Num1 index numbers using random sampling, and so on, until the index numbers for Ele1 are completely extracted. n Random sampling of elements, and finally merging all the extracted index numbers and corresponding marked elements to generate a site combination and checking if the site combination exists. If the check fails, the site combination is discarded and the same step is repeated to generate a site combination. If the check passes, the site combination is output. Step 303: Based on the calculated population size of the first generation, repeat step 301 continuously to obtain a combination of loci equal to the set population size, and output all the loci combinations.

4. The crystal structure search method based on iterative site combination using a genetic algorithm according to claim 3, characterized in that: Step five specifically involves: Step 501: Obtain site combinations through hybridization. This step requires inputting site combinations containing energy information and site fitness data. Based on computational requirements, all input site combinations should include the index numbers of the defined element types and the number of sites. From all input site combinations, select the site combination with the lowest energy as the parent and the site combination with the second lowest energy as the parent. From the parent and parent site combinations, select half of the sites with the highest fitness for each element, extract their index numbers, and then merge all extracted index numbers to generate a site combination. Check if the site combination exists. If the check fails, replace the parent or parent and regenerate. If the check passes, output the site combination. Step 502: Obtain site combinations through mutation. This step requires inputting site combinations with energy information and site fitness data. Based on computational requirements, all input site combinations should include the index numbers of the defined element types and the number of sites. Select the site combination with the lowest energy from all input site combinations as the parent. Within the parent site combination, select half of the sites with the highest fitness from each element's sites and extract their index numbers. Then, remove the extracted index numbers from all available site index numbers. Assume the remaining available site index numbers contain N index numbers. Extract Num1 / 2 index numbers using a random sampling method and label them as Ele1. Then update the available site index numbers and remove the extracted index numbers. At this point, the available site index numbers contain N - Num1 / 2 index numbers. Continue to randomly extract Num2 / 2 index numbers from these and label them as Ele2, and so on, until all element Ele1 / 2 is obtained. n Num n Extraction of 2 index numbers; Then, all extracted index numbers are merged to generate a site combination, and the existence of the site combination is checked. If the check fails, the site combination is resampled or the parent is replaced and regenerated. If the check passes, the site combination is output. Step 503: Generate the number of site combinations through hybridization and mutation according to the set requirements, and repeat steps 501 and 502 until the number of site combinations equal to the set value is obtained or the set loop limit is reached. Step 504: Based on the calculated population size of the Nth generation, subtract the number of site combinations that have been generated through hybridization and mutation to obtain the number of site combinations that need to be generated through mutation. Repeat step 301 continuously to obtain site combinations that are equal to the number of site combinations that need to be generated through mutation, and output all site combinations generated through hybridization, mutation and mutation.

5. The crystal structure search method based on iterative site combination using a genetic algorithm according to claim 1, characterized in that: In step 404, the fitness evaluation data for the sites includes multiple data related to the energy of the structure model generated by first-principles calculations, which are allocated to each site. These include Bader charge and magnetic moment obtained using the Bader software package, band center of s, p, and d orbitals obtained through band structure and density of states calculations, and torque on each site. For the fitness of the data evaluation sites, the fitness evaluation data is normalized by temporary analysis of the calculated data, depending on the material system. Single-element single-parameter, single-element multi-parameter, and multi-element multi-parameter methods are selected for linear fitting to obtain data. The normalization method with the strongest linear relationship to the energy of the structure model is selected as the fitness evaluation data.

Citation Information

Patent Citations

  • Liquid-liquid photonic crystal topological optimization method based on genetic algorithm and finite element method

    CN103246767A

  • Method and device for searching crystal structure of material

    CN113723014A