A machine learning potential function construction method for Mg-Al-Ca and Mg-Al-Zn magnesium alloy systems

By constructing atomic-level initial configuration datasets for Mg-Al-Ca and Mg-Al-Zn alloy systems and combining them with deep potential energy methods to train machine learning potential functions, the problems of insufficient accuracy in describing traditional empirical potential functions and lack of dedicated datasets for machine learning potential functions are solved, thus achieving high-precision prediction and optimization of alloy properties.

CN122245464APending Publication Date: 2026-06-19XIAN UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN UNIV OF SCI & TECH
Filing Date
2026-05-21
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, traditional empirical potential functions are difficult to accurately describe the interfacial energy, solid solution segregation behavior, and interactions between dislocations, grain boundaries, and precipitates in the complex precipitate phase and matrix phase of Mg-Al-Ca and Mg-Al-Zn magnesium alloy systems. This leads to significant discrepancies between the predicted and experimental results for key properties such as high-temperature creep and age hardening of the alloys. At the same time, existing machine learning potential functions lack dedicated datasets for these two systems, making it difficult to balance computational accuracy and simulation scale.

Method used

We constructed an atomic-level initial configuration dataset covering Mg-Al-Ca and Mg-Al-Zn alloy systems. Combining first-principles calculations and deep potential energy methods, we trained machine learning potential functions using deep potential energy methods to form a high-precision machine learning potential function model for studying solute-grain boundary interactions.

Benefits of technology

It achieves first-principles calculation accuracy while maintaining the efficiency of molecular dynamics simulation, accurately describing the complex defect structures and interatomic interactions of precipitated phases in Mg-Al-Ca and Mg-Al-Zn alloy systems, providing an efficient and accurate calculation tool, and supporting the composition design and process optimization of multi-component magnesium alloys.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122245464A_ABST
    Figure CN122245464A_ABST
Patent Text Reader

Abstract

This invention relates to a machine learning potential function construction method for Mg-Al-Ca and Mg-Al-Zn magnesium alloy systems. The method includes: constructing an atomic-level initial configuration dataset covering solid solutions, dislocations, grain boundaries, stacking faults, twins, precipitates, and free surfaces; performing first-principles calculations to obtain energy, atomic forces, and stress tensors; converting the data format; training a machine learning potential function model using a deep potential energy method; and verifying the accuracy to a root mean square error of less than 5 × 10⁻⁶. ‑ ²eV / atom, root mean square error of force less than 1×10 ‑ ¹eV / Å. The potential function constructed in this invention combines first-principles accuracy with molecular dynamics efficiency, accurately describing the interatomic interactions of complex defects and precipitates. It can be used to study microscopic mechanisms such as solute segregation and grain boundary migration, providing computational tools for magnesium alloy composition design and process optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computational materials science and artificial intelligence, specifically to a method for constructing machine learning potential functions for Mg-Al-Ca and Mg-Al-Zn magnesium alloy systems. Background Technology

[0002] Magnesium and magnesium alloys possess advantages such as light weight, high specific strength and stiffness, and good damping properties. As the lightest metallic structural material to date, their widespread application is of great significance for lightweight, low-carbon, and energy-saving development. Mg-Al-Zn alloys (such as AZ91D, AM60B, and AZ31B) are currently the most widely used commercial magnesium alloys, accounting for more than 60% of die-cast magnesium alloys. Mg-Al-Ca alloys, as representatives of rare-earth-free heat-resistant magnesium alloys, significantly improve high-temperature creep resistance by forming a thermally stable second phase. The performance improvement of these alloys relies on complex microscopic mechanisms, including dislocation slip, grain boundary movement, solid solution segregation, nucleation and evolution of precipitated phases, and interactions between different defects. Accurately describing these mechanisms at the atomic scale is of great significance for alloy composition design and process optimization.

[0003] Currently, atomic-scale simulations primarily rely on first-principles calculations and traditional molecular dynamics methods. First-principles calculations, using software such as VASP based on density functional theory, offer high accuracy but are limited in scale (typically <500 atoms), making them unable to simulate large-scale processes such as dislocation slip and grain boundary migration. Traditional molecular dynamics methods employ empirical potential functions (such as EAM and MEAM), enabling large-scale simulations; however, existing empirical potential functions lack sufficient accuracy in describing complex Ca / Zn-containing precipitate phase interfaces, solid solution segregation behavior, and multi-defect interactions. Recent machine learning potential functions mainly target rare-earth magnesium alloys (such as the Mg-Y system), lacking dedicated datasets and potential functions for the two important commercial magnesium alloy systems: Mg-Al-Ca and Mg-Al-Zn.

[0004] Therefore, existing technologies suffer from insufficient accuracy in describing the interatomic interactions of Mg-Al-Ca and Mg-Al-Zn magnesium alloy systems. Traditional empirical potential functions struggle to accurately describe the interfacial energy, solid solution segregation behavior, and interactions between dislocations, grain boundaries, and precipitates in complex Ca / Zn precipitates and the matrix phase. This leads to significant discrepancies between predictions and experimental results regarding key properties such as high-temperature creep and age-hardening of the alloys. Furthermore, existing machine learning potential functions lack dedicated datasets for the complex defect structures of these two systems, making it difficult to balance computational accuracy with simulation scale. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a machine learning potential function construction method for Mg-Al-Ca and Mg-Al-Zn magnesium alloy systems.

[0006] To achieve the above objectives, the present invention provides the following technical solution: This application provides a machine learning potential function construction method for Mg-Al-Ca and Mg-Al-Zn magnesium alloy systems, including the following steps: S1. Dataset Construction: Construct an atomic-level initial configuration dataset covering Mg-Al-Ca and Mg-Al-Zn alloy systems; S2. First-principles calculations: Perform first-principles calculations on all the initial configurations constructed in step S1 to obtain the energy, atomic forces and stress tensors of each configuration, forming a first-principles dataset; S3. Data format conversion: Convert the first-principles dataset obtained in step S2 into the format required for training machine learning potential functions; S4. Model Training: The dataset formatted in step S3 is trained using the deep potential energy method. After training, a machine learning potential function model is obtained. S5. Model Validation and Accuracy Evaluation: Randomly select some configurations from the dataset constructed in step S1 as the test set, use the machine learning potential function model trained in step S4 to predict the test set, compare the predicted values ​​with the first-principles calculation results in step S2, calculate the root mean square error of energy and the root mean square error of force, and when the root mean square error of energy and the root mean square error of force meet the preset accuracy requirements, obtain the final machine learning potential function for large-scale molecular dynamics simulation.

