Method, system, medium, terminal and program product for acquiring electron density information based on machine learning

By constructing a differential density prediction model and a residual compensation model, the problem of obtaining the electron density of complex structural materials with high precision and efficiency in existing technologies has been solved, and stable calculations of the photoelectric properties and quantum transport of heterostructures, interface structures and device structures have been achieved.

CN122264002APending Publication Date: 2026-06-23SHANGHAI TECH UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI TECH UNIV
Filing Date
2026-03-27
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technologies cannot obtain the electron density of materials with complex structures with high precision and efficiency, making it difficult to stably support downstream calculations such as photoelectric properties and quantum transport of heterostructures, interface structures, and device structures.

Method used

By constructing a differential density prediction model, the true differential density is built using the real electron density and the reference electron density. Combined with machine learning model training, the predicted differential density is output and the total electron density is recovered. The accuracy is optimized by using a residual compensation model.

Benefits of technology

It achieves high-precision and high-efficiency acquisition of electron density of complex structural materials, and stably supports the calculation of photoelectric properties and quantum transport of heterostructures, interface structures and device structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122264002A_ABST
    Figure CN122264002A_ABST
Patent Text Reader

Abstract

The application provides an electron density information acquisition method, system, medium, terminal and program product based on machine learning. The method comprises the following steps: first, constructing a real differential density according to a real electron density and a reference electron density; inputting atomic species, atomic coordinates, cell information and uniform grid definition information of a target structure into a machine learning model for training, and taking the real differential density as a supervision target during the training to construct a differential density prediction model; deploying the constructed differential density prediction model to output a predicted differential density of a to-be-tested complex structure according to to-be-tested complex structure information; and performing a recovery operation on the output predicted differential density to obtain total electron density information of the to-be-tested complex structure. The application can acquire electron density information of a complex structure with high precision and high efficiency, and stably support downstream calculations such as photoelectric properties and quantum transport of heterostructures, interface structures and device structures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, system, medium, terminal and program product for acquiring electron density information based on machine learning. Background Technology

[0002] Electron density is a core physical quantity describing the electronic structure of a material. It represents the probability of finding an electron at a specific location around an atom or molecule, and can also be defined as the number of electrons per unit volume. Based on electron density, effective potential and Hamiltonian are further constructed, thereby supporting the calculation of related physical quantities such as energy band structure, total energy, force, photoelectric properties, and quantum transport. Therefore, the accuracy of electron density acquisition directly affects the results of subsequent physical analysis and device calculations.

[0003] Traditional first-principles methods can obtain electron density relatively accurately, but their computational cost usually increases rapidly with the increase of system size, structural complexity and disorder. This puts great pressure on the self-consistent solution of complete electron density in terms of time and storage, making it difficult to meet the actual needs of high-throughput screening and rapid iterative design. This limits its widespread application in large-scale heterostructures, complex interfaces, defective systems, disordered structures and device structures.

[0004] In recent years, research has attempted to use machine learning methods to directly predict electron density or charge density representations from atomic configurations. These methods have shown good results in molecular systems, conventional periodic structures, and some bulk materials, demonstrating the feasibility of bypassing complete first-principles self-consistent solutions and directly establishing a mapping relationship from atomic structure to electron density representation. However, based on the validation objects and published results of existing works, these methods still mainly focus on molecules, regular crystals, and bulk materials, with limited research on heterostructures, interface structures, device structures, and their quantum transport scenarios. For materials with complex structures, existing machine learning methods still cannot obtain electron density with high accuracy and efficiency, making it difficult to stably support downstream calculations such as photoelectric properties and quantum transport in heterostructures, interface structures, and device structures.

[0005] Therefore, it is necessary to provide a machine learning-based method, system, medium, terminal, and program product for acquiring electron density information to solve the aforementioned problems in the prior art. Summary of the Invention

[0006] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a method, system, medium, terminal and program product for obtaining electron density information based on machine learning, so as to solve the technical problems that the prior art cannot obtain the electron density of materials with complex structures with high precision and high efficiency, and it is difficult to stably support downstream calculations such as photoelectric properties and quantum transport of heterogeneous structures, interface structures and device structures.

[0007] To achieve the above and other related objectives, a first aspect of this application provides a machine learning-based method for acquiring electron density information, comprising: acquiring a true electron density calculated based on a target structure and a constructed reference electron density, and constructing a true differential density based on the true electron density and the reference electron density; inputting the atom types, atom coordinates, unit cell information, and uniform grid definition information of the target structure into a machine learning model for training, and using the true differential density as a supervision target during the training process to construct a differential density prediction model; deploying the constructed differential density prediction model to output a predicted differential density of the complex structure under test based on the information of the complex structure under test; and performing a recovery operation on the output predicted differential density to obtain the total electron density information of the complex structure under test.

[0008] In some embodiments of the first aspect of this application, the process of constructing the reference electron density based on the atomic density superposition approximation method is as follows: based on the target structure information, the initial radial electron density function corresponding to each element in the target structure is predetermined; the initial radial electron density function is transformed to the reciprocal space, and the contributions of the electron density corresponding to each local center in the reciprocal space are superimposed based on interpolation technology and non-uniform fast Fourier transform to obtain the reference electron density representation of the target structure at the reciprocal space lattice; the reference electron density representation at the reciprocal space lattice is inversely transformed based on interpolation technology and non-uniform fast Fourier transform to construct the reference electron density in real space.

[0009] In some embodiments of the first aspect of this application, the process of performing a recovery operation on the output predicted differential density to obtain the total electron density information of the complex structure under test includes: superimposing the predicted differential density of the complex structure under test output by the differential density prediction model onto a reference electron density constructed based on the complex structure under test to recover the total electron density information of the complex structure under test.

[0010] In some embodiments of the first aspect of this application, the method further includes: performing residual correction on the predicted differential density output by the differential density prediction model based on a pre-built residual compensation model. The process includes: constructing a residual compensation label based on the difference between the predicted differential density and the true differential density; inputting the residual compensation label and the atomic configuration information of the target structure into a machine learning model for training to construct a residual compensation model; deploying the constructed residual compensation model to output a residual compensation prediction value based on the information of the complex structure to be tested, and superimposing it on the predicted differential density output by the differential density model to obtain the differential electron density after residual correction.

[0011] In some embodiments of the first aspect of this application, the method further includes: constructing a conservation term loss function based on the charge conservation constraint rule, constructing a total loss function with a grid-by-grid loss function based on the mean square error, and performing backpropagation based on the constructed total loss function, iteratively training until convergence to obtain a differential density prediction model.

[0012] In some embodiments of the first aspect of this application, optimizations are performed during the training and inference phases based on a block density reconstruction mechanism, a real space truncation mechanism, and an atomic graph reuse mechanism.

[0013] To achieve the above and other related objectives, a second aspect of this application provides a machine learning-based electron density information acquisition system, comprising: a true differential density construction module, used to acquire the true electron density calculated based on the target structure and a constructed reference electron density, and to construct a true differential density based on the true electron density and the reference electron density; a differential density prediction model construction module, used to input the atom types, atom coordinates, unit cell information, and uniform grid definition information of the target structure into a machine learning model for training, and using the true differential density as a supervision target during training to construct a differential density prediction model; a model deployment module, used to deploy the constructed differential density prediction model, and to output the predicted differential density of the complex structure under test based on the information of the complex structure under test; and a recovery module, used to perform a recovery operation on the output predicted differential density to obtain the total electron density information of the complex structure under test.

[0014] To achieve the above and other related objectives, a third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method.

[0015] To achieve the above and other related objectives, a fourth aspect of this application provides a computer program product comprising computer program code that, when executed on a computer, causes the computer to implement the method.

[0016] To achieve the above and other related objectives, a fifth aspect of this application provides an electronic terminal, including a memory, a processor, and a computer program stored in the memory; the processor executes the computer program to implement the method.

[0017] As described above, the machine learning-based electron density information acquisition method, system, medium, terminal, and program product of this application have the following beneficial effects:

[0018] First, a true differential density is constructed based on the true electron density and a reference electron density. Then, the atom types, atomic coordinates, unit cell information, and uniform grid definition information of the target structure are input into a machine learning model for training. During the training process, the constructed true differential density is used as the supervision target for model training, thereby training a differential density prediction model. The trained differential density prediction model is deployed to output the predicted differential density of the complex structure to be tested based on the information of the complex structure to be tested. Finally, a recovery operation is performed on the output predicted differential density to obtain the total electron density information of the complex structure to be tested. This achieves high-precision and high-efficiency acquisition of electron density information of complex structures, stably supporting downstream calculations such as photoelectric properties and quantum transport of heterostructures, interface structures, and device structures. Attached Figure Description

[0019] Figure 1 The diagram shown is a flowchart illustrating a machine learning-based method for obtaining electron density information in one embodiment of this application.

[0020] Figure 2 The diagram shown illustrates the working principle of a machine learning-based electron density information acquisition method in one embodiment of this application.

