원시데이터 수집 시스템
선정목록으로

Image super-resolution inspired electron density prediction

간접 관련 화학·수지 · (21) 에폭시수지 (6) PEM(고분자전해질막)(7) MEA(막전극접합체)

기본 정보

저자
  1. Chenghan Li — Division of Chemistry and Chemical Engineering, California Institute of Technology, Pasadena, 91125, CA, USA
  2. Or Sharir — Division of Engineering and Applied Sciences, California Institute of Technology, Pasadena, 91125, CA, USA
  3. Shunyue Yuan — Division of Engineering and Applied Sciences, California Institute of Technology, Pasadena, 91125, CA, USA
  4. Garnet Kin‐Lic Chan — Division of Chemistry and Chemical Engineering, California Institute of Technology, Pasadena, 91125, CA, USA. gkc1000@gmail.com
DOI
10.1038/s41467-025-60095-8
저널
Nature Communications
발행년도
2025
발행기관
Nature Portfolio
피인용수
4
라이선스
cc-by-nc-nd
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1038/s41467-025-60095-8
토픽
Electron and X-Ray Spectroscopy Techniques
OpenAlex ID
W4410631988

평가 내용

관련도
간접 관련
사업분야
화학·수지 · (21) 에폭시수지
부 분야
(6) PEM(고분자전해질막), (7) MEA(막전극접합체)
R&D 측면
분석·모델링
확신도
0.70
근거 용어
electron density prediction, machine learning quantum chemistry, density functional theory (DFT), molecular electronic structure, electronic properties
판단 근거
본 논문은 머신러닝을 이용해 분자의 전자 밀도와 전자 구조를 예측하는 방법론을 다루고 있습니다. 이는 코오롱인더스트리의 직접적인 제품 연구는 아니나, 고분자(에폭시, PEM 등)의 화학적 성질 및 반응성을 시뮬레이션하고 설계하는 데 활용될 수 있는 기초 계산 과학 기술입니다.
R&D 활용 포인트
에폭시 수지나 연료전지용 이온전도성 고분자(PEM)의 분자 수준에서의 화학적 안정성, 반응성, 전기적 특성을 예측하는 디지털 트윈 및 소재 설계 가속화에 활용 가능합니다.
평가 입력
본문 58,838자 중 30,032자 발췌

초록

Predicting ground-state electron densities of chemical systems has recently received growing attention in machine learning quantum chemistry, given their fundamental importance as highlighted by the Hohenberg-Kohn theorem. Drawing inspiration from the domain of image super-resolution, we view the electron density as a 3D grayscale image and use a convolutional residual network to transform a crude and trivially generated guess of the molecular density into an accurate ground-state quantum mechanical density. Here we show that this model produces more accurate predictions than all prior density prediction approaches. Due to its simplicity, the model is directly applicable to unseen molecular conformations and chemical elements. We show that fine-tuning on limited new data provides high accuracy even in challenging cases of exotic elements and charge states.

본문 58,838자