[0007] Furthermore, in step S1, for the Mg-Al-Ca alloy system, the configurations in the atomic-level initial configuration dataset include: pure magnesium, binary solid solution, and ternary solid solution models with different Al and Ca contents; dislocation configurations including type a edge dislocations, type a screw dislocations, c+a type edge dislocations, and c+a type screw dislocations; grain boundary configurations; stacking fault configurations including basal stacking faults and pyramidal stacking faults; twinning configurations with multiple types of twins; and configurations including the equilibrium phase Mg. 17 Al 12 Precipitation phase models for Mg2Ca, Al2Ca, and metastable phases; and free surface models; For the Mg-Al-Zn alloy system, the atomic-level initial configuration dataset includes the following configurations: solid solution models, dislocation configurations, grain boundary configurations, stacking fault configurations, twinning configurations, precipitate phase models, and free surface models for different Al and Zn contents. The precipitate phase models include Mg2Zn. 11 Mg 15 Zn, MgZn2, Mg 21Zn 25 .

[0008] Furthermore, in step S2, the first-principles calculation adopts the pseudopotential plane wave method based on density functional theory, the exchange-correlated functional adopts the generalized gradient approximation, and the plane wave cutoff energy is set to 400-600eV.

[0009] Furthermore, in step S3, according to the data specifications of the deep potential energy method, the cell information, atomic coordinates, total energy, and atomic forces of each configuration are saved as files in a specified format, and a type file containing atomic type mapping relationships is created, wherein the atomic type mapping relationships are: Mg atoms are mapped to the first type, Al atoms are mapped to the second type, and Ca atoms or Zn atoms are mapped to the third type.

[0010] Furthermore, in step S4, when training using the deep potential method, a smoothed version of the embedded atom density descriptor is used, with a cutoff radius of 4.5-6.0 Å and a smoothing start radius of 4.0-5.5 Å; the maximum number of nearest neighbors is set to 40-60; the embedded network adopts a 2-4 layer neural network structure, with the number of neurons in the first layer being 10-20, the second layer 20-40, and the third layer 40-80; the fitting network adopts a 2-4 layer fully connected neural network, with the number of neurons in each layer being 80-150.

[0011] Furthermore, in step S4, a joint loss function of energy and force is adopted, with the energy loss weight gradually increasing from 0.005-0.02 to 0.5-2, and the force loss weight gradually decreasing from 500-2000 to 0.5-2; the Adam optimizer is adopted, with an initial learning rate of 0.0005-0.002, a learning rate decay step of 500-2000 steps, and a total training step of 1,000,000-3,000,000 steps.

[0012] Furthermore, in step S5, 5%-20% of the configurations are randomly selected from the dataset constructed in step S1 as the test set; the preset accuracy requirement is: the root mean square error of energy is less than 5 × 10⁻⁶. - ²eV / atom, root mean square error of force less than 1×10 - ¹eV / Å.

[0013] Furthermore, when training on the Mg-Al-Ca alloy system, the third category represents Ca atoms; when training on the Mg-Al-Zn alloy system, the third category represents Zn atoms.

[0014] Furthermore, the final machine learning potential function is used to study solute-grain boundary interactions, including calculating the segregation energy of solute atoms on twin boundaries, calculating the segregation energy distribution of solute atoms on small-angle grain boundaries, and simulating the influence of solute segregation on grain boundary migration driving stress.

[0015] Furthermore, the atomic-level initial configuration dataset constructed in step S1 covers a range of atomic numbers from tens to hundreds and an alloy element content from 0 at.% to 20 at.%.

[0016] Compared with the prior art, this application has the following beneficial effects: The machine learning potential function construction method provided by this invention systematically constructs an atomic-level initial configuration dataset covering various defect structures such as solid solutions, dislocations, grain boundaries, stacking faults, twins, precipitates, and free surfaces. It then generates high-precision training data using first-principles calculations and optimizes the training parameters using a deep potential energy method. The resulting machine learning potential function achieves first-principles calculation accuracy while maintaining the efficiency of molecular dynamics simulations. It can accurately describe the interatomic interactions of complex defect structures and precipitates in Mg-Al-Ca and Mg-Al-Zn alloy systems. This method overcomes the shortcomings of insufficient accuracy in traditional empirical potential functions and the lack of dedicated datasets for existing machine learning potential functions, providing an efficient and accurate computational tool for the composition design and process optimization of multi-component magnesium alloys. Attached Figure Description

[0017] Figure 1 : Flowchart of the method of the present invention.

[0018] Figure 2 The datasets for the Mg-Al-Ca and Mg-Al-Zn alloy systems constructed in this invention are shown in the figure.

[0019] Figure 3 The machine learning potential function accuracy verification diagram constructed in this invention, where a and b are Mg-Al-Ca systems, and c and d are Mg-Al-Zn systems.

[0020] Figure 4 Comparison of segregation energies of Al, Ca, and Zn atoms at {10-11} and {10-12} twin boundaries.

[0021] Figure 5 : Distribution of segregation energy of Al and Ca atoms at different sites near the dislocation nucleus of the {11-20} tilted grain boundary.

[0022] Figure 6 : Segregation energy distribution of Al and Ca atoms at different sites near the dislocation nuclei of the {1-100} and {10-10} tilted grain boundaries.

[0023] Figure 7 Stress-strain curves of small-angle grain boundary migration under different solute segregation conditions. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] Furthermore, in this invention, an element referred to as fixed to or disposed on another element may be directly disposed on the other element, or there may be an intermediate element. When an element is considered to be connected to another element, it may be directly connected to the other element, or there may be an intermediate element present simultaneously. The terms vertical, horizontal, left, right, and similar expressions used herein are for illustrative purposes only and do not represent the only possible implementation.

[0026] Example 1 See Figure 1 As shown, this application provides a machine learning potential function construction method for Mg-Al-Ca and Mg-Al-Zn magnesium alloy systems, including the following steps: S1. Dataset Construction: Construct an atomic-level initial configuration dataset covering Mg-Al-Ca and Mg-Al-Zn alloy systems.