[0021] Figure 3 The image shown is a random object with a size of 3×3×3 in one embodiment of this application. Comparison of differential density of Te supercell structure at the fractional coordinate 𝑧 = 0 section.

[0022] Figure 4 This is shown as a 3×3×3 random sampling of multiple different components in one embodiment of this application. Comparison of the band gap (center) and band structure (around the perimeter) of the Te supercell structure.

[0023] Figure 5 The diagram shows the atomic structure, actual differential electron density profile, predicted differential density profile, and predicted differential density residual profile of three different components of Au–HgCdTe–Au device structures in one embodiment of this application, as well as a comparison of the surface potential function along the transport direction 𝑧 and the transmission spectrum along the transport direction 𝑧.

[0024] Figure 6 The single Hg vacancy defect system, shown as a 2×2×2 supercell structure in one embodiment of this application, is illustrated. Data display chart (the four charts on the left correspond to the actual differential density, predicted differential density, predicted residual and corresponding atomic structure of the interface where the defect is located, respectively; the right side shows the band structure comparison).

[0025] Figure 7 The single Hg vacancy defect system with a supercell structure of size 3×3×3 shown in one embodiment of this application is illustrated. Data display chart (the four charts on the left correspond to the actual differential density, predicted differential density, predicted residual and corresponding atomic structure of the interface where the defect is located, respectively; the right side shows the band structure comparison).

[0026] Figure 8 The diagram shows the relationship between the time of the model inference stage and the video memory scaling under different atomic number systems in one embodiment of this application (the main figure shows the total time of the differential density prediction process as a function of the atomic number A, and the inset figure shows the corresponding peak GPU video memory usage (VRAM) as a function of A).

[0027] Figure 9 The diagram shown is a block diagram of an electron density information acquisition system based on machine learning, according to an embodiment of this application.

[0028] Figure 10 The diagram shown is a structural schematic of an electronic terminal according to an embodiment of this application. Detailed Implementation

[0029] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0030] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.

[0031] It should be noted that, in the embodiments of this application, the words "exemplary" or "for example" indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0032] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0033] Before providing a further detailed description of the present invention, the nouns and terms used in the embodiments of the present invention are explained, and the nouns and terms used in the embodiments of the present invention are subject to the following interpretations:

[0034] <1> Machine Learning Model: A mathematical model that is trained on data to obtain the mapping relationship between input and output, and is used for prediction, fitting, or decision support.

[0035] <2> Real space is the space for intuitively understanding crystal structure. It is used to describe the arrangement of atoms in a crystal. The Bravais lattice of a crystal is defined by the basis vectors a1, a2, and a3. Each lattice point represents a repeating position of the unit cell. The interplanar spacing and crystal orientation in real space are the basis for analyzing the geometry of crystals.

[0036] <3> Reciprocal space: refers to the representation space spanned by reciprocal lattice vectors and which is Fourier conjugate with real space. It can be used to represent the periodic structure of crystals and the distribution of physical quantities such as electron density in the wave vector domain.

[0037] <4> Fast Fourier Transform (FFT) is an efficient algorithm used to convert time-domain signals into frequency-domain signals, helping to analyze the frequency components and amplitudes of signals. Its core idea is that any periodic signal can be decomposed into a superposition of sine and cosine waves of different frequencies. FFT quickly obtains the amplitude and phase of these frequency components through mathematical operations.

[0038] <5> The Inverse Fast Fourier Transform (IFFT) is the inverse operation of the Fast Fourier Transform (FFT). It is used to convert point-value representation back to coefficient representation, which is especially important in polynomial operations, particularly when the polynomial needs to be restored after convolution. Its core idea is to utilize the structural characteristics of the FFT to achieve an efficient inverse transformation by modifying the direction of the unit root and the scaling factor.

[0039] <6> Graph Neural Networks (GNNs) are deep learning models specifically designed for processing graph data. Graph data consists of nodes and edges, and the graph structure is usually represented using an adjacency matrix to capture the relationships between nodes and edges. Its core is to learn and optimize the attribute vectors in the graph, including node information, edge information, and overall graph information. This information is usually represented by vectors.

[0040] <7> Graph Convolutional Network (GCN): A specific type of Graph Neural Network (GNN) that extracts feature information from a graph structure by performing convolution-like information aggregation and feature updates between nodes and their neighborhoods, learning node representations layer by layer. As the number of network layers increases, information can propagate over a wider neighborhood.

[0041] <8> Periodic Boundary Conditions (PBCs) are a method used in mathematical modeling and computer simulation to simplify the boundary treatment of physical systems. They replace the influence of the real environment on the system by simulating the periodic repetition of the system at the boundary. The core definition is to use equivalent conditions to reflect the mathematical expression of the interaction between the system and its surrounding environment.

[0042] <9> Density functional theory (DFT) is a quantum mechanical method that uses electron density as the fundamental variable to study the electronic structure of multi-electron systems. It is widely used in fields such as chemistry, materials science, condensed matter physics, and nuclear physics, and is a core tool in computational materials science and computational chemistry.

[0043] <10> First-principles calculation, also known as ab initio calculation, refers to the method of calculating the physical properties of materials or molecular systems, such as electronic structure, electronic density, and total energy, based on the fundamental principles of quantum mechanics and with minimal reliance on empirical parameters. Common implementations include density functional theory (DFT).

[0044] <11> Mean Squared Error (MSE) is a measure of error calculated by averaging the squared errors. It characterizes the overall deviation between predicted and true values; the smaller the MSE value, the closer the prediction is to the true value. In machine learning, MSE is often used as a loss function during model training and also as an evaluation metric for model performance.

[0045] <12> Non-Uniform Fast Fourier Transform (NUFFT) is an extended Fast Fourier Transform (FFT) algorithm specifically designed for processing non-uniformly sampled data. Its basic idea is to map non-uniform sampling points onto a uniform grid through interpolation and density compensation, and then use the traditional FFT for fast computation. It can efficiently calculate the spectrum of non-uniformly sampled signals and is widely used in image processing, magnetic resonance imaging (MRI), astronomy, and signal processing.

[0046] <13> Interpolation is a mathematical method used to estimate the value of unknown data points from known data points. It has wide applications in numerical analysis, image processing, engineering, and other fields, helping to handle missing data, smooth data, or predict values ​​in unknown regions.

[0047] To facilitate understanding of the embodiments of this application, in conjunction with Figure 1 and Figure 2 Detailed explanation. Figure 1 A flowchart illustrating a machine learning-based method for obtaining electron density information is shown in an embodiment of the present invention. Figure 2 This illustration shows a schematic diagram illustrating the working principle of a machine learning-based electron density information acquisition method according to an embodiment of the present invention. The machine learning-based electron density information acquisition method in this embodiment includes the following steps:

[0048] Step S11: Obtain the true electron density calculated based on the target structure and the constructed reference electron density, and construct the true differential density based on the true electron density and the reference electron density.

[0049] In the dataset construction phase, supervised samples that can be directly used by the machine learning model are generated based on the first-principles calculation results, ensuring that training and inference use a unified electron density representation and recovery rule. Further, this phase includes the construction of datasets for the differential density prediction model and the residual compensation model. Specifically, the dataset for the differential density prediction model includes: the true electron density obtained from first-principles calculations based on the atomic structure, the reference electron density constructed from the atomic structure, and the true differential density on a uniform real-space grid obtained by calculating the difference between the two. The dataset for the residual compensation model includes: the true electron density obtained from first-principles calculations based on the atomic structure, the reference electron density constructed from the atomic structure, the true differential density on a uniform real-space grid obtained by calculating the difference between the two, the predicted differential density output by the differential density prediction model, and the equivalent residual charge defined on each atom by subtracting the predicted differential density from the true differential density.

[0050] First, a training dataset for the differential density prediction model is constructed based on the first-principles calculations of the target structural system. The target structural system can be a molecular system, a conventional periodic material system, a bulk supercell system, a heterostructure, or a device structure. The corresponding model input includes at least the types of atoms, atomic coordinates, unit cell information, and the real-space grid or hybrid representation information corresponding to the target electron density.

[0051] In some specific embodiments, the true electron density is derived from the first-principles calculation results of FP-MTO (Full-Potential Muffin-Tin Orbital method), specifically based on density functional theory calculations to obtain the true electron density of the target structure system. The electron density is represented using a three-component hybrid grid method compatible with the FP-MTO method, namely, the smoothed electron density on a real-space uniform grid, the true radial electron density within the atomic sphere, and the smoothed radial electron density within the atomic sphere. The electron density using the three-component representation method is shown below. , means as follows:

[0052] ;Formula (1)

[0053] in, This is defined as a smooth electron density on a uniform lattice in real space, used to represent the electron density in the interstitial region; For atoms The true radial electron density inside the sphere; For atoms The radial smoothing electron density within the sphere is used to counteract the uniform lattice smoothing electron density within the corresponding atomic sphere. Contributions within the ball; Indicates spatial location relative atoms The radial distance from the center of the sphere.