본문 펼치기
Article https://doi.org/10.1038/s41467-025-60095-8 # Image super-resolution inspired electron density prediction Received: 6 March 2024 Accepted: 7 May 2025 Check for updates Chenghan Li <sup>1</sup>, Or Sharir 2, Shunyue Yuan 2 & Garnet Kin-Lic Chan 1 Predicting ground-state electron densities of chemical systems has recently received growing attention in machine learning quantum chemistry, given their fundamental importance as highlighted by the Hohenberg-Kohn theorem. Drawing inspiration from the domain of image super-resolution, we view the electron density as a 3D grayscale image and use a convolutional residual network to transform a crude and trivially generated guess of the molecular density into an accurate ground-state quantum mechanical density. Here we show that this model produces more accurate predictions than all prior density prediction approaches. Due to its simplicity, the model is directly applicable to unseen molecular conformations and chemical elements. We show that fine-tuning on limited new data provides high accuracy even in challenging cases of exotic elements and charge states. Computing electronic properties of the ground-state of molecules and materials is a central task in chemistry and materials science. Even within the common mean-field formulation known as Kohn-Sham density functional theory (DFT) <sup>1</sup>, the computations can be prohibitively expensive for many applications, for example, in molecules with many atoms, or when many geometric configurations must be considered. To reduce this cost, machine learning techniques have risen to the fore. These substitute physics-based calculations with a machine learning model, turning the electronic structure problem into a regression task to map a chemical description to the electronic state and properties <sup>2,3</sup> . The most common machine learning models for electronic structure target the electronic energy. In one approach, known as machine learning force fields, the inputs are the molecular geometry and element types (and sometimes atomic energies) <sup>4–15</sup> . Another common class of modelsrequires first carrying out a simpler molecular electronic structure calculation (e.g., semi-empirical tight-binding density functional theory) to generate an input to a model that predicts the energy of a more sophisticated electronic structure method on the same molecule <sup>16–18</sup> . In both approaches, much effort has focused on improving the featurization and model architectures, for example, to explicitly incorporate the equivariance and invariance that arise from physical symmetries. <sup>13</sup> . These ML models have achieved considerable success, greatly reducing the time to obtain quantum mechanical quality energies. However, the energy is only a single facet of the electronic structure, and machine learning other properties of the quantum state has been comparatively less explored <sup>19</sup> . Within density functional theory, due to the Hohenberg-Kohn theorem <sup>20</sup>, the ground-state electron density formally yields all properties of the associated quantum state. Machine learning the electron density has thus attracted recent attention <sup>17,21–42</sup> . Like their counterparts in force fields, ML density models have been explored with different sources of input data, ranging from ones that just take in the geometry and element types <sup>21–25,27–33,35–42</sup> to ones that first require a quantum mechanical calculation <sup>17,34</sup> . We will demonstrate that a powerful way to learn an accurate molecular electron density is to start from its crudest physical approximation, the superposition of atomic densities, represented on a spatial grid. In fact the atomic densities can be chosen to be very crude, and serve mainly to denote the size and location of the atoms, but importantly, once the choice is made, they do not require recalculation for any molecule. After featurizing the input superposed atomic density on a coarse grid, our model learns the accurate molecular electron density on a high-resolution grid. This learning task is the 3D analog of image super-resolution, a wellestablished domain in computer vision <sup>43,44</sup>, where crude, lossy images at low resolution are enhanced to accurate, high-resolution images. We therefore adopt a standard image processing approach, using a simple convolutional residual neural net (ResNet) <sup>45</sup> that does not enforce any physical symmetries. We find that we achieve state 1Division of Chemistry and Chemical Engineering, California Institute of Technology, Pasadena 91125 CA, USA. 2Division of Engineering and Applied Sciences, California Institute of Technology, Pasadena 91125 CA, USA. [e-mail: gkc1000@gmail.com](mailto:gkc1000@gmail.com) Table 1 | Density prediction mean absolute error on QM9 test set ResNet ChargE3Net <sup>41</sup> DeepDFT (in-/ OrbNet- DF SAD <u><mark>equivariant)</mark></u> <sup>38</sup> <u><mark>Equi</mark></u> <sup>17</sup> 0.14 0.196 0.36/0.27 0.21 0.26/ 13.9 0.27 ResNet (This work) starts from the superposition of spherical atomic density (SAD) guess and uses a spatial upscaling factor of 2. The density fitting (DF) errors were computed with both the Coulombmetric andthe overlap metric(numbersare given in the order Coulomb/overlap). More details and other data are in the text. Table 2 | Electronic property errors on QM9 <u><mark>Quantity</mark></u> <u><mark>Unit</mark></u> <u><mark>ResNet (This work)</mark></u> <u><mark>DF</mark></u> E <sup>elec</sup> meV 3.0 0.0083/0.014 ϵ <sup>HOMO</sup> meV 12.0 1.3/3.8 ϵ <sup>LUMO</sup> meV 9.5 2.0/6.1 Δϵ meV 11.0 1.4/4.4 Quantities defined in the text. All errors are given as the mean absolute errors. ResNet (This work) starts from the superposition of spherical atomic density (SAD) guess and uses a spatial upscaling factor of 2. The density fitting (DF) errors were computed with both the Coulomb metric and the overlap metric (numbers are given in the order Coulomb/overlap). Note that access to the properties listed in this table (E <sup>elec</sup> : total electronic energy, ϵ <sup>HOMO</sup> : the highest occupied molecular orbital energy, ϵ <sup>LUMO</sup> : the lowest unoccupied molecular orbital energy, and Δϵ: the HOMO-LUMO gap) from the electron density requires one diagonalization of the KohnSham matrix built with the predicted density (note, this diagonalization yields a different density to the predicted density). of-the-art accuracy in density prediction, improving on all previous models. Furthermore, because we do not use explicit element types, our architecture generalizes, and can be easily fine-tuned, across chemical space, which we demonstrate in molecules including elements we do not train against. From the density, we compute energies and orbitals through a single diagonalization of the KohnSham Hamiltonian based on our predicted density. We find that even though we do not train against these quantities, we can obtain accurate predictions from this additional diagonalization step. We propose that the strategy in this work not only provides an important step forward in the density prediction problem but also opens up a distinct class of methods to predict real-space electronic structure properties based on well-established image processing techniques. We conclude with a discussion of the future of such models, including the current limitations and potential future solutions. Results Density learning on the test set In Table 1, we summarize the accuracy of our density model trained on the QM9 dataset, which contains 134K small neutral organic molecules composed of the CHONF elements <sup>46</sup> . As is usual,the dataset is split into training (used to optimize the model parameters), validation (used to determine the end-point of training), and test (used for independent assessment) datasets, and we follow the same number of training/ validation/testing points used in Ref. 38. We consider two types of input densities for our density prediction models (see Methods for model details). The first is the superposition of spherical neutral atomic density (SAD) (similar to the atomic guess approach in NWChem <sup>47</sup> but without building and diagonalizing a molecular Fock), based on pre-tabulated atomic natural orbitals expanded in a Gaussian atomic basis <sup>48–50</sup> . The other is of even lower (atrocious) quality, and is generated by modifying the SAD density by multiplying the Gaussian basis exponents of the atomic natural orbitals to be filled by electrons by two. This results in a highly spatially contracted density that is very poor in terms of Errρ but which still preserves qualitative information about the atom positions and the relative order of atom sizes. As shown in Table 1, starting from the SAD guess, and using a spatial upscaling factor of 2 (i.e., the predicted density is output on a grid resolution that is uniformly improved from that of the input density by a factor of 2 along each axis) our model refines the density error of the input SAD density by two orders of magnitude. (As an immediate consequence of this, using the predicted density in selfconsistent-field (SCF) iterations to obtain a converged DFT density required, on average, 5.5 fewer iterations than starting from the SAD guess, or roughly 35% of the iterations). The atrocious SAD density has a worse input density error by a factor of 2 from the SAD density (Errρ = 27.7%). However, using this input, the model achieves a 173-fold factor of improvement, and the predicted density saved 10.2 SCF cycles (49% of the iterations) on average compared to the atrocious SAD guess. The predicted error in the density is then almost the same as when using the standard SAD input (model prediction Errρ = 0.16% on the test set), testifying to the robustness of the model. If we spatially upscale the resolution by a factor of 4, the result is only slightly less accurate than upscaling by a factor of 2, with Errρ = 0.19%. To place our results in a broader perspective, we compare to the density prediction error of some recent density learning approaches on the same datasets. ChargE3Net <sup>41</sup> and DeepDFT <sup>38</sup> are equivariant models that take the molecular structure and element types as inputs, while OrbNet-Equi <sup>17</sup> uses input information from a molecular semiempirical tight-binding DFT calculation. We reproduce their reported errors in Table 1 and we find that we achieve a better accuracy than all these prior models. We further compare to the error from a direct numerical fit of the target density. For this, we use Gaussian density fitting, a common numerical representation in quantum chemistry which expands the density in an auxiliary Gaussian basis <sup>51</sup> . Here, we choose the auxiliary basis to be the default even-tempered Gaussian auxiliary basis in PYSCF for our DFT computational basis, and fit using both the Coulomb metric <sup>51</sup> and the overlap metric <sup>52</sup> . Our density model outperforms even this direct numerical fit to the data by a factor of 2 in terms of density mean absolute error (MAE), although it falls behind according to some metrics, as discussed later. Energies and properties from predicted densities Within the framework of Kohn-Sham density functional theory, the total electronic energy and orbitals can be obtained from the exact electron density via a single diagonalization of the effective KohnSham Hamiltonian (one-step DFT). Although this additional diagonalization means these quantities are not obtained within a pure datadriven approach, they provide a physically interpretable metric with which to understand the quality of a density prediction model, and one-step DFT metrics have been employed in several recent density prediction models <sup>28,38,41,53</sup> . It is important to note that the energy obtained from the one-step DFT process is not the same as the energy computed directly from the Kohn-Sham energy functional using the model-predicted density. The latter is challenging to compute due to the unknown kinetic energy functional in the Kohn-Sham framework. This discrepancy arises because the diagonalization step also updates the density, typically improving it (e.g., by two-fold on average on the QM9 test set). We list our MAE errors in Table 2. The one-step DFT electronic energy error is small (well within chemical accuracy of 1 kcal/mol ≈ 43 meV). The one-step DFT highest-occupied-molecular-orbital (HOMO) and lowest-unoccupied-molecular-orbital (LUMO) energies (ϵ <sup>HOMO</sup>, ϵ <sup>LUMO</sup> ), and HOMO-LUMO gap (Δϵ) are less accurate than the total energy (although still within chemical accuracy). We find larger errors in the individual energy components: for the Coulomb energy MAE = 167 meV, the exchange-correlation energy MAE = 40 meV, and the Kohn-Sham kinetic energy MAE = 303 meV. This is because near the Fig. 1 | Energy error distribution from a one-step DFT procedure based on the predicted electron density. The equivariant DeepDFT result was extracted from Ref. 38. Source data are provided as a Source Data file. Fig. 2 | Zero-shot density prediction mean absolute error of the QM9 model and timings on a water cluster dataset. Representative molecular configurations of a three-water cluster and a thirty-water cluster are shown. The ResNet timing was performed using one A100 GPU, and the DFT timing was performed on one compute node with 28 cores [CPU model: Intel(R) Xeon(R) E5-2680 v4 @ 2.40GHz]. The computational cost of ResNet grows linearly with the system size due to the increasing box volume, where we maintain a constant margin around the actual extent of the atoms. Source data is provided as a Source Data file. Table 3 | Transferability check of the ResNet model trained on QM9 <u><mark>Dataset</mark></u> <u><mark>ρ(%)</mark></u> <u><mark>E</mark></u> <sup>elec</sup> <u><mark>(meV)</mark></u> C7O2H10 Zero-shot ResNet 0.65 24.5 Fine-tuned ResNet 0.25 2.6 From-scratch ResNet 1.5 SAD Guess 13.8 Zero-shot eqDeepDFT 1.8 MT Zero-shot ResNet 2.1 Fine-tuned ResNet 0.33 From-scratch ResNet 3.4 SAD Guess 11.9 The errors are reported as mean absolute errors. Zero-shot means the model trained on QM9 is tested on the C7O2H10 and MT datasets, fine-tuned means that after training on QM9, the ResNet model is further fine-tuned on a small portion of each dataset. From-scratch represents a ResNet model trained only on the C7O2H10 or MT data, starting from randomly initialized parameters. DFT electronic minimum, the energy error is quadratic in the density error (which is here small), while the relationship for other observables is linear <sup>53</sup> . Despite the use of one-step DFT errors as a metric in density learning <sup>28,38,41,53</sup>, reported numbers for the multiple quantities in Table 2 for the QM9 dataset are scarce. One comparable example is given by the DeepDFT model, which reported the distribution of energy errors on this dataset. We show the comparison with the distribution in Fig. 1 and we see that our errors are on average smaller (note the logarithmic axes), and we do not see large outliers. Removing the outliers of DeepDFT (defined as density MAE - 0.6%) cannot change its prediction accuracy more than 0.01% due to the relatively few number of outliers (15 data points, according to Fig. 2 of Ref. 38 compared to 10,000 total testing data). While our ResNet model achieves higher accuracy regarding the density MAE than a direct fitting to the SCF-converged density (Table 1), it does not in terms of energy errors (Table 2). One might prioritize energy-related metrics during training if energy errors are deemed more practically significant. In addition to the above quantities, we can also assess the quality of prediction of properties that are directly available from the density without diagonalization, such as the multipole moments (non-traceless, using the center of electron charge density as the origin). The L <sup>2</sup> norm of our dipole, quadrupole and octupole errors are 68 mD, 0.14 a.u., and 1.0 a.u. respectively. Another model that reports these quantities on the QM9 data set is OrbNet <sup>17</sup> . Our results can be compared to the reported 185 mD, 0.856 a.u., and 8.68 a.u. errors for OrbNet <sup>17</sup> . Transferability on unseen geometries and elements We now assess the transferability of our model. As a first task, we consider the performance of our ResNet model trained on QM9 on a different dataset of the isomers C7O2H10. Unlike QM9, which consists only of equilibrium molecular geometries, the C7O2H10 dataset contains diverse conformers sampled at high temperature, and thus the geometries and associated electron densities extend outside of the training space of QM9. Specifically, the C7O2H10 dataset comprises 5000 conformations for each of the 113 isomers of C7O2H10. As these conformations were sampled at 1 fs intervals from molecular dynamics (MD) simulations and geometries at adjacent time steps are very correlated, we evenly downsampled by a factor of 100 for each isomer trajectory (keeping the 0-th, 99-th, ... geometries), resulting in a totalof 5650 less correlated data points. As shown in Table 3, our ResNet model trained on QM9 (denoted zero-shot) moderately decreases in accuracy when evaluated on the C7O2H10 dataset, illustrating a qualitative difference between equilibrium and non-equilibrium structure densities. This hypothesis is supported by the high accuracy we observe when evaluating our model densities only for the initial conformation of each of the 113 isomer MD trajectories (Errρ = 0.13%), which correspond to local energy minima. We also assess the zero-shot eqDeepDFT (trained on QM9) model. This gives a zero-shot density error of 1.8% on the full diluted dataset and 0.29% on the first conformation of each isomer. The zero-shot error of ResNet is not only smaller than that of eqDeepDFT, but the increase from the QM9 test error is also smaller than that of eqDeepDFT. This shows that our density model not only fits better but also generalizes better. Despite the decrease in accuracy of our predicted densities when fed into a one-step diagonalization, our zero-shot ResNet model still predicts the total energy within chemical accuracy of 1 kcal/mol (24.5 meV = 0.56 kcal/mol). Since we did not train on energies and the density learning was trained without conformational diversity of this isomer dataset, this illustrates the surprising robustness of the model. To obtain better performance, we further fine-tune our ResNet model after training on QM9, using a small dataset comprising the first Fig. 3 | Density prediction mean absolute error and potential energy surfaces of a single H2 and N2 molecule as a function of bond distance. Source data is provided as a Source Data file. two conformations from the downsampled dataset, including the one at the energy minimum—from each of the 113 trajectories. During training, we monitored the validation loss on the third confirmation of each trajectory. Since the conformations in the dataset are ordered by the MD simulation time, the use of the first 3 conformations for training and validation limits our model’s fine-tuning to future conformations. In Table 3, we show the accuracy of the fine-tuned model on the last 40 conformations of each downsampled trajectory. As such, the middle data points (4th-9th) of each trajectory are never used, and this gap between the training/validation set and test set helps minimize the correlation between the training and test data, creating a more stringent test. We note that using the first two conformations of each isomer corresponds to only 4% of our downsampled C7O2H10 dataset (and 0.04% of the original dataset). Typically, such limited training data (113 × 2 = 226 data points) does not suffice to train a deep neural network, thus, a fine-tuning approach is essential. Training on this small dataset alone yields the from-scratch ResNet model, which is less accurate than the predictions from the zero-shot ResNet model. Finetuning leads to a (more than) two-fold decrease of the density and energy error on the C7O2H10 set and a performance close to that achieved by ResNet in the QM9 testing set. The isomer test evaluates the transferability of our model to moderately non-equilibrium geometries of a single gas-phase molecule. To assess the transferability of our model, which is trained on single-molecule data to aggregates and condensed-phase settings, we use a water cluster dataset <sup>54</sup> . We tested the zero-shot prediction of the QM9 model on the energy-minimized geometries of water clusters ranging from 3 to 30 molecules. As shown in Fig. 2, our model trained on gas-phase single molecule data extrapolates reasonably well to the larger water clusters, with a computational cost that is a small fraction of that of the DFT calculations. Comparing to literature models, the equivariant e3nn model trained on 7-water clusters achieved an Errρ of around 0.65% on 30water clusters, and including clusters up to 14 waters in the training data brought the error down to ~0.4% (see Fig. 3 of Ref. 36). To test if similar behavior exists for our model, we fine-tuned the QM9 model on a few conformations containing up to 9 or 13 waters (see Methods for training and dataset details) and achieved a density error Errρ of 0.17% and 0.12%, respectively on the 30-water clusters. For a different comparison, we also trained from scratch on 4635 conformations of up to 13 waters and obtained Errρ = 0.11% on 30-water clusters. The water cluster dataset further provides an opportunity to assess the quality of electrostatics associated with our predicted density. The Coulomb energy E <sup>coul</sup> spans a large range in this dataset (its standard deviation on the 15-30 water data is 1.6 × 10 <sup>3</sup> kcal/mol/ molecule). Despite this, the Coulomb energy for the same 15–30 water data using the from-scratch model density prediction, followed by a single Fourier transform, gave an MAE of only 1.1 kcal/mol/molecule. As is well known, capturing long-range interactions is a challenge for commonly employed ML approaches based on short-range potentials, and a hybrid approach <sup>55</sup> combining a density prediction model for the long-range electrostatic interactions with an ML potential for the remaining interactions, is a promising possibility. As another test for model transferability on unseen geometries, we examined the density MAE of the QM9 model on H2 and N2 molecules. The potential energy surface was scanned every 0.01 Å, and the density error as well as the one-step DFT energy were computed at the same resolution. H-H and N-N bonds are poorly represented in the training data, and we observe that Errρ is larger than in the transferability test on the C7O2H10 dataset, but the one-step DFT energy remains accurate. Thus, the predicted equilibrium bond lengths are accurate (exact within the 0.01 Å spacing used in the PES scan). The harmonic frequencies at the minimum are 4153 cm <sup>−1</sup> (onestep DFT) and 4172 cm <sup>−1</sup> (reference) for H2; 2425 cm <sup>−1</sup> (one-step DFT) and 2330 cm <sup>−1</sup> (reference) for N2, computed from finite difference with δx = 0.01 Å. We next evaluate the ResNet model transferability on unseen elements and molecular charges. These are non-trivial tasks for models that explicitly require the element types as input, and (indeed, without any modification) are impossible for certain models. However, our network can be applied without any modification in both these cases. As a first test, we create a training and validation set for QM9 that deliberately omits the N atom, and train a model to this limited data. The model yields a density error of 1.4% when tested on the remaining nitrogen-containing QM9 molecules. This error is significantly higher than what we saw in the previous transferability tests on the isomer and water cluster dataset. However, the 1.4% error still represents a substantial improvement over the initial SAD guess, which has a density error of 13.6%. Further analysis reveals that the density error specifically associated with nitrogen is 3.3%, compared to a 7.8% error in the SAD guess around the nitrogen atoms. (The density error around the atoms was evaluated using grid points within the atomic radii as taken from Ref. 56). This indicates that although the pre-training itself is not sufficient for a quantitatively accurate prediction of the unseen nitrogen element, it enhances the model’s ability to predict densities for the unseen element by learning about the density of other elements. As a second, even harder test, we consider a large biological system, namely, a model of the GTP hydrolysis reaction in microtubules <sup>57</sup> (denoted here the MT dataset). This consists of, on average, 211 atoms and a wide range of conformations involving close interactions between GTP, water, and protein amino acid residues, and bondbreaking during GTP hydrolysis. From the density prediction perspective, the system is especially challenging as it carries a total charge of -4 and also includes two new elements compared to the QM9 dataset, namely phosphorus and magnesium. The previous transferability task omitted nitrogen in the QM9 dataset but trained on data containing oxygen and fluorine elements. Thus testing on molecules with the unseen nitrogen element tests the Fig. 4 | Density prediction on a microtubule-mediated GTP hydrolysis model. The first two rows show the electron density isosurface at 0.1 e/Bohr <sup>3</sup> . The third row shows the density prediction error (ρ <sup>pred</sup> - ρ <sup>ref</sup> ) isosurfaces at 0.003 e/Bohr <sup>3</sup> (transparent red) and −0.003 e/Bohr <sup>3</sup> (transparent blue). Coloring of atoms: oxygen (red), nitrogen (blue), carbon (silver), hydrogen (white), phosphorus (gold), and magnesium (pink). interpolation ability of the model between two adjacent elements in the periodic table. In contrast, moving from the QM9 dataset to the MT dataset involves extrapolating elemental and charge state behavior. As such, very accurate predictions are not anticipated in this scenario. Indeed, we find using the zero-shot ResNet model a relatively large average error (2.1%) with a large density error around the phosphorus and magnesium elements (7.8% and 33%, respectively). A visual check confirms that the density errors are predominantly around the unseen elements (Fig. 4). To improve on the zero-shot model, we can use fine-tuning. Again, we limit ourselves to a small training set, containing a few initial conformations of the MD trajectories. Despite using limited training data (110 data points, comprising only 8% of the total data), the fine-tuned ResNet model achieves a 0.33% accuracy in density prediction on the test data (approximately 88% of the entire MT dataset), again approaching the accuracy of our state-of-the-art model on the simpler QM9 training dataset. In comparison, training from scratch with the same limited data results in a model that is much less accurate than the fine-tuned one. This highlights that pre-training our density model on a standard dataset such as QM9, in conjunction with a modest amount of fine-tuning, achieves quantitative accuracy even in the very challenging case of unseen systems with new charge states and unusual elements. Discussion We have demonstrated that a simple machine learning strategy, inspired by image super-resolution methods, is a promising approach for electron density prediction. The model is based on a convolutional residual network, and the input is a crude guess of the density (superposition of atomic densities; SAD) represented on a coarse 3D real-space grid. We showed that even very poor input atomic guesses make virtually no difference to the accuracy, thus the input density mainly encodes the atomic positions and atom types (the latter is implicitly represented by the sizes of the atomic densities). From a computer vision perspective, the above process mimics the well-studied image super-resolution problem. From a physical perspective, the model may be viewed as indirectly learning the Hohenberg-Kohn (HK) map from the nuclear electrostatic potential v <sup>ext</sup> (r) to the ground-state density, where the nuclear potential is encoded in the features of the input density. The latter may be seen as in the spirit of Bright-Wilson’s argument <sup>58,59</sup> that the nuclear potential of the Hamiltonianmay be identified from the features of the density. It therefore provides an alternative target for ML approaches to the construction of the HK map from v <sup>ext</sup> (r) to ρ(r) via minimization of ML density functionals <sup>60–70</sup> . Following the density prediction, a one-step DFT calculation enables the extraction of various DFT electronic properties, such asthe total energies and molecular orbitals. We found that compared to other recent density prediction models that have used this one-step diagonalization metric, we obtained smaller average errors in the energies with fewer outliers. Our model also displayed significant transferability to previously unseen molecular geometries but only moderate transferability for interpolated chemical elements (with atomic numbers in between elements seen during training). Although we do not achieve quantitative accuracy in the zero-shot predictions for new elements, our model is easily fine-tuned on new data with unseen chemical elements, because element types are not part of the input. After fine-tuning our pre-trained models on limited data corresponding to the new geometries and elements, we found that we could achieve accurate predictions in all the cases we examined. Such transferability and fine-tunability suggests our approach is well-suited to an ensemble-based active learning setup <sup>71,72</sup> on large unlabeled datasets. In particular, given its transferability, we expect a significant reduction in the need for expensive DFT data labeling. Our model features a real-space convolution that necessitates a uniform grid. Such a requirement prevents us from directly working with angular-radial grids (such as atom-centered grids) that are more economical for small gas-phase molecules when all-electron calculations are conducted. Currently, the model predicts the valence density as the result of employing pseudo-potentials in the periodic DFT calculations used for data generation. The prediction of all-electron densities may be facilitated by a hybrid approach that employs models that predict density fitting coefficients for the core part of the density, while maintaining the ResNet approach for the valence part. The success of our real-space approach to learning densities also suggests applications to other objects that are naturally expressed on real-space grids. In addition, while the electron density provides access to the electronic observables such as the energy after a single diagonalization, as performed in this work, it is desirable to use a datadriven approach to bypass this expensive computational step. These directions will be explored in the future. Methods Density learning and the superposition of atomic densities The main objective of image super-resolution is to establish a mapping from a low-resolution and potentially inaccurate image (e.g., generated by lossy compression), denoted x, to its high-resolution counterpart, X. We view density learning through the same lens. Namely, given an inaccurate and low-resolution molecular density, we wish to predict the accurate molecular density, here defined as the selfconsistent pseudopotential DFT density, on a finer grid. The density learning essentially performs two tasks: it transforms the inaccurate density to an accurate one, and it upscales the spatial resolution of the density. The latter is similar to interpolation and can be achieved Fig. 5 | Model architecture. K indicates the kernel size used in the convolution. without machine-learning techniques. The former is a more complex map, and is where data-driven approaches are most useful. Since we wish to learn accurate densities for large molecules, it is essential for our input data to be cheap to generate. This suggests we should avoid approaches where we must first perform a low-level molecular quantum mechanical calculation, as these will be prohibitive in large problems. On the other hand, the list of atomic types and positions alone seems more parsimonious than necessary. We will define our input data to be the physically motivated approximation of the superposition of (spherical) neutral atomic densities, normalized to the total number of electrons, expressed on a low-resolution uniform grid. The spherical neutral atomic densities are obtained from filling electrons into atomic natural orbitals according to the Aufbau occupations, which need to be tabulated once for the periodic table, while the cost of assembling the SAD guess on the molecular grid requires no additional quantum calculation, is linear in the molecular size, and scalable to large molecules. The SAD guess preserves important physical constraints (e.g., it is positive) and provides qualitative information about the size and location of the atoms, but otherwise does not provide an accurate density, as quantified below. DFT data generation Our training data consisted of DFT densities computed using periodic boundary conditions in the Gaussian-Plane-Wave approach <sup>73–75</sup> with the Perdew-Burke-Ernzerhof (PBE) functional <sup>76</sup>, the Goedecker-TeterHutter (GTH) pseudopotential <sup>77</sup>, and the GTH-TZV2P basis set <sup>73</sup>, computed on a fine uniform grid (plane wave cutoff = 400 Ry), as implemented in the PYSCF <sup>74,75</sup> package. The relation between the coarse grid for the input density and the predicted fine uniform grid is a factor of 2 or 4 in each dimension as specified below (an overall factor of 8 or64 in the number of density points; note, the high-resolution grid is fixed, so the coarse-grid is scaled). For all the datasets, the box size was determined based on the closest even-number multiple of the grid spacing while ensuring a minimum of 4 Å of space around the molecule in every dimension. This box size occasionally led to SCF convergence issues for some long conjugated chains in QM9, and a 5 Å margin was used instead for these cases. A SCF convergence threshold of 10 <sup>−11</sup> Hartree was set for the QM9, C7O2H10, and water cluster calculations. For the water cluster dataset, we consider three subsets of the full data optimized by the TTM2.1-F potential [(https://sites.uw.edu/wdbase/database-of-water-](https://sites.uw.edu/wdbase/database-of-water-clusters/) [clusters/):](https://sites.uw.edu/wdbase/database-of-water-clusters/) (1) 1904 structures that are within 1 kJ/mol of the minimum (denoted as Wmin/n) (2) the first few structures of each of the nwater clusters within 1 kcal/mol of the minimum (in the order of geometries listed in the xyz file) such that n times the number of structures does not exceed 1500 (denoted as W1500/n; 692 geometries in total), and (3) structures of each of the n-water clusters within 1 kcal/mol of the minimum such that n times the number of geometries does not exceed 50,000 (denoted as W50,000/n; 5137 geometries in total). The GTP hydrolysis in microtubules (MT) dataset contains 1442 The reported MAE over a dataset is computed as the average of the MAE of individual molecules. Supplementary Table 1 summarizes the hyperparameters and density errors for all models in this study. Each model underwent 50 epochs of training using the density MAE as the training loss, with the best model chosen based on the lowest validation error. The first epoch used a warm-up with a 10 <sup>5</sup> times reduced learning rate, followed by a cosine scheduler from the second epoch starting with a learning rate specified in Supplementary Table 1. We employed the Adam optimizer <sup>79</sup> with β1 = 0.9 and β2 = 0.99. Training data was augmented with a random rotation along the x, y, or z axes. A batch size of 1, combined with instance normalization and data augmentation, proved sufficient for regularization across all cases, eliminating the need for weight decay. The data splitting for QM9 was random, and the number of training, testing, and validation points followed Ref. 38. The QM9 model was tested on the Wmin/3-30 datasets to produce Fig. 2. Finetuning on water clusters was performed on W1500/3-9 (59 geometries), and the validation error on W1500/10 was monitored. Another fine-tuning trial was performed on W1500/3-13 (226 geometries) and validated on W1500/14. Training from scratch on water clusters was performed on W50,000/3-13 (4635 geometries) and validated on configurations extracted from 11 metadynamics runs <sup>57</sup> . The total simulation time for the metadynamics trajectories was about 750 ps. Configurations spaced every 12 hours of wall time, corresponding to a 0.5-1 ps simulation interval, were included in the dataset. For the MT dataset, the SCF convergence criteria were 10 <sup>−7</sup> Hartree for the energy and 10 <sup>−5</sup> Hartree for the orbital gradient. To aid SCF convergence, we used an electronic smearing with an electronic temperature of 0.01 Hartree. Model details The model is a convolutional residual neural network, adapted from the ResNet part of the SRGAN superresolution model <sup>78</sup> for electron density prediction. Our modifications were (1) changing the 2D convolution to a 3D one, (2) substituting batch normalization with instance normalization, (3) appending a ReLU layer to the network output to guarantee positive density values, and (4) normalizing the ReLU output to match the correct electron number, i.e., ρ ← Neρ/∫ρdr. All convolutions maintained a stride of 1, with padding applied to preserve the original size. Circular padding was employed to respect the periodic boundary conditions. The resulting architecture is depicted in Fig. 5. Note that, as we do not target human perception of the visual quality of the image, we do not use an adversarial network for our loss function (as used in image-processing tasks to produce images that are visually realistic to humans <sup>78</sup> ) but instead use a standard mean absolute error loss Errρ = <sup><u>1</u></sup> Ne Z drjρ <sup>pred</sup> ðrÞ � ρ <sup>ref</sup> ðrÞj: ð1Þ W50,000/14. As mentioned in the main text, the original C7O2H10 dataset, comprising 5000 conformations for each of the 113 isomers, was downsampled by a factor of 100 to yield less correlated data. The first two conformations of each isomer in the diluted dataset served as the training data, with the third used for validation. The entire (diluted) dataset was used for testing if the model was not trained on the dataset, and otherwise the final 40 conformations were used for testing. For the MT dataset, the first 10 conformations from each of the 11 metadynamics trajectories were used for training, the 11th for validation, and the 17th to the last for testing. Fine-tuning on C7O2H10 and MT followed exactly the same training protocol, but the models were initialized from the best QM9-trained model. Recent learning approaches for molecular systems have favored the incorporation of physical symmetries into the model, such as equivariance under the coordinate transformations corresponding to translations, rotations, and reflections. Equivariant models for density prediction have also been formulated, for example, in Refs. 17,24,27,28,35,36,38,40,41. Our approach satisfies a transformation property that the predictions are unchanged if the molecule is rotated and the grid is simultaneously rotated with it. This is because the input SAD density is invariant under the simultaneous coordinate transformations of the molecule and grid points, and the model uses only the values of the density (not the coordinates of the grid points) thus, the predictions are unchanged. However, the set of density values is not invariant under molecular symmetry transformations if the grid points are not also transformed, i.e., the set fhrjρðMÞig≠fhrjρðR <sup>^</sup> MÞig. A simple way to improve this is to augment the density data with that from rotated molecules on the same fixed grid, and we thus performed this data augmentation in our model training. Computation of electronic properties Some electronic properties were obtained from a one-step DFT procedure, which requires one Fock build and one diagonalization. Explicitly, a Fock matrix was built using the predicted electron density ρ(r): Z f μν = hμ <sup>core</sup> ν + Jμν½ρ� + drϕμðrÞvXC½ρ�ðrÞϕνðrÞ ð2Þ References 1. Parr, R. & Weitao, Y.Density-Functional Theory of Atoms and Molecules. International Series of Monographs on Chemistry (Oxford University Press, New York, 1994). 2. Kulik, H. J. et al. Roadmap on machine learning in electronic structure. Electron. Struct. 4, 023004 (2022). 3. Ceriotti, M., Clementi, C. & Anatole von Lilienfeld, O. Machine learning meetschemical physics. J. Chem. Phys. 154, 160401 (2021). 4. Behler, J. & Parrinello, M. Generalized neural-network representation of high-dimensional potential-energy surfaces. Phys. Rev. Lett. 98, 146401 (2007). 5. Schütt, K. et al. Schnet: A continuous-filter convolutional neural network for modeling quantum interactions. Adv. Neural Inf. Process. Syst. 30 (2017). 6. Bartók, A. P., Payne, M. C., Kondor, R. & Csányi, G. Gaussian approximation potentials: The accuracy of quantum mechanics, without the electrons. Phys. Rev. Lett. 104, 136403 (2010). 7. Unke, O. T. & Meuwly, M. Physnet: A neural network for predicting energies, forces, dipole moments, and partial charges. J. Chem. Theory Comput. 15, 3678–3693 (2019). 8. Zhang, L., Han, J., Wang, H., Car, R. & Weinan, E. Deep potential molecular dynamics: a scalable model with the accuracy of quantum mechanics. Phys. Rev. Lett. 120, 143001 (2018). 9. Smith, J. S. et al. Approaching coupled cluster accuracy with a general-purpose neural network potential through transfer learning. Nat. Commun. 10, 2903 (2019). 10. Smith, J. S., Isayev, O. & Roitberg, A. E. ANI-1: an extensible neural network potential with DFT accuracy at force field computational cost. Chem. Sci. 8, 3192–3203 (2017). 11. Gasteiger, J., Giri, S., Margraf, J. T. & Günnemann, S. Fast and uncertainty-aware directional message passing for non-equilibrium molecules. arXiv preprint arXiv:2011.14115 (2020). 12. Thölke, P. & De Fabritiis, G. Equivariant transformers for neural network based molecular potentials. In International Conference on Learning Representations (2021). 13. Batzner, S. et al. E (3)-equivariant graph neural networks for dataefficient and accurate interatomic potentials. Nat. Commun. 13, 2453 (2022). 14. Musaelian, A. et al. Learning local equivariant representations for large-scale atomistic dynamics. Nat. Commun. 14, 579 (2023). 15. Batatia, I., Kovacs, D. P., Simm, G., Ortner, C. & Csányi, G. Mace: Higher order equivariant message passing neural networks for fast and accurate force fields. Adv. Neural Inf. Process. Syst. 35, 11423–11436 (2022). 16. Welborn, M., Cheng, L. & Miller III, T. F. Transferability in machine learning for electronic structure via the molecular orbital basis. J. Chem. Theory Comput. 14, 4772–4779 (2018). 17. Qiao, Z. et al. Informing geometric deep learning with electronic interactions to accelerate quantum chemistry. Proc. Natl Acad. Sci. 119, e2205221119 (2022). 18. Ramakrishnan, R., Dral, P. O., Rupp, M. & Von Lilienfeld, O. A. Big data meets quantum chemistry approximations: the Δ-machine learning approach. J. Chem. Theory Comput. 11, 2087–2096 (2015). 19. Ceriotti, M. Beyond potentials: Integrated machine learning models for materials. Mrs Bull. 47, 1045–1053 (2022). 20. Hohenberg, P. & Kohn, W. Inhomogeneous electron gas. Phys. Rev. 136, B864 (1964). 21. Brockherde, F. et al. Bypassing the Kohn-Sham equations with machine learning. Nat. Commun. 8, 872 (2017). 22. Schütt, K. T., Gastegger, M., Tkatchenko, A., Müller, K.-R. & Maurer, R. J. Unifying machine learning and quantum chemistry with a deep neural network for molecular wavefunctions. Nat. Commun. 10, 5024 (2019). with μ and ν indexing atom orbitals, h <sup>core</sup>, J, and vXC adopting their usual quantum chemical meanings of the core Hamiltonian, Coulomb matrix, and exchange-correlation potential. The one-body reduced density matrix γμν and orbital energies were obtained from diagonalizing the Fock matrix. The total energy and the Kohn-Sham kinetic energy were evaluated using the resulting γμν. The dipole moment, the Coulomb energy, and the exchange-correlation energy were obtained directly from the predicted density without the need for one step of DFT. Reporting summary Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article. Data availability The DFT density data and molecular geometries are available at Refs. 80–82. Source data for the Figures are provided with this paper. Source data are provided with this paper. Code availability Implementation and minimal examples can be found at Ref. 83 Pretrained models can be found in [https://doi.org/10.6084/m9.figshare.](https://doi.org/10.6084/m9.figshare.25365508) [25365508.](https://doi.org/10.6084/m9.figshare.25365508) 23. Unke, O. et al. SE (3)-equivariant prediction of molecular wavefunctions and electronic densities. Adv. Neural Inf. Process. Syst. 34, 14434–14447 (2021). 24. Grisafi, A. et al. Transferable machine-learning model of the electron density. ACS Cent. Sci. 5, 57–64 (2018). 25. Ryczko, K., Strubbe, D. A. & Tamblyn, I. Deep learning and densityfunctional theory. Phys. Rev. A 100, 022512 (2019). 26. Zepeda-Núñez, L. et al. Deep density: circumventing the KohnSham equations via symmetry preserving neural networks. J. Comput. Phys. 443, 110523 (2021). 27. Lewis, A. M., Grisafi, A., Ceriotti, M. & Rossi, M. Learning electron densities in the condensed phase. J. Chem. Theory Comput. 17, 7203–7214 (2021). 28. Fabrizio, A., Grisafi, A., Meyer, B., Ceriotti, M. & Corminboeuf, C. Electron density learning of non-covalent systems. Chem. Sci. 10, 9424–9432 (2019). 29. Kamal, D., Chandrasekaran, A., Batra, R. & Ramprasad, R. A charge density prediction model for hydrocarbons using deep neural networks. Mach. Learn.: Sci. Technol. 1, 025003 (2020). 30. Gong, S. et al. Predicting charge density distribution of materials using a local-environment-based graph convolutional network. Phys. Rev. B 100, 184103 (2019). 31. del Rio, B. G., Phan, B. & Ramprasad, R. A deep learning framework to emulate density functional theory. npj Comput. Mater. 9, 158 (2023). 32. Chandrasekaran, A. et al. Solving the electronic structure problem with machine learning. npj Comput. Mater. 5, 22 (2019). 33. Fiedler, L. et al. Predicting electronic structures at any length scale with machine learning. npj Comput. Mater. 9, 115 (2023). 34. Sinitskiy, A. V. & Pande, V. S. Deep neural network computes electron densities and energies of a large set of organic molecules faster than density functional theory (DFT). arXiv preprint arXiv:1809.02723 (2018). 35. Lee, A. J., Rackers, J. A. & Bricker, W. P. Predicting accurate ab initio dna electron densities with equivariant neural networks. Biophys. J. 121, 3883–3895 (2022). 36. Rackers, J. A., Tecot, L., Geiger, M. & Smidt, T. E. A recipe for cracking the quantum scaling limit with machine learned electron densities. Mach. Learn.: Sci. Technol. 4, 015027 (2023). 37. Jørgensen, P. B. & Bhowmik, A. DeepDFT: Neural message passing network for accurate charge density prediction. arXiv preprint arXiv:2011.03346 (2020). 38. Jørgensen, P. B. & Bhowmik, A. Equivariant graph neural networks for fast electron density estimation of molecules, liquids, and solids. npj Comput. Mater. 8, 183 (2022). 39. Pathrudkar, S., Thiagarajan, P., Agarwal, S., Banerjee, A. S. & Ghosh, S. Electronic structure prediction of multi-million atom systems through uncertainty quantification enabled transfer learning. npj Comput. Mater. 10, 175 (2024). 40. Lee, A. J., Rackers, J. A. & Bricker, W. P. Machine-learned electron densities of nucleic acids. Biophys. J. 123, 499a (2024). 41. Koker, T., Quigley, K., Taw, E., Tibbetts, K. & Li, L. Higher-order equivariant neural networks for charge density prediction in materials. npj Comput. Mater. 10, 161 (2024). 42. Fu, X. et al. A recipe for charge density prediction. Adv. Neural Inf. Process. Syst. 37, 9727–9752 (2024). 43. Wang, Z., Chen, J. & Hoi, S. C. Deep learning for image superresolution: A survey. IEEE Trans. pattern Anal. Mach. Intell. 43, 3365–3387 (2020). 44. Chen, H. et al. Real-world single image super-resolution: A brief review. Inf. Fusion 79, 124–145 (2022). 45. He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 770–778 (2016). 46. Ramakrishnan, R., Dral, P. O., Rupp, M. & Von Lilienfeld, O. A. Quantum chemistry structures and properties of 134 kilo molecules. Sci. Data 1, 1–7 (2014). 47. Apra, E. et al. NWChem: Past, present, and future. J. Chem. Phys. 152, 184102 (2020). 48. Widmark, P.-O., Malmqvist, P.-Å & Roos, B. O. Density matrix averaged atomic natural orbital (ANO) basis sets for correlated molecular wave functions: I. first row atoms. Theor. Chim. acta 77, 291–306 (1990). 49. Roos, B. O., Veryazov, V. & Widmark, P.-O. Relativistic atomic natural orbital type basis sets for the alkaline and alkaline-earth atoms applied to the ground-state potentials for the corresponding dimers. Theor. Chem. Acc. 111, 345–351 (2004). 50. Roos, B. O., Lindh, R., Malmqvist, P.-Å, Veryazov, V. & Widmark, P.O. Main group atoms and dimers studied with a new relativistic ano basis set. J. Phys. Chem. A 108, 2851–2858 (2004). 51. Whitten, J. L. Coulombic potential energy integrals and approximations. J. Chem. Phys. 58, 4496–4501 (1973). 52. Mintmire, J. & Dunlap, B. Fitting the coulomb potential variationally in linear-combination-of-atomic-orbitals density-functional calculations. Phys. Rev. A 25, 88 (1982). 53. Grisafi, A., Lewis, A. M., Rossi, M. & Ceriotti, M. Electronic-structure properties from atom-centered predictions of the electron density. J. Chem. Theory Comput. 19, 4451–4460 (2022). 54. Rakshit, A., Bandyopadhyay, P., Heindel, J. P. & Xantheas, S. S. Atlas of putative minima and low-lying energy networks of water clusters n=3–25. J. Chem. Phys. 151, 214307 (2019). 55. Yue, S. et al. When do short-range atomistic machine-learning models fall short? J. Chem. Phys. 154, 034111 (2021). 56. Pyykkö, P. & Atsumi, M. Molecular single-bond covalent radii for elements 1–118. Chem. –A Eur. J. 15, 186–197 (2009). 57. Beckett, D. & Voth, G. A. Unveiling the catalytic mechanism of GTP hydrolysis in microtubules. Proc. Natl Acad. Sci. 120, e2305899120 (2023). 58. Tozer, D. J., Ingamells, V. E. & Handy, N. C. Exchange-correlation potentials. J. Chem. Phys. 105, 9200–9213 (1996). 59. Rich, A., Davidson, N. & Pauling, L. Structural Chemistry and Molecular Biology (W. H. Freeman, San Francisco, 1968). 60. Snyder, J. C., Rupp, M., Hansen, K., Müller, K.-R. & Burke, K. Finding density functionals with machine learning. Phys. Rev. Lett. 108, 253002 (2012). 61. Nagai, R., Akashi, R., Sasaki, S. & Tsuneyuki, S. Neural-network Kohn-Sham exchange-correlation potential and its out-of-training transferability. J. Chem. Phys. 148, 241737 (2018). 62. Schmidt, J., Benavides-Riveros, C. L. & Marques, M. A. Machine learning the physical nonlocal exchange–correlation functional of density-functional theory. J. Phys. Chem. Lett. 10, 6425–6431 (2019). 63. Zhou, Y., Wu, J., Chen, S. & Chen, G. Toward the exact exchange–correlation potential: A three-dimensional convolutional neural network construct. J. Phys. Chem. Lett. 10, 7264–7269 (2019). 64. Nagai, R., Akashi, R. & Sugino, O. Completing density functional theory by machine learning hidden messages from molecules. npj Comput. Mater. 6, 43 (2020). 65. Dick, S. & Fernandez-Serra, M. Machine learning accurate exchange and correlation functionals of the electronic density. Nat. Commun. 11, 3509 (2020). 66. Li, L. et al. Kohn-Sham equations as regularizer: Building prior knowledge into machine-learned physics. Phys. Rev. Lett. 126, 036401 (2021). 67. Kasim, M. F. & Vinko, S. M. Learning the exchange-correlation functional from nature with fully differentiable density functional theory. Phys. Rev. Lett. 127, 126403 (2021). 68. Kirkpatrick, J. et al. Pushing the frontiers of density functionals by solving the fractional electron problem. Science 374, 1385–1389 (2021). 69. Ryczko, K., Wetzel, S. J., Melko, R. G. & Tamblyn, I. Toward orbitalfree density functional theory with small data sets and deep learning. J. Chem. Theory Comput. 18, 1122–1128 (2022). 70. Ma, H., Narayanaswamy, A., Riley, P. & Li, L. Evolving symbolic density functionals. Sci. Adv. 8, eabq0279 (2022). 71. Beluch, W. H., Genewein, T., Nürnberger, A. & Köhler, J. M. The power of ensembles for active learning in image classification. In Proceedings of the IEEE Conference On Computer Vision and Pattern Recognition, 9368–9377 (2018). 72. Smith, J. S., Nebgen, B., Lubbers, N., Isayev, O. & Roitberg, A. E. Less is more: Sampling chemical space with active learning. J. Chem. Phys. 148, 241733 (2018). 73. VandeVondele, J. et al. Quickstep: Fast and accurate density functional calculations using a mixed Gaussian and plane waves approach. Comput. Phys. Commun. 167, 103–128 (2005). 74. Sun, Q. et al. PySCF: the Python-based simulations of chemistry framework. Wiley Interdiscip. Rev. Comput. Mol. Sci. 8, e1340 (2018). 75. Sun, Q. et al. Recent developments in the PySCF program package. J. Chem. Phys. 153, 024109 (2020). 76. Perdew, J. P., Burke, K. & Ernzerhof, M. Generalized gradient approximation made simple. Phys. Rev. Lett. 77, 3865 (1996). 77. Krack, M. Pseudopotentials for H to Kr optimized for gradientcorrected exchange-correlation functionals. Theor. Chem. Acc. 114, 145–152 (2005). 78. Ledig, C. et al. Photo-realistic single image super-resolution using a generative adversarial network. In Proceedings of the IEEE conference on computer vision and pattern recognition, 4681–4690 (2017). 79. Kingma, D. P. & Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980 (2014). 80. Li, C., Sharir, O., Yuan, S. & Chan, G. K.-L. QM9 DFT Electron Density [[Data set]. CaltechDATA https://doi.org/10.22002/7vr2f-0r732 (2024).](https://doi.org/10.22002/7vr2f-0r732) 81. Li, C., Sharir, O., Yuan, S. & Chan, G. K.-L. C7O2H10 Isomer DFT [Electron Density [Data set]. CaltechDATA https://doi.org/10.22002/](https://doi.org/10.22002/04d1z-1d608) [04d1z-1d608 (2024).](https://doi.org/10.22002/04d1z-1d608) 82. Li, C., Sharir, O., Yuan, S. & Chan, G. K.-L. GTP-in-Microtubule DFT [Electron Density [Data set]. CaltechDATA https://doi.org/10.22002/](https://doi.org/10.22002/v5tec-g6p43) [v5tec-g6p43 (2024).](https://doi.org/10.22002/v5tec-g6p43) 83. Li, C., Sharir, O., Yuan, S. & Chan, G. K.-L. Image super-resolution [inspired electron density prediction. resnet_density https://doi.org/](https://doi.org/10.5281/zenodo.15226766) [10.5281/zenodo.15226766 (2025).](https://doi.org/10.5281/zenodo.15226766) Acknowledgements This work was primarily supported by the United States Department of Energy, Office of Science, Basic Energy Sciences, Chemical Sciences, Geosciences, and Biosciences Division, FWP LANLE3F2 awarded to Los Alamos National Laboratory under Triad National Security, LLC (‘Triad’) contract grant no. 89233218CNA000001, subaward C2448 to the California Institute of Technology for C.L., O.S., S.Y., and G.K.C. Additional support for G.K.C was provided by the Camille and Henry Dreyfus Foundation via a grant from the program “Machine Learning in the Chemical Sciences and Engineering". G.K.C is a Simons Investigator in Physics. The authors disclose the use of the GPT-4 (OpenAI) model during the writing of the first draft of the article. The artificial intelligence model was used to polish the language, and the generated text was carefully inspected, validated, and edited by the authors. Author contributions C.L., O.S., and G.K.C. conceived the original study. C.L., S.Y. carried out DFT calculations to generate the training and testing data. C.L. developed the density prediction model and conducted the research. All authors discussed the results of the manuscript, and all authors contributed to the writing of the manuscript. Competing interests G.K.C. is a part owner of QSimulate Inc. The remaining authors declare no competing interests. Additional information Supplementary information The online version contains supplementary material available at [https://doi.org/10.1038/s41467-025-60095-8.](https://doi.org/10.1038/s41467-025-60095-8) Correspondence and requests for materials should be addressed to Garnet Kin-Lic Chan. Peer review information Nature Communications thanks the anonymous reviewer(s) for their contribution to the peer review of this work. A peer review file is available. Reprints and permissions information is available at [http://www.nature.com/reprints](http://www.nature.com/reprints) Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence toshare adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly [from the copyright holder. To view a copy of this licence, visit http://](http://creativecommons.org/licenses/by-nc-nd/4.0/) [creativecommons.org/licenses/by-nc-nd/4.0/.](http://creativecommons.org/licenses/by-nc-nd/4.0/) © The Author(s) 2025

