Machine learning potential function training method and system, electronic device, and storage medium
By constructing initial and random crystal configuration datasets and combining molecular dynamics simulations and iterative training, the problems of long cycle, high cost and poor stability in the training of potential functions in machine learning are solved, and efficient and stable potential function training is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO INST OF MATERIALS TECH & ENG CHINESE ACAD OF SCI
- Filing Date
- 2026-04-07
- Publication Date
- 2026-06-16
AI Technical Summary
Existing machine learning potential function training processes suffer from problems such as long training cycles, high computational costs, inconsistent development frameworks, limited generalization capabilities, and poor transfer performance. Furthermore, there is duplication of effort and differences in prediction accuracy and stability among different developers.
By constructing an initial crystal configuration dataset, labeling energy and forces, and combining molecular dynamics simulations to obtain new crystal configuration samples, an iterative training method is adopted, combined with random crystal configuration samples, to reduce the empirical nature of the training process and improve accuracy and stability.
It improves the training speed of machine learning potential functions, reduces the human element involved in the training process, enhances accuracy and generalization performance, improves stability, shortens the development process, and reduces costs.
Smart Images

Figure CN122222084A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital data processing technology, and particularly to a machine learning potential function training method, system, electronic device, and storage medium. Background Technology
[0002] Molecular dynamics (MD) simulation is an important computational method for studying the structure and properties of materials at the atomic scale. It numerically solves for the motion of atoms or molecules under the influence of interaction forces, thereby obtaining the structural evolution and physical properties of material systems under different temperatures, pressures, and external fields. This method has been widely applied in fields such as metallic materials, semiconductor materials, ceramic materials, and nanomaterials, and is of great significance in studying the mechanical behavior, thermal properties, defect evolution, phase transition processes, and interface behavior of materials.
[0003] In molecular dynamics (MD) simulations, interatomic interactions are typically described using potential functions. These potential functions characterize the potential energy surface (PES) of the system, thereby determining the interaction forces experienced by each atom. Their accuracy and applicability directly determine the reliability of the MD simulation results. Therefore, the construction and selection of potential functions is one of the core issues in molecular dynamics simulations.
[0004] In current molecular dynamics simulations, interatomic potential functions constructed based on empirical or semi-empirical methods are often used. For example, the pair potential function calculates the system energy by describing the interaction between atomic pairs. It has a relatively simple form and high computational efficiency, but it is difficult to accurately characterize many-body effects and complex chemical environments, and its applicability is significantly limited.
[0005] To improve the ability to describe many-body interactions, existing technologies have proposed various many-body potential functions, including the Embedded Atom Method (EAM), the Modified Embedded Atom Method (MEAM), the Tersoff potential, the Stillinger–Weber potential, and the ReaxFF (Reactive Force Field). These potential functions, by incorporating local environment information, bond angle terms, or electron density terms, have improved the accuracy of describing metallic or covalent materials to some extent, and have already been applied in specific material systems.
[0006] However, the aforementioned traditional potential functions typically require pre-defined fixed functional forms and parameter expressions, and their parameters rely on manual fitting and empirical adjustment, making it difficult to maintain good generalization ability under different material systems or complex structural conditions. Furthermore, when the material system involves multi-component, defect, non-equilibrium, or complex structural evolution processes, traditional potential functions often struggle to balance computational efficiency and simulation accuracy.
[0007] Compared to empirical potential functions, first-principles calculation methods (such as density functional theory, DFT) can provide a more accurate description of atomic-scale interactions without the need for empirical parameters. However, first-principles methods are computationally expensive and difficult to apply directly to dynamic simulations of large-scale atomic systems or long-term timescales, thus being constrained by computational resources and efficiency in practical materials simulations.
[0008] To overcome the shortcomings of insufficient accuracy in traditional potential functions and the high computational cost of first-principles methods, machine learning-based potential function modeling techniques have been developed in recent years. These techniques learn the mapping relationships between atomic structure and system energy and atomic forces from a large amount of first-principles calculation data, thereby constructing models of interatomic interactions without pre-setting a specific potential function form.
[0009] While machine learning potential functions combine the high accuracy of first-principles calculations with the high speed of traditional potential functions, many practical problems remain. For example, training existing potential functions typically requires lengthy AIMD (first-principles molecular dynamics) simulations, generating massive amounts (tens of thousands / hundreds of thousands) of atomic structure data through numerous MD iterations. These atomic structures are then labeled using DFT calculations to generate the training set. This extensive DFT computation directly leads to long training cycles and high computational costs. Furthermore, a unified development framework has not yet been established in the industry, and potential function development heavily relies on the individual abilities of developers. This not only results in inefficient training set construction and significant duplication of effort among different developers, but also leads to limitations in generalization ability, poor transfer performance, and strong dependence on specific structures or operating conditions. In addition, the development process of machine learning potential functions is highly experience-based, with significant differences in prediction accuracy and operational stability between potential functions implemented by different developers. Summary of the Invention
[0010] To address the technical problems existing in the prior art, this invention proposes a machine learning potential function training method, system, electronic device, and storage medium, which can quickly train the machine learning potential function corresponding to a given system, reduce the empirical nature of the training process, and improve the accuracy, generalization performance, and stability of the machine learning potential function.
[0011] To address the technical problems existing in the prior art, according to one aspect of the present invention, a machine learning function training method is proposed, comprising the following steps: An initial crystal configuration dataset is constructed based on the specified crystal configuration of the target material system. The energy and force of the crystal configuration in the initial crystal configuration dataset are labeled to obtain a training sample set. The potential function model structure is trained based on the training sample set to obtain the potential function model; Based on a specified crystal configuration of the target material system, a new crystal configuration is obtained through molecular dynamics simulation. The energy and forces of the new crystal configuration are labeled to obtain new training samples. These new training samples are merged into a training sample set. The potential function model is iteratively trained based on this merged training sample set until the termination condition is met. A random crystal configuration of the target material system is constructed, and the energy and force of the random crystal configuration are labeled to obtain random samples. The random samples are merged into the training sample set, and the potential function model is iteratively trained based on the training sample set with merged random samples until the termination condition is met.
[0012] Optionally, the machine learning potential function training method further includes: The training sample set is filtered to meet the quantity requirements; and The potential function model is trained based on a training sample set that meets the quantity requirements to obtain the final potential function model.
[0013] Optionally, after filtering the training sample set to meet the quantity requirements, the method further includes: performing first-principles calculations of energy and force on the crystal configurations in the training sample set that meet the quantity requirements using a first precision standard to relabel the energy and force of the crystal configurations in the training sample set; correspondingly, training the potential function model using the relabeled training sample set that meets the quantity requirements to obtain the final potential function model.
[0014] Optionally, when labeling the energy and force of crystal configurations in the initial crystal configuration dataset, when labeling the energy and force of new crystal configurations obtained through molecular dynamics simulations, and when labeling the energy and force of random crystal configurations, a second precision standard is used to perform first-principles calculations of the energy and force of the crystal configurations. The second precision standard is lower than the first precision standard.
[0015] Optionally, the steps of constructing an initial crystal configuration dataset based on specified crystal configuration parameters of the target material system include: Construct an initial unit cell based on the specified crystal configuration parameters of the target material system; The initial unit cell is periodically replicated according to the crystal phase relationship of the specified crystal configuration and the size of the simulation cell to obtain multiple unit cells of a first preset number of crystal configurations; and The atomic coordinates in each unit cell are corrected according to the correction parameter values; the multiple unit cell data of a specified number of crystal configurations after the correction calculation constitute the initial crystal configuration dataset.
[0016] Optionally, the correction calculation for the atomic coordinates in each unit cell includes one or more of the following calculations: random perturbation calculation of the simulation box, random perturbation calculation of the atomic coordinates in the unit cell, and calculation of the atomic coordinates in the unit cell based on the unit cell scaling parameter value.
[0017] Optionally, the steps of obtaining a new crystal configuration through molecular dynamics simulation based on a specified crystal configuration of the target material system include: Construct an initial unit cell based on the specified crystal configuration parameters of the target material system; Molecular dynamics simulations are performed on the initial unit cell based on the simulation conditions of the current simulation round, and the corresponding crystal configuration data is acquired when the simulation system meets the data recording conditions; and The energy and force of the new crystal configuration are labeled to obtain new training samples, and the new training samples are merged into the training sample set. Correspondingly, the step of iteratively training the potential function model using a training sample set includes: The new training samples are input into the latest potential function model, and the first loss value is calculated based on the output data of the potential function model and the sample labels. In the first training of the iterative training process, the latest potential function model is the potential function model trained based on the training sample set of the initial crystal configuration. In the iterative training process, the latest potential function model is the potential function model trained in the previous round. Train the latest potential function model based on the training sample set and calculate the second loss value; Calculate the difference between the first loss value and the second loss value, and compare the difference with a threshold value; and In response to the difference being greater than a threshold, the simulation conditions are changed, and the aforementioned steps of obtaining a new crystal configuration through molecular dynamics simulation and iterative training steps are repeated until the difference is less than or equal to the threshold.
[0018] Optionally, after constructing the random crystal configuration of the target material system, the process further includes: Calculate the rotationally symmetric descriptor for each random crystal configuration; and Descriptors based on random crystal configurations remove duplicate crystal configurations from multiple constructed random crystal configurations.
[0019] Optionally, the steps for constructing a random crystal configuration of the target material system include: Construct a predetermined number of initial random crystal configurations for the target material system based on given parameters; The initial random crystal configuration was corrected based on soft potential; and The energy and force of the corrected random crystal configuration are calculated using a potential function model, and the random crystal configuration is optimized with the goal of minimizing energy and force.
[0020] Optionally, the step of iteratively training the potential function model based on a training sample set that incorporates random samples includes: The currently constructed random sample is input into the latest potential function model, and the first loss value is calculated based on the model's output data and sample labels. In the first training of the iterative training process, the latest potential function model is the potential function model obtained by iterative training with new samples obtained through molecular dynamics simulation. In the iterative training process, the latest potential function model is the potential function model of the previous training round. The current state potential function model is trained based on a training sample set that incorporates random samples, and the second loss value is calculated. Calculate the difference between the first loss value and the second loss value, and compare the difference with a threshold value; and In response to the difference being greater than a threshold, a random crystal configuration of the target material system is constructed to obtain a new random sample, and the aforementioned steps are repeated until the difference is less than or equal to the threshold.
[0021] According to another aspect of the present invention, the present invention also provides a machine learning potential function training system, comprising: The initial sample construction module is configured to build an initial crystal configuration dataset based on a specified crystal configuration of the target material system, and to label the energy and force of the crystal configuration in the initial crystal configuration dataset to obtain a training sample set; The first training module is configured to train the target potential function model structure using the training sample set built based on the initial sample construction module to obtain the potential function model; The second training module, configured to use a specified crystal configuration based on the target material system, obtains a new crystal configuration through molecular dynamics simulation. It then labels the energy and forces of the new crystal configuration to obtain new training samples. These new training samples are merged into a training sample set. The potential function model trained in the first training module is iteratively trained based on this merged training sample set until the termination condition is met. The third training module is configured to construct a random crystal configuration of the target material system, and the energy and force of the random crystal configuration are labeled to obtain random samples. The random samples are merged into the training sample set, and the potential function model trained by the second training module is iteratively trained based on the training sample set with the random samples merged until the termination condition is met.
[0022] According to another aspect of the invention, the present invention also provides an electronic device, including a processor and a memory, wherein a set of computer program instructions is stored on the memory, and the aforementioned machine learning potential function training method is implemented when the processor executes the set of computer program instructions in the memory.
[0023] According to another aspect of the invention, the present invention also provides a computer-readable storage medium, wherein a computer program instruction set is stored on the computer-readable storage medium, the computer program instruction set being executed by a processor to implement the aforementioned machine learning potential function training method.
[0024] According to another aspect of the invention, the present invention also provides a computer program product comprising a computer program instruction set, which, when executed by a processor, implements the aforementioned machine learning potential function training method.
[0025] This invention improves the training speed of machine learning potential functions, reduces the influence of human experience during the training process, and improves the accuracy, generalization performance, and stability of machine learning potential functions. Attached Figure Description
[0026] The preferred embodiments of the present invention will now be described in further detail with reference to the accompanying drawings, wherein: Figure 1 This is a flowchart of a machine learning potential function training method according to an embodiment of the present invention; Figure 2 This is a flowchart of a method for constructing an initial crystal configuration dataset according to an embodiment of the present invention; Figure 3 This is a flowchart of a method for generating samples and training a potential function model through molecular dynamics simulation according to an embodiment of the present invention. Figure 4 This is a flowchart of a method for constructing multiple random crystal configurations of a target material system according to an embodiment of the present invention; Figure 5 This is a flowchart of a method for deduplicating random crystal configurations according to an embodiment of the present invention; Figure 6 This is a flowchart of a method for iteratively training a potential function model based on new random samples according to an embodiment of the present invention; Figure 7This is a flowchart of a machine learning potential function training method according to another embodiment of the present invention; Figure 8 This is a block diagram illustrating the principle of a learning potential function training system according to an embodiment of the present invention. Figure 9 This is a block diagram illustrating the application architecture of a learning potential function training system according to an embodiment of the present invention. Figure 10 According to an embodiment of the present invention, the user and Figure 9 The diagram shows the first part of the interactive process of training the learning potential function in the training system of the application architecture shown. Figure 11 According to an embodiment of the present invention, the user and Figure 9 The second part of the interactive process of training the learning potential function in the training system of the application architecture shown is illustrated. Figure 12 This is a partial schematic diagram of the contents of a crystal configuration file according to an embodiment of the present invention; Figure 13 This is a three-dimensional structural schematic diagram of a copper crystal configuration according to an embodiment of the present invention; Figure 14 yes Figure 13 A schematic diagram of the copper crystal configuration shown from a top-down perspective; Figure 15 This is a schematic diagram comparing the state equation curves obtained when testing a machine learning potential function model trained based on an initial crystal configuration sample according to an embodiment of the present invention. Figure 16 This is a schematic diagram comparing the state equation curves obtained when testing the final machine learning potential function model according to an embodiment of the present invention. Figure 17 This is a schematic diagram comparing the phonon spectrum of Cu fcc crystal generated by applying a machine learning potential function model according to an embodiment of the present invention with the results calculated using first-principles calculations. Figure 18 This is a schematic diagram of the temperature change trend obtained by simulating the measurement of the melting point of copper using a two-phase method based on a machine learning potential function model according to an embodiment of the present invention. Figure 19 This is a snapshot of the configuration when the equilibrium temperature is 1238K, which is simulated and measured by the two-phase method to measure the melting point of copper. Figure 20 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0028] In the following detailed description, reference can be made to the accompanying drawings, which form part of this application and illustrate specific embodiments of the present application. In the drawings, similar reference numerals describe substantially similar components in different figures. Specific embodiments of the present application are described in sufficient detail below to enable those skilled in the art to implement the technical solutions of the present application. It should be understood that other embodiments may also be utilized, or structural, logical, or electrical changes may be made to the embodiments of the present application.
[0029] See Figure 1 , Figure 1 This is a flowchart of a machine learning potential function training method according to an embodiment of the present invention. The machine learning potential function training method includes the following steps: Step S110: Construct an initial crystal configuration dataset based on the specified crystal configuration of the target material system, and label the energy and force of the crystal configuration in the initial crystal configuration dataset to obtain a training sample set.
[0030] Step S120: Train the target potential function model structure based on the training sample set to obtain the potential function model.
[0031] Step S130: Based on the specified crystal configuration of the target material system, a new crystal configuration is obtained through molecular dynamics simulation. The energy and force of the new crystal configuration are marked to obtain new training samples. The new training samples are merged into the training sample set. The potential function model is iteratively trained using the training sample set until the termination condition is met.
[0032] Step S140: Construct a random crystal configuration of the target material system, label the energy and force of the random crystal configuration to obtain random samples, merge the random samples into the training sample set, and continue iteratively training the potential function model based on the training sample set until the termination condition is met.
[0033] In one embodiment, see Figure 2 , Figure 2 This is a flowchart of a method for constructing an initial crystal configuration dataset according to an embodiment of the present invention. Specifically, it includes the following steps: Step S111: Obtain the specified crystal configuration parameter values for the target material system. These parameters include the element symbols of the target material system, the specified crystal configuration, cell expansion parameters, cell scaling parameters, perturbation parameters, the number of crystal configurations to be generated, and the storage address of the output file (e.g., a specific file directory). If the target material system is an elemental material, it is represented by an element symbol, such as copper (Cu). If it is a multi-element material, such as a copper-zirconium alloy, it also includes the weights of the corresponding elements, for example, "Cu:50;Zr:50," indicating that the generated crystal configuration of the target material system includes copper and zirconium elements in a 50:50 ratio. The specified crystal configuration can be, for example, a crystal configuration in a cell structure file (POSCAR format) stored in a database, or a crystal phase of a given fcc, bcc, or hcp configuration. When specifying a specific crystal phase for fcc, bcc, or hcp, the specific value of the lattice constant is also included.
[0034] Step S112: Determine the initial values of the simulation cell. Specifically, when a specific crystal phase and lattice constant are specified, the product of the specific value of the lattice constant and the value of the cell expansion parameter is used as the initial value of the simulation cell side length.
[0035] Step S113: Determine the atomic coordinates of the initial unit cell according to the crystal structure type of the target material. For example, the atomic coordinates r of the fcc crystal orientation are: .
[0036] Step S114: Based on the lattice constant, map the elementary coordinates to real space, denoted as r1.
[0037] Step S115: Based on the set crystal phase relationship and simulation box size, the initial unit cell is periodically copied according to the number of crystal configurations n to be generated. Each copy yields the atomic space coordinates of a unit cell, which are used as the initial atomic coordinates to obtain the initial atomic coordinate set {r1,r2,……,ri,……,rn}.
[0038] Step S116: Perform consistent scaling of atomic coordinates and simulation box size according to the set unit cell scaling parameters to obtain crystal configurations corresponding to different densities.
[0039] Step S117: Apply a random perturbation to the simulation box to obtain a new simulation box. For example, calculate the size of the simulation box using the following formula (1-1): (1-1) 'a' represents the side length of the simulation box for the specified crystal configuration; 'd' represents the perturbation parameter value; 'V' represents the volume of the simulation box; and 'randn()' is the standard normal distribution random number generator. Perturbation of the simulation box applies macroscopic strain to the atoms in the crystal configuration, thereby generating real physical quantities such as stress, non-zero atomic forces, and elastic response.
[0040] Step S118: Apply random perturbations to the spatial coordinates of each atom in the crystal configuration to obtain new spatial coordinates. For example, calculate the perturbated atomic coordinates r based on the following formula: (1-2) Where N is the total number of atoms constituting a specified unit cell.
[0041] By randomly perturbing the atomic coordinates, local non-equilibrium and nonlinear interactions are generated in the crystal configuration, thereby enriching the information of the crystal configuration and improving the generalization performance of the model.
[0042] The initial crystal configuration dataset is obtained after the aforementioned steps. In step S110, when labeling the energy and force of the crystal configurations in the initial crystal configuration dataset, the energy and force of the crystal configurations are calculated based on first principles.
[0043] To improve computational efficiency and resource utilization, during the first-principles calculation process, the task of calculating the energy and force of the crystal configuration in the initial crystal configuration dataset is reasonably divided into multiple computational tasks based on the available computing resources. These tasks are executed synchronously using parallel computing. If the number of computational tasks exceeds the current parallel processing capacity, they are executed sequentially using a queuing and polling method to ensure efficient and orderly utilization of resources.
[0044] Taking a specific application scenario as an example, if the computing module used is a supercomputer with 64 cores, it can be set to group 8 cores together and allocate them to one computing task. This allows 8 computing tasks to be processed in parallel at the same time, achieving efficient allocation of computing resources. If the number of computing tasks to be executed exceeds 8, the excess will enter a queue and adopt a polling mechanism. After the previous batch of tasks is completed and the computing resources are released, the subsequent tasks in the queue will be started in sequence, ensuring that all computing tasks proceed in an orderly manner and that there is no idle resources or task congestion.
[0045] After the aforementioned step S110, an initial training sample set is obtained. Then, in step S120, a potential function model structure is trained based on the initial training sample set to obtain a rough potential function.
[0046] The potential function model structure in this invention can be any kind of model structure, such as a model based on a neural network structure, a model based on a Gaussian process or linear regression, or a model based on a graph neural network, etc., without any limitation.
[0047] The potential function model training process described in this invention includes a training process and a testing process to ensure the accuracy and reliability of the trained potential function.
[0048] For example, the training sample set is divided into a training subset and a test subset according to a preset ratio, and the model parameters are iteratively optimized using the training subset samples. Specifically, based on the applied model structure, model input data is generated from the samples in the training subset, and then training is performed according to the corresponding method of the model structure. For example, when a neural network is used as the model architecture, corresponding basis vectors are generated from the samples in the training subset, and these basis vectors are used as model input data to the neural network. Mean squared error is used as the loss function to calculate the error, and the energy and force errors are combined according to the weights. The model parameters are optimized using an optimizer (such as LBFGS), and the error on the test subset is monitored during each optimization step. After a given number of iterations, a potential function model is obtained.
[0049] After the aforementioned steps, a preliminary potential function model was obtained by training based on the initial training sample set. For ease of distinction, it is referred to here as the first potential function model.
[0050] Then, in step S130, a new crystal configuration is obtained based on molecular dynamics simulations. The first potential function model is then iteratively trained again using the new crystal configuration to continuously optimize the model accuracy. See [link to detailed process] for more information. Figure 3 . Figure 3 This is a flowchart of a method for generating samples and training a potential function model through molecular dynamics simulation according to an embodiment of the present invention. Specifically, it includes the following steps: Step S131: Construct an initial unit cell based on the specified crystal configuration parameters of the target material system. This involves constructing multiple unit cells conforming to the specified crystal configuration based on parameters such as the elements, crystal configuration, lattice constant, cell expansion parameters, and overall scaling parameters of the target material system.
[0051] Step S132: Determine the simulation conditions for the current simulation round. Simulation conditions are determined, for example, by volume parameters, pressure parameters, temperature parameters, etc.
[0052] Step S133: Perform molecular dynamics simulation on the unit cell based on the simulation conditions of the current simulation round. In the first simulation, the energy and atomic forces of the simulated system are calculated using the first potential function model trained on the initial training sample set. In subsequent simulations, the newly trained potential function model is applied, ensuring that increasingly reasonable atomic trajectories are obtained during continuous iteration.
[0053] Step S134: Determine if the data recording conditions are met. For example, after the current simulation system reaches thermal equilibrium, data is recorded at regular intervals. Therefore, timing begins after the current simulation system reaches thermal equilibrium, and the data recording conditions are determined to be met when the preset timing period is reached. If the data recording conditions are met, in step S135, the corresponding crystal configuration data is recorded. If the data recording conditions are not met, the process returns to step S133 to continue the current round of molecular dynamics simulation.
[0054] Step S136: The energy and force of the crystal configuration data are labeled using first-principles calculations to obtain new training samples.
[0055] Step S137: Input the new training samples into the current first potential function model, and calculate the loss value based on the output of the first potential function model and the sample labels. For the sake of distinction, this is referred to as the first loss value.
[0056] Step S138: Add new training samples to the training sample set, train the first potential function model based on the training sample set, and calculate the loss value, which is referred to as the second loss value here for distinction.
[0057] Step S139: Calculate the difference between the first loss value and the second loss value to obtain the loss difference.
[0058] Step S1310: Determine if the loss difference is less than or equal to a threshold. If the loss difference is less than or equal to the threshold, it means that the potential function trained with new samples in the training sample set is not significantly different from the potential function trained with only new samples. In this case, it is no longer necessary to generate new samples for training, i.e., the convergence condition is met, and training stops. It should be noted that in order to obtain a stable potential function, the convergence condition of loss difference being less than or equal to the threshold must be met for a certain number of consecutive rounds to be considered true convergence. If the loss difference is greater than the threshold, it means that the difference between the potential function trained with new samples in the training sample set and the potential function trained with only new samples is too large. In this case, it is necessary to continue generating new samples for training, and step S1311 is executed.
[0059] Step S1311: Set new simulation conditions, such as increasing temperature, changing pressure, etc. Then return to step S133 to perform molecular dynamics simulation.
[0060] When the training potential model is completed by generating new samples using molecular dynamics simulation, the training sample set includes the initial training samples and the training samples generated by each molecular dynamics simulation. The potential function model obtained at this time is called the second potential function model.
[0061] The samples used in the two training sessions of the aforementioned potential function model were obtained based on specified crystal phases and crystal configurations. To improve the applicability of the potential function model to unknown crystal phases or crystal configurations, in step S140, random crystal configuration samples of the target material system are generated, and then the second potential function model is trained using these random crystal configuration samples to optimize the potential function model. For details, see [link to relevant documentation]. Figure 4 , Figure 4 This is a flowchart of a method for constructing multiple random crystal configurations of a target material system according to an embodiment of the present invention, the method comprising: Step S1411: Construct a predetermined number of initial random crystal configurations for the target material system based on given parameter values. The given parameters may be user-set values or default values in the system. In one embodiment, the parameters include: the elements contained in the random crystal configuration and their proportions; the number of random crystal configurations to be generated; a list of allowed atomic numbers; a list of target pressures corresponding to the random crystal configurations; the initial atomic volume of the random crystal configuration, etc. When constructing the initial random crystal configurations, the initial unit cell volume is first determined based on the initial atomic volume and number of atoms in the random crystal configuration. Then, the types of atoms in the unit cell are allocated according to the elements contained in the random crystal configuration and their proportions. Afterward, the unit cell and the atomic coordinates of each atom within it are randomly generated, thereby obtaining the predetermined number of initial crystal configurations.
[0062] Step S1412 involves correcting the initial random crystal configuration based on a soft potential. Specifically, a short-range soft repulsion potential is applied to the atoms in each initial random crystal configuration to push atoms that are too close together to a reasonable distance. By correcting the initial random crystal configuration with a soft potential, extreme geometric conflicts are avoided, the numerical stability of subsequent optimizations is improved, and abnormal force values are prevented from being generated during the calculation of the machine learning potential function.
[0063] Step S1413: Optimize the crystal configuration. Specifically, the optimization objective in the crystal configuration optimization process is to minimize energy and force, and to make the system pressure of the optimized crystal configuration approach the target pressure set in the parameters. An optimization process includes, for example, calculating the total system energy and the force on each atom for each random crystal configuration using the second potential function model trained in step S130, and calculating the system pressure based on the force on each atom; then evaluating whether the optimization objective has been achieved. If the optimization objective has not been achieved, the crystal configuration is updated, such as by changing the distance between atoms and the size and shape of the simulation box. Then, the above calculation, evaluation, and updating of the crystal configuration are repeated until the crystal configuration satisfies the optimization objective, that is, the system energy is minimized, the atomic force is minimized and stable, and the system pressure reaches the target pressure.
[0064] A large number of random crystal configurations can be obtained using the aforementioned method. In an optional step, to avoid data redundancy, improve training efficiency, and significantly reduce the number of crystal configurations that need to be calculated in subsequent DFTs, it is necessary to perform a structural equivalence judgment on the random crystal configurations, removing duplicate or nearly duplicate crystal configurations from the multiple random crystal configurations. This invention achieves the unique identification of configurations by constructing a global descriptor that conforms to rotational symmetry. Specifically, see [link to documentation]. Figure 5 , Figure 5 This is a flowchart of a method for deduplicating random crystal configurations according to an embodiment of the present invention, specifically including the following steps: Step S1421: Calculate the rotationally symmetric descriptor for each random crystal configuration. For each random crystal configuration, given the cell parameters (lattice vectors), atom types, atomic three-dimensional coordinates, and periodic boundary conditions, assuming a random crystal configuration contains N atoms, for each atom i, construct its local neighborhood environment to obtain multiple nearest neighbor atoms j, which conform to the rotational symmetry descriptor. , , , Let be the distance between atom i and atom j; The cutoff radius. Each atom i is at the cutoff radius. The nearest neighbor atom j within the range constitutes the nearest neighbor list. .
[0065] To ensure that the descriptor remains invariant under global spatial rotation, this invention employs a local structure descriptor that satisfies rotation invariance, such as using a radial symmetry function (RSF) or an angular symmetry function to calculate the descriptor. For example, the descriptor Pi for each atom in a random crystal configuration is calculated using the following formula (2-1): (2-1) in, For atom i at the cutoff radius The nearest neighbor list within atom i. Parameter j represents the nearest neighbor atoms of atom i. Weights for element types, The element type number is assigned to atom j. It is a radially symmetric function, where n is the radial order. This is the truncation function. Its specific form is shown in formulas (2-2) to (2-4): (2-2) (2-3) (2-4) in It is a Chebyshev polynomial of the first kind. This represents the total number of element types.
[0066] Step S1422: Summarize the descriptors of all atoms in the random crystal configuration to form a global descriptor at the crystal configuration level. For example, the average value of all atomic descriptors can be used directly. Alternatively, all atomic descriptors can be directly concatenated as the global descriptor at the crystal configuration level. Alternatively, the average value, variance, etc., can be calculated first, and then sorted and concatenated to obtain the global descriptor at the crystal configuration level.
[0067] Step S1423: Calculate the Euclidean distance between the global descriptors of any two random crystal configurations. Of course, in addition to Euclidean distance, cosine similarity, weighted Euclidean distance, or kernel function distance can also be calculated as a metric for the global descriptor distance.
[0068] Step S1424: Based on the principle of the furthest descriptor distance, select the preset number (e.g., 100) of random crystal configurations with the largest distance.
[0069] After generating a predetermined number of random crystal configurations, the energy and atomic forces of each random crystal configuration are calculated based on first-principles methods to obtain a sample label for each random crystal configuration, thereby generating a new sample.
[0070] See Figure 6 , Figure 6 This is a flowchart of a method for iteratively training a potential function model based on new random samples according to an embodiment of the present invention. The method includes the following steps: Step S1431: Input the currently constructed random sample into the latest potential function model, and calculate the first loss value based on the model output and sample label; wherein, during the first training of iterative training, the latest potential function model is the second potential function model trained based on the sample obtained from molecular dynamics simulation, and during iterative training, the latest potential function model is the potential function model obtained in the previous round of training.
[0071] Step S1432: Train the latest potential function model based on the training sample set that has merged random samples and calculate the second loss value.
[0072] Step S1433: Calculate the difference between the first loss value and the second loss value.
[0073] Step S1434: Determine if the difference is greater than a threshold. If the difference is greater than the threshold, in step S1435, construct a random crystal configuration of the target material system to obtain new random samples, and return to step S1431. If the difference is less than or equal to the threshold, it indicates that the new random samples have not optimized the model, meaning the current model is considered converged, and training ends. The potential function model obtained at this time is the final potential function model.
[0074] This invention generates new samples through molecular dynamics simulations to train potential function models. It uses an initial potential function model trained with the initial samples to calculate the energy and forces during the simulation. Furthermore, it modifies the simulation conditions in each round, such as increasing the temperature, thus effectively improving the convergence speed. For example, conventional methods using molecular dynamics simulations to generate samples for potential function model training typically require dozens of simulations and iterative training rounds to converge, while this invention requires only a limited number, such as 2-5 rounds. Compared to the tens or hundreds of thousands of crystal configurations generated during molecular dynamics simulations in existing technologies, this invention generates a smaller amount of data, significantly reducing the DFT computation during sample labeling and effectively shortening the training time. This invention also generates randomized configurations as samples, increasing sample diversity and thus effectively improving the generalization performance of machine learning potential functions. The training method provided by this invention reduces the influence of personal experience in the training process, and the learning threshold for developing machine learning potential functions is low, thus shortening the development process of machine learning potential functions. By allocating parallel tasks for the first-principles calculation process, the efficiency of resource utilization is improved, the training speed is further accelerated, and the development cost of machine learning potential functions is significantly reduced.
[0075] See Figure 7 , Figure 7 This is a flowchart of a machine learning potential function training method according to another embodiment of the present invention. In this embodiment, the machine learning potential function training method includes the following steps: Step S210: Construct an initial crystal configuration dataset based on the specified crystal configuration of the target material system, and label the energy and force of the crystal configurations in the initial crystal configuration dataset to obtain a training sample set. The energy and force of the crystal configurations are calculated using first-principles calculations with a second-precision standard.
[0076] Step S220: Train the target potential function model structure based on the training sample set to obtain the potential function model.
[0077] Step S230: Based on the specified crystal configuration of the target material system, a new crystal configuration is obtained through molecular dynamics simulation. The energy and force of the new crystal configuration are labeled to obtain new training samples. The new training samples are merged into the training sample set, and the potential function model is iteratively trained using the training sample set until the termination condition is met. Specifically, when labeling samples, the energy and force of the crystal configuration are calculated using first-principles calculations with a second-precision standard. Step S240: Construct a random crystal configuration of the target material system, label the energy and force of the random crystal configuration to obtain random samples, merge the random samples into the training sample set, and continue iterative training of the potential function model based on the training sample set until the termination condition is met. Specifically, when labeling the energy and force of the random crystal configuration, first-principles calculations using a second-precision standard are employed to calculate the energy and force of the crystal configuration.
[0078] Steps S210 to S240 are the same as those in the previous embodiment, and will not be repeated here.
[0079] Step S250 involves filtering the training sample set to meet quantity requirements. Following steps S210 to S240, the training sample set contains a large number of samples, and the sample labels are calculated quickly using a low-precision standard. Therefore, to further improve the performance of the trained potential function model, a certain number of samples are selected from the training sample set for final model training. The selected samples exhibit a uniform proportion of initial crystal configurations, crystal configurations generated based on molecular dynamics simulations, and random crystal configurations.
[0080] Step S260: First-principles calculations of energy and force are performed on the crystal configurations of the previously selected training samples according to a first precision standard to re-label the energy and force of the crystal configurations. The first precision standard described here is higher than the second precision standard used in steps S210 to 240 when labeling the energy and force of the samples.
[0081] Step S270: Train the potential function model based on the relabeled training sample set to obtain the final potential function model.
[0082] In this embodiment, low-precision standard calculations are used to calculate energy and force when labeling the initial crystal configuration, when labeling the energy and force of the new crystal configuration obtained through molecular dynamics simulation, and when labeling the energy and force of the random crystal configuration, thereby improving the calculation speed. Then, high-precision standard is used to label the energy and force of the samples in the final training set, ensuring the accuracy of the final model. Therefore, from an overall perspective, this embodiment improves the training speed and ensures the accuracy of the trained model.
[0083] On the other hand, the present invention also provides a machine learning potential function training system, see [link to relevant documentation]. Figure 8 , Figure 8 This is a block diagram illustrating the principle of a learning potential function training system according to an embodiment of the present invention. The machine learning potential function training system in this embodiment includes an initial sample construction module 100, a first training module 110, a second training module 120, and a third training module 130. The initial sample construction module 100 constructs an initial crystal configuration dataset based on a specified crystal configuration of the target material system, and labels the energy and force of the crystal configurations in the initial crystal configuration dataset to obtain a training sample set. The first training module 110 trains the target potential function model structure based on the training sample set constructed by the initial sample construction module 100 to obtain a potential function model, such as the first potential function model in the aforementioned method. The second training module 120, based on a specified crystal configuration of the target material system, obtains new crystal configurations through molecular dynamics simulations, labels the energy and force of the new crystal configurations to obtain new training samples, merges the new training samples into the training sample set, and iteratively trains the potential function model trained by the first training module 110 based on the training sample set with the merged new training samples until the termination condition is met. The third training module 130 constructs random crystal configurations of the target material system, labels the energy and forces of the random crystal configurations to obtain random samples, merges the random samples into the training sample set, and continues iteratively training the potential function model trained by the second training module 120 based on the training sample set with merged random samples until the termination condition is met. For details, please refer to the description in the aforementioned method section, which will not be repeated here. Further, it may also include a sample set screening module and a fourth training module. The sample set screening module screens the training sample set with merged random samples to ensure it meets the quantity requirements; the fourth training module relabels the crystal configurations in the training sample set using a high-precision standard first-principles calculation method, and uses the relabeled training sample set that meets the quantity requirements to train the potential function model obtained by the third training module to obtain the final potential function model.
[0084] In the foregoing explanation, energy and atomic forces are labeled when the samples are labeled. However, it can be known that the physical quantities calculated during labeling correspond one-to-one with the potential functions. For example, when the potential function to be trained also calculates stress, stress is of course also calculated when the samples are labeled.
[0085] See Figure 9 , Figure 9 This is a block diagram illustrating the application architecture of a learning potential function training system according to an embodiment of the present invention. The system includes a front-end system 200 and a back-end system 300. The front-end system 200 provides a user interface 201, through which the user inputs various commands and parameter values. The front-end system 200 receives user commands and parameter values and transmits them to the back-end system 300. The back-end system 300 trains the machine learning potential function based on the user commands and parameter values, and during the training process, outputs corresponding data and displays it on the user interface 201. See also... Figure 10 , Figure 10 According to an embodiment of the present invention, the user and Figure 9 The diagram shows the first part of the interactive process of training the learning potential function in the training system of the application architecture shown. Figure 11 According to an embodiment of the present invention, the user and Figure 9 The second part of the interactive process of training the learning potential function in the training system of the application architecture shown is illustrated.
[0086] On the user side, in step S301, the user inputs the initial crystal configuration construction command and corresponding parameter values through the user interface 201 of the front-end system 200. The parameters include the element symbols contained in the target material system, the specified crystal configuration, cell expansion parameters, cell scaling parameters, perturbation parameters, the number of crystal configurations to be generated, and the storage address of the output file (such as a specific file directory).
[0087] In step S401, the front-end system 200 transmits the input initial crystal configuration construction command and the corresponding parameter values to the back-end system 300.
[0088] Step S501, the backend system 300 follows... Figure 2 The method shown generates an initial crystal configuration dataset.
[0089] In step S502, the backend system 300 sends the parameters and their values used in generating the initial crystal configuration dataset, as well as the processing progress, to the frontend system 200, and stores the generated initial crystal configuration dataset as files in a specified file directory. Each crystal configuration is stored in a separate file; see [link to relevant documentation]. Figure 12 , Figure 12This is a partial schematic diagram of the contents of a crystal configuration file according to an embodiment of the present invention. The first line of the file contains comments, the second line contains the overall scaling parameter values for the current unit cell data, the third to fifth lines contain the simulation box data, the sixth line contains the elements of the unit cell (copper in this embodiment), the seventh line contains the number of atoms (32 in this embodiment), and each subsequent line contains the three-dimensional spatial coordinates of each atom.
[0090] Users can open the file in the specified directory to view it.
[0091] In step S402, the front-end system 200 displays the structured parameters and parameter values, as well as the processing progress of generating crystal configuration data, on the user interface 201.
[0092] In order to enable users to clearly understand the system's execution status of the current task, the backend system 300 displays the relevant parameters used in the current calculation in a structured form on the user interface 201, which is convenient for users to view intuitively. At the same time, the processing progress of the task will also be displayed synchronously in the user interface 201, allowing users to keep track of the task's progress in real time and understand the execution status of the calculation task in a timely manner.
[0093] In addition, the front-end system 200 can also display crystal configuration data in a visual manner, for example Figure 13 , Figure 13 This is a three-dimensional structural diagram of a copper crystal configuration according to an embodiment of the present invention. Figure 14 yes Figure 13 The diagram shows a copper crystal configuration viewed from above. To clearly illustrate the position of each atom in the copper crystal configuration, compared to... Figure 13 , Figure 14 The atomic size has been reduced.
[0094] In step S302, the user inputs the first-principles calculation command and corresponding parameter values into the user interface 201. The parameter values include the address of the crystal configuration file used for calculation; the storage address of the calculated file; the initial magnetic moment; the required k-point accuracy; the cutoff energy, etc.
[0095] In step S403, the front-end system 200 transmits the first-principles calculation command and the corresponding parameter values to the back-end system 300.
[0096] In step S503, the backend system 300 performs first-principles calculations on the energy and forces of the crystal configuration in the specified file based on the transmitted first-principles calculation command and corresponding parameter values. In one embodiment, the backend system 300 includes a first-principles calculation module, which calculates the energy and forces of the crystal configuration in the initial crystal configuration dataset by calling the first-principles calculation module. When calling the first-principles calculation module, the backend system 300 inputs the preset parameter values and the initial crystal configuration data file to the first-principles calculation module, which completes the calculation and merges the calculation results into the initial crystal configuration data file to obtain a new file, which is then stored at a specified storage address. This new file is the sample data file. The first-principles calculation module is, for example, The Vienna Ab initio Simulation Package (VASP). Since VASP is a commonly used computational simulation package in the art, it will not be described in detail here.
[0097] In step S504, the backend system 300 sends the parameters and their values used in the first-principles calculation, as well as the calculation progress, to the frontend system 200. The backend system 300 saves the initial crystal configuration data file as a sample set file and adds the calculated energy and forces to the corresponding crystal configuration data file.
[0098] In step S404, the front-end system 200 displays the parameters and parameter values used in the first-principles calculation transmitted from the back-end system 300 in a structured form on the user interface 201, and displays the calculation progress.
[0099] In step S303, the user inputs model training commands and corresponding parameter values on the user interface 201. These parameter values include the element list of the machine learning potential function, the address of the training sample set, the path of the machine learning potential function output after training, and the number of training rounds.
[0100] In step S405, the front-end system 200 transmits the model training command and the corresponding parameter values to the back-end system 300.
[0101] In step S505, the backend system 300 trains the specified machine learning potential function model based on the transmitted model training command and corresponding parameter values, and saves the trained machine learning potential function model to the specified path.
[0102] In this embodiment, the backend system 300 has a built-in default potential function model architecture. During the potential function training process, when the backend system 300 receives a training command input by the user, it reads the aforementioned sample file including initial samples and trains the default potential function model. The default potential function model can vary depending on the user category. Alternatively, the system of this invention provides different interface permissions to different users. For users with higher permissions, they can specify the potential function model to be trained or add potential function models that need to be trained. The potential function model training process described in this invention includes a training process and a verification (or testing) process to ensure the accuracy and reliability of the trained potential function.
[0103] In step S506, the backend system 300 sends the parameters and parameter values used when training the machine learning potential function model, the training progress, and the results to the frontend system 200.
[0104] In step S406, the front-end system 200 displays the parameters and parameter values used during the training of the learning potential function model transmitted from the back-end system 300 in a structured form on the user interface 201, and displays the training progress and results.
[0105] When the learning potential function model displayed in the user interface 201 has converged, the user can proceed to step S304.
[0106] In step S304, the user inputs molecular dynamics simulation commands and corresponding parameter values into the user interface 201. These parameter values include the element symbols of the target material system, the specified crystal configuration, cell expansion parameters, cell scaling parameters, volume parameters, pressure parameters, temperature parameters, etc.
[0107] In step S407, the front-end system 200 transmits the molecular dynamics simulation command and the corresponding parameter values to the back-end system 300.
[0108] In step S507, the backend system 300 performs molecular dynamics simulation based on the transmitted molecular dynamics simulation command and corresponding parameter values, and saves the crystal configuration data as new data.
[0109] In step S508, the backend system 300 sends the parameter values and progress of the molecular dynamics simulation to the frontend system 200.
[0110] In step S408, the front-end system 200 displays the parameters and parameter values used in the molecular dynamics simulation transmitted from the back-end system 300 in a structured form on the user interface 201, and displays the simulation progress.
[0111] When the simulation ends, the user performs the following steps S305.
[0112] In step S305, the user inputs the first-principles calculation command and the corresponding parameter values into the user interface 201. The parameter values include the address of the crystal configuration data file generated during the molecular dynamics simulation to be calculated.
[0113] In step S409, the front-end system 200 transmits the first-principles calculation command and the corresponding parameter values to the back-end system 300.
[0114] In step S509, the backend system 300 performs first-principles calculations on the energy and force of the crystal configuration in the specified file based on the transmitted first-principles calculation command and the corresponding parameter values, and stores it in the specified location as a new sample set. At the same time, the new sample set is merged into the sample file obtained in step S504.
[0115] In step S510, the backend system 300 sends the parameters used for the first-principles calculation, the parameter values, and the calculation progress to the frontend system 200.
[0116] In step S410, the front-end system 200 displays the first-principles calculation parameters and parameter values transmitted from the back-end system 300 in a structured form on the user interface 201, and displays the calculation progress.
[0117] In step S306, the user inputs model training commands and corresponding parameter values on the user interface 201. The parameter values include the element list of the machine learning potential function, the address of the training sample set, the path of the machine learning potential function output after training, and the training epochs, etc.
[0118] In step S411, the front-end system 200 transmits the model training command and the corresponding parameter values to the back-end system 300.
[0119] In step S511, the backend system 300 trains the specified machine learning potential function model based on the transmitted model training command and corresponding parameter values, and saves the trained machine learning potential function model to the specified path. The specified machine learning potential function model is the potential function model trained in step S505 above, and the samples used during training are the sample files obtained in step S509.
[0120] In step S512, the backend system 300 sends the parameters and parameter values used when training the machine learning potential function model, the training progress, and the results to the frontend system 200.
[0121] In step S412, the front-end system 200 displays the parameters and parameter values used during the training of the learning potential function model transmitted from the back-end system 300 in a structured form on the user interface 201, and displays the training progress and results.
[0122] Users determine whether further molecular dynamics simulations are needed based on the training results. Typically, one or two more molecular dynamics simulations and model training sessions are required, which will not be elaborated upon here. After two to three molecular dynamics simulations and model training sessions, the model converges.
[0123] In step S307, the user inputs a command to construct a random crystal configuration and corresponding parameter values on the user interface 201 of the front-end system 200. Parameters include: the elements contained in the crystal configuration and their proportions; the number of random configurations to be generated; a list of allowed atomic numbers; a list of target pressures corresponding to the random configuration; the initial atomic volume of the random configuration, etc. In step S413, the front-end system 200 sends the command to construct the random crystal configuration and the corresponding parameter values to the back-end system 300.
[0124] In step S513, the backend system 300 constructs a random crystal configuration based on the received commands and parameters, and generates the corresponding crystal configuration file.
[0125] Step S308: The user inputs the command for first-principles calculation and the corresponding parameter values on the user interface 201 of the front-end system 200.
[0126] In step S414, the front-end system 200 sends the first-principles calculation command and the corresponding parameter values to the back-end system 300.
[0127] In step S514, the backend system 300 performs first-principles calculations on the energy and force of the crystal configuration file generated in step S513 to obtain the corresponding energy and force data, thereby obtaining a new sample. On the one hand, the sample is merged into the sample file, and on the other hand, it is stored as a new sample file.
[0128] In step S309, the user inputs the command for model training and the corresponding parameter values on the user interface 201 of the front-end system 200.
[0129] In step S415, the front-end system 200 sends the model training command and the corresponding parameter values to the back-end system 300.
[0130] In step S515, the backend system 300 trains a specified machine learning potential function model based on the sample file and the new sample file obtained in step S514. The machine learning potential function model is the potential function model trained and saved in step S511.
[0131] Similarly, the parameters and parameter values used in each processing step by the backend system 300 are displayed in a structured form in the user interface, along with the processing progress of that step. When training a specified machine learning potential function model, the backend system 300 also displays the training results for each iteration. When the training results show that the model has not converged, steps 307-S515 are repeated until the training results show that the model has converged. After the model converges, the following steps are performed: In step S310, the user inputs the command for filtering the training sample set and the corresponding parameter values on the user interface 201 of the front-end system 200.
[0132] In step S416, the front-end system 200 sends the command for selecting the training sample set and the corresponding parameter values to the back-end system 300.
[0133] In step S516, the backend system 300 filters the existing samples as required to form a new sample set. The number of samples in the new sample set is much smaller than the number of samples in the current sample set.
[0134] In step S311, the user enters the command for first-principles calculation and the corresponding parameter values again in the user interface 201, using high-precision parameter values this time.
[0135] In step S417, the front-end system 200 sends the first-principles calculation command and the corresponding parameter values to the back-end system 300.
[0136] In step S517, the backend system 300 performs high-precision first-principles calculations on the crystal configurations in the new sample set obtained in step S516 to obtain new energy and force data, and replaces the original energy and force data.
[0137] In step S312, the user enters the command for model training and the corresponding parameter values again on the user interface 201.
[0138] In step S418, the front-end system 200 sends the model training command and the corresponding parameter values to the back-end system 300.
[0139] In step S518, the backend system 300 retrains the specified machine learning potential function model (which is the machine learning potential function model obtained in step S515) based on the samples relabeled in step S517, and obtains the optimized potential function model.
[0140] In the aforementioned steps, after each training iteration of the machine learning model, the backend system (300) also constructs a state equation graph based on the test or validation results. See also... Figure 15 and Figure 16 , Figure 15This is a schematic diagram comparing the state equation curves obtained when testing a machine learning potential function model trained based on an initial crystal configuration sample according to an embodiment of the present invention. Figure 16 This is a schematic diagram comparing the state equation curves obtained when testing the final machine learning potential function model according to an embodiment of the present invention.
[0141] The horizontal axis represents volume per atom, and the vertical axis represents energy per atom. Data points (such as boxes, circles, and triangles) in the graph represent DFT results, and curves represent potential function results. Different shapes and colors of data points and curves correspond to different crystal types (fcc, bcc, hcp). (Comparison) Figure 15 and Figure 16 It is evident that after multiple rounds of training, the accuracy of the final potential function is significantly improved.
[0142] Before proceeding to the next step, users can view the graph to understand the accuracy of the currently trained machine learning potential function model.
[0143] As demonstrated by the foregoing embodiments, this invention provides a paradigm for training general machine learning potential functions. It enables the rapid construction of machine learning potential functions corresponding to a given system, reducing the empirical nature of traditional training processes and improving the generalization performance, accuracy, and stability of the final machine learning potential function. The system's user interface, with its various user permissions, not only lowers the learning curve and shortens the development process of machine learning potential functions but also provides users with more diverse choices. During computation and training, the parallel computing model effectively improves resource utilization efficiency, accelerates the first-principles calculation process, and reduces the development cost of machine learning potential functions.
[0144] See Figure 17 , Figure 17 This diagram illustrates a comparison between the phonon spectrum of a copper (Cu) fcc crystal generated using a machine learning potential function model according to an embodiment of the present invention and the result calculated based on first-principles calculations. The phonon spectrum consists of two parts: the phonon dispersion relation on the left and the phonon density of states (DOS) on the right. In the phonon dispersion relation diagram, the horizontal axis represents the wave vector q in the crystal's momentum space, and the vertical axis represents the phonon energy. In the phonon density of states diagram, the horizontal axis represents the magnitude of the density of states, and the vertical axis represents the phonon energy. The red dashed line in the diagram represents the phonon spectrum calculated based on first-principles calculations, and the black solid line represents the phonon spectrum generated by the machine learning potential function model trained using the training method provided by the present invention. Figure 17 As can be seen, the phonon spectrum obtained by training the machine learning potential function based on the method described in this invention is highly consistent with the result calculated based on first principles.
[0145] See Figure 18 , Figure 18 This diagram illustrates the temperature change trend obtained by simulating the melting point of copper using a two-phase method based on a machine learning potential function model according to an embodiment of the present invention. The red curve represents the temperature of the liquid, and the blue curve represents the temperature of the solid. The green dashed line represents the average temperature at the final equilibrium when both liquid and solid phases are present; this average temperature is the melting point of copper, approximately 1238 K. Figure 19 This is a snapshot of the configuration at an equilibrium temperature of 1238 K when the melting point of copper is simulated using a two-phase method. The green atoms represent the solid phase, and the gray atoms represent the liquid phase. From... Figure 19 As can be seen, the two phases coexist at this point, and therefore the equilibrium temperature at this point is the melting point.
[0146] Figure 20 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. The electronic device can be implemented as a server, or as a personal PC, laptop computer, smart mobile terminal, etc. It includes a processor 601 and a memory 602. The memory 602 stores a program instruction set, and when the processor 601 executes the program instruction set in the memory 602, the aforementioned machine learning potential function training method is implemented.
[0147] Specifically, the processor 601 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.
[0148] Memory 602 may include mass storage for data or instructions. For example, and not limitingly, memory 602 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 602 may include removable or non-removable (or fixed) media. Where appropriate, memory 602 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 602 is non-volatile solid-state memory.
[0149] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the machine learning potential function training method provided by this invention.
[0150] In one example, the electronic device may also include a communication interface 603 and a bus 610. For example, Figure 6 As shown, processor 601, memory 602, and communication interface 603 are connected via bus 610 and communicate with each other. Communication interface 603 is mainly used to implement communication between modules, devices, units, and / or equipment in this embodiment of the invention. Bus 610 includes hardware, software, or both. For example, and not limitingly, the bus may include Accelerated Graphics Port (AGP) or other graphics buses, Enhanced Industry Standard Architecture (EISA) bus, Front Side Bus (FSB), HyperTransport (HT) Interconnect, Industry Standard Architecture (ISA) bus, Infinite Bandwidth Interconnect, Low Pin Count (LPC) bus, memory bus, Microchannel Architecture (MCA) bus, Peripheral Component Interconnect (PCI) bus, PCI-Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 610 may include one or more buses. Although specific buses are described and shown in this embodiment of the invention, the invention contemplates any suitable bus or interconnect.
[0151] The present invention also provides a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the machine learning potential function training method described in the foregoing embodiments. The computer-readable storage medium can be any medium that contains or stores computer-executable instructions for use by or in conjunction with an instruction execution system, apparatus, or device. The storage medium can be a transient computer-readable storage medium or a non-transitory computer-readable storage medium. Non-transitory computer-readable storage media may include, but are not limited to, magnetic storage devices, optical storage devices, and / or semiconductor storage devices. Examples of such storage devices include, for example, magnetic disks, optical discs based on CD, DVD, or Blu-ray technology, and persistent solid-state storage such as flash memory and solid-state drives.
[0152] This invention also provides a computer program product, which includes computer program instructions that, when executed by a processor, implement the machine learning potential function training method described in the foregoing embodiments. The computer program product includes, but is not limited to, application installation packages and application plugins published on websites and in app stores.
[0153] The above embodiments are for illustrative purposes only and are not intended to limit the invention. Those skilled in the art can make various changes and modifications without departing from the scope of the invention. Therefore, all equivalent technical solutions should also fall within the scope of the invention.
Claims
1. A machine learning potential function training method, characterized in that, include: An initial crystal configuration dataset is constructed based on the specified crystal configuration of the target material system. The energy and force of the crystal configuration in the initial crystal configuration dataset are labeled to obtain a training sample set. The potential function model structure is trained based on the training sample set to obtain the potential function model; Based on the specified crystal configuration of the target material system, a new crystal configuration is obtained through molecular dynamics simulation. The energy and force of the new crystal configuration are labeled to obtain new training samples. The new training samples are merged into the training sample set. The potential function model is iteratively trained based on the training sample set with the merged new training samples until the termination condition is met. as well as A random crystal configuration of the target material system is constructed, and the energy and force of the random crystal configuration are labeled to obtain random samples. The random samples are merged into the training sample set, and the potential function model is iteratively trained based on the training sample set with merged random samples until the termination condition is met.
2. The machine learning potential function training method according to claim 1, characterized in that, Further includes: The training sample set, which includes random samples, is filtered to meet the quantity requirements. as well as The potential function model is trained based on a training sample set that meets the quantity requirements to obtain the final potential function model.
3. The machine learning potential function training method according to claim 2, characterized in that, After filtering the training sample set that has merged random samples to meet the quantity requirements, the method further includes: performing first-principles calculations on the energy and force of the crystal configurations in the training sample set that meet the quantity requirements using a first precision standard to relabel the energy and force of the crystal configurations in the training sample set; correspondingly, training the potential function model using the relabeled training sample set that meets the quantity requirements to obtain the final potential function model.
4. The machine learning potential function training method according to claim 3, characterized in that, When labeling the energy and force of crystal configurations in the initial crystal configuration dataset, when labeling the energy and force of new crystal configurations obtained through molecular dynamics simulations, and when labeling the energy and force of random crystal configurations, a second precision standard is used for first-principles calculations. The second precision standard is lower than the first precision standard.
5. The machine learning potential function training method according to claim 1, characterized in that, The steps for constructing an initial crystal configuration dataset based on a specified crystal configuration of the target material system include: Construct an initial unit cell based on the specified crystal configuration parameters of the target material system; The initial unit cell is periodically replicated according to the crystal phase relationship of the specified crystal configuration and the size of the simulation cell to obtain multiple unit cells of a first preset number of crystal configurations; and The atomic coordinates in each unit cell are corrected according to the correction parameter values; the multiple unit cell data of a specified number of crystal configurations after the correction calculation constitute the initial crystal configuration dataset.
6. The machine learning potential function training method according to claim 5, characterized in that, The correction calculation for the atomic coordinates in each unit cell includes one or more of the following calculations: random perturbation calculation of the simulation box, random perturbation calculation of the atomic coordinates in the unit cell, and calculation of the atomic coordinates in the unit cell based on the unit cell scaling parameter value.
7. The machine learning potential function training method according to claim 1, characterized in that, The steps for obtaining a new crystal configuration based on a specified crystal configuration of the target material system through molecular dynamics simulations include: Construct an initial unit cell based on the specified crystal configuration parameters of the target material system; Molecular dynamics simulations are performed on the initial unit cell based on the simulation conditions of the current simulation round, and the corresponding crystal configuration data is acquired when the data recording conditions are met; and The energy and force of the new crystal configuration are labeled to obtain new training samples, and the new training samples are merged into the training sample set. Correspondingly, the step of iteratively training the potential function model based on the training sample set that has been merged with the new training samples includes: The new training samples are input into the latest potential function model, and the first loss value is calculated based on the output data of the potential function model and the sample labels. In the first training of the iterative training process, the latest potential function model is the potential function model trained based on the training sample set of the initial crystal configuration. In the iterative training process, the latest potential function model is the potential function model trained in the previous round. Train the latest potential function model based on the training sample set and calculate the second loss value; Calculate the difference between the first loss value and the second loss value, and compare the difference with a threshold value; and In response to the difference being greater than a threshold, the simulation conditions are changed, and the aforementioned steps of obtaining a new crystal configuration through molecular dynamics simulation and the training steps are repeated until the difference is less than or equal to the threshold.
8. The machine learning potential function training method according to claim 1, characterized in that, After constructing the random crystal configuration of the target material system, the following further steps are included: Calculate the rotationally symmetric descriptor for each random crystal configuration; and Descriptors based on random crystal configurations remove duplicate crystal configurations from multiple constructed random crystal configurations.
9. The machine learning potential function training method according to claim 1 or 8, characterized in that, The steps for constructing a random crystal configuration of the target material system include: Construct a predetermined number of initial random crystal configurations for the target material system based on given parameters; The initial random crystal configuration was corrected based on soft potential; and The energy and force of the corrected random crystal configuration are calculated using a potential function model, and the random crystal configuration is optimized with the goal of minimizing energy and force.
10. The machine learning potential function training method according to claim 1, characterized in that, The steps for iteratively training the potential function model based on a training sample set that incorporates random samples include: The currently constructed random sample is input into the latest potential function model, and the first loss value is calculated based on the output data of the potential function model and the sample label. In the first training of the iterative training process, the latest potential function model is the potential function model obtained by iterative training with new samples obtained through molecular dynamics simulation. In the iterative training process, the latest potential function model is the potential function model of the previous training round. The current state potential function model is trained based on a training sample set that incorporates random samples, and the second loss value is calculated. Calculate the difference between the first loss value and the second loss value, and compare the difference with a threshold value; and In response to the difference being greater than a threshold, a random crystal configuration of the target material system is constructed to obtain a new random sample, and the aforementioned steps are repeated until the difference is less than or equal to the threshold.
11. A machine learning potential function training system, characterized in that, include: The initial sample construction module is configured to build an initial crystal configuration dataset based on a specified crystal configuration of the target material system, and to label the energy and force of the crystal configuration in the initial crystal configuration dataset to obtain a training sample set; The first training module is configured to train the target potential function model structure using the training sample set built based on the initial sample construction module to obtain the potential function model; The second training module is configured to obtain a new crystal configuration based on a specified crystal configuration of the target material system through molecular dynamics simulation. The energy and force of the new crystal configuration are marked to obtain new training samples. The new training samples are merged into the training sample set. The potential function model trained by the first training module is iteratively trained based on the training sample set with the merged new training samples until the termination condition is met. as well as The third training module is configured to construct a random crystal configuration of the target material system, and the energy and force of the random crystal configuration are labeled to obtain random samples. The random samples are merged into the training sample set, and the potential function model trained by the second training module is iteratively trained based on the training sample set with the random samples merged until the termination condition is met.
12. An electronic device comprising a processor and a memory, wherein the memory stores a set of computer program instructions, characterized in that, The machine learning potential function training method of any one of claims 1-10 is implemented when the processor executes the computer program instruction set on the memory.
13. A computer-readable storage medium, wherein, The computer-readable storage medium stores a set of computer program instructions, characterized in that, when the set of computer program instructions is executed by a processor, it implements the machine learning potential function training method according to any one of claims 1-10.
14. A computer program product comprising a computer program instruction set, characterized in that, When the computer program instruction set is executed by the processor, it implements the machine learning potential function training method according to any one of claims 1-10.