[0054] To construct a supervised objective for the differential density prediction model, the true electron density of the target structural system is calculated. Then, a reference electron density is constructed using the same lattice representation. The reference electron density and the actual electron density are represented using a compatible hybrid representation, and then uniformly restored to a real space uniform grid to ensure consistency between differential density construction, training supervision, and inference restoration.

[0055] In some embodiments of this application, the process of constructing the reference electron density based on the atomic density superposition approximation method is as follows: based on the target structure information, the initial radial electron density function corresponding to each element in the target structure is predetermined; the initial radial electron density function is transformed to the reciprocal space, and the contributions of the electron density corresponding to each local center in the reciprocal space are superimposed based on interpolation technology and non-uniform fast Fourier transform to obtain the reference electron density representation of the target structure at the reciprocal space lattice; the reference electron density representation at the reciprocal space lattice is inversely transformed based on interpolation technology and non-uniform fast Fourier transform to construct the reference electron density in real space.

[0056] Specifically, the reference electron density is constructed using the Superposition of Atomic Densities (SAD) approximation method. The process is as follows: First, prepare the corresponding true radial electron density and smoothed radial electron density of free atoms for each element in the target structure. For the implementation using the full-potential three-component electron density representation, the smoothed radial electron density of each element's free atoms must first be transformed to the reciprocal space. Then, combining the structure factor corresponding to the spatial position of each atom in the target structure, the smoothed electron density contribution of all atoms is summed in the reciprocal space, thus obtaining the total smoothed electron density defined on the uniform lattice points of the reciprocal space. Subsequently, based on the total smoothed electron density in the reciprocal space, on the one hand, the smoothed electron density components on the uniform grid in real space are obtained; on the other hand, the radial smoothed electron density term corresponding to each local center is constructed. Finally, combining the difference between the true radial electron density term and the radial smoothed electron density term of the free atoms at each local center, a reference electron density compatible with the full-potential three-component representation is obtained. .

[0057] In obtaining the true electron density Compared with reference electron density Then, the difference between the two is defined as the true difference density. As a supervised objective for model training, the specific formula is as follows:

[0058] ;Formula (2)

[0059] In some specific embodiments, the constructed real difference density is preprocessed as follows: the real difference density is defined as a real space uniform grid smoothed difference density and radial difference components within each atomic sphere; within a preset radius, the radial difference components within each atomic sphere are smoothed to obtain an intra-sphere difference representation; the intra-sphere difference representation within each atomic sphere is mapped onto a unified real space uniform grid and combined with the real space uniform grid smoothed difference density as a global background term to obtain a unified grid difference electron density.

[0060] To balance the preservation of details within the atomic spheres with the stability of subsequent unified grid-point supervision, the true differential density within the spheres undergoes further local preprocessing. Specifically, within a preset radius, the radial differential components within the corresponding spheres are smoothed to obtain a more suitable intra-sphere differential representation for subsequent unified grid-point reconstruction, thereby minimizing discretization errors. Subsequently, the three-component representation of the true differential density is converted into a uniform grid-point representation across the entire unit cell. That is, the smoothed differential density of the real-space uniform grid is retained as a global background term, while the preprocessed radial differential components within each atomic sphere are mapped onto a unified real-space uniform grid and combined with the global background term to obtain a unified grid differential electron density representation for supervised training of the differential density prediction model, denoted as . .

[0061] By preprocessing the constructed real difference density, we can retain the key information of the real electron density change inside the sphere, and avoid the instability caused by the direct entry of high-frequency details near the nucleus into the unified coarse grid representation, thereby improving the consistency of subsequent model training and inference.

[0062] Therefore, the training samples for the differential density prediction model are: atomic configuration information of the target structure, unit cell information, uniform grid definition information, and reference electron density. True differential density supervision target This includes auxiliary information related to the local representation within the sphere. Therefore, the differential density prediction model no longer directly learns the complete electron density during the training phase. Instead, it learns the difference relative to the reference electron density and then combines it with the reference electron density in the subsequent recovery stage to reconstruct the complete electron density representation of the target structure.

[0063] It should be noted that this application uses a three-component electron density representation under the FP-MTO method, but this application is not limited to this density representation. For other electron density representations, as long as a corresponding reference electron density can be constructed for the target structure and a differential monitoring target corresponding to the true electron density can be established, this application is equally applicable. For example, other electron density representations of the FP method (Full-Potential method) and the real-space uniform or non-uniform grid representations used in the PS method (Pseudopotential method) or PAW method (Projector Augmented Wave method) can be used in the differential density monitoring and recovery process of this application, simply by selecting a matching reference density construction method, local projection method, and recovery method based on the characteristics of the corresponding electron density representation.

[0064] Step S12: Input the atom types, atom coordinates, unit cell information and uniform grid definition information of the target structure into the machine learning model for training, and use the real differential density as the supervision target during the training process to construct a differential density prediction model.

[0065] For complex material systems, the total electron density is typically composed of a large-amplitude principal contribution term from atomic nearest neighbors and rearrangement terms reflecting bonding, interface coupling, and defect perturbations. The former has a dominant spatial weight and a large numerical amplitude, while the latter, although smaller in overall amplitude, often has a more direct impact on the system's local electronic structure and subsequent physical properties. If the total electron density is directly used as the prediction target, the model is easily dominated by the principal contribution term during training, thus devoting a large amount of representational power to fitting parts that can already be well described by a reference approximation, which is detrimental to the effective learning of key details such as interface charge transfer, defect-induced charge rearrangement, and changes in the local environment. To address this, this application uses the true difference density as the supervised target for model training. Specifically, by subtracting the reference electron density from the true electron density, the previously dominant large-amplitude background component is pre-separated, allowing the model to focus on learning the electron density changes relative to the reference state. This retains key physical information while reducing the interference of the principal contribution term on the training process, improving the model's ability to represent complex local charge rearrangement features, and thus facilitating the accurate calculation of subsequent effective potentials and transport properties.

[0066] For example, after constructing the aforementioned dataset, an isomorphic graph neural network model based on orbital expansion coefficients, such as an isomorphic graph convolutional neural network, is used as the differential density prediction model, and the constructed dataset is used for supervised training of this model. The selected isomorphic graph convolutional neural network takes as input the atom types, atom coordinates, unit cell information, uniform grid definition information, and auxiliary information related to the local center of the target structure. Based on the atomic diagram representation of the target structure components, it outputs the electron density expansion coefficients on the basis function expansion channels at each local center. The predicted differential electron density is recovered based on the orbital expansion representation and combined with the reference electron density to obtain the total electron density. Since the expansion coefficients are related to different angular momentum channels, the machine learning model preferably adopts a model that satisfies spatial rotation isomorphism to ensure that different angular momentum components have a consistent transformation relationship under coordinate rotation, thus being more suitable for learning the mapping relationship between the atomic local environment and the angular distribution of electron density.

[0067] In some specific embodiments, the true difference density is represented using the local basis function expansion form at the atom centers. For the first... Each local center has a corresponding local basis function. It is expressed as follows:

[0068] ;Formula (3)

[0069] in, For the first The location of a local center; Let be any point in space; It is a spherical harmonic function; These are radial basis functions; Radial channel index; The angular momentum index; It is the quantum number of angular momentum; It is the magnetic quantum number.

[0070] Furthermore, radial basis functions Using a Gaussian basis set, the specific formula is as follows:

[0071] ;Formula (4)

[0072] in, The radial Gaussian function exponent; These are the normalization coefficients; The radial distance to the local center; It is a radial power factor.

[0073] The predicted difference density output by the difference density prediction model Specifically, it is expressed as follows:

[0074] ;Formula (5)

[0075] in, These are the expansion coefficients predicted by the differential density prediction model.

[0076] Furthermore, to accommodate the multi-scale spatial resolution requirements of both regions near and far from the atomic nucleus, the exponential parameters of the Gaussian group are selected in a proportional manner. Specifically, for a given set of radial channels, the radial Gaussian function exponent is expressed as follows:

[0077] ;Formula (6)

[0078] in, and These represent the minimum and maximum Gaussian exponents, respectively. This represents the number of radial basis functions.

[0079] By selecting the Gaussian exponent in an equal ratio manner, the basis functions can form a more balanced coverage across different spatial scales, which is more conducive to simultaneously characterizing the locally rapidly changing and relatively slowly changing electron density distributions.

[0080] During training, the differential density prediction model first outputs the expansion coefficients at the local center of each region. Then, the predicted difference density is reconstructed based on the expansion coefficients and local basis functions. Subsequently, the predicted differential density is compared with the actual differential density supervision target obtained during the dataset construction phase, and the parameters of the differential density prediction model are optimized based on the difference between the two. Thus, the differential density prediction model learns not the complete electron density itself, but the differential portion relative to the reference electron density, thereby mitigating the adverse effects of the near-nuclear principal contribution term on the training process.

[0081] Step S13: Deploy the constructed differential density prediction model to output the predicted differential density of the complex structure under test based on the information of the complex structure under test.

[0082] Step S14: Perform a recovery operation on the output predicted differential density to obtain the total electron density information of the complex structure under test.