섹션 본문 38문단 · 30,356자

(제목 없음)

1Drawing inspiration from the domain of image super-resolution, we view the electron density as a 3D grayscale image and use a convolutional residual network to transform a crude and trivially generated guess of the molecular density into an accurate ground-state quantum mechanical density.We find that this model outperforms all prior density prediction approaches.Because the input is itself a real-space density, the predictions are equivariant to molecular symmetry transformations even though the model is not constructed to be.Due to its simplicity, the model is directly applicable to unseen molecular conformations and chemical elements.We show that fine-tuning on limited new data provides high accuracy even in challenging cases of exotic elements and charge states.Our work suggests new routes to learning real-space physical quantities drawing from the established ideas of image processing.

Introduction

2Computing electronic properties of the ground-state of molecules and materials is a central task in chemistry and materials science.Even within the common mean-field formulation known as Kohn-Sham density functional theory (DFT) [1], the computations can be prohibitively expensive for many applications, for example, in molecules with many atoms, or when many geometric configurations must be considered.To reduce this cost, machine learning techniques have risen to the fore.These substitute physics-based calculations with a machine learning model, turning the electronic structure problem into a regression task to map a chemical description to the electronic state and properties [2,3].

3The most common machine learning models for electronic structure target the electronic energy.In one approach, known as machine learning force fields, the inputs are the molecular geometry and element types (and sometimes atomic energies) [4][5][6][7][8][9][10][11][12][13][14][15].Another common class of models requires first carrying out a simpler molecular electronic structure calculation (e.g.semi-empirical tight-binding density functional theory) to generate an input to a model that predicts the energy of a more sophisticated electronic structure method on the same molecule [16][17][18].In both approaches, much effort has focused on improving the featurization and model architectures, for example to explicitly incorporate the equivariance and invariance that arise from physical symmetries.[13].These ML models have achieved considerable success, greatly reducing the time to obtain quantum mechanical quality energies.However, the energy is only a single facet of the electronic structure, and machine learning other properties of the quantum state has been comparatively less explored [19].