[0027] In this embodiment, firstly, an atomic-level initial configuration dataset covering Mg-Al-Ca and Mg-Al-Zn alloy systems is constructed. The specific construction method is as follows: For the Mg-Al-Ca alloy system, based on the close-packed hexagonal crystal structure of magnesium, models of pure magnesium, Mg-Al binary solid solutions, Mg-Ca binary solid solutions, and Mg-Al-Ca ternary solid solutions with different Al and Ca contents were constructed using methods such as cell expansion, atomic substitution, and strain application. These models included dislocation configurations such as a-type edge dislocations, a-type screw dislocations, c+a-type edge dislocations, and c+a-type screw dislocations; grain boundary configurations; stacking fault configurations including basal type I1 stacking faults, basal type I2 stacking faults, first-order pyramidal stacking faults, and second-order pyramidal stacking faults; twinning configurations including {10-12} twins, {10-11} twins, and {10-13} twins; and models including the equilibrium phase Mg. 17 Al 12Precipitation phase models for Mg2Ca, Al2Ca, and metastable phases Ca4MgAl3 and CaMgAl were constructed, along with free surface models. All configurations were converted to POSCAR format, readable by first-principles calculation software, using VESTA software. This step can be performed using software such as Atomsk and Materials Studio.

[0028] For the Mg-Al-Zn alloy system, a similar method was used to construct a dataset, including solid solution models, dislocation configurations, grain boundary configurations, stacking fault configurations, twinning configurations, and precipitate phase models (including Mg2Zn) with different Al and Zn contents. 11 Mg 15 Zn, MgZn2, Mg 21 Zn 25 ) and free surface model.

[0029] In one specific instance, a total of 952 initial configurations were constructed for the Mg-Al-Ca system, with the number of atoms in each configuration ranging from 32 to 236, covering the range of Al content from 0 to 20 at.% and Ca content from 0 to 15 at.%; a total of 847 initial configurations were constructed for the Mg-Al-Zn system.

[0030] S2. First-principles calculations: Perform first-principles calculations on all the initial configurations constructed in step S1 to obtain the energy, atomic forces and stress tensors of each configuration, forming a first-principles dataset; In this embodiment, first-principles calculations are performed on all initial configurations constructed in step S1. Specifically, VASP software based on density functional theory is used, the projected augmented wave pseudopotential is set, the exchange correlation functional is the PBE functional under the generalized gradient approximation, and the plane wave cutoff energy is set to 400-600 eV (520 eV in a specific instance). Γ-centered k-point grid sampling is used to ensure that the reciprocal spatial resolution of all supercells in each direction is better than 0.04 Å. - ¹. The convergence criterion for structural relaxation is: all free atoms experience forces less than 0.02 eV / Å, and the electron energy converges to 10. -5 eV. Through structural relaxation and static calculations, the total energy, atomic forces, and stress tensors of each configuration are obtained, forming a first-principles dataset.

[0031] S3. Data format conversion: Convert the first-principles dataset obtained in step S2 into the format required for training machine learning potential functions; In this embodiment, the first-principles dataset obtained in step S2 is converted into the format required for training the machine learning potential function. Specifically, following the data specifications of deep potential energy methods (such as DeePMD-kit), the cell information of each configuration is saved as box.npy, the atomic coordinates as coord.npy, the total energy as energy.npy, and the atomic forces as force.npy. Simultaneously, a type.raw file is created, containing the type index of each atom, according to a preset mapping relationship: 0 represents a Mg atom, 1 represents an Al atom, and 2 represents a Ca or Zn atom. All data is stored in corresponding directories according to system classification; in a specific instance, the dpdata tool provided by DeePMD-kit is used to convert the OUTCAR file output by VASP calculation into a compressed dataset.

[0032] S4. Model Training: The dataset formatted in step S3 is trained using the deep potential energy method. After training, a machine learning potential function model is obtained. In this embodiment, the deep potential method is used to train the dataset formatted in step S3. During training, a smoothed version of the embedded atom density descriptor se_e2_a is used, with the cutoff radius rcut set to 4.5-6.0 Å and the smoothing starting radius rcut_smth set to 4.0-5.5 Å; the maximum number of nearest neighbors is set to 40-60 according to the atom type. The embedding network adopts a 2-4 layer neural network structure, with the number of neurons in the first layer being 10-20, the second layer 20-40, and the third layer 40-80. The fitting network adopts a 2-4 layer fully connected neural network, with the number of neurons in each layer being 80-150. A joint loss function of energy and force is used, with the energy loss weight gradually increasing from 0.005-0.02 to 0.5-2, and the force loss weight gradually decreasing from 500-2000 to 0.5-2. The Adam optimizer was used, with an initial learning rate of 0.0005-0.002, a learning rate decay step count of 500-2000, and a total training step count of 1,000,000-3,000,000. After training, the machine learning potential function model was obtained and saved as a graph.pb file.

[0033] Loss function weight dynamic adjustment strategy: This invention employs a joint loss function of energy and force, with the total loss defined as: The weights are dynamically adjusted using an exponential decay strategy: energy weights. The exponential decays from 0.01 to 1; Force weight Decaying exponentially from 1000 to 1, number of decay steps 1000 steps The weights decay exponentially with the number of training steps. The design philosophy of this strategy is: initially, force weights are higher, allowing the model to prioritize learning the local characteristics of atomic forces; as training progresses, energy weights gradually increase, ensuring the model accurately predicts the total energy of the system simultaneously. After 1000 steps of decay, the weights are maintained at their final values ​​(all 1), at which point the contributions of energy and force to the loss are balanced. In a specific example (Mg-Al-Ca system), the cutoff radius rcut is set to 5.0 Å, the smoothing starting radius rcut_smth is 4.8 Å, and the maximum number of nearest neighbors is 50. The embedding network adopts a three-layer structure with 16, 32, and 64 neurons respectively. The fitting network adopts a three-layer fully connected neural network with 120 neurons in each layer. The energy loss weight gradually increases from 0.01 to 1, and the force loss weight gradually decreases from 1000 to 1. The initial learning rate is 0.001, the learning rate decays in 1000 steps, and the total number of training steps is 2,000,000.