[0083] After model training is completed, the differential density prediction model is used to infer the complete electron density of the untrained complex structure under test. The complex structure under test includes, but is not limited to, conventional periodic bulk supercells, heterojunctions, and device structures.

[0084] During model inference, the atomic types, atomic coordinates, unit cell information, and uniform grid definition information of the complex structure under test are first obtained. Then, a reference electron density is constructed based on the complex structure under test. The reference electron density needs to be constructed using the same atomic density superposition method as in the training phase to ensure consistency in the reference density definition between the training and inference phases. Next, the structural information of the complex structure under test is input into the trained differential density prediction model, which then outputs the electron density expansion coefficients for the basis function expansion channels at each local center. The local basis function expansion form, radial basis function form, and parameter selection method corresponding to the expansion coefficients can be consistent with the definitions used in the aforementioned model training process. Furthermore, based on the expansion coefficients output by the model, the predicted differential density of the complex structure under test is reconstructed, and the reconstruction method is consistent with the aforementioned model training process.

[0085] In obtaining the predicted difference density Then, it is compared with the reference electron density. By combining these parameters, the preliminary total electron density prediction result of the complex structure under test can be recovered. The recovery process can be represented as follows:

[0086] ;Formula (7)

[0087] In some embodiments of this application, the process of performing a recovery operation on the output predicted differential density to obtain the total electron density information of the complex structure under test includes: superimposing the predicted differential density of the complex structure under test output by the differential density prediction model onto a reference electron density constructed based on the complex structure under test, so as to recover the total electron density information of the complex structure under test.

[0088] Specifically, for the three-component hybrid lattice electron density representation, after obtaining the predicted differential density, a recovery operation is performed to reconstruct the electron density. The process is as follows: first, the predicted differential density is transformed to reciprocal space and superimposed on the reciprocal smoothed electron density component corresponding to the reference electron density; then, based on the superimposed reciprocal smoothed electron density, smoothed electron density components on the real space uniform grid and radial smoothed electron density terms on the radial grid are constructed simultaneously; finally, these components are combined with the radial true electron density terms corresponding to each local center to form the recovered three-component representation of the total electron density, thereby maintaining the consistency of the three-component representation form while recovering the total electron density information.

[0089] Furthermore, for electron density representation using only a real space uniform grid, the specific process of recovery after obtaining the predicted differential density is as follows: for example, after aligning the grid points using Fourier interpolation, the predicted differential density under the same grid representation is added to the reference electron density grid point by grid point to obtain the recovered total electron density real space uniform grid representation.

[0090] Through the aforementioned reasoning and recovery process, starting from the atomic configuration information of the complex structure under test, the predicted total electron density of the structure can be obtained without re-performing a complete first-principles self-consistent solution. This can further serve applications such as effective potential construction, downstream physical quantity calculation, or transport property analysis. In some embodiments of this application, the method further includes: performing residual correction on the predicted differential density output by the differential density prediction model based on a pre-built residual compensation model. The process includes: constructing a residual compensation label based on the difference between the predicted differential density and the true differential density; inputting the residual compensation label and the atomic configuration information of the target structure into a machine learning model for training to construct a residual compensation model; deploying the constructed residual compensation model to output a residual compensation prediction value based on the information of the complex structure under test, and superimposing it on the predicted differential density output by the differential density model to obtain the differential electron density after residual correction.

[0091] To further improve prediction accuracy, a residual compensation model was designed to compensate for the aforementioned recovery results and further correct the total electron density prediction value, thereby obtaining the final electron density prediction result. That is, the residual compensation process can be used as an additional compensation process after the differential density prediction model inference, in conjunction with the aforementioned differential density prediction model inference and electron density recovery process.

[0092] Specifically, this embodiment does not directly fit the residuals at each grid point point by point. Instead, it first extracts local compensation information defined at each compensation center from the residual distribution between the predicted results of the differential density prediction model and the actual results. Then, it determines the spatial distribution of the compensation charge within the local area through a few preset constraints. The constructed residual compensation distribution is then superimposed on the predicted differential density output by the differential density prediction model to obtain the compensated differential electron density. The local compensation information is used to characterize the dominant part of the local residual distribution that needs to be compensated, rather than being pre-limited to a fixed single parameter form. The most basic center-by-center compensation method is preferred, corresponding to the residual compensation of spherically symmetric distribution. The pre-constructed residual compensation model learns the compensation amount for each local center and remaps it back to the electron density expression to further improve the consistency of the effective potential and transport results derived from the predicted electron density. For material systems with large interstitial regions or where local residuals are not easily fully characterized by real atomic centers, virtual centers can be introduced at necessary positions to improve the distribution effect of residuals when mapping from grid points to local centers. The specific process of residual correction is as follows:

[0093] First, a residual compensation model is constructed. During the training phase of the residual compensation model, it learns the mapping relationship from atomic structure to the local residual compensation amount of the differential density prediction model. Specifically, based on the difference between the predicted differential density output by the differential density prediction model and the actual differential density, a residual distribution is constructed, and a specific weight of the differential density prediction model is set. Below, the model output prediction difference density is The true difference density is The corresponding residual distribution It can be defined as:

[0094] ;Formula (8)

[0095] Residual distribution Defined on a uniform real-space grid consistent with the above, it is used to characterize the local error portion that is not correctly recovered after the differential density prediction model prediction.

[0096] To avoid establishing independent compensation parameters for each grid point, this embodiment does not directly fit the residual distribution grid-by-grid, but instead compresses it into a local compensation quantity defined on several discrete compensation centers. Preferably, each atom center in the target structure is selected as the residual compensation center. That is, for the first atom in the target structure... For each atom, define a corresponding local residual compensation parameter. The residual compensation centers correspond one-to-one with the atomic graph nodes used in the differential density prediction model, thus facilitating the direct reuse of existing atomic configuration information, adjacency relationships, and local geometric features from the differential density prediction model. For material systems with large interstitial regions, empty spheres can be added in the interstitial regions as auxiliary compensation centers when necessary to improve the characterization ability of locally structured residuals in the interstitial regions.

[0097] In obtaining the residual distribution Then, the residual distribution is mapped onto each residual compensation center according to a preset local allocation rule, thereby obtaining the atom-by-atom scalar residual compensation label. In other words, the continuous residual distribution defined on a uniform grid is compressed into a set of discrete scalars defined on the atom centers. ,in Let this be the total number of compensation centers. For each compensation center, first define a corresponding original local weight function. It satisfies the locality requirement; subsequently, for any spatial lattice point The original local weight functions of each compensation center are normalized to obtain the normalized weight functions. The specific formula is as follows:

[0098] ;Formula (9)

[0099] in, Indicates the same grid point The sum of the original weights of all compensation centers; This indicates traversing all compensation centers. , is the index for summation.

[0100] Based on formula (9), the first The atomic scalar residual compensation label corresponding to each compensation center can be represented as:

[0101] ;Formula (10)

[0102] in, Corresponding grid points The body element.

[0103] By constructing an atom-by-atom scalar residual compensation label, the unidirectional or biased residuals originally distributed across a group of grid points within a local region are merged into an equivalent scalar compensation quantity at the corresponding compensation center. This scalar compensation quantity does not correspond to the error of a single grid point, but rather characterizes the dominant net bias of the residual distribution within that local region.

[0104] After constructing the atom-by-atom scalar residual compensation labels, training samples for the residual compensation model are built based on the atomic configuration information of the target structure and the corresponding residual compensation labels, and the residual compensation model is trained. The training samples for the residual compensation model include at least: the element type of each atom in the target structure, the spatial coordinates of each atom, the unit cell parameters, the atom-by-atom scalar residual compensation labels corresponding to each compensation center, the true electron density obtained from first-principles calculations based on the atomic structure, the reference electron density constructed from the atomic structure, the true difference density on the real space uniform grid obtained by calculating the difference between the two, the predicted difference density output by the difference density prediction model, and the equivalent residual charge defined on each atom by subtracting the predicted difference density from the true difference density. The training samples are then input into the machine learning model for training, thus constructing the residual compensation model.

[0105] For example, the residual compensation model can employ the same or similar graph structure modeling and message passing framework as the differential density prediction model to characterize the local atomic environment in the target structure. However, unlike the differential density prediction model, the output of the residual compensation model is no longer used to reconstruct the differential electron density, but rather to characterize the local residual compensation information corresponding to each compensation center. In other words, the differential density prediction model primarily learns the mapping relationship between atomic structure and differential electron density representation, while the residual compensation model primarily learns the mapping relationship between the local atomic environment and local compensation information.

[0106] Considering that local residual compensation information typically corresponds to residual biases over a large spatial range, the residual compensation model preferably employs a deeper network structure than the differential density prediction model to enhance its ability to perceive information over a larger neighborhood and longer-range structural information. Meanwhile, to ensure the stability of deep network training, auxiliary designs suitable for deep graph network training can be introduced as needed, but this application is not limited to any particular implementation.