4Within density functional theory, due to the Hohenberg-Kohn theorem [20], the ground-state electron density formally yields all properties of the associated quantum state.Machine learning the electron density has thus attracted recent attention [17,[21][22][23][24][25][26][27][28][29][30][31].Like their counterparts in force fields, ML density models have been explored with different sources of input data, ranging from ones that just take in the geometry and element types [21,[23][24][25][26][27][28][29][30] to ones that first require a quantum mechanical calculation [17,31].

5We will demonstrate that a powerful way to learn an accurate molecular electron density is to start from its crudest physical approximation, the superposition of atomic densities, represented on a spatial grid.In fact the atomic densities can be chosen to be extremely crude, and serve mainly to denote the size and location of the atoms, but importantly once the choice is made, they do not require recalculation for any molecule.After featurizing the input superposed atomic density on a coarse grid, our model learns the accurate molecular electron density on a high-resolution grid.This learning task is the 3D analog of image super-resolution, a well-established domain in computer vision [32,33], where crude, lossy images at low resolution are enhanced to accurate, high-resolution images.We therefore adopt a standard image processing approach, using a simple convolutional residual neural net (ResNet) [34] that does not enforce any physical symmetries.Despite this, it is easily argued that the predictions of our model are trivially invariant to symmetry transformations of the grid and molecule (as is targeted in an equivariant model construction [35]) due to the properties of our input data.We find that we achieve state-of-the-art accuracy in density prediction, improving on all previous models.Furthermore, because we do not use explicit element types, our architecture generalizes, and can be easily fine-tuned, across chemical space, which we demonstrate in molecules including elements we do not train against.From the density, we compute energies and orbitals through a single diagonalization of the Kohn-Sham Hamiltonian based on our predicted density.We find that even though we do not train against these quantities, the accuracy of our predictions exceeds that even of previous models that were trained against this data.We propose that the strategy in this work not only provides an important step forward in the density prediction problem, but opens up a new class of methods to predict real-space electronic structure properties based on well-established image processing techniques.

Density Learning and the superposition of atomic densities

6The main objective of image super-resolution is to establish a mapping from a lowresolution and potentially inaccurate image (e.g.generated by lossy compression), denoted x to its high-resolution counterpart, X.We view density learning through the same lens.Namely, given an inaccurate and low-resolution molecular density, we wish to predict the accurate molecular density, here defined as the self-consistent pseudopotential DFT density, on a finer-grid.The density learning essentially performs two tasks: it transforms the "inaccurate" density to an accurate one, and it upscales the spatial resolution of the density.The latter is similar to interpolation, and can be achieved without machine-learning techniques.The former is a more complex map, and is where data driven approaches are most useful.

7Since we wish to learn accurate densities for large molecules, it is essential for our input data to be cheap to generate.This suggests we should avoid approaches where we must first perform a low-level molecular quantum mechanical calculation, as these will be prohibitive in large problems.On the other hand, the list of atomic types and positions alone seems more parsimonious than necessary.We will define our input data to be the physically motivated approximation of the superposition of (spherical) neutral atomic densities (SAD), normalized to the total number of electrons, expressed on a low-resolution uniform grid.The spherical neutral atomic densities are obtained from filling electrons into atomic natural orbitals according to the Aufbau principle, which need to be tabulated once for the periodic table, while the cost of assembling the SAD guess on the the molecular grid requires no additional quantum calculation, is linear in the molecular size, and scalable to large molecules.The SAD guess preserves important physical constraints (e.g. it is positive) and provides qualitative information about the size and location of the atoms, but otherwise does not provide an accurate density, as quantified below.

Training data and model

8Our training data will consist of DFT densities computed in the Gaussian-Plane-Wave approach [36][37][38] using the Perdew-Burke-Ernzerhof (PBE) functional [39], the Goedecker-Teter-Hutter (GTH) pseudopotential [40], and the GTH-TZV2P basis set [36], computed on a fine uniform grid, as implemented in the PySCF [37,38] package.The relation between the coarse grid for the input density and predicted fine uniform grid is a factor of 2 or 4 in each dimension as specified below (an overall factor of 8 or 64 in the number of density points; note, the high-resolution grid is fixed, so the coarse-grid is scaled).

9The model is a convolutional residual neural net (ResNet), adapted from the ResNet part of the SRGAN superresolution model [41] by extending it to 3D, and with other adaptations discussed in the SI section 1.Note that, as we do not target human perception of the visual quality of the image, we do not use an adversarial network for our loss function (as used in image-processing tasks to produce images that are visually realistic to humans [41]) but instead use a standard mean absolute error (MAE) loss

10Recent learning approaches for molecular systems have favoured the incorporation of physical symmetries into the model, such as equivariance under the coordinate transformations corresponding to translations, rotations, and reflections.For example, in [35], an equivariant network is used to ensure that the density prediction is invariant under simultaneous coordinate transformations of the nuclear positions and the gridpoints at which the density is evaluated.Our approach achieves the same equivariance in a straightforward manner without needing to use an equivariant model architecture.This is because the input SAD density is invariant under simultaneous coordinate transformations of the molecule and grid points.When, for example, the molecule is rotated, the input density is rotated and expressed on a set of grid points which are similarly rotated.The values of the input density are thus unchanged, and since the model uses only the values of the density (not the coordinates of the grid points) the predictions are unchanged.

Density learning on the test set

11In Table 1, we summarize the accuracy of our density model trained on the QM9 dataset, which contains 134K small neutral organic molecules composed of the CHONF elements [42].As is usual, the dataset is split into training (used to optimize the model parameters), validation (used to determine the end-point of training), and test (used for independent assessment) datasets, and we follow the splitting used in Ref. [35].

12We consider two types of input densities.The first is the standard low quality SAD input density (similar to the atomic guess approach in NWChem [43] but without building and diagonalizing a molecular Fock), based on pre-tabulated atomic natural orbitals expanded in a Gaussian atomic basis [44][45][46].The other is of even lower ("atrocious") quality, and is generated by modifying the SAD density by multiplying the Gaussian basis exponents of the atomic natural orbitals to be filled by electrons by two.This results in a highly spatially contracted density that is very poor in terms of Err ρ but which still preserves qualitative information about the atom positions and the relative order of atom sizes.

13As shown in Table 1, starting from the SAD guess, and using an upscaling factor of 2, our model refines the density error of the input SAD density by two orders of Table 1 Density prediction error Errρ(%) on QM9 test set.ResNet (This work) starts from the SAD guess and uses an upscaling factor of 2.More details and other data in the text.Note that the DeepDFT, OrbNet-Equi models, and this work were fitted to QM densities generated from different DFT computational procedures, and the errors were computed with respect to each of their ground-truth densities.

ResNet (This work)

14inv-/eqDeepDFT [35] OrbNet-Equi [17] Density Fitting SAD guess 0.14 0.36/0.270.21 0.29 13.9

15magnitude.The atrocious SAD density has a worse input density error by a factor of 2 from the SAD density (Err ρ = 27.7%).However, using this input, the model achieves a 173-fold factor of improvement, and the predicted error in the density is then almost the same as when using the standard SAD input (model prediction Err ρ = 0.16% on the test set), testifying to the robustness of the model.If we upscale the resolution by a factor of 4, the result is only slightly less accurate than upscaling by a factor of 2, with Err ρ = 0.19%.To place our results in perspective, we compare to the density prediction error of some recent density learning approaches on the same datasets.The invDeepDFT and eqDeepDFT models [35] are respectively invariant and equivariant models that take the molecular structure and element types as inputs, while OrbNet-Equi [17] uses data from a molecular semi-empirical tight-binding DFT calculation.We reproduce their reported errors in Table 1 and we find that we outperform all these prior models.

16We further compare to the error from a direct numerical fit of the target density.For this we use Gaussian density fitting, a common numerical representation in quantum chemistry which expands the density in an auxiliary Gaussian basis [47].(Certain density learning approaches aim to learn the coefficients of expansion of the density in such a basis [17,21,[23][24][25]).Here we choose the auxiliary basis to be the default even tempered Gaussian auxiliary basis in PySCF for the GTH-TZV2P basis set, and fit using the overlap metric [48] (to minimize the least squares density error).Our density model outperforms even this direct numerical fit to the data by a factor of 2.

Energies and properties from predicted densities

17Within the framework of Kohn-Sham density functional theory, the total electronic energy and orbitals can be obtained from the exact electron density via a single diagonalization of the effective Kohn-Sham Hamiltonian ("one-step" DFT).The quality of the energy and orbitals therefore report on the exactness of the predicted densities by our model in a physically meaningful way, even though our model is not trained on the energy and orbitals directly.We note, however, that it can be argued that the required diagonalization in the one-step DFT means that this is not a pure data-driven approach to obtain these quantities.

18In Table 2, we show the MAE in energy on the QM9 dataset.We compare to predictions from a number of recent equivariant models which are trained to the energy rather than the density.The learned densities from our model allow us to achieve state-of-art accuracy in the energy as well (out-performing all other models in the The errors in the highest-occupied-molecular-orbital (HOMO) and lowestunoccupied-molecular-orbital (LUMO) energies (ϵ HOMO , ϵ LUMO ), HOMO-LUMO gap (∆ϵ) are also reported in Table 2.As is evident, the one-step DFT HOMO/LUMO energy predictions from our predicted densities are larger than for the total energy.This is because near the DFT electronic minimum, the energy error is quadratic in the density error (which is here small), while the relationship for other observables is linear.[50].On the other hand, even though we did not train to these quantities, we still see competitive (or even better) accuracy for predicting HOMO-LUMO energies and the gap compared to prior models, even though these other models were trained on the HOMO-LUMO data.

Transferability on Unseen Geometries and Elements

19We now assess the transferability of our model.As a first task, we consider the performance of our ResNet model trained on QM9 on a different dataset of the isomers C 7 O 2 H 10 .Unlike QM9 which consists only of equilibrium molecular geometries, the C 7 O 2 H 10 dataset contains diverse conformers sampled at high temperature, and thus the geometries and associated electron densities extend outside of the training space of QM9.Specifically, the C 7 O 2 H 10 dataset comprises 5,000 conformations for each of the 113 isomers of C 7 O 2 H 10 .As these conformations were sampled at 1 fs intervals from molecular dynamics (MD) simulations and data at adjacent time steps are very correlated, we downsampled by a factor of 100 for each isomer trajectory, resulting in a total of 5650 less correlated data points.

20As shown in Table 3, our ResNet model trained on QM9 (denoted Zero-shot) moderately decreases in accuracy when evaluated on the C 7 O 2 H 10 dataset, illustrating a qualitative difference between equilibrium and non-equilibrium structure densities.This hypothesis is supported by the high accuracy we observe when evaluating our model densities only for the initial conformation of each of the 113 isomer MD trajectories (Err ρ = 0.13%), which correspond to local energy minima.We also assess the Zero-shot eqDeepDFT (trained on QM9) model.This gives a zero-shot density error of 1.8% on the full diluted dataset and 0.29% on the first conformation of each isomer.The zero-shot error of ResNet is not only smaller than that of eqDeepDFT, but the increase from the QM9 test error is also smaller than that of eqDeepDFT.This shows that our density model not only fits better but also generalizes better.Despite the decrease in accuracy of our predicted densities, when fed into a one-step diagonalization, our Zero-shot ResNet model still predicts energies within "chemical accuracy" of 1 kcal/mol (24.5 meV = 0.56 kcal/mol) in the total energy.Since we did not train to energies and the density learning was trained without conformational diversity of this isomer dataset, this illustrates surprising robustness of the model.In fact, the energy accuracy far exceeds that of one machine learning force field (DTNN) and is comparable to that of another (SchNet) that were specifically trained to reproduce the energy on this dataset.

21To obtain better performance, we further fine-tune our ResNet model after training on QM9, using a small dataset comprising the first two downsampled conformationsincluding the one at the energy minimum-from each of the 113 trajectories.During training, we monitored the validation loss on the third conformation of each trajectory.Since the conformations in the dataset are ordered by the MD simulation time, the use of the first 3 conformations for training and validation limits our model's fine-tuning to future conformations.

22In Table 3, we show the accuracy of the fine-tuned model on the last 40 downsampled conformations of each trajectory.As such, the middle data points (4th-9th) of each trajectory are never used, and this gap between the training/validation set and test set helps minimize the correlation between the training and test data, creating a more stringent test.We note that using the first two conformations of each isomer corresponds to only 4% of our downsampled C 7 O 2 H 10 dataset (and 0.04% of the original dataset).Typically, such limited training data (113 × 2 = 226 data points) does not suffice to train a deep neural network, thus a fine-tuning approach is essential.Training to this small dataset alone yields the From-scratch ResNet model which is less accurate than the predictions from the zero-shot ResNet model.Fine-tuning leads to a (more than) two-fold decrease of the density and energy error on the C 7 O 2 H 10 set and a performance close to that achieved by ResNet in the QM9 testing set.

23We next evaluate the ResNet model transferability on unseen elements and molecular charges.These are non-trivial tasks for models that explicitly require the element types as input, and (indeed, without any modification) is impossible for certain models.However, our network can be applied without any modification in both these cases.

24As a first test, we create a training and validation set for QM9 that deliberately omits the N atom, and train a model to this limited data.The model yields a density error of 1.4% when tested on the remaining nitrogen-containing QM9 molecules.This error is significantly higher than what we saw in the previous transferability tests on the isomer dataset.However, the 1.4% error still represents a substantial improvement over the initial SAD guess, which has a density error of 13.6%.Further analysis reveals that the density error specifically associated with nitrogen is 3.3%, compared to a 7.8% error in the SAD guess around the nitrogen atoms.(The density error around the atoms was evaluated using grid points within the atomic radii as taken from Ref. [52]).This indicates that the pre-training on the limited QM9 dataset without nitrogen enhances the model's ability to predict densities for the unseen nitrogen element.

25As a second even harder test, we consider a large biological system, namely, a model of the GTP hydrolysis reaction in microtubules [53] (denoted here the MT dataset).This consists of on average 211 atoms and a wide range of conformations involving close interactions between GTP, water, and protein amino acid residues, and bondbreaking during GTP hydrolysis.From the density prediction perspective, the system is especially challenging as it carries a total charge of -4 and also includes two new elements compared to the QM9 dataset, namely phosphorus and magnesium.

26The previous transferability task omitted nitrogen in the QM9 dataset but trained on data containing oxygen and fluorine elements.Thus testing on molecules with the unseen nitrogen element tests the interpolation ability of the model between two adjacent elements in the periodic table.In contrast, moving from the QM9 dataset to the MT dataset involves extrapolating elemental and charge state behaviour.As such, very accurate predictions are not anticipated in this scenario.Indeed, we find using the Zero-shot ResNet model a relatively large average error (2.1%) with a large density error around the phosphorus and magnesium elements (7.8% and 33% respectively).A visual check confirms that the density errors are predominantly around the unseen elements (Figure 1).

27To improve on the Zero-shot model, we can use fine-tuning.Again, we limit ourselves to a small training set, containing a few initial conformations of the MD trajectories.Despite using limited training data (110 data points, comprising only 8% of the total data), the fine-tuned ResNet model achieves a 0.33% accuracy in density prediction on the test data (approximately 88% of the entire MT dataset), again approaching the accuracy of our state-of-the-art model on the simpler QM9 training dataset.In comparison, training from scratch with the same limited data results in a model that is much less accurate than the fine-tuned one.This highlights that pretraining our density model on a standard dataset such as QM9, in conjunction with a modest amount of fine-tuning, achieves quantitative accuracy even in the extremely challenging case of unseen systems with new charge states and unusual elements.

Discussions

28We have demonstrated that a simple machine learning strategy, inspired by image super-resolution methods, is a promising approach for electron density prediction.The model is based on a convolutional residual network, and the input is a crude guess of the density (superposition of atomic densities; SAD) represented on a coarse 3D real-space grid.We showed that even extremely poor input atomic guesses make virtually no difference to the accuracy, thus the input density mainly encodes the atomic positions and atom types (the latter implicitly represented the size of the atomic density).The model then transforms the initial guess density into the accurate quantum mechanical ground-state density on a fine grid.The model achieves equivariance under standard molecular transformations by virtue of the properties of the input density.

29From a computer vision perspective, the above process mimics the well-studied image super-resolution problem.From a physical perspective, the model may be viewed as indirectly learning the Hohenberg-Kohn (HK) map from the nuclear electrostatic potential v ext (r) to the ground-state density, where the nuclear potential is encoded in the features of the input density.The latter may be seen as in the spirit of Bright-Wilson's argument [54,55] that the nuclear potential of the Hamiltonian may be identified from the features of the density.

30Following the density prediction, a one-step DFT calculation enables the extraction of various DFT electronic properties, such as the total energies and molecular orbitals.We found that this gave state-of-art accuracy in predicting total and orbital energies even without training against such data.Importantly, our model also displayed significant transferability to previously unseen molecular geometries and moderate transferability for "interpolated" chemical elements (with atomic number in between elements seen during training).After fine-tuning our pre-trained model on limited new data corresponding to new geometries and elements, we could achieve accurate predictions in all the cases we examined.Such transferability and fine-tunability suggests our approach is well-suited to an ensemble-based active learning setup [56,57] on large unlabeled datasets.Given its transferability, there should be a significant reduction in the need for expensive DFT data labeling.

31The success of our real-space approach to learn densities also suggests applications to other objects which are naturally expressed on real-space grids.In addition, while the electron density provides access to the electronic observables such as the energy after a single diagonalization, as performed in this work, it is desirable to use a datadriven approach to bypass this expensive computational step.These directions will be explored in the future.

Computational Details for DFT Data Generation

32All calculations employed the multigrid Gaussian plane wave (GPW) DFT as implemented in PySCF.We set a plane wave cutoff of 400 Ry, corresponding to a real-space grid spacing of approximately 0.083 Å, and utilized the GTH pseudo-potentials and GTH-TZV2P basis sets.For all the datasets, the box size was determined based on the closest even-number multiple of the grid spacing while ensuring a minimum of 4 Å of space around the molecule in every dimension.This box size occasionally led to SCF convergence issues for some long conjugate chains in QM9, and a 5 Å margin was used instead for these cases.A SCF convergence threshold of 10 −11 Hartree was set for the QM9 calculations.The GTP hydrolysis in microtubules (MT) dataset contains 1442 configurations extracted from 11 metadynamics runs [1].The total simulation time for the metadynamics trajectories was about 750 ps.Configurations spaced every 12 hours of wall time, corresponding to a 0.5-1 ps simulation interval, were included in the dataset.For the MT dataset, the SCF convergence criteria were 10 −7 Hartree for the energy and 10 −5 for the orbital gradient.To aid SCF convergence, we used an electronic smearing with an electronic temperature of 0.01 Hartree.All DFT calculations were conducted using the PBE functional.

Model Details

33The convolutional residual network employed by Ledig et al. [2] was adapted for electron density prediction.Our modifications were (1) changing the 2D convolution into a 3D one, (2) substituting batch normalization with instance normalization, (3) appending a ReLU layer to the network output to guarantee positive density values, and (4) normalizing the ReLU output to match the correct electron number, i.e., ρ ← N e ρ/ ρdr.All convolutions maintained a stride of 1, with padding applied to preserve the original size.Circular padding was employed to respect the periodic boundary conditions.The resulting architecture is depicted in Figure 1.

34Figure 2 summarizes the hyperparameters and density errors for all models in this study.Each model underwent 50 epochs of training using the density MAE as the training loss, with the best model chosen based on the lowest validation error.The first epoch used a warm-up with a 10 5 times reduced learning rate, followed by a cosine scheduler from the second epoch starting with a learning rate specified in Figure 2. We employed the Adam optimizer [3] with β 1 = 0.9 and β 2 = 0.99.Training data was augmented with a random rotation along the x, y, or z axes.A batch size of 1, combined with instance normalization and data augmentation, proved sufficient for regularization across all cases, eliminating the need for weight decay.The data splitting for QM9 followed Ref. [4].As mentioned in the main text, the original C 7 O 2 H 10 dataset, comprising 5000 conformations for each of the 113 isomers, was downsampled by a factor of 100 to yield less correlated data.The first two conformations of each isomer in the diluted dataset served as the training data, with the third used for validation.The entire (diluted) dataset was used for testing if the model was not trained on this dataset and otherwise the final 40 conformations were used for testing.For the MT dataset, the first 10 conformations from each of the 11 metadynamics trajectories were used for training, the 11th for validation, and the 17th to the last for testing.Fine-tuning on C 7 O 2 H 10 and MT followed exactly the same training protocol, but the models were initialized from the best QM9-trained model.Fig. 2: Density prediction error of all trained models.All the models were trained to predict the density expressed on the fine-grid (the DFT computational resolution), while the number of upscaling blocks describes the downsampling of the input density by a factor of 2 Nup in each dimension."lr" specifies the learning rate.C indicates the channel size for the convolution.The "atrocious" label means that the artificially worsened SAD guess was used as the model input.The "noN" label signifies the set of QM9 molecules that do not contain a nitrogen atom, while "N" means the remaining nitrogen-containing molecules.

Fig. 1

35Fig. 1 Density prediction on a microtubule-mediated GTP hydrolysis model.The first row shows the electron density isosurface at 0.1 e/Bohr 3 .The second row shows the density prediction error (Ä pred − Ä ref ) isosurfaces at 0.003 e/Bohr 3 (transparent red) and -0.003 e/Bohr 3 (transparent blue).Coloring of atoms: oxygen (red), nitrogen (blue), carbon (silver), hydrogen (white), phosphorus (gold), and magnesium (pink).

Fig. 1 :

36Fig. 1: Model architecture.K indicates the kernel size used in the convolution.

Table 2

37Electronic property prediction errors on QM9.Quantities defined in the text.Energy errors (E elec , ϵ HOMO , ϵ LUMO , ∆ϵ) are given as the MAE.ResNet (This work) starts from the SAD guess and uses an upscaling factor of 2.Table) even though the energy is not a training target.This attests to centrality of the density as a learning target.

Table 3

38Transferability check of the ResNet model trained on QM9.The errors are reported as MAE.Zero-shot means the model trained on QM9 is tested on the C 7 O 2 H 10 and MT datasets, fine-tuned means that after training on QM9, the ResNet model is further fine-tuned on a small portion of each dataset.From-scratch represents a ResNet model trained only on the C 7 O 2 H 10 or MT data, starting from randomly initialized parameters.

참고문헌 73건

  1. Big Data Meets Quantum Chemistry Approximations: The Δ-Machine Learning Approach Journal of Chemical Theory and Computation · American Chemical Society · 2015 10.1021/acs.jctc.5b00099
  2. Generalized Gradient Approximation Made Simple Physical Review Letters · American Physical Society · 1996 10.1103/physrevlett.77.3865
  3. Coulombic potential energy integrals and approximations The Journal of Chemical Physics · American Institute of Physics · 1973 10.1063/1.1679012
  4. Pseudopotentials for H to Kr optimized for gradient-corrected exchange-correlation functionals Theoretical Chemistry Accounts · Springer Science+Business Media · 2005 10.1007/s00214-005-0655-y
  5. Quickstep: Fast and accurate density functional calculations using a mixed Gaussian and plane waves approach Computer Physics Communications · Elsevier BV · 2005 10.1016/j.cpc.2004.12.014
  6. Finding Density Functionals with Machine Learning Physical Review Letters · American Physical Society · 2012 10.1103/physrevlett.108.253002
  7. Generalized Neural-Network Representation of High-Dimensional Potential-Energy Surfaces Physical Review Letters · American Physical Society · 2007 10.1103/physrevlett.98.146401
  8. Relativistic atomic natural orbital type basis sets for the alkaline and alkaline-earth atoms applied to the ground-state potentials for the corresponding dimers Theoretical Chemistry Accounts · Springer Science+Business Media · 2003 10.1007/s00214-003-0537-0
  9. Inhomogeneous Electron Gas Physical Review · American Institute of Physics · 1964 10.1103/physrev.136.b864
  10. Exchange-correlation potentials The Journal of Chemical Physics · American Institute of Physics · 1996 10.1063/1.472753
  11. Fitting the Coulomb potential variationally in linear-combination-of-atomic-orbitals density-functional calculations Physical review. A, General physics · American Institute of Physics · 1982 10.1103/physreva.25.88
  12. Main Group Atoms and Dimers Studied with a New Relativistic ANO Basis Set The Journal of Physical Chemistry A · American Chemical Society · 2003 10.1021/jp031064+
  13. Quantum chemistry structures and properties of 134 kilo molecules Scientific Data · Nature Portfolio · 2014 10.1038/sdata.2014.22
  14. Gaussian Approximation Potentials: The Accuracy of Quantum Mechanics, without the Electrons Physical Review Letters · American Physical Society · 2010 10.1103/physrevlett.104.136403
  15. Molecular Single‐Bond Covalent Radii for Elements 1–118 Chemistry - A European Journal · Wiley · 2008 10.1002/chem.200800987
  16. Deep Residual Learning for Image Recognition 2016 10.1109/cvpr.2016.90
  17. Bypassing the Kohn-Sham equations with machine learning Nature Communications · Nature Portfolio · 2017 10.1038/s41467-017-00839-3
  18. ANI-1: an extensible neural network potential with DFT accuracy at force field computational cost Chemical Science · Royal Society of Chemistry · 2017 10.1039/c6sc05720a
  19. SchNet: A continuous-filter convolutional neural network for modeling quantum interactions arXiv (Cornell University) · Cornell University · 2017
  20. Deep Potential Molecular Dynamics: A Scalable Model with the Accuracy of Quantum Mechanics Physical Review Letters · American Physical Society · 2018 10.1103/physrevlett.120.143001
  21. P<scp>y</scp>SCF: the Python‐based simulations of chemistry framework Wiley Interdisciplinary Reviews Computational Molecular Science · Wiley · 2017 10.1002/wcms.1340
  22. Less is more: Sampling chemical space with active learning The Journal of Chemical Physics · American Institute of Physics · 2018 10.1063/1.5023802
  23. Neural-network Kohn-Sham exchange-correlation potential and its out-of-training transferability The Journal of Chemical Physics · American Institute of Physics · 2018 10.1063/1.5029279
  24. The Power of Ensembles for Active Learning in Image Classification 2018 10.1109/cvpr.2018.00976
  25. Transferability in Machine Learning for Electronic Structure via the Molecular Orbital Basis Journal of Chemical Theory and Computation · American Chemical Society · 2018 10.1021/acs.jctc.8b00636
  26. Transferable Machine-Learning Model of the Electron Density ACS Central Science · American Chemical Society · 2018 10.1021/acscentsci.8b00551
  27. Deep learning and density-functional theory Physical review. A/Physical review, A · American Physical Society · 2019 10.1103/physreva.100.022512
  28. Solving the electronic structure problem with machine learning npj Computational Materials · Nature Portfolio · 2019 10.1038/s41524-019-0162-7
  29. PhysNet: A Neural Network for Predicting Energies, Forces, Dipole Moments, and Partial Charges Journal of Chemical Theory and Computation · American Chemical Society · 2019 10.1021/acs.jctc.9b00181
  30. Approaching coupled cluster accuracy with a general-purpose neural network potential through transfer learning Nature Communications · Nature Portfolio · 2019 10.1038/s41467-019-10827-4
  31. Predicting charge density distribution of materials using a local-environment-based graph convolutional network Physical review. B./Physical review. B · American Physical Society · 2019 10.1103/physrevb.100.184103
  32. Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network 2017 10.1109/cvpr.2017.19
  33. Electron density learning of non-covalent systems Chemical Science · Royal Society of Chemistry · 2019 10.1039/c9sc02696g
  34. Machine Learning the Physical Nonlocal Exchange–Correlation Functional of Density-Functional Theory The Journal of Physical Chemistry Letters · American Chemical Society · 2019 10.1021/acs.jpclett.9b02422
  35. Toward the Exact Exchange–Correlation Potential: A Three-Dimensional Convolutional Neural Network Construct The Journal of Physical Chemistry Letters · American Chemical Society · 2019 10.1021/acs.jpclett.9b02838
  36. Unifying machine learning and quantum chemistry with a deep neural network for molecular wavefunctions Nature Communications · Nature Portfolio · 2019 10.1038/s41467-019-12875-2
  37. Atlas of putative minima and low-lying energy networks of water clusters <i>n</i> = 3–25 The Journal of Chemical Physics · American Institute of Physics · 2019 10.1063/1.5128378
  38. Deep Learning for Image Super-Resolution: A Survey IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2020 10.1109/tpami.2020.2982166
  39. Completing density functional theory by machine learning hidden messages from molecules npj Computational Materials · Nature Portfolio · 2020 10.1038/s41524-020-0310-0
  40. Machine learning accurate exchange and correlation functionals of the electronic density Nature Communications · Nature Portfolio · 2020 10.1038/s41467-020-17265-7
  41. Kohn-Sham Equations as Regularizer: Building Prior Knowledge into Machine-Learned Physics Physical Review Letters · American Physical Society · 2021 10.1103/physrevlett.126.036401
  42. Bypassing the Kohn-Sham equations with machine learning Nature Communications · Nature Portfolio · 2017 10.1038/s41467-017-00839-3
  43. Neural-network Kohn-Sham exchange-correlation potential and its out-of-training transferability The Journal of Chemical Physics · American Institute of Physics · 2018 10.1063/1.5029279
  44. When do short-range atomistic machine-learning models fall short? The Journal of Chemical Physics · American Institute of Physics · 2021 10.1063/5.0031215
  45. Learning the Exchange-Correlation Functional from Nature with Fully Differentiable Density Functional Theory Physical Review Letters · American Physical Society · 2021 10.1103/physrevlett.127.126403
  46. Machine learning meets chemical physics The Journal of Chemical Physics · American Institute of Physics · 2021 10.1063/5.0051418
  47. SE(3)-equivariant prediction of molecular wavefunctions and electronic densities arXiv (Cornell University) · Cornell University · 2021
  48. Deep Density: Circumventing the Kohn-Sham equations via symmetry preserving neural networks Journal of Computational Physics · Elsevier BV · 2021 10.1016/j.jcp.2021.110523
  49. Learning Electron Densities in the Condensed Phase Journal of Chemical Theory and Computation · American Chemical Society · 2021 10.1021/acs.jctc.1c00576
  50. Real-world single image super-resolution: A brief review Information Fusion · Elsevier BV · 2021 10.1016/j.inffus.2021.09.005
  51. Pushing the frontiers of density functionals by solving the fractional electron problem Science · American Association for the Advancement of Science · 2021 10.1126/science.abj6511
  52. Toward Orbital-Free Density Functional Theory with Small Data Sets and Deep Learning Journal of Chemical Theory and Computation · American Chemical Society · 2022 10.1021/acs.jctc.1c00812
  53. Roadmap on Machine learning in electronic structure Electronic Structure · IOP Publishing · 2022 10.1088/2516-1075/ac572f
  54. E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials Nature Communications · Nature Portfolio · 2022 10.1038/s41467-022-29939-5
  55. Evolving symbolic density functionals Science Advances · American Association for the Advancement of Science · 2022 10.1126/sciadv.abq0279
  56. Density matrix averaged atomic natural orbital (ANO) basis sets for correlated molecular wave functions Theoretica Chimica Acta · Springer Science+Business Media · 1990 10.1007/bf01120130
  57. Informing geometric deep learning with electronic interactions to accelerate quantum chemistry Proceedings of the National Academy of Sciences · National Academy of Sciences · 2022 10.1073/pnas.2205221119
  58. Equivariant graph neural networks for fast electron density estimation of molecules, liquids, and solids npj Computational Materials · Nature Portfolio · 2022 10.1038/s41524-022-00863-y
  59. Predicting accurate ab initio DNA electron densities with equivariant neural networks Biophysical Journal · Elsevier BV · 2022 10.1016/j.bpj.2022.08.045
  60. Density-Functional Theory of Atoms and Molecules Oxford University Press eBooks · Oxford University Press · 1995 10.1093/oso/9780195092769.001.0001
  61. Electronic-Structure Properties from Atom-Centered Predictions of the Electron Density Journal of Chemical Theory and Computation · American Chemical Society · 2022 10.1021/acs.jctc.2c00850
  62. Beyond potentials: Integrated machine learning models for materials MRS Bulletin · Springer Nature · 2022 10.1557/s43577-022-00440-0
  63. Learning local equivariant representations for large-scale atomistic dynamics Nature Communications · Nature Portfolio · 2023 10.1038/s41467-023-36329-y
  64. Unveiling the catalytic mechanism of GTP hydrolysis in microtubules Proceedings of the National Academy of Sciences · National Academy of Sciences · 2023 10.1073/pnas.2305899120
  65. Predicting electronic structures at any length scale with machine learning npj Computational Materials · Nature Portfolio · 2023 10.1038/s41524-023-01070-z
  66. A deep learning framework to emulate density functional theory npj Computational Materials · Nature Portfolio · 2023 10.1038/s41524-023-01115-3
  67. Higher-order equivariant neural networks for charge density prediction in materials npj Computational Materials · Nature Portfolio · 2024 10.1038/s41524-024-01343-1
  68. Electronic structure prediction of multi-million atom systems through uncertainty quantification enabled transfer learning npj Computational Materials · Nature Portfolio · 2024 10.1038/s41524-024-01305-7
  69. MoleOrbitalHybridAnalyst/resent_density: v1.0.1 Zenodo (CERN European Organization for Nuclear Research) · European Organization for Nuclear Research · 2025 10.5281/zenodo.15226766
  70. GTP-in-Microtubule DFT Electron Density CaltechDATA · 2024 10.22002/v5tec-g6p43
  71. QM9 DFT Electron Density CaltechDATA · 2024 10.22002/7vr2f-0r732
  72. C7O2H10 Isomer DFT Electron Density CaltechDATA · 2024 10.22002/04d1z-1d608
  73. Recent developments in the PySCF program package arXiv (Cornell University) · Cornell University · 2022 10.48550/arxiv.2002.12531