scieee AI-readable full text Open interactive document viewer

An Efficient Deep Learning Scheme To Predict the Electronic Structure of Materials and Molecules: The Example of Graphene-Derived Allotropes

Kuenneth, Christopher,Tran, Huan Doan,Ramprasad, Rampi,González Del Rio, Beatriz

Abstract

Producción Científica

Full text

An Efficient Deep Learning Scheme to Predict the Electronic Structure of Materials and Molecules: The Example of Graphene-Derived Allotropes Beatriz G. del Rio, Christopher Kuenneth, Huan Doan Tran, and Rampi Ramprasad∗ School of Materials Science and Engineering, Georgia Institute of Technology, 771 Ferst Drive NW, Atlanta, GA 30332, United States E-mail: rampi.ramp[email protected] Abstract Computations based on density functional theory (DFT) are transforming various aspects of materials research and discovery. However, the effort required to solve the central equation of DFT, namely the Kohn-Sham equation, remains a major obstacle for studying large systems with hundreds of atoms in a practical amount of time with routine computational resources. Here, we propose a deep learning architecture that systematically learns the input-output behavior of the Kohn-Sham equation and predicts the electronic density of states, a primary output of DFT calculations, with unprecedented speed and chemical accuracy. The algorithm also adapts and progressively improves in predictive power and versatility as it is exposed to new diverse atomic configurations. We demonstrate this capability for a diverse set of carbon allotropes spanning a large configurational and phase space. The electronic density of states, 1 along with the electronic charge density, may be used downstream to predict a variety of materials properties, bypassing the Kohn-Sham equation, leading to an ultrafast and high-fidelity DFT emulator. Introduction Density functional theory (DFT)1,2 has become an invaluable computational workhorse for materials development and design. It has impacted a variety of fields ranging from energy storage,3–5 catalysis,6,7 fuel production and chemical transformations,8,9 design of advanced electronic and functional materials,10,11 and the understanding of materials behavior under a variety of extreme conditions,12,13 to just name a few. DFT addresses the many-electron many-nuclear problem of quantum mechanics through a series of approximations and leaps of imagination and ingenuity, and ultimately involves solving the effective one-electron Kohn- Sham equation.2For a given configuration of atoms, the solutions of the Kohn-Sham equation include the one-electron wavefunctions (or the electronic charge density), one-electron energy spectrum (or the electronic density of states), atomic forces, potential energy, as well as a variety of application-relevant equilibrium materials properties. Despite its versatility and reach, DFT remains a laborious computational enterprise. It requires high-performance computing hardware, robust and specialized software, and fairly in-depth knowledge and expertise to execute the calculations in a credible manner. Even with the availability of such resources, modern DFT ecosystems only allow the practical or routine treatment of systems involving not more than a few hundreds of atoms per repeating unit cell. In order to accelerate the speed with which one may reliably predict application-relevant properties of new materials, the community is beginning to focus attention on the creation of “surrogate” models that can be much faster than a fresh and direct DFT calculation, but mimics it in the accuracy. Such surrogate models are trained, using machine learning algorithms, on a set of reference data produced by prior DFT calculations. The last decade 2 has seen several successful examples of such predictive machine learning models applied to a variety of materials properties and application spaces.14–25 In these efforts, a mapping is established between atomic configurations and appropriate quantities of interest, such as atomic forces, potential energies and a variety of materials or molecular properties of interest. The primary bottleneck in DFT-based workflows is the computation of the electronic density of states (DOS) and charge density. Once computed, the DOS and charge density, owing to their fundamental nature, may be used to determine the above listed other quantities of interest at negligible cost. Thus, creation of a capability that can significantly speed up the prediction of DOS and charge density will impart unprecedented efficiency to the overall DFT workflow, and can lead to an ultrafast DFT emulator that can produce DFT-like output with a high degree of verisimilitude. This manner of solving the electronic structure problem will be a radical departure from attempting to directly solve the Kohn-Sham equation. In this contribution, we mainly focus on the creation of an efficient deep learning capability for the instantaneous prediction of the electronic DOS for a given configuration of atoms. A neural network (NN) architecture is trained on a database of prior reference DFT computations, and learns the relationship between the atomic configuration and the electronic DOS. Specifically, the NN is designed to take as input the environment around an atom, i.e., the distribution of its neighbouring atoms, producing as output the corresponding atomic DOS spectrum. The NN is trained such that the sum of the thus-predicted atomic DOS of all atoms in the system is required to be equal to the correct total electronic DOS calculated by DFT. As we will show here, this deep learning capability proves to be several orders of magnitude faster than the parent DFT calculation. Moreover, the present development is also a significant advance, both in terms of conceptual aspects and in terms of efficiency, compared to a recipe we proposed recently.26 While this past work also utilized deep neural networks to predict the DOS (and the electronic charge density), the training data consisted of the projected DOS at each spatial grid point. As the typical ratio of the number of grid points to the number of atoms in any system is about a million, the method of Ref. 26 leads 3 to an enormous memory requirement (for the storage of the training data), and an enormous amount of training and prediction time, hindering its use with large datasets. −2 −1 0 1 2 3 PC 1 −1 0 1 2 3 4 PC 2 Graphene Graphite C20 C40 C60 C(6,4) C(9,9) C(8,0) Defects (SW) Defects (SV) Defects (DV) Graphene (2000 K) C60 (2000 K) C(6,4) (2000 K) C(9,9) (2000K) C(8,0) (2000K) Structures # atoms Graphene 128 Graphite 108 C20 20 C40 40 C60 60 C(6,4) 152 C(9,9) 144 C(8,0) 128 Structures # atoms SW 128 Defects SV 127 -124 DV 126 -120 Graphene 128 C60 60 2000 K C(6,4) 152 C(9,9) 144 C(8,0) 128 Dataset 1 Dataset 2 Stone-Wales Single vacancies C(9,9) - 2000 K (a) (b) (c) Figure 1: (a) Datasets used to train the models in this work. The number of atoms refers to those in the repeating unit cell of each structure. (b) Main two principal components (PC) of the mean atomic fingerprints of each configuration. (c) Snapshots of carbon allotropes included in dataset 1 and in dataset 2, with red-colored atoms to identify the location of the defects. As a demonstration of the present development, we train our NN to predict the total electronic DOS of a variety of graphene-derived allotropes, including carbon nanotubes of various types, fullerene molecules, as well as graphene and graphite. Specifically, as listed in the tables of Figure 1(a), we created two different datasets, for which accurate reference DFT calculations were done. We first trained the model using dataset 1, comprised of graphene, graphite, C20, C40 and C60 fullerene molecules, and C(6,4), C(9,9) and C(8,0) single-walled carbon nanotubes (SWCNT) with different chirality. To provide the NN with sufficient examples of configurational diversity within the space of the above list of structures, 200 random snapshots of each of these structures from DFT-based molecular dynamics (MD) runs at 300 K and 600 K were procured. From this set, 80 % of the configurations were used for training and 20 % for validation. An additional separate test set of 20 configurations of each structure was created to select the best performing model after cross-validation. Figure 4 1(c) (left) shows some representative structures contained in dataset 1. In order to test the generality of the model built out of dataset 1, and also to unambiguosly demonstrate the ability to systematically improve the model through exposure to newer environments, dataset 2 was considered. Dataset 2 is comprised of defects in graphene and highly disordered structures. The considered graphene defects are Stone-Wales (SW), singlevacancies (SV), and double-vacancies (DV). A representative set of such defected structures are shown in Figure 1(c) (right). The highly disordered structures were procured from DFTMD runs at 2000 K. The train and test sets of dataset 2 were composed of a total of 830 and 83 configurations, respectively. Overall, the structural and topological diversity of the cases included in the training data considered here is enormous relative to past studies. We choose the vacuum energy as the global energy reference and the DOS of every atomic configuration was aligned with respect to it. The DFT DOS curve is partitioned into 310 windows of 0.1 eV, from -30 eV to 1 eV. To describe the atomic environment surrounding each atom in a machine-readable form, we used the same set of permutation, translation, and rotation invariant fingerprints introduced in our previous NN DOS protocol,26 but centered at each atom instead of at grid points. The fingerprints consist of a hierarchy of scalar, vector, and tensor expressions which capture the radial (scalar) and angular (vector and tensor) features of the surrounding atomic environment. The fingerprints are based on a predefined set of Gaussian functions with varying widths centered at every atom. Figure 1(b) shows the variation of the two principal components (PC) of the fingerprint features for each type of the aforementioned structures, spanning a large region of configurational space. The atomic fingerprint vectors are provided as input layer for the NN, resulting in a DOS per atom as the NN output. Addition of all the atomic DOS for a given configuration results in the predicted total DOS. To ensure an accurate prediction of the Fermi level, the cumulative sum is concatenated to the predicted total DOS. Owing to the variability in size of the structures in the datasets, the prediction is normalized by the number of atoms in 5 the configuration. This normalization ensures an equal contribution to the error metric from each structure. Figure 2 provides a schematic view of the entire protocol. N Sk,1 Vk,1 Tk,1 ′ Tk,1 ′′ Tk,1 … DOS/atom Energy (eV) DOS/atom Energy (eV) + DOS DOS ( E i ) Energy (eV) Atom 1 Sk,N Vk,N Tk,N σ1 σ2 S1 S2 Atom N Tk,N ′′ Tk,N ′ E1 E2 E3 E4 En … 1 E1 E2 E3 E4 En … Σ Dataset creation Atomic fingerprints NN DOS training NN DOS validation Figure 2: Overall scheme and workflow designed to compute the DOS of a given atomic structure using deep NN with atom centered fingerprints. After the dataset is created, each atom in an atomic structure is replaced by a fingerprint vector representing the surrounding environment. These fingerprints are provided as input layers to the NN, resulting in a DOS per atom as the output layer. All atomic DOS from the same atomic configuration are added to obtain the total DOS. Once normalized, the DOS is concatenated to its cumulative sum and validated against the DFT reference. As we will demonstrate below, the NN DOS model predicts the electronic structure of sp2- type carbon allotropes (metallic or semiconducting, and with or without a variety of defects and significant disorder) with unprecedented accuracy and speed (relative to conventional DFT computations). Owing to the flexibility of training afforded by the NN architecture, model prediction performance can be systematically and continuously improved via persistent exposure to newer varieties of configurational diversity. Further, the predicted DOS allows for a precise evaluation of the contribution of the occupied energy levels to the total energy of the system; a necessary step to achieving a machine learned DFT emulator. 6 Methods DFT Details All the reference data calculations were performed using DFT-MD simulations using the Vienna Ab Initio Simulation Package (VASP).27,28 The exchange-correlation functional was modelled using the Perdew-Burke-Ernzerhof approximation29 and the ion-electron interaction was modelled using projector-augmented wave (PAW) potentials.30 We employed a Monkhorst-Pack grid31 with a density of 0.03 ˚ A−1to sample the Brillouin zone. A plane wave basis set with kinetic energy cutoff of 800 eV was used. The chosen kinetic energy cutoff and k-point sampling converged the total energy to less than 1 meV per atom. Grimme’s D2 vdW correction was included.32 A Gaussian smearing of 0.2 eV was used. The MD simulations were performed in the NVT ensemble, with a time step of 1 fs. All structures were thermalized for 500 time steps at the desired temperature (300 K, 600 K, and 2000 K) and the snapshots were taken from the subsequent thermalized simulations spanning 2 ps. Fingerprint Details The scalar fingerprint for a given atom, i, is expressed as the sum over the number of Gaussian functions (k) of width σk, Sk=ck N X j=1 exp −R2 ij 2σ2 kfc(Rij) (1) where ckis the normalization constant defined as 1 √2πσk3 ,Rij the distance between atom jand the center atom i, and fc(Rij) a cutoff function defined as 0.5hcos πRij dc+ 1ifor Rij ≤dc, and equal to 0 for Rij > dc. In this work, we employed 18 different Gaussian widths, on a logarithmic scale (base 10) from 0.25 to 6.0 ˚ A, with a cutoff distance of dc= 7˚ A. 7 The vector and tensor components are defined as Vα k=ck N X j=1 rα ij Rij exp −R2 ij 2σ2 kfc(Rij) (2) Tαβ k=ck N X j=1 rα ijrβ ij R2 ij exp −R2 ij 2σ2 kfc(Rij) (3) where αand βrepresent the x,yor zcomponents of the radial vector between atoms iand j. While Skis rotational invariant, Vα kand Tαβ kare variant, but can be combined into four rotational invariant expressions, Vk=q(Vx k)2+ (Vy k)2+ (Vz k)2(4) Tk=Txx k+Tyy k+Tzz k(5) T0 k=Txx kTyy k+Tyy kTzz k+Txx kTzz k−(Txy k)2−(Tyz k)2−(Txz k)2(6) T00 k= det Tαβ k(7) Therefore, for each width there are five features. We employed 18 different widths, providing a feature vector for each atom with 90 components. Neural Network Architecture and Performance The number of hidden dense layers and nodes per layer were optimized to five with the first four with 300 neurons each and the last one with 312. After the last dense layer, there is a 1D convolution layer with three filters of size 3, resulting in 1D vectors of size 310, equal to the number of energy windows used to discretize the reference DOS curve. Finally, the 8 average value of the three 1D vectors for each bin is selected as the output for the value of each energy window in the DOS. The final 1D Convolution layer is included to introduce the correlation between adjacent points and ensure a smooth shape in the predicted atomic DOS. Details on the performance of the NN with different number of dense layers can be found on the Supporting Information (SI). The activation function used for each dense layer as well as for the final 1D convolution layer is rectified linear unit (ReLU). To prevent over-fitting, a L2 regularizer with 0.1 was used in each hidden layer. A dropout rate of 0.1 was also included for the hidden layers, meaning that for every pass, each node in the layer has a 10% probability of not being active. The benefit of including the dropout is twofold. First, during training, it acts as a regularization technique to reduce over fitting and second, during prediction, it allows for an evaluation of the uncertainty in such prediction. The latter technique of activating the dropout during prediction is known as Monte Carlo dropout.33,34 We used Keras35 with Tensorflow backend to implement the NN DOS model. A minibatch training of 30 with random sampling was employed along with Adam optimizer with a learning rate of 0.0001 and momentum vectors β1= 0.9 and β2= 0.999. The RMSE was employed as the objective function. We compare the computational performance of DFT and our NN DOS model, for a given graphene configuration of 128 atoms. DFT employs 3615 s to solve the Kohn-Sham equation and calculate the DOS on a Broadwell node with 28 cores and 128 GB of RAM. On the other hand, the NN requires only 5 s on a Tesla P100-PCIe GPU with 16 GB of RAM. Out of that time, the fingerprinting process requires 3 s, while the DOS prediction only takes 2 s. Albeit the comparison limitations due to the different architectures used, the achieved speed up is several orders of magnitude. Furthermore, it is worth noting the quadratic scaling (at best) of modern DFT codes with system size as opposed to the linear scaling of NN. As a final note, we performed a baseline comparison with the model in Ref. 26 by training and testing our model on the same aluminum configurations from the study. The accuracy 9 (4) Schlapbach, L.; Z¨uttel, A. Hydrogen-storage materials for mobile applications. Nature 2001, 353–358. (5) Kang, K.; Meng, Y. S.; Br´eger, J.; Grey, C. P.; Ceder, G. Electrodes with high power and high capacity for rechargeable lithium batteries. Science 2006, 977–980. (6) Greeley, J.; Jaramillo, T. F.; Bonde, J.; Chorkendorff, I. B.; Nørskov, J. K. Computational high-throughput screening of electrocatalytic materials for hydrogen evolution. Nat. Mater. 2006, 909–913. (7) Nørskov, J. K.; Abild-Pedersen, F.; Studt, F.; Bligaard, T. Density functional theory in surface chemistry and catalysis. PNAS 2011, 937–943. (8) Yan, J.; Gorai, P.; Ortiz, B.; Miller, S.; Barnett, S.; Mason, T.; Stevanovi´cab, V.; Toberer, E. Materials descriptors for predicting thermoelectric performance. Energy Environ. Sci 2015, 983–994. (9) Seh, Z.; Kibsgaard, J.; Dickens, C.; Chorkendorff, I.; Nørskov, J.; Jaramillo, T. Combining theory and experiment in electrocatalysis: Insights into materials design. Science 2017, eaad4998. (10) K¨orzd¨orfer, T.; Br´edas, J.-L. Organic electronic materials: recent advances in the DFT description of the ground and excited states using tuned range-separated hybrid functionals. Acc. Chem. Res. 2014, 3284–3291. (11) Yan, F.; Zhang, X.; Yu, Y.; Yu, L.; Nagaraja, A.; Mason, T.; Zunger, A. Design and discovery of a novel half-Heusler transparent hole conductor made of all-metallic heavy elements. Nat. Commun. 2015, 7308. (12) Christensen, N. E.; Novikov, D. L. Predicted superconductive properties of lithium under pressure. Phys. Rev. Lett. 2001, 1861–1864. 16 (13) Kolmogorov, A.; Shah, S.; Margine, E.; Bialon, A.; Hammerschmidt, T.; Drautz, R. New superconducting and semiconducting Fe-B compounds predicted with an ab initio evolutionary search. Phys. Rev. Lett. 2010, (14) Behler, J.; Parrinello, M. Generalized Neural-Network Representation of High- Dimensional Potential-Energy Surfaces. Phys. Rev. Lett. 2007, 146401. (15) Bart´ok, A.; Payne, M.; Kondor, R.; Cs´anyi, G. Gaussian Approximation Potentials: The Accuracy of Quantum Mechanics, without the Electrons. Phys. Rev. Lett. 2010, 136403. (16) Behler, J. Atom-centered symmetry functions for constructing high-dimensional neural network potentials. J. Chem. Phys. 2011, 074106. (17) Botu, V.; Ramprasad, R. Learning scheme to predict atomic forces and accelerate materials simulations. Phys. Rev. B 2015, 094306. (18) Mueller, T.; Kusne, A.; Ramprasad, R. Machine learning in materials science: Recent progress and emerging applications. Rev. Comp. Ch. 2016, 186–273. (19) Botu, V.; Batra, R.; Chapman, J.; Ramprasad, R. Machine Learning Force Fields: Construction, Validation, and Outlook. J. Phys. Chem. C 2017, 511–522. (20) Huan, T.; Batra, R.; Chapman, J.; Krishnan, S.; Chen, L.; Ramprasad, R. A universal strategy for the creation of machine learning-based atomistic force fields. Npj Comput. Mater. 2017, 37. (21) Imbalzano, G.; Anelli, A.; Giofr´e, D.; Klees, S.; Behler, J.; Ceriotti, M. Automatic selection of atomic fingerprints and reference configurations for machine-learning potentials. J. Chem. Phys 2018, 241730. (22) Mannodi-Kanakkithodi, A.; Chandrasekaran, A.; Kim, C.; Huan, T.; Pilania, G.; 17 Botu, V.; Ramprasad, R. Scoping the polymer genome: A roadmap for rational polymer dielectrics design and beyond. Mater. Today 2018, 785–96. (23) Kim, C.; Chandrasekaran, A.; Huan, T. D.; Das, D.; Ramprasad, R. Polymer Genome: A Data-Powered Polymer Informatics Platformfor Property Predictions. J. Phys. Chem. C2018, 17575–17585. (24) Batra, R.; Tran, H.; Kim, C.; Chapman, J.; Chen, L.; Chandrasekaran, A.; Ramprasad, R. General Atomic Neighborhood Fingerprint for Machine Learning-Based Methods. J. Phys. Chem. C 2019, 15859–15866. (25) Kim, C.; Chandrasekaran, A.; Jha, A.; Ramprasad, R. Active-learning and materials design: the example of high glass transition temperature polymers. MRS Commun. 2019, 860–6. (26) Chandrasekaran, A.; Kamal, D.; Batra, R.; Kim, C.; Chen, L.; Ramprasad, R. Solving the electronic structure problem with machine learning. Npj Comput. Mater. 2019, 22. (27) Kresse, G.; Furthm¨uller, J. Efficient iterative schemes for ab initio total-energy calculations using a plane-wave basis set. . Phys. Rev. B 1996, 11169–86. (28) Kresse, G.; Furthm¨uller, J. Efficiency of ab-initio total energy calculations for metals and semiconductors using a plane-wave basis set. J. Comput. Mater. Sci. 1996, 15–50. (29) Perdew, J.; Burke, K.; Ernzerhof, M. Generalized Gradient Approximation Made Simple. . Phys. Rev. Lett. 1996, 3865–8. (30) Kresse, G. From ultrasoft pseudopotentials to the projector augmented-wave method. Phys. Rev. B 1999, 1758–75. (31) Monkhorst, H.; Pack, J. Special points for Brillouin-zone integrations. Phys. Rev. B 1976, 5188–92. 18 (32) Grimme, S. Semiempirical gga-type density functional constructed with a long-range dispersion correction. J. Comp. Chem. 2006, 1787. (33) Gal, Y.; Ghahramani, Z. Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. Proceedings of the 33rd International Conference on Machine Learning (ICML-16) 2016, (34) Gal, Y. Uncertainty in Deep Learning. Ph.D. thesis, University of Cambridge 2016, (35) Chollet, F., et al. Keras. https://keras.io, 2015. 19 Graphical TOC Entry Density of states Energy Time ~ seconds Time ~ hours DFT 20