[0034] S5. Model Validation and Accuracy Evaluation: Randomly select some configurations from the dataset constructed in step S1 as the test set, use the machine learning potential function model trained in step S4 to predict the test set, compare the predicted values ​​with the first-principles calculation results in step S2, calculate the root mean square error of energy and the root mean square error of force, and when the root mean square error of energy and the root mean square error of force meet the preset accuracy requirements, obtain the final machine learning potential function for large-scale molecular dynamics simulation.

[0035] In this embodiment, a portion of the configurations (preferably 5%-20%) are randomly selected from the dataset constructed in step S1 as the test set, and the machine learning potential function model trained in step S4 is used to predict the test set. Specifically, prediction is performed using the test command of the DeePMD-kit (e.g., mpirundptest-mgraph.pb -s[test set path] -ddetailfile). The predicted values ​​are compared with the first-principles calculation results in step S2, and the root mean square error of energy and the root mean square error of force are calculated. When the root mean square error of energy is less than 5 × 10⁻⁶, the prediction is performed. - ²eV / atom, root mean square error of force less than 1×10 - At ¹eV / Å, the final machine learning potential function for large-scale molecular dynamics simulations is obtained.

[0036] In a specific example (Mg-Al-Ca system), 10% (approximately 95 configurations) of 952 initial configurations were randomly selected as the test set, and the final root mean square error of energy was 2.04 × 10⁻⁶. -5 eV / atom, root mean square error of force is 1.6×10 -³eV / Å. In the Mg-Al-Zn system example, the root mean square error of energy is 2.21 × 10³ eV / Å. -6 eV / atom, root mean square error of force is 5.84×10 -4 eV / Å. The above precision all meet the preset requirements and can be used as the final potential function.

[0037] In a preferred embodiment, in step S1, for the Mg-Al-Ca alloy system, the configurations in the atomic-level initial configuration dataset include: pure magnesium, binary solid solution, and ternary solid solution models with different Al and Ca contents; dislocation configurations including type a edge dislocations, type a screw dislocations, type c+a edge dislocations, and type c+a screw dislocations; grain boundary configurations; stacking fault configurations including basal stacking faults and pyramidal stacking faults; twinning configurations with multiple types of twins; and configurations including the equilibrium phase Mg. 17 Al 12 Precipitation phase models for Mg2Ca, Al2Ca, and metastable phases; and free surface models; For the Mg-Al-Zn alloy system, the configurations in the atomic-level initial configuration dataset include: solid solution models, dislocation configurations, grain boundary configurations, stacking fault configurations, twinning configurations, precipitate phase models, and free surface models under different Al and Zn contents. The precipitate phase models include Mg2Zn. 11 Mg 15 Zn, MgZn2, Mg 21 Zn 25 .

[0038] In this embodiment, for the Mg-Al-Ca alloy system, the configurations in the atomic-level initial configuration dataset include: pure magnesium, binary solid solutions (Mg-Al, Mg-Ca), and ternary solid solutions (Mg-Al-Ca) with different Al and Ca contents; dislocation configurations including type a edge dislocations, type a screw dislocations, c+a type edge dislocations, and c+a type screw dislocations; grain boundary configurations; stacking fault configurations including basal stacking faults (such as basal type I1 and I2) and pyramidal stacking faults (such as first-order pyramidal stacking faults and second-order pyramidal stacking faults); twin configurations of various types of twins (such as {10-12} twins, {10-11} twins, and {10-13} twins); and configurations including the equilibrium phase Mg. 17 Al 12 Precipitation phase models for Mg2Ca, Al2Ca, and metastable phases (such as Ca4MgAl3 and CaMgAl); and free surface models.

[0039] For the Mg-Al-Zn alloy system, the configurations in the atomic-level initial configuration dataset include: solid solution models, dislocation configurations, grain boundary configurations, stacking fault configurations, twinning configurations, precipitate phase models, and free surface models under different Al and Zn contents. The precipitate phase models include Mg2Zn.11 Mg 15 Zn, MgZn2, Mg 21 Zn 25 .

[0040] The specific construction methods for the above-mentioned configurations can be found in the description in step S1, and will not be repeated here.

[0041] In a preferred embodiment, the first-principles calculation in step S2 adopts the pseudopotential plane wave method based on density functional theory, the exchange-correlated functional adopts the generalized gradient approximation, and the plane wave cutoff energy is set to 400-600eV.

[0042] The specific implementation method is as follows: a pseudopotential plane wave method based on density functional theory is adopted, and the exchange correlation functional adopts the generalized gradient approximation (specifically the PBE functional), with the plane wave cutoff energy set to 400-600 eV. In a specific instance, the cutoff energy is set to 520 eV. Other parameters (such as k-point sampling and convergence criteria) can be adjusted according to conventional settings to ensure computational accuracy.

[0043] In a preferred embodiment, in step S3, according to the data specifications of the deep potential energy method, the cell information, atomic coordinates, total energy, and atomic forces of each configuration are saved as files in a specified format, and a type file containing atomic type mapping relationships is created, wherein the atomic type mapping relationships are: Mg atoms are mapped to the first type, Al atoms are mapped to the second type, and Ca atoms or Zn atoms are mapped to the third type.

[0044] The specific implementation is as follows: Following the data specifications of the deep potential energy method, the cell information, atomic coordinates, total energy, and atomic forces for each configuration are saved as files in specified formats (e.g., box.npy, coord.npy, energy.npy, force.npy), and a type file (e.g., type.raw) containing atomic type mapping relationships is created. The atomic type mapping relationships are as follows: Mg atoms are mapped to type 1 (e.g., 0), Al atoms to type 2 (e.g., 1), and Ca or Zn atoms to type 3 (e.g., 2). These mapping relationships need to be fixed before training to ensure data consistency.

[0045] In a preferred embodiment, in step S4, when training using the deep potential method, a smoothed version of the embedded atom density descriptor is used, with a cutoff radius of 4.5-6.0 Å and a smoothing start radius of 4.0-5.5 Å; the maximum number of nearest neighbors is set to 40-60; the embedded network adopts a 2-4 layer neural network structure, with the number of neurons in the first layer being 10-20, the second layer 20-40, and the third layer 40-80; the fitting network adopts a 2-4 layer fully connected neural network, with the number of neurons in each layer being 80-150.

