Construction method of two-dimensional layered material machine learning potential function
By constructing a machine learning potential function using DeepMD, the problems of high computational cost and insufficient accuracy of traditional methods are solved, enabling efficient and accurate simulation of two-dimensional layered materials, which is suitable for large-scale simulation and dynamic process description.
Patent Information
- Application Number
- CN202510762209.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-11-07
AI Technical Summary
Traditional methods are computationally expensive and lack accuracy in the study of two-dimensional layered materials, making it difficult to perform large-scale or long-term simulations. Existing empirical potential functions have poor generalization in complex material systems and are inaccurate in modeling dynamic processes.
We use the DeepMD deep learning model to construct a machine learning potential function, train a neural network using first-principles calculations, and generate an efficient and accurate potential energy model. This includes data preparation, model training, and testing steps to ensure data quality and model accuracy.
It significantly improves computational efficiency, reduces costs, and maintains high accuracy, enabling accurate description of interatomic interactions under different structures and conditions, and is suitable for large-scale simulations.
Smart Images

Figure CN120913666A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of materials science and computational simulation, and specifically relates to a method for constructing a machine learning potential function for two-dimensional layered materials. Background Technology
[0002] Two-dimensional layered materials have broad application prospects in fields such as nanoelectronics, energy storage, and catalysis due to their unique physical, chemical, and mechanical properties.
[0003] While traditional first-principles calculations can accurately describe the electronic structure and mechanical properties of materials, they are computationally expensive and difficult to use for large-scale simulations. For example, first-principles calculations face multi-scale simulation limitations, and the DFT (density functional theory) method is limited by the complexity of orthogonalizing the electronic wavefunction in simulations exceeding 10^64 ohms. 3 In atomic systems, functional errors exceeding 200 meV / atom are generated, leading to inaccuracies in the simulation of edge reconstruction of two-dimensional materials (e.g., dynamic simulations of MoS2 only maintain ps-level accuracy). The defects in van der Waals interaction characterization are particularly prominent; the GGA functional underestimates the interlayer binding energy of graphene by up to 35%, and although van der Waals correction (van der Waals density functional) is introduced, the single-point calculation time increases by 5-7 times. In the fabrication of two-dimensional materials, epitaxial growth by CVD (chemical vapor deposition) is constrained by substrate lattice mismatch (e.g., a 4.8% mismatch in Cu(111) / graphene causes >10... 3 / μm 2 (Grain boundary network), and the interface diffusion at the heterojunction interface exceeds 5 nm due to the difference in the sulfur vacancy migration barrier (0.4 eV potential difference between MoS2 / WS2), while existing characterization methods are limited by electron beam-induced vacancy migration (>10). 5 e - / nm 2 (Ineffective at dosage).
[0004] Traditional empirical potential functions, limited by predefined function forms and fixed parameter systems, exhibit significant shortcomings in complex material systems: their physical generalization collapses due to the lack of many-body coupling effects (e.g., the Tersoff potential's prediction error for the binding energy of Si / Ge alloys is >300 meV / atom, and the Lennard-Jones potential's prediction of interlayer slip energy in two-dimensional materials deviates from DFT data by up to 40%); dynamic process modeling suffers from inaccurate reaction rates due to potential energy surface distortion (ReaxFF (reaction force field) overestimates the graphene etching rate by 100 times, and NEB verification shows saddle point position shift). ), and completely loses the ability to describe the evolution of the electronic structure, the DeepMD machine learning potential function realizes the revolutionary unification of the quantum accuracy and the molecular dynamics efficiency of the interatomic interaction potential by deeply integrating the first principle calculation data. It adopts an end-to-end deep tensor neural network architecture, accurately encodes the many-body electronic correlation effect through atomic environment feature vectors (such as radial / angular symmetry functions), while preserving the accuracy of DFT, the calculation speed is improved to the order of millions of times of DFT, and the structural generalization barrier of traditional potential functions is successfully broken through.
[0005] Therefore, it is of great significance to develop an efficient and accurate machine learning potential function for the research and application of two-dimensional layered materials. SUMMARY
[0006] In view of the problems mentioned in the background art, the present application proposes a method for constructing an efficient and accurate machine learning potential function of two-dimensional layered materials.
[0007] Technical scheme: In order to solve the above technical problems, the technical scheme adopted by the present application is as follows:
[0008] A method for constructing a machine learning potential function of two-dimensional layered materials, comprising the following steps:
[0009] S1: modeling the two-dimensional layered material by using the first principle, and completing the first principle calculation, taking the results as a data source;
[0010] S2: extracting the structure and force information from the data source, and vectorizing the data to form a data set for training a neural network model;
[0011] S3: training the processed data set based on the deep learning model DeepMD to generate a machine learning potential function model;
[0012] S4: model detection: calculating the error between the predicted value of the model and the first principle calculation result;
[0013] S5: molecular dynamics simulation.
[0014] As a preferred embodiment, the specific process of S1 is as follows:
[0015] S11: constructing a lattice model of the two-dimensional layered material, and introducing defects to simulate the actual material properties;
[0016] S12: generating multi-temperature and multi-stress data based on AIMD.
[0017] As a preferred embodiment, the specific implementation process of S12 is as follows:
[0018] S121: temperature setting;
[0019] S122: stress setting is performed;
[0020] S123: VASP parameter configuration is performed;
[0021] S124: batch calculation is performed: OUTCAR file is saved independently for each task.
[0022] As preferred, the specific implementation process of S2 is as follows:
[0023] S21: the energy, force, and atomic position information is extracted from the first-principle calculation results using the LabeledSystem method of dpdata;
[0024] S22: the extracted data is converted into the format required by DeepMD and divided into training set and validation set;
[0025] S23: the generated data file is checked, including box information, position, force, and energy, to ensure the accuracy and consistency of the data;
[0026] S24: the data set is screened to delete abnormal data.
[0027] As preferred, the specific implementation process of S3 is as follows:
[0028] S31: a neural network model is established using the deep learning framework of DeepMD;
[0029] S32: the neural network model is trained using the data obtained from the first-principle calculation, thereby generating a potential energy model capable of simulating molecular dynamics;
[0030] S33: after training, the model is frozen and compressed.
[0031] As preferred, in S31, a multilayer perceptron or convolutional neural network is selected as the basic model structure; according to the complexity and precision requirements of the data set, the network structure parameters and hyperparameters are adjusted, and the fitting ability and generalization performance of the model are optimized through cross-validation and grid search methods.
[0032] As preferred, in S4, the error indicators include:
[0033] Energy error: the root mean square error RMSE between the predicted energy of the model and the first-principle calculation energy is calculated, and the specific calculation formula is as follows:
[0034]
[0035] where E deepmd,i is the energy of the i-th system predicted by the model, E DFT,i is the energy of the i-th system calculated by the first-principle, and n is the total number of systems.
[0036] Advantages: Compared with the prior art, the present application has the following advantages:
[0037] (1) In the prior art, although traditional first-principles calculations can provide high-precision simulation results, the calculation cost is high and it is difficult to apply to large-scale or long-time simulation. The present application constructs a machine learning potential function by using a deep learning model (such as DeepMD) to fit the data of first-principles calculations, generating an efficient potential energy model. The calculation efficiency of this model is at least five orders of magnitude higher than that of the traditional DFT method, and it can run quickly on modern high-performance computers, significantly reducing the calculation cost.
[0038] (2) The present application optimizes the modeling process, data processing and model training steps to ensure the high precision of the machine learning potential function. In the data preparation stage, by introducing diversified structures and defects, the data source is enriched, and through strict screening and verification, the quality and consistency of the data are guaranteed. In the model training process, by adjusting the network structure and hyperparameters, the fitting ability and generalization performance of the model are optimized. The final generated potential function model not only can accurately describe the interaction between atoms, but also can maintain good prediction accuracy under different structures and conditions. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 is a flowchart of the construction method of the two-dimensional layered material machine learning potential function of the present application;
[0040] Figure 2 is a comparison chart of the effect of the potential function trained by the present application;
[0041] Figure 3 is a result chart of the application of the potential function trained by the present application to molecular dynamics simulation. DETAILED DESCRIPTION
[0042] The present application will be further illustrated below in conjunction with specific embodiments, which are implemented on the premise of the technical scheme of the present application, and it should be understood that these embodiments are only used to illustrate the present application and not to limit the scope of the present application.
[0043] The construction method of the two-dimensional layered material machine learning potential function provided in this embodiment aims to construct a potential function model of two-dimensional layered material silicon diphosphide (SiP2) by machine learning method, which is used for efficient simulation of its mechanical, thermal and dynamic properties. Although traditional first-principles calculations have high precision, the calculation cost is high and it is difficult to be used for large-scale or long-time simulation. Therefore, this embodiment adopts machine learning method and combines deep learning framework DeepMD to construct an efficient and accurate potential function model. Including the following steps:
[0044] S1: Model the two-dimensional layered material using first-principles and perform first-principles calculations, taking the results as the data source, which includes the following steps:
[0045] S11: For the two-dimensional layered material, establish a reasonable lattice model to ensure that the model can reflect the two-dimensional characteristics of the material.
[0046] Construct an ideal lattice model of two-dimensional layered material silicon diphosphide (SiP2) and introduce defects to simulate the actual material properties. Use crystal structure databases or literature to determine the ideal lattice parameters, such as: Interlayer spacing is
[0047] Build the initial lattice model in the modeling software (such as VASP), i.e. the POSCAR file, to ensure that the model can reflect the two-dimensional characteristics of the material. The model size is selected as a 2x2x1 supercell, containing 38 phosphorus (Si) atoms and 96 silicon (P) atoms. During modeling, assign atomic positions according to a specified ratio (e.g. within -5% to 5% of the lattice constant) or a random ratio, and introduce defects such as vacancy defects (5% of the total number of atoms) or substitution impurities (e.g. replacing some P atoms with arsenic atoms (As)) or lattice distortion to simulate the microscopic structural changes in the actual material, so that the model can best reflect various atomic distribution situations.
[0048] The specific operation is as follows:
[0049] Randomly select 2 P atom positions and replace them with vacancies.
[0050] Randomly select 1 P atom position and replace it with an As atom.
[0051] Save the initial model file for subsequent calculations.
[0052] S12: Generate based on multi-temperature and multi-stress data obtained from ab initio molecular dynamics (AIMD) method.
[0053] S121: Set the temperature in the range of 100K to 1000K, with 10 temperature points selected at intervals of 100K.
[0054] S122: Set the stress for each temperature point to 11 stress values.
[0055] Specifically: compress 0.01-0.05, no stress, stretch 0.01-0.05.
[0056] S123: Perform VASP (Vienna ab initio simulation package) parameter configuration, use NVT ensemble (canonical ensemble), set Nosé-Hoover heat bath to control temperature, time step is set to 1 fs (femtosecond), total simulation step number is 5000 steps (5 ps), enable ISIF (magnetic parameter) = 3 parameter to allow lattice relaxation and apply external stress, set SIGMA (precision setting) parameter corresponding to target stress value, realize stress loading through VASP's STARES label;
[0057] S124: Perform batch calculation: automatically generate 110 calculation tasks (10 temperatures x 11 stresses) through script, save OUTCAR (output file) file independently for each task.
[0058] S2: Data processing and vectorization: use dpdata (a Python library that can convert data sets obtained from first-principles calculation tools such as VASP into the required format for DeepMD model training) tool to process data sources, extract structure and force information, and vectorize data to form a data set for training neural network models, which includes the following steps:
[0059] S21: Use the LabeledSystem method of dpdata (Python library) to extract energy, force, position, etc. information from first-principles calculation results (such as VASP's OUTCAR file);
[0060] Use the LabeledSystem method of dpdata tool to extract energy, force, atomic position, etc. information from first-principles calculation result file (such as VASP's OUTCAR file), which includes box.raw: box information (lattice parameters); coord.raw: atomic coordinates; force.raw: atomic force; energy.raw: total energy of the system. Ensure that the extracted data is complete and correctly formatted.
[0061] S22: Convert the extracted data into the format required by DeepMD and divide it into training set and validation set;
[0062] Convert the extracted data into the format required by DeepMD (such as deepmd / npy format). Divide the data set into training set and validation set, usually in the ratio of 80% training set and 20% validation set. Save the training set and validation set files; ensure the randomness and representativeness of data division, avoid overfitting or underfitting phenomenon.
[0063] S23: Check the generated data files, including box.raw (box information), coord.raw (position), force.raw (force), energy.raw (energy), etc.; check the generated data files to ensure the accuracy and consistency of the data; specifically including:
[0064] Check whether the lattice parameters in the box.raw file are consistent with the first-principle calculation results.
[0065] Check whether the atomic coordinates in the coord.raw file are correct, i.e., whether they are within a reasonable range.
[0066] Check whether the atomic forces in the force.raw file are reasonable (e.g., whether there are forces greater than ).
[0067] Check whether the total energy in the energy.raw file is convergent.
[0068] If abnormal data is found, the first-principle calculation process or data extraction step needs to be rechecked.
[0069] S24: Screen the data set and delete abnormal data (such as data with excessive force or abnormal energy);
[0070] For example, set a threshold (such as atomic force greater than or total energy deviating from the average value (such as more than 20% of the average value)) to identify and eliminate these data points, to improve the quality and accuracy of the training data. Save the screened data set.
[0071] S25: Data set optimization;
[0072] In this embodiment, the preparation of the data set specifically includes:
[0073] 1) Ensure the consistency and correctness of the data, including K-point sampling (2×2×1), exchange correlation approximation (PBE), etc., to ensure the quality of the data.
[0074] K-point sampling (2×2×1): In the structure optimization and static calculation stage, the 2×2×1 sampling scheme of the Monkhorst-Pack grid is adopted: for two-dimensional materials or surface models, the z direction is fixed as 1 (the vacuum layer direction does not need to be densely sampled), which is directly set through the KPOINTS file or KSPACING=0.5 (VASP).
[0075] Exchange correlation approximation (PBE): strictly use pure PBE functional (without empirical correction): set GGA=PE in the INCAR (input file) file.
[0076] where GGA is the Generalized Gradient Approximation framework, and PE is the abbreviation of Perdew-Ernzerhof, which is the identifier of the standard PBE functional.
[0077] 2) Set the training space according to the accuracy requirement. The larger the space, the more accurate the trained machine learning potential function, but the higher the calculation consumption of training.
[0078] 3) The training space should not be less than the cutoff radius of the large-scale atom / molecule parallel simulation tool calculation, or greater than the size of the lattice model of the atomic scale material simulation calculation. Set the training space to be 2 times the lattice constant, to ensure that the training space is greater than the cutoff radius of the atom / molecule parallel simulation tool calculation.
[0079] 4) According to the accuracy requirement, the training space is gridded, and the grid size should be much smaller than the lattice constant, and the grid near the central atom is denser to improve the accuracy. The training space is gridded, and the grid size is and the grid near the central atom is denser (the grid size is ).
[0080] S3: Train the processed data set based on the deep learning model DeepMD to generate a machine learning potential function model, which includes the following steps:
[0081] S31: Use the deep learning framework of DeepMD to establish a neural network model;
[0082] Use the deep learning framework of DeepMD to establish a neural network model. Choose multilayer perceptron (MLP) or convolutional neural network (CNN) as the basic model structure. According to the complexity and accuracy requirement of the data set, adjust the network structure parameters, including the number of layers, the number of neurons in each layer, the activation function, etc.
[0083] For example, for two-dimensional layered materials, 3-layer MLP can be selected, and the number of neurons in each layer is 120, 80 and 40 respectively. Set hyperparameters such as learning rate (e.g. 1e-3), training steps (e.g. 1 million steps) and batch size (e.g. 32).
[0084] In this embodiment, the characteristics of the DeepMD training model include:
[0085] 1) Support MPI (Message Passing Interface) and GPU (Graphics Processing Unit) parallel computing, and can run efficiently on modern heterogeneous high-performance supercomputers;
[0086] 2) The model has high computational efficiency, which is more than five orders of magnitude faster than the traditional DFT (Density Functional Theory) method;
[0087] 3) The model is easy to maintain symmetry of the system, especially when dealing with multiple elements;
[0088] 4) The model is designed end-to-end, reducing the possibility of human intervention.
[0089] S32: Model training: use the dp train command to train the neural network model using the data obtained from first-principles calculation, to generate a potential energy model that can efficiently simulate molecular dynamics;
[0090] Train the model using the training set data. During the training process, evaluate the model performance through the validation set and test set, and monitor the training loss, validation loss, and prediction accuracy in real time.
[0091] According to the evaluation results, dynamically adjust the model parameters (such as learning rate decay, neuron number adjustment, etc.) to improve the accuracy and stability of the model. For example, if the validation loss fluctuates during the training process, you can appropriately reduce the learning rate or increase the number of training steps. After training is complete, use the test set to further evaluate the model's generalization ability to ensure that the model performs well on unseen data.
[0092] In this step, the input.json input script is mainly modified, and dp train input.json is used for training.
[0093] S33: Model freezing and compression;
[0094] After training, use the dp freeze command to freeze the model, fixing the trained model parameters for subsequent use. Then, use the dp compress command to compress the model, remove redundant information, optimize the model structure, and improve the model's running efficiency. The compressed model can significantly reduce the consumption of computing resources while maintaining high accuracy, making it suitable for large-scale simulation tasks.
[0095] S4: Model detection;
[0096] By comparing with the first-principles calculation results, verify the accuracy and reliability of the generated machine learning potential function model.
[0097] Verify the accuracy of the model in predicting physical quantities such as energy, force, and stress, specifically:
[0098] Select a set of untrained test datasets (e.g., containing 10 two-dimensional layered material models with different structures). Perform precise calculations on these test datasets using first-principles calculation methods (such as VASP) to obtain reference energy, force, and stress values. Use a trained machine learning potential function model to make predictions on the same set of test data, and calculate the error between the model predictions and the first-principles calculations.
[0099] Evaluation of error metrics, including energy error.
[0100] Energy error: The root mean square error (RMSE) between the energy predicted by the computational model and the energy calculated using first principles.
[0101]
[0102] Among them, E deepmd,i F is the energy of the i-th system predicted by the model. DFT,i This is the energy of the i-th system calculated using first-principles calculations, where n is the total number of systems. The formula yields the RMSE (Real-Time Separation) between the predicted and actual energies by averaging the squares of the differences between each predicted and actual energy value, and then taking the square root.
[0103] Expected result: The energy error predicted by the model should be less than 0.02 eV / atom.
[0104] like Figure 2 As shown, the energy prediction errors of density functional theory (DFT) and deep potential energy models are compared at 10 temperature points (100K–1000K). The total number of atoms is 144, reflecting the average contribution of the total error linearly amortized to each atom. 100K: 0.00229 eV / atom, 200K / 300K: 0.00215 eV / atom, 400K: 0.00229 eV / atom, 500K: 0.00236 eV / atom, 600K: 0.00306 eV / atom, 700K: 0.00326 eV / atom, 800K: 0.00333 eV / atom, 900K: 0.00458 eV / atom, 1000K: 0.00521 eV / atom. Both the DFT and model predictions cover an energy range of -795 eV to -765 eV, indicating that the model has good overall predictive ability. After distributing the RMSE (root mean square error) at each temperature to 144 atoms, the average error per atom ranges from 0.0023 eV / atom (100 K) to 0.0052 eV / atom (1000 K).
[0105] This result shows that the Deep Potential model performs well in energy prediction at the atomic level, with a stable error of 0.0023-0.0024 eV / atom at low temperatures (100K-500K) and high prediction accuracy. Even at high temperatures (600K-1000K), the error increases slightly (up to 0.0052 eV / atom), but it is still within the acceptable range at the atomic scale. Combining the trend of RMSE with temperature and Figure 2 The predicted values shown as "y=x" in the middle are highly linearly correlated with the DFT actual values, indicating that the model can reliably reproduce the DFT calculation results at different temperatures and has good generalization ability and practicality.
[0106] S5: Perform molecular dynamics simulation;
[0107] DeepMD comes with many molecular dynamics interfaces. After verifying the model effect, perform molecular dynamics simulation through the interface. Take LAMMPS (a molecular dynamics simulation software) as an example. In the LAMMPS input file, specify the machine learning potential function and related parameters after pair_style by adding deepmd frozen_model.pb (the verified model).
[0108] pair_style is a command in LAMMPS used to specify the interaction potential between pairs of particles in molecular dynamics simulation.
[0109] As shown in Figure 3 , at a temperature of 300K, the stress-strain diagram generated by the molecular dynamics simulation using the potential function generated by the method of the present application can be used to explore when the material is pulled apart (i.e., when the stress drops suddenly) and further explore the mechanical properties of the material.
[0110] This embodiment shows in detail how to construct a machine learning potential function model for two-dimensional layered material silicon diphosphide, and proves its accuracy and reliability through various verification methods. The model has wide application prospects in material design, defect engineering, large-scale simulation, and multi-scale research, and provides an efficient and accurate tool for the research and development of two-dimensional layered materials.
[0111] The above only describes the preferred embodiments of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, several improvements and refinements can be made, and these improvements and refinements should also be considered within the scope of protection of the present application.
Claims
1. A method for constructing a machine learning potential function of a two-dimensional layered material, characterized in that: The method comprises the following steps: S1: modeling two-dimensional layered materials using first principles and completing first principles calculation, taking the results as a data source; S2: extracting structural and force information from the data source and vectorizing the data to form a data set for training a neural network model; S3: training the processed data set based on a deep learning model DeepMD to generate a machine learning potential function model; S4: model detection: calculating the error between the model prediction value and the first principles calculation result; S5: performing molecular dynamics simulation.
2. The method of claim 1, wherein: The specific process of S1 is as follows: S11: constructing a lattice model of two-dimensional layered materials and introducing defects to simulate actual material properties; S12: generating multi-temperature-multiple stress data based on AIMD.
3. The method of claim 2, wherein: The specific implementation process of S12 is as follows: S121: set the temperature and select multiple temperature points; S122: set the stress and apply stress values to each temperature point; S123: configure VASP parameters; S124: perform batch calculation and automatically generate calculation tasks through scripts, with each task saving an OUTCAR file independently.
4. The method of claim 1, wherein: The specific implementation process of S2 is as follows: S21: use the LabeledSystem method of dpdata to extract energy, force, and atomic position information from the first principles calculation results; S22: convert the extracted data into the format required by DeepMD and divide it into a training set and a validation set; S23: check the generated data files, including box information, position, force, and energy, to ensure the accuracy and consistency of the data; S24: filter the data set and delete abnormal data; S25: optimize the data set.
5. The method of claim 4, wherein: In S24, the specific process of filtering the data set and deleting abnormal data is as follows: A threshold is set, and data points with atomic forces greater than or total energy deviating from the average by more than a certain amount are identified and removed.
6. The method of claim 1, wherein: The specific implementation process of S3 is as follows: S31: use the deep learning framework of DeepMD to establish a neural network model; S32: train the neural network model using the data obtained from first principles calculation to generate a potential energy model that can simulate molecular dynamics; S33: after training, freeze and compress the model.
7. The method of claim 6, wherein: In S31, select a multilayer perceptron or a convolutional neural network as the basic model structure; adjust the network structure parameters and hyperparameters according to the complexity and precision requirements of the data set; and optimize the fitting ability and generalization performance of the model through cross-validation and grid search methods. 8.The method of claim 1, wherein: In S4, the error indicators include: Energy error: calculate the root mean square error RMSE between the model predicted energy and the first principles calculation energy, with the specific calculation formula being: where E deepmd,i is the model-predicted energy of the i-th system, E DFT,i is the first-principles-calculated energy of the i-th system, and n is the total number of systems.
Citation Information
Cited By
Potential function model construction and training method, system and device and storage medium
CN121963909A