[0107] During the training of the residual compensation model, the constructed local residual compensation information (atomic-wise scalar residual compensation labels) is used as the supervision target to optimize the residual compensation model, enabling it to learn the mapping relationship between the local atomic environment of the target structure and the corresponding local compensation information. After training, the residual compensation model can directly output the local residual compensation information at each compensation center based on the structure to be predicted during the inference phase, and further construct the residual compensation distribution.

[0108] Based on the constructed residual compensation model, during the inference phase, for the complex structure to be tested, the predicted differential density output by the differential density prediction model is first obtained. Subsequently, the atomic configuration information of the same complex structure under test is input into the trained residual compensation model to obtain the atomic-wise scalar residual compensation prediction values ​​at each compensation center. The predicted value represents the dominant net bias of the residual distribution in each local region, rather than the point-to-point repair amount on a single grid point. That is, the prediction process is aimed at the overall correction of the local structured residuals, without the need to perform point-by-point regression on the grid residuals of the entire space.

[0109] After obtaining the predicted values ​​of the atom-by-atom scalar residual compensation, they are remapped back to real space to construct the real-space residual compensation distribution. For each compensation center, predefine a local expansion function, a local smoothing distribution function, or another local back-addition function. And preferably satisfy the normalization condition:

[0110] ;Formula (11)

[0111] The specific formula for the real-space residual compensation distribution is as follows:

[0112] ;Formula (12)

[0113] Using the above method, the atom-by-atom scalar correction quantities defined at the atom centers can be re-expanded into a continuous correction distribution defined on a uniform grid in real space. The correction distribution is preferably a locally smooth distribution, enabling it to compensate for local net biases in the differential density prediction model output without introducing additional large-scale non-physical oscillations.

[0114] It should be noted that for local back-increment functions... The specific form is not strictly limited, as long as it can stably map the atom-by-atom scalar residual correction back to the local real space region. Preferably, the local back-addition function adopts a spherically symmetric radial distribution form centered on the compensation center, and can be expressed as a truncated Gaussian function and The product of terms is expressed in the following formula:

[0115] ;Formula (13)

[0116] in, Corresponding spatial location To the The distance between the compensation centers For kernel width, The power exponent, For the cutoff radius, This is a truncation function. This is the normalization coefficient.

[0117] After obtaining the real space residual correction distribution Then, it is superimposed on the predicted differential density output by the differential density prediction model to obtain the differential electron density after residual correction, as shown in the following formula:

[0118] ;Formula (14)

[0119] Furthermore, following the aforementioned method for recovering the total electron density, the differential electron density after residual correction is added to the reference electron density to obtain the final predicted total electron density, as shown in the following formula:

[0120] ;Formula (15)

[0121] Thus, the total electron density distribution after residual correction can be obtained, and can be further used to calculate the effective potential, Hamiltonian, band structure, transport properties or other downstream physical quantities.

[0122] By introducing a residual compensation step after the differential density prediction model, residual errors with structured characteristics within a local area can be further compensated. Furthermore, by compensating for these locally dominant residual components, the residual local net bias in the differential density prediction model output can be further reduced, thereby decreasing the potential function shift caused by this local bias and improving the consistency of the compensated electron density in potential construction and downstream physical quantity calculations. During the inference stage, without needing to re-solve for the first-principles self-consistent electron density, the differential density prediction model first recovers the total electron density information based on the complex structure under test, and then further combines the residual compensation results to obtain the compensated electron density expression, thus providing input for subsequent effective potential construction, Hamiltonian establishment, and quantum transport analysis.

[0123] In some embodiments of this application, the method further includes: constructing a conservation term loss function based on charge conservation constraint rules, constructing a total loss function with a grid-by-grid loss function based on mean square error, and performing backpropagation based on the constructed total loss function, iteratively training until convergence to obtain a differential density prediction model.

[0124] For materials with complex structures, obtaining numerically approximate electron density results at the lattice level is insufficient to guarantee consistency between the effective potential and transport results calculated from these electron densities. This is because existing methods mostly use lattice-level errors as the primary monitoring signal. Such constraints are relatively inadequate for limiting low-frequency charge deviations, local integrated charge errors, and local charge conservation errors. In bulk or highly symmetric structures, these errors are sometimes difficult to detect in conventional indicators; however, in heterogeneous interfaces and device structures, these errors are further amplified and significantly affect barrier distribution and transmission characteristics. To address this, this application, based on the differential density prediction model training method, introduces a charge conservation constraint term during training to further improve the physical consistency of the predicted differential density. This constraint limits the overall charge deviation and prevents the model from optimizing only local point-by-point errors while neglecting global physical consistency.

[0125] If charge conservation constraints are directly constructed based on the predicted electron density on a discrete grid for training, the conservation terms are easily affected by sampling fluctuations and become unstable when random grid point selection is used during training, which is detrimental to model training. Therefore, a charge conservation constraint method decoupled from the discrete grid is designed. Unlike the method of constructing conservation constraints by numerically integrating the predicted electron density on the discrete grid, this method utilizes the output form of the differential density prediction model based on the local central orbit expansion, and directly uses the model output... The coefficients are used to calculate the total number of electrons in the entire space without first restoring the predicted differential density to a complete discrete grid before summing. In other words, the differential density prediction model outputs the coefficients corresponding to each expanded channel at each local center; the total number of electrons in the entire space is calculated from the coefficients at each local center. The corresponding coefficients of the channels are obtained by weighted summation according to predetermined weights, and Since the channel correspondence coefficients do not affect the total number of electrons in the entire space, they are not included in the total charge calculation. The specific process is as follows: first, the radial form of each local basis function is pre-determined... The integral weight corresponding to the channel, and then applied to all local centers. The coefficients are weighted and accumulated to obtain the total predicted electron count, and a charge conservation constraint term is constructed based on this. For the differential electron density prediction task, since the supervisory objective is the difference between the target electron density and the reference electron density, its conservation objective value is 0. Therefore, the deviation between the predicted total charge and 0 can be used as the conservation term, which, together with the main supervisory term, forms the overall training objective. This leads to the construction of the conservation term loss function. By employing a conservation term loss function, the charge conservation constraint no longer depends on the step size, number of grid points, sampling method, and block recovery order of the discrete grid. It can maintain a consistent definition under conditions of random grid sampling, block inference, and large-scale low-storage execution. Furthermore, it directly constrains the total charge in the entire space using the output structure based on the orbital unfolding model, thereby improving training stability and the physical consistency of prediction results. It also further suppresses the local integral charge bias and slowly varying charge error caused by insufficient grid-by-grid error constraints.

[0126] Meanwhile, mean square error (MSE) is used as the grid-by-grid loss function. The total loss function is then constructed by combining it with the conservation term loss function, as shown in the following formula:

[0127] ;Formula (16)

[0128] in, This is the loss weighting coefficient.

[0129] In some embodiments of this application, a processing mechanism for the atomic diagram construction stage and the density reconstruction stage is designed based on periodic boundary conditions to ensure consistency between neighborhood relationships, displacement vector definitions, and density re-addition processes.

[0130] To ensure this application is applicable to periodic structures, supercell structures, and large-scale device structures, the handling of periodic boundary conditions is further defined. Specifically, the handling of periodic boundary conditions is divided into an atomic diagram construction stage and a density reconstruction stage, with different periodic processing methods employed based on their respective scopes. In the atomic diagram construction stage, the minimum image principle is used to handle the relative displacements between atoms; in the density reconstruction stage, explicit periodic extension is used to handle the periodic image contribution. By separating the two stages, the same periodic processing method is avoided from being used indiscriminately for both diagram construction and density reconstruction, thus ensuring the consistency of the definition of geometric input and electron density recovery process in periodic systems. The specific processing procedure is as follows:

[0131] During the atomic diagram construction stage, for any pair of atoms, their relative displacement in Cartesian coordinates is first calculated. Then, the cell matrix is ​​used to reflect this relative displacement back to the shortest displacement representation corresponding to the basic cell. Based on this shortest displacement, it is determined whether a preset adjacency truncation condition is met. If the condition is met, an edge is established between the corresponding pair of atoms, and the shortest displacement is input into the model as part of the edge's geometric features. Through this processing method, the adjacency relationship between nearest-neighbor atoms across periods can be correctly established without explicitly enumerating a large number of periodically replicated atoms, and the displacement vector is defined consistently under periodic replication.

[0132] In the density reconstruction stage, the electron density of any target lattice point in a periodic system needs to consider not only the contribution of the basic intracellular atoms but also the contribution of periodic image atoms that overlap with the effective influence range of that lattice point. Therefore, instead of using only the minimum image shift during density reconstruction, the atoms in the original unit cell are explicitly periodically replicated according to a preset periodic extension range, generating an extended atom set that participates in the reconstruction of that lattice point or lattice set. Subsequently, based on the expansion coefficients and local basis functions of the extended atom set, the predicted differential density at the target lattice point is cumulatively reconstructed. This approach avoids introducing incorrect truncation into the periodic summation process by relying solely on the minimum image convention.