[0046] The specific implementation is as follows: a smoothed version of the embedded atomic density descriptor (such as se_e2_a) is used, with the cutoff radius rcut set to 4.5-6.0 Å and the smoothing start radius rcut_smth set to 4.0-5.5 Å; the maximum number of nearest neighbors is set to 40-60. The embedded network adopts a 2-4 layer neural network structure, with the number of neurons in the first layer being 10-20, the second layer 20-40, and the third layer 40-80. The fitting network adopts a 2-4 layer fully connected neural network, with the number of neurons in each layer being 80-150. In a specific example, rcut=5.0 Å, rcut_smth=4.8 Å, the maximum number of nearest neighbors=50, the embedded network is [16,32,64], and the fitting network has 120 neurons per layer.

[0047] In a preferred embodiment, in step S4, a joint loss function of energy and force is used, with the energy loss weight gradually increasing from 0.005-0.02 to 0.5-2, and the force loss weight gradually decreasing from 500-2000 to 0.5-2; the Adam optimizer is used, with an initial learning rate of 0.0005-0.002, a learning rate decay step count of 500-2000 steps, and a total training step count of 1,000,000-3,000,000 steps.

[0048] The specific implementation is as follows: a joint loss function of energy and force is used, with the energy loss weight gradually increasing from 0.005-0.02 to 0.5-2, and the force loss weight gradually decreasing from 500-2000 to 0.5-2. The Adam optimizer is used, with an initial learning rate of 0.0005-0.002, a learning rate decay step count of 500-2000 steps, and a total training step count of 1,000,000-3,000,000. In a specific example, the energy loss weight increases from 0.01 to 1, the force loss weight decreases from 1000 to 1, the initial learning rate is 0.001, the decay step count is 1000, and the total number of steps is 2,000,000.

[0049] In a preferred embodiment, in step S5, 5%-20% of the configurations are randomly selected from the dataset constructed in step S1 as the test set; the preset accuracy requirement is: the root mean square error of energy is less than 5 × 10⁻⁶. - ²eV / atom, root mean square error of force less than 1×10 - ¹eV / Å.

[0050] The specific implementation method is as follows: 5%-20% of the configurations are randomly selected from the dataset constructed in step S1 as the test set. The preset accuracy requirement is: the root mean square error of energy is less than 5 × 10⁻⁶. - ²eV / atom, root mean square error of force less than 1×10 -¹eV / Å. In a specific instance, with a test set proportion of 10%, the energy RMSE was 2.04 × 10⁻⁶. -5 eV / atom, force RMSE is 1.6×10 - ³eV / Å, far exceeding the preset threshold.

[0051] Root mean square error of energy (RMSE) E ) and root mean square error of force (RMSE) F The calculation method for ) is as follows: The root mean square error on the validation set is calculated using the following formula: Root mean square error of energy: To test the total number of set configurations For the first First-principles calculation of total energy (in eV) for each configuration. For the first Machine learning potential function prediction of total energy (in eV) for each configuration Root mean square error of force: The total number of force components on all atoms in the test set ( ) For the first First-principles calculations of the force components (unit: eV / Å) For the first Machine learning potential function predictions for each force component (unit: eV / Å) In a preferred embodiment, when training is performed on a Mg-Al-Ca alloy system, the third category represents Ca atoms; when training is performed on a Mg-Al-Zn alloy system, the third category represents Zn atoms.

[0052] Specifically, when training on the Mg-Al-Ca alloy system, the third category (i.e., mapping value 2) represents Ca atoms; when training on the Mg-Al-Zn alloy system, the third category represents Zn atoms. Other mapping relationships (Mg is the first category, Al is the second category) remain unchanged.

[0053] In a preferred embodiment, the final machine learning potential function is used to study solute-grain boundary interactions, including calculating the segregation energy of solute atoms on twin boundaries, calculating the segregation energy distribution of solute atoms on small-angle grain boundaries, and simulating the influence of solute segregation on grain boundary migration driving stress.

[0054] The calculation method and physical significance of segregation energy: This invention uses the following formula to calculate the segregation energy of solute atoms at twin boundaries or grain boundaries: The total energy of a system that includes interfaces (twin boundaries or grain boundaries) and contains solute atoms; The total energy of a system that includes the interface but does not contain solute atoms; The total energy of a system containing solute atoms in a perfect crystal (without interfaces); The total energy of a system containing no solute atoms in a perfect crystal (without interfaces); when Solute atoms tend to segregate at the interface. Solute atoms tend to move away from the boundary. The larger the value, the stronger the tendency to cluster.

[0055] The specific implementation involves using the constructed potential function to study solute-grain boundary interactions, including: calculating the segregation energy of solute atoms (such as Al, Ca, and Zn) at twin boundaries (such as {10⁻¹¹} and {10⁻¹²} twin boundaries); calculating the segregation energy distribution of solute atoms (such as Al and Ca) at small-angle grain boundaries (such as 6°, 10°, and 14° tilted grain boundaries); and simulating the effect of solute segregation on the driving stress of grain boundary migration (such as comparing stress-strain curves under no segregation, Al segregation, and Ca segregation conditions). In a specific example, the segregation behavior of Al and Ca atoms at 6°, 10°, and 14° small-angle grain boundaries was simulated using the Mg-Al-Ca potential function, and stress-strain curves for grain boundary migration were obtained, revealing the drag effect of solute segregation on grain boundary migration.

[0056] As a preferred embodiment, the atomic-level initial configuration dataset constructed in step S1 has an atomic number ranging from tens to hundreds and an alloy element content ranging from 0 at.% to 20 at.%.

[0057] The specific implementation involves constructing an atomic-level initial configuration dataset, with the number of atoms ranging from tens to hundreds (e.g., 32 to 236 atoms) and the content of alloying elements ranging from 0 at.% to 20 at.% (e.g., Al content 0-20 at.% and Ca content 0-15 at.%) in the Mg-Al-Ca system. In a specific example, the Mg-Al-Ca system has a total of 952 configurations, and the Mg-Al-Zn system has a total of 847 configurations.

[0058] Example 2 Based on the above embodiment 1, this embodiment further elaborates on the technical solution of this application in conjunction with the accompanying drawings: This embodiment explains the construction of the machine learning potential function for the Mg-Al-Ca alloy system as follows: (1) An atomic-level initial configuration dataset of the Mg-Al-Ca alloy system was constructed using Atomsk and Materials Studio software. Based on the close-packed hexagonal crystal structure of magnesium, solid solution models, dislocation configurations (including type a edge dislocations, type a screw dislocations, type c+a edge dislocations, and type c+a screw dislocations), grain boundary configurations, stacking fault configurations (including basal plane type I1 stacking faults, basal plane type I2 stacking faults, first-order pyramidal stacking faults, and second-order pyramidal stacking faults), twinning configurations (including {10-11} twins, {10-12} twins, and {10-13} twins), and precipitate phase models (including equilibrium phase Mg) were constructed for different Al and Ca contents through cell expansion, atomic substitution, and strain application. 17 Al 12 Mg2Ca, Al2Ca and metastable phases Ca4MgAl3, CaMgAl) and free surface models, the dataset composition is as follows Figure 2 As shown. All configurations were converted to VASP-readable POSCAR format using VESTA software; this embodiment constructed a total of 952 initial configurations, each with 32 to 236 atoms, covering an Al content range of 0-20 at.% and a Ca content range of 0-15 at.%. Figure 2 As shown in the figure, the dataset of Mg-Al-Ca and Mg-Al-Zn alloy systems constructed in this invention is composed of seven types of structures, including solid solution model, dislocation configuration, grain boundary configuration, stacking fault configuration, twin configuration, precipitate phase model and free surface model.

[0059] (2) First-principles calculations were performed on all the initial configurations constructed in step 1 using VASP software based on density functional theory. The projected fused wave pseudopotential was set, the exchange correlation functional was the PBE functional under the generalized gradient approximation, and the plane wave cutoff energy was set to 520 eV.

[0060] This invention employs VASP software for DFT calculations. Atomic pseudopotentials are selected from the VASP standard library: Mg, Al, and Zn use the PAW_PBE standard pseudopotential; Ca uses the PAW_PBE_sv pseudopotential (treating 3s and 3p electrons as valence electrons) to more accurately describe the interaction between Ca and Mg and Al, which is crucial for the accuracy of calculating the formation energy of precipitates (Al₂Ca, Mg₂Ca). All pseudopotentials are based on the PBE functional, with a cutoff energy set to 520 eV, and convergence tests verify that they meet the pseudopotential requirements.

[0061] A Γ-centered k-point grid sampling method was used to ensure that the reciprocal spatial resolution of all supercells in each direction was better than 0.04 Å. -¹. The convergence criterion for structural relaxation is: all free atoms experience forces less than 0.02 eV / Å, and the electron energy converges to 10. - 5 eV. Through structural relaxation and static calculations, the total energy, atomic forces, and stress tensors of each configuration are obtained, forming a first-principles dataset.

[0062] (3) Convert the first-principles dataset obtained in step 2 into a format readable by DeePMD-kit. Use the dpdata tool provided by DeePMD-kit to convert the OUTCAR file output by VASP calculation into a compressed dataset. According to the data specifications of DeePMD-kit, the cell information of each configuration is saved as box.npy, the atomic coordinates as coord.npy, the total energy as energy.npy, and the atomic forces as force.npy; at the same time, a type.raw file is created, which contains the type index of each atom, according to the preset mapping relationship: 0 represents Mg atom, 1 represents Al atom, and 2 represents Ca atom. All data are stored in the corresponding directories according to system classification.

[0063] (4) The dataset formatted in step 3 was trained using the deep potential energy method. During training, the cutoff radius rcut was set to 5.0 Å, the smoothing starting radius rcut_smth was set to 4.8 Å, and the maximum number of nearest neighbors was set to 50. The embedding network adopted a three-layer neural network structure with 16, 32, and 64 neurons respectively. The fitting network adopted a three-layer fully connected neural network with 120 neurons in each layer. The energy loss weight gradually increased from 0.01 to 1, and the force loss weight gradually decreased from 1000 to 1. The Adam optimizer was used with an initial learning rate of 0.001, a learning rate decay step of 1000 steps, and a total training step of 2,000,000 steps. After training, the machine learning potential function model was obtained and saved as a graph.pb file.

[0064] (5) Randomly select 10% (approximately 95 configurations) from the 952 initial configurations constructed in step 1 as the test set, ensuring coverage of all structure types and avoiding their participation in training. Using the graph.pb file obtained from training in step 4, predict the test set using the DeePMD-kit test command: mpirundptest-mgraph.pb-s[test set path]-ddetailfile; compare the predicted values ​​with the first-principles calculation results from step 2, calculate the root mean square error of energy and the root mean square error of force, and verify the accuracy results as follows: Figure 3 As shown in a and b. Verification shows that the root mean square error of the energy of the machine learning potential function constructed in this embodiment on the test set is 2.04 × 10⁻⁶. -5 eV / atom, root mean square error of force is 1.6×10- ³eV / Å. This accuracy is significantly better than that of traditional empirical potential functions, achieving the accuracy of first-principles calculations, such as... Figure 3 As shown, Figure 3 This diagram shows the accuracy verification of the machine learning potential function for the Mg-Al-Ca and Mg-Al-Zn alloy systems constructed in this invention. Figures a and b compare the tested values ​​of the average atomic energy and atomic force in the Mg-Al-Ca system with first-principles calculations, respectively; figures c and d compare the tested values ​​of the average atomic energy and atomic force in the Mg-Al-Zn system with first-principles calculations, respectively. The diagonal line in the diagram represents the ideal prediction result; data points closer to the diagonal line indicate higher prediction accuracy.

[0065] Example 3 This embodiment provides a detailed explanation of the construction of the machine learning potential function for the Mg-Al-Zn alloy system: For the Mg-Al-Zn alloy system, the same method as in Example 1 was used to construct the dataset, perform first-principles calculations, convert data formats, train and validate the model. The dataset includes solid solution models, dislocation configurations, grain boundary configurations, stacking fault configurations, twinning configurations, and precipitate phase models (including Mg2Zn) with different Al and Zn contents. 11 Mg 15 Zn, MgZn2, Mg 21 Zn 25 ) and free surface models, a total of 847 initial configurations were constructed, and the dataset composition is as follows Figure 2 As shown. The first-principles calculation parameters are exactly the same as in Example 1. Only the atom type needs to be modified to ["Mg","Al","Zn"] in the training script; the remaining parameters remain unchanged. It has been verified that the root mean square error of the energy of the machine learning potential function constructed in this example on the test set is 2.21 × 10⁻⁶. -6 eV / atom, root mean square error of force is 5.84×10 -4 eV / Å, accuracy verification results are as follows Figure 3 c. Figure 3 As shown in d.