[0133] By avoiding the exponential expansion of the number of nodes and edges due to explicit expansion of all periodic images during the atomic graph construction stage, and maintaining the correctness of the electron density definition under the periodic system during the density reconstruction stage, a processing mechanism for the atomic graph construction stage and the density reconstruction stage is designed based on periodic boundary conditions. This balances computational efficiency and physical consistency, ensuring that the model has a consistent geometric processing method when performing cross-scale training and inference between periodic structures, supercell structures and large-scale device structures.

[0134] In some embodiments of this application, optimizations are performed during the training and inference phases based on block density reconstruction mechanism, real space truncation mechanism, and atomic graph reuse mechanism.

[0135] As the system scale increases, several implementation steps in electron density prediction bring significant computational and storage pressure. For example, recovering the electron density from local expansion parameters to a uniform grid often requires handling tensors with very large intermediate scales. Neighborhood search, local subgraph construction, and density reconstruction in periodic systems and large-scale structures, if lacking targeted optimization, can easily lead to excessive memory usage, excessive redundant computation, and decreased inference efficiency. To address this, based on the master model training and inference methods, an optimization mechanism is designed to further apply this application to large-scale structures, especially device structures containing a large number of atoms and high-density real-space lattice points. This mechanism retains only the set of local centers related to the current target lattice point, completes electron density recovery block by block, and reuses the adjacency relationships or local subgraph indices of atomic coordinate-invariant structures. This significantly reduces redundant graph construction and invalid computation, lowers peak memory usage, and improves inference efficiency.

[0136] For large-scale structures, directly performing electron density reconstruction on all atoms and all lattice points at once can easily generate excessively large tensor data in the intermediate process, leading to excessively high peak GPU memory or memory usage, and even making training or inference impossible. Furthermore, during training, directly incorporating the large-scale intermediate tensors generated in the density reconstruction stage into the automatic differentiation computation graph will further increase the GPU memory pressure during backpropagation. On the other hand, during the inference stage, repeatedly performing complete graph construction, message passing, and density reconstruction on all atoms will introduce a large amount of computation unrelated to the current local region and redundant graph construction overhead, resulting in low overall execution efficiency. Based on this, a block-based density reconstruction mechanism, a real-space truncation mechanism, and an atomic graph reuse mechanism are designed to jointly address the execution methods for large-scale structures. The details are as follows:

[0137] To reduce peak GPU or memory usage during the density reconstruction stage, instead of constructing a global intermediate tensor for all atoms and all target lattice points at once, a block-based accumulation method is used to reconstruct the electron density. Specifically, the set of atoms participating in the current reconstruction process is divided into multiple atomic sub-blocks. Then, the contribution of each atomic sub-block to the electron density of the current lattice point set is calculated separately and accumulated sequentially along the lattice point dimension, ultimately obtaining the predicted electron density for that batch of lattice points. Since electron density reconstruction is essentially a linear superposition of the contributions of each atom, block accumulation does not change the physical definition of the final result, but it can significantly reduce the size of the intermediate tensor required for a single calculation, thereby controlling peak GPU memory usage.

[0138] Furthermore, during the training phase, to reduce memory pressure during backpropagation, large-scale intermediate tensors generated during density reconstruction are not directly stored in the automatic differentiation computation graph. Instead, they are processed using an on-demand recalculation method. Specifically, for intermediate quantities that can be reconstructed from input data, local geometric relationships, and model output coefficients, only the necessary information for reconstruction is retained during the forward propagation phase, without caching the corresponding large tensors. During the backpropagation phase, the relevant intermediate quantities are recalculated using the same block-based method as in the forward propagation to complete the gradient solution. This approach avoids a significant increase in backpropagation memory usage due to large tensors entering the computation graph, thereby improving the large-scale executability of the training phase.

[0139] Meanwhile, to reduce the overall computational load during the inference phase, instead of involving all atoms in the computation of each grid point batch, a local atomic subgraph is constructed for the current grid point batch, retaining only atoms with actual contributions and complete graph information for the current subproblem. Specifically, the set of anchored atoms corresponding to the current grid point batch is first determined based on the spatial proximity relationship between grid points and atoms; then, starting from the anchored atom set, the atomic graph is expanded within a limited range, combining the spatial range of the local basis functions and the neighborhood depth required for message passing in the differential density prediction model, thus obtaining the local atomic subgraph participating in the computation of the current grid point batch, i.e., the atomic subgraph with k-hop truncation. This avoids a large number of distant, unrelated atoms participating in the model computation and density reconstruction of the current grid point batch, reducing the overall computational load while ensuring the integrity of the local graph information. To further improve the effect of local truncation, the batching method of the target grid point set is optimized. Specifically, instead of using a simple linear sequential partitioning method, the grid points are preferentially divided into several spatially continuous sub-blocks according to their positions in real space. Furthermore, sub-blocks can be in the form of cubic blocks or near-cubic blocks to ensure that grid points within the same batch are distributed as centrally as possible. Using this method, the anchored atom sets and their extended neighborhoods corresponding to each grid point within the same batch have a higher degree of overlap, thereby reducing the number of non-repeating atoms that need to be processed in a single batch, further reducing the total computational cost after local truncation.

[0140] Furthermore, to reduce the overhead of repetitive graph construction during large-scale inference, the global adjacency relationships of the target structure can be pre-calculated during the inference initialization phase and reused across multiple grid batches. Since the atomic coordinates of the same target structure typically remain unchanged during inference, there is no need to repeatedly perform a full-system neighbor search in each grid batch. Based on global adjacency relationships, the local atomic subgraph can be directly extracted, and geometric information such as edge connectivity, edge displacement vectors, and node indices can be generated. If necessary, geometric information can be further pre-cached for direct use during subsequent forward propagation. This approach reduces repetitive inter-atomic distance calculations and graph construction operations, further improving the efficiency of large-scale inference.

[0141] By employing a combined execution approach of "block density reconstruction - local computation and grid-based batch optimization based on real space truncation - atomic graph reuse," the main bottlenecks in training and inference under large-scale structures are addressed. Block density reconstruction primarily controls peak storage overhead during training and inference, and further suppresses training memory growth through on-demand recalculation during the backpropagation phase. Local computation and grid-based batch optimization based on real space truncation primarily reduce irrelevant computations. Atomic graph reuse primarily reduces the additional overhead caused by repeated graph construction, thereby achieving efficient execution for large-scale structures without altering the physical definition of electron density.

[0142] To address how to improve the design of the supervision target itself, enhance the local charge conservation properties in electron density prediction, suppress low-frequency charge errors, and achieve a low-storage, scalable electron density reconstruction process on large-scale structures, this application provides a machine learning-based electron density information acquisition method. This method uses the real differential density as the supervision target for training the differential density prediction model. During training, a conservation term loss function is designed, along with a combined execution method of "block density reconstruction - local computation based on real space truncation and grid-based batch optimization - atomic graph reuse." This improves the accuracy, physical consistency, and large-scale computational scalability of electron density representation in complex structures, thereby obtaining an electron density representation that can serve downstream effective potential construction, Hamiltonian establishment, and quantum transport analysis.

[0143] To further verify the technical effectiveness of the machine learning-based electron density information acquisition method proposed in this application, simulations were performed on bulk system architecture, metal-semiconductor heterostructure and device structure, bulk structure with defects, and large-scale device structure, as detailed below:

[0144] like Figures 3-4 As shown, the block architecture is verified by selecting multiple bulk blocks. The Te random alloy supercell structure was used as a test object to verify the electron density prediction capability of this application in disordered bulk semiconductor systems, as well as the consistency of the electronic structure results further derived from the predicted electron density.

[0145] Specifically, for the bulk to be tested For Te supercell structures, the reference electron density is first obtained using first-principles methods. Then, the structure under test is input into a trained differential density prediction model to obtain the predicted differential electron density for the corresponding structure. The predicted differential electron density is then combined with the reference electron density to recover the total electron density. Based on this, the band gap and band structure corresponding to the DFT electron density and the predicted total electron density are further calculated and compared with the first-principles results.

[0146] Select a size as The total number of atoms is 216. Te supercell structures, where the training set only includes supercell structures with smaller cross-sectional dimensions. Figure 3 Displaying a random object with a size of 3×3×3 The true difference density (Delta Rho True) of the Te supercell structure at the fractional coordinate φ = 0 section. Predicted difference density ( ) With the predicted residual ( ) The appearance of the system. The mean square error of the predicted electron density of this system is... The comparison results show that the predicted differential electron density can reproduce the main spatial distribution characteristics in the real differential density well, including the density change trends in the electron density rearrangement region near the atom and the bonding region.