[0066] Example 4 This embodiment provides a detailed explanation of the application of the Mg-Al-Ca potential function in the study of solute-grain boundary interactions: To verify the accuracy of the Mg-Al-Ca potential function constructed in this invention in describing the solute-grain boundary interaction, the segregation energies of Al, Ca, and Zn atoms at {10⁻¹²} and {10⁻¹¹} twin boundaries were calculated and compared with the first-principles calculation results in existing literature. The results are as follows: Figure 4 As shown. By Figure 4It can be seen that the segregation energy predicted by the potential function of this invention is in high agreement with the DFT results in the literature, which proves the accurate descriptive ability of the potential function for solute-grain boundary interaction.

[0067] The segregation behavior of Al and Ca atoms at small-angle grain boundaries of 6°, 10°, and 14° (<10⁻¹⁰>) was further investigated using the potential function of this invention. By calculating the segregation energies at different sites near the dislocation nucleus, the lowest energy segregation site of the solute atoms was determined, as shown in the results. Figure 5 and Figure 6 As shown, where, Figure 5 c. Figure 5 d shows the segregation energy of Ca and Al atoms at different sites on a 6° <10⁻¹⁰> tilted grain boundary. Figure 6 b、 Figure 6 c shows the segregation energy distribution of Ca and Al atoms at the 10° <10-10> tilt grain boundary; Figure 6 e Figure 6 f shows the segregation energy distribution of Ca and Al atoms at the 14° <10-10> tilted grain boundary.

[0068] Based on this, stress-strain curves for small-angle grain boundary migration under three conditions—no segregation, Al segregation, and Ca segregation—were simulated, and the results are as follows: Figure 7 As shown. From Figure 7 It can be seen that solute segregation significantly increases the driving stress required for grain boundary migration, with Ca segregation having a more pronounced effect. This reveals the drag effect of solute segregation on grain boundary migration, providing an atomic-scale theoretical basis for understanding the solute drag effect and alloy composition design.

[0069] Figure 4 A comparison of the segregation energies of Al, Ca, and Zn atoms at {10⁻¹²} and {10⁻¹¹} twin boundaries, among which, Figure 4 a, Figure 4 b shows the tension (E) sites and compression (C) sites on the two types of twin boundaries, respectively; Figure 4 c represents the predicted segregation potential function of Al atoms at the compression site and Ca and Zn atoms at the tension site. This is compared with the first-principles calculation results in the existing literature, verifying the accuracy of the potential function in describing the solute-grain boundary interaction.

[0070] Figure 5 : Segregation energy distribution of Al and Ca atoms at different sites near the dislocation nucleus at a 6° <10⁻¹⁰> tilted grain boundary, where Figure 5 a, Figure 5 b represents the labeling of different sites near the dislocation nucleus at the small-angle grain boundary; Figure 5 c. Figure 5 d represents the segregation energy of Ca and Al atoms at different sites; Figure 5 e is the identifier for the lowest energy site of Ca and Al atoms.

[0071] Figure 6 Segregation energy distribution of Al and Ca atoms at different sites near dislocation nuclei at 10°<10⁻¹⁰> and 14°<10⁻¹⁰> tilted grain boundaries, where... Figure 6 a, Figure 6 d represents the labels of different sites near the dislocation nucleus on the small-angle grain boundaries at 10° and 14°. Figure 6 b、 Figure 6 c represents the segregation energy of Ca and Al atoms at different sites on the 10° grain boundary; Figure 6 e Figure 6 f represents the segregation energy of Ca and Al atoms at different sites on the 14° grain boundary.

[0072] Figure 7 Stress-strain curves of small-angle grain boundary migration under different solute segregation conditions, where Figure 7 a is a 6° <10⁻¹⁰> tilt grain boundary; Figure 7 b represents a 10° <10-10> tilted grain boundary; Figure 7 c represents a 14° <10⁻¹⁰> tilted grain boundary. Each subplot includes comparisons of three cases: no segregation, Al segregation, and Ca segregation, demonstrating the influence of solute segregation on the driving stress for grain boundary migration. The horizontal axis represents strain, and the vertical axis represents stress (MPa). As can be seen from the foregoing Examples 1-4, the initial configuration dataset system constructed by the technical solution of this application covers a variety of structural types in Mg-Al-Ca and Mg-Al-Zn alloy systems, such as solid solutions, dislocations, grain boundaries, stacking faults, twins, precipitates, and free surfaces. This provides rich training samples for machine learning potential functions, ensuring that the potential functions can accurately describe the interatomic interactions of complex defect structures and precipitates. (2) The root mean square error of the energy of the machine learning potential function constructed in this invention on the Mg-Al-Ca system is 2.04 × 10⁻⁶. -5 eV / atom, root mean square error of force is 1.6×10 - ³eV / Å; the root mean square error of energy in the Mg-Al-Zn system is 2.21×10⁻⁶ eV / Å. - 6 eV / atom, root mean square error of force is 5.84 × 10⁻⁶. -4 eV / Å. This accuracy is significantly better than traditional empirical potential functions (such as EAM and MEAM), and even better than the typical accuracy of similar machine learning potential functions (typically 10). - (on the order of ²eV / atom), achieving the accuracy of first-principles calculations; (3) The method of this invention is applicable to both important magnesium alloy systems, Mg-Al-Ca and Mg-Al-Zn, and achieves ultra-high accuracy in both systems, proving the universality of the method. At the same time, the constructed machine learning potential function combines the accuracy of first-principles calculations with the efficiency of molecular dynamics simulations, enabling large-scale, long-timescale simulations to study the microscopic mechanisms of dislocation slip, stacking fault evolution, twin growth, precipitate phase evolution, and multi-defect interactions, providing an efficient and accurate computational tool for the composition design and process optimization of multi-component magnesium alloys; (4) The Mg-Al-Ca potential function constructed in this invention has been successfully applied to the study of solute-grain boundary interaction, accurately predicting the segregation energy of Al, Ca, and Zn atoms on twin boundaries. It is highly consistent with the first-principles calculation results in existing literature, verifying the accuracy of the potential function in describing solute segregation energy. Furthermore, the distribution of segregation energy of Al and Ca atoms on small-angle grain boundaries of 6°, 10°, and 14° and the influence of segregation on the stress-strain curve of grain boundary migration were simulated, demonstrating the powerful application capability of this potential function in the study of solute segregation, grain boundary engineering, and alloy design.

[0073] Comparison and verification with the traditional 2NN-MEAM potential function: (1) Comparison of generalized stacking fault energy prediction: The 2NN-MEAM potential function's prediction of basal stacking fault energies in Mg-Al-Ca and Mg-Al-Zn systems deviates from the DFT by approximately 15-20%, and the deviation for cylindrical stacking fault energies is as high as 30%. The potential function of this invention has a deviation of less than 5% for basal stacking fault energies and less than 8% for cylindrical stacking fault energies, improving accuracy by 3-4 times.

[0074] (2) Comparison of twin boundary segregation energy predictions: The 2NN-MEAM potential function's prediction of the {10-12} twin boundary segregation energy deviates from the DFT by 0.02-0.09 eV. The deviation of the potential function in this invention is controlled within 0.02 eV, improving the accuracy by 2.5-5 times.

[0075] (3) Comparison of precipitate formation energy prediction: 2NN-MEAM potential function for Mg 17 Al 12 The predicted formation energies of precipitates such as Mg2Ca and Al2Ca deviated from those of DFT / CALPHAD by 0.03-0.07 eV / atom. The deviation of the potential function in this invention is less than 0.01 eV / atom, which improves the accuracy by 5-10 times.

[0076] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0077] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for constructing machine learning potential functions for Mg-Al-Ca and Mg-Al-Zn magnesium alloy systems, characterized in that, Includes the following steps: Step S1. Dataset Construction: Construct an atomic-level initial configuration dataset covering Mg-Al-Ca and Mg-Al-Zn alloy systems; Step S2. First Principles Calculation: Perform first principles calculations on all initial configurations constructed in Step S1 to obtain the energy, atomic forces, and stress tensors of each configuration, forming a first principles dataset; Step S3. Data format conversion: Convert the first-principles dataset obtained in step S2 into the format required for training the machine learning potential function; Step S4. Model Training: The dataset formatted in Step S3 is trained using the deep potential energy method. After training, a machine learning potential function model is obtained. Step S5. Model Validation and Accuracy Evaluation: Randomly select some configurations from the dataset constructed in Step S1 as the test set. Use the machine learning potential function model trained in Step S4 to predict the test set. Compare the predicted values ​​with the first-principles calculation results in Step S2. Calculate the root mean square error of energy and the root mean square error of force. When the root mean square error of energy and the root mean square error of force meet the preset accuracy requirements, the final machine learning potential function for large-scale molecular dynamics simulation is obtained.

2. The method according to claim 1, characterized in that, In step S1, for the Mg-Al-Ca alloy system, the configurations in the atomic-level initial configuration dataset include: pure magnesium, binary solid solution, and ternary solid solution models with different Al and Ca contents; dislocation configurations including type a edge dislocations, type a screw dislocations, c+a type edge dislocations, and c+a type screw dislocations; grain boundary configurations; stacking fault configurations including basal stacking faults and pyramidal stacking faults; twinning configurations with multiple types of twins; and configurations including the equilibrium phase Mg. 17 Al 12 Precipitation phase models for Mg2Ca, Al2Ca, and metastable phases; and free surface models; For the Mg-Al-Zn alloy system, the configurations in the atomic-level initial configuration dataset include: solid solution models, dislocation configurations, grain boundary configurations, stacking fault configurations, twinning configurations, precipitate phase models, and free surface models under different Al and Zn contents. The precipitate phase models include Mg2Zn. 11 Mg 15 Zn, MgZn2, Mg 21 Zn 25 .

3. The method according to claim 1, characterized in that, In step S2, the first-principles calculation uses the pseudopotential plane wave method based on density functional theory, the exchange-correlated functional uses the generalized gradient approximation, and the plane wave cutoff energy is set to 400-600 eV.

4. The method according to claim 1, characterized in that, In step S3, according to the data specifications of the deep potential energy method, the cell information, atomic coordinates, total energy, and atomic forces of each configuration are saved as files in a specified format, and a type file containing atomic type mapping relationships is created, wherein the atomic type mapping relationships are: Mg atoms are mapped to the first type, Al atoms are mapped to the second type, and Ca atoms or Zn atoms are mapped to the third type.

5. The method according to claim 1, characterized in that, In step S4, when training using the deep potential method, a smoothed version of the embedded atom density descriptor is used, with a cutoff radius of 4.5-6.0 Å and a smoothing start radius of 4.0-5.5 Å; the maximum number of nearest neighbors is set to 40-60; the embedded network adopts a 2-4 layer neural network structure, with the number of neurons in the first layer being 10-20, the second layer 20-40, and the third layer 40-80; the fitting network adopts a 2-4 layer fully connected neural network, with the number of neurons in each layer being 80-150.

6. The method according to claim 1 or 5, characterized in that, In step S4, a joint loss function of energy and force is adopted, with the energy loss weight gradually increasing from 0.005-0.02 to 0.5-2, and the force loss weight gradually decreasing from 500-2000 to 0.5-2; the Adam optimizer is adopted, with an initial learning rate of 0.0005-0.002, a learning rate decay step of 500-2000 steps, and a total training step of 1,000,000-3,000,000 steps.

7. The method according to claim 1, characterized in that, In step S5, 5%-20% of the configurations are randomly selected from the dataset constructed in step S1 as the test set; the preset accuracy requirement is: the root mean square error of energy is less than 5 × 10⁻⁶. - ²eV / atom, root mean square error of force less than 1×10 - ¹eV / Å.

8. The method according to claim 4, characterized in that, When training on the Mg-Al-Ca alloy system, the third category represents Ca atoms; when training on the Mg-Al-Zn alloy system, the third category represents Zn atoms.

9. The method according to claim 1, characterized in that, The final machine learning potential function is used to study solute-grain boundary interactions, including calculating the segregation energy of solute atoms on twin boundaries, calculating the segregation energy distribution of solute atoms on small-angle grain boundaries, and simulating the influence of solute segregation on grain boundary migration driving stress.

10. The method according to claim 1, characterized in that, The atomic-level initial configuration dataset constructed in step S1 covers the range of tens to hundreds of atoms and the alloy element content covers the range of 0 at.% to 20 at.%.