[0147] Furthermore, for multiple different components random The Te test structure was used to calculate its band gap and band structure based on the predicted recovered electron density, and the results were compared with first-principles results. Figure 4 The paper presents comparisons of band diagrams for each specific structure and band gaps at different concentrations. For the tested structures, the band gap error is approximately -0.008 eV to -0.006 eV. The comparison results show that, using the electron density recovered in this application, the calculated band gap varies with composition in accordance with first-principles calculations. For the critical bands near the Fermi level, the dispersion relation also maintains good consistency with first-principles results, accurately reflecting the relative positions of the conduction band bottom, valence band top, and nearby bands. Electron density calculations were also performed without residual compensation, and it was found that residual compensation has a negligible impact on the accuracy of band gap and bandgap predictions for bulk systems.

[0148] Therefore, this application can not only accurately recover the real space electron density distribution in the bulk HgCdTe random alloy system, but also better maintain the downstream electronic structure characteristics such as band gap and energy band determined by the electron density. This shows that the method has good applicability in disordered bulk semiconductor systems and can provide reliable electron density input for subsequent potential function construction, effective Hamiltonian generation and transport property calculation.

[0149] like Figure 5 As shown, several Au–HgCdTe–Au device structures with different concentrations were selected as test objects, with the channel length being much longer than that of the structures in the training set, to verify the electron density prediction capability of this application in metal-semiconductor-metal heterostructures, and the consistency between the potential function and transport property results obtained based on the predicted electron density. The device structure, along the transport direction, sequentially includes a left Au electrode region, a middle... The Te channel region and the right Au electrode region, with the transport direction being... direction.

[0150] Specifically, the true electron density of the device under test (DUT) structure is first obtained using first-principles methods. Then, the atomic configuration of the device is input into a trained differential density prediction model to obtain the predicted differential density of the corresponding structure. This predicted differential density is then combined with the reference electron density to recover the complete electron density. Based on this, the effective potential function and the transmission spectrum along the transport direction are calculated according to a unified post-processing workflow and compared with the first-principles results.

[0151] To further verify the effect of conservation constraints and residual compensation on improving the consistency of device-level physical quantities, the following three cases were compared in this verification method: the first case was to use only the differential density prediction model for electron density recovery; the second case was to introduce conservation constraints in the training of the differential density prediction model; and the third case was to further correct the prediction results by combining the residual compensation model with the introduction of conservation constraints. Since the HgCdTe interstitial region is relatively large, virtual atoms for residual redistribution were set in the interstitial region to improve the problem of excessive distribution of residual charge in the interstitial region during the "lattice-atom" mapping process.

[0152] In the potential function verification, the three-dimensional effective potential function is integrated or averaged on a transverse section perpendicular to the transport direction to obtain the one-dimensional potential function distribution along the transport direction. After subtracting the background potential function corresponding to each structure, its spatial variation trend in the left electrode region, interface region, channel region, and right electrode region is compared. Figure 5 It can be seen that when only the differential density prediction model is used without introducing charge conservation constraints (green dashed line), although the recovered electron density has good results in terms of grid-by-grid error index, there may still be a significant shift in the device-scale potential function. After introducing conservation constraints (blue dashed line), the overall shape of the device potential function along the transport direction is significantly closer to the first-principles result, and the barrier position near the interface, the trend of barrier height change, and the potential energy fluctuations in the channel region are all better preserved. On this basis, after further introducing residual compensation (red dashed line), the deviation between the obtained one-dimensional potential function and the first-principles result is further reduced, and the maximum error of different concentration structures is reduced from 0.205ev~0.410ev to 0.033ev~0.110ev. This result shows that the conservation constraints and residual compensation mechanism in this application can effectively suppress the device-level potential function shift caused by local charge imbalance and residual error propagation in the gap region.

[0153] Furthermore, under the same post-processing conditions, the corresponding device electronic structure input is constructed based on the recovered electron density, and the transmission spectrum along the transport direction is calculated under zero bias or given bias conditions. Figure 6This indicates that the transmission spectra obtained by restoring the electron density using this application can reproduce the main features of the first-principles results well, including the transmission on-off position near the Fermi level, the distribution of the main transmission plateaus or suppression regions, and the overall trend of transmission intensity variation among different component devices. For multiple Au–HgCdTe–Au device structures with different compositions or atomic configurations, the transmission spectra obtained based on this application can maintain the relative magnitude regularity consistent with the first-principles results, indicating that this method can not only restore the local real-space electron density distribution, but also maintain the device transport response characteristics further determined by the electron density.

[0154] Therefore, the electron density prediction method designed in this application, which uses differential electron density as the prediction target and combines conservation constraints and residual compensation, can not only accurately recover the electron density in Au–HgCdTe–Au heterostructures, but also maintain the device-level potential function distribution and transport properties further determined by the electron density. This shows that the method can provide reliable input for device-scale effective potential construction, Hamiltonian generation, and quantum transport calculation, and has good device-level application value.

[0155] like Figures 6-7 As shown, a bulk HgCdTe supercell structure with a single Hg vacancy defect was selected as the test object to verify the applicability of the application in a defective semiconductor system and to examine whether the electronic structure results derived from the predicted electron density can still maintain good consistency with the first-principles results.

[0156] Specifically, a bulk HgCdTe supercell structure containing a single Hg vacancy defect was constructed, and its true electron density was obtained through complete relaxation using first-principles methods. Subsequently, the structure under test was input into a trained differential density prediction model to obtain the corresponding predicted differential density. This predicted differential density was then combined with a reference electron density to recover the complete electron density. Based on this, the band structure of the corresponding structure was further calculated and compared with the first-principles results.

[0157] For vacancy defect structures, an empty atom node is introduced at the ideal lattice position corresponding to the vacancy. This empty atom node participates in the interaction of local environment information during message passing in the graph neural network, but does not directly contribute to the electron density during density reconstruction. This approach allows for a better characterization of local environment changes near vacancy defects without disrupting the expression of local topological relationships.

[0158] Select With 3 Supercell-structured single Hg vacancy defect system and As a verification object, the true difference density, predicted difference density, predicted residual, and corresponding atomic structure are compared on a cross-section containing the defect location. Figure 7 and Figure 8 As can be seen, the differential electron density predicted by the model can reflect the main spatial distribution characteristics of the local electron density rearrangement near the vacancy, and the density perturbation morphology around the defect is generally consistent with the first-principles results; the band structure further obtained from the predicted electron density can also reproduce the characteristics of the first-principles results, such as the band gap and the band structure near the Fermi surface.

[0159] like Figure 8 As shown, to verify the computational scalability of this application on large-scale structures, the time overhead and memory usage during the model inference stage are statistically analyzed as a function of system size. Furthermore, an end-to-end inference demonstration is performed on a very large heterogeneous device structure. This verification primarily examines the computability of this application under large-scale system conditions, its resource overhead control capabilities, and its practical application potential for even larger-scale structures.

[0160] Specifically, in the time and memory scaling tests, a bulk HgCdTe supercell structure with the same lateral cross-section and gradually extending along only one lattice direction was selected as the test object. Based on bulk HgCdTe supercell, in Extending this direction, a set of test systems with different lengths and numbers of atoms were constructed. For each test structure, the computation time of the differential electron density inference stage was statistically analyzed, and the corresponding peak GPU memory usage was recorded.

[0161] Depend on Figure 9 The statistical results show that when the system size is sufficiently large, the differential electron density inference time of this application increases approximately power-lawfully with the number of atoms, and the fitting exponent is close to 1, indicating that the inference process exhibits near-linear time scaling characteristics within a large system range. Unlike the time overhead, the peak memory usage during the inference stage varies little across different atom counts, remaining at an approximately constant level. This suggests that the strategies employed in this application, such as block density reconstruction, local computation based on real-space truncation and grid-based batch processing, and atom graph reuse, can effectively limit the peak resource usage during the inference stage, preventing it from increasing linearly with system length and the number of atoms.

[0162] Building upon this, to further verify the practical computability of this application in ultra-large heterogeneous device structures, an ultra-large device structure containing an Au electrode region and a HgCdTe channel region was selected for inference calculations. Specifically, this device structure contains 52,400 HgCdTe atoms and 11,700 Au atoms, for a total of 64,100 atoms. The inference process for this structure took 9 hours and 13 minutes on a 3090Ti, while the process of reducing the total electron density took 1417.84 seconds on an Intel® Xeon® Gold 6148 @ 2.40GHz CPU cores.

[0163] Verification results show that even for ultra-large heterogeneous device structures containing tens of thousands of atoms, this application can still complete the differential electron density inference and subsequent density recalculation process with acceptable resource overhead. This indicates that the method is not only applicable to medium-scale bulk or device structures, but also has the ability to be further extended to larger-scale practical device structures. Therefore, this application effectively alleviates the time and memory pressure caused by the combined growth of "number of atoms × number of lattice points" in large systems through optimization techniques such as block density reconstruction, local computation, and atomic map reuse. This enables machine learning-based electron density prediction to be practically implemented in device-scale and even larger-scale structures.

[0164] The machine learning-based electron density information acquisition method provided in this application combines reference electron density construction, differential density prediction, and local residual compensation. This helps to improve low-frequency charge errors and local charge conservation biases, and enhances the consistency of electrostatic potential and quantum transport results in heterostructures, interface structures, defect structures, and device structures. At the same time, through low-storage and scalable execution mechanisms such as periodic consistency processing, conservation constraints, block accumulation, real space truncation, batch processing organization, and graph reuse, the method's application capability in large-scale structures is improved.

[0165] Figure 9 This is a schematic block diagram of an electron density information acquisition system based on machine learning provided in an embodiment of this application. Figure 9 As shown, the machine learning-based electron density information acquisition system 900 includes:

[0166] The real differential density construction module 901 is used to obtain the real electron density calculated based on the target structure and the constructed reference electron density, and to construct the real differential density based on the real electron density and the reference electron density.

[0167] The differential density prediction model construction module 902 is used to input the atomic types, atomic coordinates, unit cell information and uniform grid definition information of the target structure into the machine learning model for training, and to use the real differential density as the supervision target during the training process to construct the differential density prediction model.

[0168] The model deployment module 903 is used to deploy the constructed differential density prediction model and output the predicted differential density of the complex structure to be tested based on the information of the complex structure to be tested.

[0169] The recovery module 904 is used to perform a recovery operation on the output predicted differential density to obtain the total electron density information of the complex structure under test.

[0170] It should be understood that the specific process of each module performing the above-mentioned steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.

[0171] It should also be understood that the module division in the embodiments of this application is illustrative and only represents a logical functional division; in actual implementation, there may be other division methods. Furthermore, the functional modules in the various embodiments of this application can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0172] Figure 10 This is a schematic block diagram of the electronic terminal provided in an embodiment of this application. Figure 10 As shown, the electronic terminal 1000 includes at least one processor 1001, a memory 1002, at least one network interface 1003, and a user interface 1005. The various components in the electronic terminal 1000 are coupled together via a bus system 1004. It is understood that the bus system 1004 is used to implement communication between these components. In addition to a data bus, the bus system 1004 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 10 The general will label all buses as bus systems.

[0173] The user interface 1005 may include a monitor, keyboard, mouse, trackball, clicker, button, touchpad, or touch screen.

[0174] It is understood that memory 1002 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM) or programmable read-only memory (PROM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM) and synchronous static random access memory (SSRAM). The memories described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable categories of memory.

[0175] In this embodiment of the invention, the memory 1002 is used to store various types of data to support the operation of the electronic terminal 1000. Examples of this data include: any executable program for operation on the electronic terminal 1000, such as the operating system 10021 and application programs 10022; the operating system 10021 contains various system programs, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. The application program 10022 may contain various applications, such as a media player, browser, etc., for implementing various application services. The methods provided in this embodiment of the invention can be included in the application program 10022.

[0176] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by the processor 1001. The processor 1001 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 1001 or by instructions in the form of software. The processor 1001 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 1001 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor 1001 may be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of the present invention can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in a memory. The processor reads the information in the memory and combines it with its hardware to complete the steps of the aforementioned method.

[0177] In an exemplary embodiment, the electronic terminal 1000 may be used by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), or complex programmable logic devices (CPLDs) to execute the aforementioned method.

[0178] According to the method provided in the embodiments of this application, this application also provides a computer program product, which includes: computer program code, which, when run on a computer, causes the computer to execute... Figures 1 to 8 The method of any of the embodiments shown.

[0179] According to the method provided in the embodiments of this application, this application also provides a computer-readable storage medium storing program code, which, when executed on a computer, causes the computer to perform... Figures 1 to 8 The method of any of the embodiments shown.

[0180] As used in this specification, the terms "component," "module," "system," etc., are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process and / or an execution thread, and components may be located on a single computer and / or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0181] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0182] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0183] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0184] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0185] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0186] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. A computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0187] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0188] In summary, addressing the technical challenges of existing technologies in accurately and efficiently acquiring the electron density of materials with complex structures, and in stably supporting downstream computations such as quantum transport in heterostructures, interface structures, and device structures, this application provides a machine learning-based method, system, medium, terminal, and program product for acquiring electron density information. First, a true differential density is constructed based on the true electron density and a reference electron density. Then, the atom types, atomic coordinates, unit cell information, and uniform grid definition information of the target structure are input into a machine learning model for training. During training, the constructed true differential density serves as the supervision target for model training, thereby training a differential density prediction model. The trained differential density prediction model is then deployed to output the predicted differential density of the complex structure under test based on the information of the complex structure. Finally, a recovery operation is performed on the output predicted differential density to obtain the total electron density information of the complex structure under test. This invention enables high-precision and high-efficiency acquisition of electron density information for complex structures, stably supporting downstream calculations such as photoelectric properties and quantum transport of heterostructures, interface structures, and device structures. Furthermore, by constructing a reference electron density and designing a differential electron density supervision target, the interference of the density principal contribution term on the learning process is reduced, improving the model's ability to represent complex local perturbations. Simultaneously, through a conservation constraint loss function and residual compensation mechanism, low-frequency charge bias and local charge conservation errors can be suppressed, improving the consistency between the potential function and transport results determined by the predicted electron density. In addition, through engineering optimizations such as block reconstruction, local truncation, and graph reuse, it can be more stably extended to large-scale heterostructures and device structures, possessing strong practical application value. It can directly recover electron density expressions usable for downstream analysis from atomic configurations without requiring a complete first-principles self-consistent solution, thus providing a new technical path for high-throughput evaluation of complex material and device structures. Therefore, this application effectively overcomes the various shortcomings of existing technologies and has high industrial applicability.

[0189] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A method for acquiring electron density information based on machine learning, characterized in that, include: Obtain the true electron density calculated based on the target structure and the constructed reference electron density, and construct the true differential density based on the true electron density and the reference electron density; The atomic types, atomic coordinates, unit cell information, and uniform grid definition information of the target structure are input into the machine learning model for training. During the training process, the actual difference density is used as the supervision target to construct a difference density prediction model. The constructed differential density prediction model is deployed to output the predicted differential density of the complex structure under test based on the information of the complex structure under test. A recovery operation is performed on the output predicted differential density to obtain the total electron density information of the complex structure under test.

2. The method for obtaining electron density information based on machine learning according to claim 1, characterized in that, The process of constructing the reference electron density based on the atomic density superposition approximation method is as follows: Based on the target structure information, the initial radial electron density function corresponding to each element in the target structure is determined in advance; The initial radial electron density function is transformed to the reciprocal space, and the contributions of electron density corresponding to each local center in the reciprocal space are superimposed based on interpolation techniques and non-uniform fast Fourier transform to obtain the reference electron density representation of the target structure at the reciprocal space lattice. The reference electron density representation of the reciprocal space lattice is inversely transformed using interpolation techniques and non-uniform fast Fourier transform to construct the reference electron density in real space.

3. The method for obtaining electron density information based on machine learning according to claim 1, characterized in that, The process of performing a recovery operation on the output predicted differential density to obtain the total electron density information of the complex structure under test includes: The predicted differential density of the complex structure under test, output by the differential density prediction model, is superimposed onto the reference electron density constructed based on the complex structure under test to recover the total electron density information of the complex structure under test.

4. The method for obtaining electron density information based on machine learning according to claim 1, characterized in that, Also includes: The process of performing residual correction on the predicted differential density output by the differential density prediction model based on a pre-built residual compensation model includes: Based on the difference between the predicted difference density and the actual difference density, residual compensation labels are constructed. The residual compensation labels and the atomic configuration information of the target structure are input into the machine learning model for training to construct the residual compensation model. The constructed residual compensation model is deployed to output residual compensation prediction values ​​based on the information of the complex structure to be tested, and superimposed on the predicted differential density output by the differential density model to obtain the differential electron density after residual correction.

5. The method for obtaining electron density information based on machine learning according to claim 1, characterized in that, Also includes: Based on the charge conservation constraint rule, a conservation term loss function is constructed, which is then combined with a grid-by-grid loss function based on mean square error to construct a total loss function. Backpropagation is then performed based on the constructed total loss function, and the training is iterated until convergence is achieved to obtain the differential density prediction model.

6. The method for obtaining electron density information based on machine learning according to claim 1, characterized in that, The training and inference phases are optimized based on the block density reconstruction mechanism, real space truncation mechanism, and atomic graph reuse mechanism.

7. A machine learning-based electron density information acquisition system, characterized in that, include: The real differential density construction module is used to obtain the real electron density calculated based on the target structure and the constructed reference electron density, and to construct the real differential density based on the real electron density and the reference electron density. The differential density prediction model construction module is used to input the atom types, atom coordinates, unit cell information and uniform grid definition information of the target structure into the machine learning model for training, and to use the real differential density as the supervision target during the training process to construct the differential density prediction model. The model deployment module is used to deploy the constructed differential density prediction model and output the predicted differential density of the complex structure to be tested based on the information of the complex structure to be tested. The recovery module is used to perform a recovery operation on the output predicted differential density to obtain the total electron density information of the complex structure under test.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.

9. A computer program product, characterized in that, The computer program product includes computer program code that, when run on a computer, causes the computer to implement the method as described in any one of claims 1 to 7.

10. An electronic terminal, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1 to 7.