<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>QH9: A Quantum Hamiltonian Prediction Benchmark for QM9 Molecules</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10460979</idno>
					<idno type="doi"></idno>
					<title level='j'>arXivorg</title>
<idno>2331-8422</idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Meng Liu Haiyang Yu</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Supervised machine learning approaches have been increasingly used in accelerating electronic structure prediction as surrogates of first-principle computational methods, such as density functional theory (DFT). While numerous quantum chemistry datasets focus on chemical properties and atomic forces, the ability to achieve accurate and efficient prediction of the Hamiltonian matrix is highly desired, as it is the most important and fundamental physical quantity that determines the quantum states of physical systems and chemical properties. In this work, we generate a new Quantum Hamiltonian dataset, named as QH9, to provide precise Hamiltonian matrices for 2,399 molecular dynamics trajectories and 130,831 stable molecular geometries, based on the QM9 dataset. By designing benchmark tasks with various molecules, we show that current machine learning models have the capacity to predict Hamiltonian matrices for arbitrary molecules. Both the QH9 dataset and the baseline models are provided to the community through an open-source benchmark, which can be highly valuable for developing machine learning methods and accelerating molecular and materials design for scientific and technological applications.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Machine learning methods have shown great potential in accelerating computations in quantum chemistry tasks. For example, a variety of invariant geometric deep learning methods have been developed to encode pairwise distances and bond angles in molecular and materials systems <ref type="bibr">[Sch&#252;tt et al., 2018</ref><ref type="bibr">, Gasteiger et al., 2020</ref><ref type="bibr">, 2021</ref><ref type="bibr">, Liu et al., 2022</ref><ref type="bibr">, Wang et al., 2022]</ref> to accelerate the prediction of their chemical properties as data-driven surrogate approximations. To enhance the prediction of vectorial properties, such as force fields, equivariant deep learning methods have been developed to capture permutation, translation, and rotation equivariance for equivariant property prediction <ref type="bibr">[Satorras et al., 2021</ref><ref type="bibr">, Sch&#252;tt et al., 2021</ref><ref type="bibr">, Th&#246;lke and Fabritiis, 2022</ref><ref type="bibr">, Thomas et al., 2018</ref><ref type="bibr">, Batzner et al., 2022</ref><ref type="bibr">, Fuchs et al., 2020</ref><ref type="bibr">, Liao and Smidt, 2023</ref><ref type="bibr">, Anderson et al., 2019</ref><ref type="bibr">, Brandstetter et al., 2022]</ref>. To support and facilitate the development of machine learning methods on quantum chemistry property prediction, many datasets have been generated to benchmark the respective tasks on molecular property prediction <ref type="bibr">[Blum and Reymond, 2009</ref><ref type="bibr">, Ruddigkeit et al., 2012</ref><ref type="bibr">, Ramakrishnan et al., 2014</ref><ref type="bibr">, Wang et al., 2009</ref><ref type="bibr">, Nakata and Shimazaki, 2017]</ref>, catalyst prediction <ref type="bibr">[Chanussot et al., 2021</ref><ref type="bibr">, Tran et al., 2023]</ref>, and force field prediction <ref type="bibr">[Chmiela et al., 2017</ref><ref type="bibr">[Chmiela et al., , 2023]]</ref>.</p><p>In addition to these quantum chemistry prediction tasks, the quantum Hamiltonian is another significant and fundamental physical property that determines the quantum states and various materials properties <ref type="bibr">[Marzari and Vanderbilt, 1997</ref><ref type="bibr">, Souza et al., 2001</ref><ref type="bibr">, Qian et al., 2010</ref><ref type="bibr">, Marzari et al., 2012</ref><ref type="bibr">, Bai et al., 2022]</ref>. The quantum Hamiltonian can be calculated using Density Functional Theory (DFT) <ref type="bibr">[Hohenberg and</ref><ref type="bibr">Kohn, 1964, Kohn and</ref><ref type="bibr">Sham, 1965]</ref> with a time complexity of O(n 3 T ), where n represents the number of electrons and T denotes the number of optimization steps required to achieve convergence. Given the high computational complexity of the DFT algorithms, accelerating such calculations for novel molecular and materials systems becomes a desirable but challenging task. To tackle this challenge, machine learning methods, such as quantum tensor networks <ref type="bibr">[Li et al., 2022</ref><ref type="bibr">, Gong et al., 2023</ref><ref type="bibr">, Sch&#252;tt et al., 2019</ref><ref type="bibr">, Yu et al., 2023</ref><ref type="bibr">, Unke et al., 2021]</ref>, provide a highly promising approach for accelerating the DFT algorithms. These networks directly predict the final Hamiltonian matrix given the input 3D geometries, resulting in significant acceleration of calculations by orders of magnitude.</p><p>Unlike invariant chemical properties, Hamiltonian matrices obey intrinsic block-by-block matrix equivariance. This equivariance can be represented by the rotation Wigner D-Matrix, which may contain higher order rotations beyond 3D space. In order to make physically meaningful predictions, it is important to design quantum tensor network architectures that preserve this equivariance property. To perform systematic and in-depth study of this new task, there is a clear need to generate large-scale quantum tensor datasets and benchmarks. Currently, the only quantum Hamiltonian datasets include the MD17 <ref type="bibr">[Sch&#252;tt et al., 2019</ref><ref type="bibr">, Gastegger et al., 2020]</ref> and mixed MD17 <ref type="bibr">[Yu et al., 2023]</ref> datasets, which consist of data for a single and four molecules, respectively.</p><p>To provide a much larger and more realistic dataset, we generate a new quantum tensor dataset named QH9. This dataset contains Hamiltonian matrices for 130,831 stable molecular geometries and 2,399 molecular dynamic trajectories. In order to provide comprehensive studies for quantum tensor networks, we have designed four specific tasks. The first two tasks, QH-stable-iid and QH-stableood, aim to explore the performance of the networks in both in-distribution and out-of-distribution scenarios, specifically focusing on stable molecular geometries. The QH-dynamic-geo task follows the setting of the mixed MD17, containing the same molecule with different geometries in the training, validation, and test. On the other hand, the QH-dynamic-mol task splits the trajectories based on different molecules. Finally, we evaluate the transferrability of the trained models on molecules with larger sizes, thereby testing the models' ability to generalize beyond the training dataset. To demonstrate the quality of the predicted Hamilton matrix, we use four metrics. These metrics are based on the Mean Absolute Error (MAE) of the predicted Hamiltonian matrix H, as well as the derived properties such as orbital energies &#1013; and electronic wavefunction &#968;. Furthermore, to evaluate the quality of the predicted Hamiltonian in accelerating DFT calculations, we calculate the DFT optimization ratio by taking the model predictions as DFT initialization.</p><p>2 Background and Related Works</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Density Functional Theory (DFT)</head><p>Modeling the quantum states of physical systems is a central topic in computational quantum physics and chemistry. It aims to solve the Schr&#246;dinger equation <ref type="bibr">[Schr&#246;dinger, 1926]</ref>, which describes the electronic states shown as</p><p>where</p><p>is the n-electronic wavefunctions and r is the 3D coordinates. Electronic eigenvalues and wavefunctions play an important role in calculating numerous crucial physical properties, including the energy gap between the Highest Occupied Molecular Orbital (HOMO) and the Lowest Unoccupied Molecular Orbital(LUMO), i.e. the HOMO-LUMO gap, and charge density. However, due to the exponentially expanding input Hilbert space with the number of electrons, the computational cost to directly calculate many-electronic wavefunctions is extremely high. Therefore, various methods are proposed to approximate the solutions, such as the Hartree-Fock (HF) method <ref type="bibr">[Szabo and Ostlund, 2012]</ref> that approximates the wavefunction itself, or density functional theory <ref type="bibr">[Hohenberg and Kohn, 1964</ref>] that approximates the electron density. While the HF method scales with the number of electrons n as O(n 4 ), DFT scales with O(n 3 ) and therefore DFT is better suited for large-scale systems. DFT is based on the key discovery that the total energy and thus all ground-state properties of a system are uniquely determined by the ground-state electron density <ref type="bibr">[Kohn and Sham, 1965]</ref>.</p><p>Both of these approaches divide an n-electron system into a set of n non-interacting one-electron wavefunctions &#968; i (r i ), also called molecular orbitals in molecular systems. These one-electron orbitals can then be approximated by a linear combination of basis functions &#981; j (r) as &#968; i (r) = j C ij &#981; j (r).</p><p>The basis functions can be represented in analytical forms, such as Slater-type orbitals (STOs), Gaussian-type orbitals (GTOs), or plane waves, under numerical approximations for obtaining the coefficients matrix C. With these approximations, the original Schr&#246;dinger Equation (1) for electrons can be transformed into a matrix form as</p><p>where H is the Hamiltonian matrix, S is the overlap matrix, and &#1013; i is the energy for the i-th orbital.</p><p>The Hamiltonian matrix can be decomposed into the sum</p><p>which describes electron-ion interactions (H eN ), electron-electron interactions (H ee , including kinetic energy and electron-electron Coulomb repulsion energy), and exchange-correlation energy (H XC ). These matrices take the electron density &#961;(r) as an input to evaluate the Hamiltonian matrix.</p><p>The exchange-correlation energy functional used in this paper was B3LYP <ref type="bibr">[Lee et al., 1988</ref><ref type="bibr">, Becke, 1993]</ref>, which is a hybrid functional that includes both the exchange energy from the HF method as well as a correlation potential. We implement the GTO basis set Def2SVP <ref type="bibr">[Weigend and Ahlrichs, 2005]</ref> in a post-HF method that incorporates aspects of DFT, namely, an exchange-correlation potential, in order to more accurately capture electron-electron interactions compared to the HF method, which uses a mean field approximation of electron density.</p><p>Equation ( <ref type="formula">2</ref>) is satisfied for the final Hamiltonian matrix and its coefficient matrix once selfconsistency is achieved using direct inversion in the iterative subspace (DIIS) <ref type="bibr">[Pulay, 1980</ref><ref type="bibr">[Pulay, , 1982]]</ref>.</p><p>The equation is solved iteratively by building and solving the Hamiltonian and coefficient matrices, constructing an error vector based on a linear combination of energy differences in the previous steps, then diagonalizing and recalculating H until the error vector is below a convergence threshold.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Group Equivariance and Equivariant Matrices</head><p>In many quantum chemistry problems, the molecular property to be predicted (e.g., energy and force) is internally invariant or equivariant to transformations in SE(3) group, including rotations and translations. Formally, for an n-atom molecule whose 3D atom coordinates are r 1 , ..., r n , any transformation in SE(3) group can be described as changing the 3D atom coordinates to Rr 1 + t, ..., Rr n + t. Here, the translation vector t &#8712; R 3 is an arbitrary 3D vector, and the rotation matrix</p><p>holds for any rotation matrix R and translation vector t, where 2&#8467;+1) is the order-&#8467; Wigner-D matrix of R. To accurately predict SE(3)-equivariant properties, an effective approach is to develop neural network models that are designed to maintain the same equivariance relations between inputs and outputs as in Equation (4). Recently, many studies have proposed SE(3)equivariant neural network architectures by using SE(3)-invariant feature encoding <ref type="bibr">[Sch&#252;tt et al., 2018</ref><ref type="bibr">, Gasteiger et al., 2020</ref><ref type="bibr">, 2021</ref><ref type="bibr">, Liu et al., 2022]</ref>, tensor product operations <ref type="bibr">[Thomas et al., 2018</ref><ref type="bibr">, Brandstetter et al., 2022</ref><ref type="bibr">, Liao and Smidt, 2023]</ref>, or atomic cluster expansion framework <ref type="bibr">[Batatia et al., 2022</ref><ref type="bibr">, Drautz, 2019</ref><ref type="bibr">, Dusson et al., 2022</ref><ref type="bibr">, Kov&#225;cs et al., 2021]</ref>.</p><p>Different from vector-like molecular properties, the Hamiltonian matrix H has a much more complicated SE(3) equivariance pattern that is associated with the intrinsic angular momentum of the atomic orbital pairs. In computational quantum chemistry algorithms such as DFT, the Hamiltonian matrix H can be used to represent the interactions between these atomic orbitals, and the block H ij in Hamiltonian matrix represents the interactions between the atomic orbitals i in atom a i with angular momentum &#8467; i and atomic orbitals j in atom a j with angular momentum &#8467; j , and the shape of this block H ij is (2&#8467; i + 1) &#215; (2&#8467; j + 1). Usually, the atomic orbitals are arranged sequentially for the orbitals in the same atom and with the same angular momentum. For example, H ij can be located within the s i -th to (s i + 2&#8467; i )-th row, and the s j -th to (s j + 2&#8467; j )-th column of Hamiltonian matrix H. Specifically, its SE(3) equivariance can be described as</p><p>where &#961;(r) is the electronic density at positioin r and Hamiltonian matrix H is a function of the electronic density &#961;(r) in the DFT algorithm. In other words, the SE(3) equivariance of different submatrices in H has different mathematical forms, which is much more complicated than the SE(3) equivariance of vector-like molecular properties. Hence, it is much more challenging to develop SE(3)-equivariant neural network architectures for the prediction of Hamiltonian matrices. Nowadays, only a few studies <ref type="bibr">[Li et al., 2022</ref><ref type="bibr">, Gong et al., 2023</ref><ref type="bibr">, Yu et al., 2023</ref><ref type="bibr">, Unke et al., 2021]</ref> have made initial exploration in this direction.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Datasets for Quantum Chemistry</head><p>To facilitate the usage of machine learning models to predict chemistry properties and accelerate simulations, numerous quantum chemistry datasets have been built to provide extensive and faithful data. Here, we introduce several existing datasets that have been constructed for different tasks respectively, including molecular property prediction, catalyst modeling, molecular force field prediction, and molecular Hamiltonian matrix prediction. For molecular property prediction, the QM7 <ref type="bibr">[Blum and Reymond, 2009]</ref> dataset was initially constructed using 7,165 molecules from the organic molecule database <ref type="bibr">GDB-13 [Blum and Reymond, 2009]</ref>, with each selected molecule having no more than 7 heavy atoms. The primary purpose of creating the QM7 dataset is to provide atomization energies as the target molecular property. Then QM9 <ref type="bibr">[Ramakrishnan et al., 2014</ref><ref type="bibr">, Sch&#252;tt et al., 2018]</ref> was built based on GDB-17 <ref type="bibr">[Ruddigkeit et al., 2012]</ref> to provide 134k stable small organic molecules with no more than 9 heavy atoms in each molecule. Moreover, it provides 13 different important quantum chemistry properties, including HOMO and LUMO energies.</p><p>Based on the molecules from PubQChem <ref type="bibr">[Wang et al., 2009</ref><ref type="bibr">, 2017</ref><ref type="bibr">, Kim et al., 2019</ref><ref type="bibr">, 2021</ref><ref type="bibr">, 2023]</ref>,</p><p>PubQChemQC <ref type="bibr">[Nakata and Shimazaki, 2017]</ref> provides 3M ground-state molecular structures as well as the HOMO-LUMO gap and excitation energies for 2M molecules. In addition to the molecular property datasets, OC20 <ref type="bibr">[Chanussot et al., 2021]</ref> and OC22 <ref type="bibr">[Tran et al., 2023]</ref> were developed to provide the data of interactions of catalysts on material surfaces. They provide the geometries of the initial structures to predict the final structures or energies as well as the relaxation trajectories with energy and atomic forces. For the molecular force field prediction datasets, MD17 <ref type="bibr">[Chmiela et al., 2017]</ref> and MD22 <ref type="bibr">[Chmiela et al., 2023]</ref> contain atomic forces for molecular and supramolecular trajectories respectively as valuable datasets to develop machine learning methods. The last category is the Hamiltonian matrices datasets. MD17 <ref type="bibr">[Sch&#252;tt et al., 2019</ref><ref type="bibr">, Gastegger et al., 2020]</ref> provides the Hamiltonian matrices for single molecular dynamic trajectories to study the Hamiltonian matrices for molecules with various geometries. Building upon this dataset, mixed MD17 <ref type="bibr">[Yu et al., 2023]</ref> combines four molecular trajectories in the MD17 to study Hamiltonian matrix prediction tasks with multiple molecules. Alongside the increasing interest in Hamiltonian matrix prediction, there is a growing need for datasets that include Hamiltonian matrices with a greater number of molecules to facilitate the subsequent studies.</p><p>3 Datasets, Tasks, Methods, and Metrics</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Datasets</head><p>Dataset Generation. For the QH9 dataset, we use open-source software PySCF <ref type="bibr">[Sun et al., 2018</ref><ref type="bibr">[Sun et al., , 2020] ]</ref> to conduct computational quantum chemistry calculations. In the QH9, there are two sub datasets. The first one is the QH-stable dataset containing Hamiltonian matrices for 130,831 molecules with their geometries. The stable molecular geometries come from a subset of dataset from QM9    <ref type="bibr">Wang et al. [2022]</ref>. The second one is the QH-dynamic dataset, it has molecular trajectories for 2, 399 molecules and each trajectory contains 60 geometries. To obtain the accurate Hamiltonian matrices for this dataset, we set the hyper-parameters of the DFT algorithms to a tight level. Specifically, we set the grid density level to 3 to calculate accurate electronic density, and the SCF convergence condition is set to SCF tolerance of 10 -13 and gradient threshold of 3.16 &#215; 10 -5 to ensure the the final states achieve tight convergence. For the density functional, we select the B3LYP exchange-correlation functional to conduct DFT calculations, and GTO orbital basis Def2SVP is selected to approximate the electronic wavefunctions. To accelerate and achieve the convergence of SCF algorithm, we use DIIS algorithm with consideration of the 8 previous steps. For the QH9-dynamic dataset, molecular dynamics simulations are conducted under the microcanonical ensemble, where the number of particles, volume, and energy remain constant (NVE). The temperature is set to 300K, and the time step for recording the molecular trajectory is set to 2.419 &#215; 10 -3 fs.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Dataset Statistics</head><p>The statistical data, including the number of molecules and geometries for QH9stable and QH9-dynamic, is presented in Table <ref type="table">1</ref>. These molecules consist of no more than 9 heavy atoms and are composed of four specific heavy atoms: carbon (C), nitrogen (N), oxygen (O), and fluorine (F). The distribution of molecule size for QH9-stable and QH9-dynamic is shown in Figure <ref type="figure">1a</ref> and Figure <ref type="figure">1c</ref>. Meanwhile, the percentage of molecules in QH9-stable with different the number of heavy atoms is shown in 1b.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Tasks</head><p>To comprehensively evaluate the quantum Hamiltonian prediction performance, we define the following tasks based on the obtained stable and dynamic geometries in the QH9 dataset.</p><p>QH-stable-iid. We first randomly divide the obtained stable geometries in QH9 into three subsets, including 80% for training, 10% for validation, and 10% for testing. This serves as the basic evaluation task for predicting quantum Hamiltonian matrices.</p><p>QH-stable-ood. We further split the stable geometries in QH9 by molecular size based on the number of constituting atoms. The training set consists of molecules with 3 to 20 atoms, maintaining a similar number of training samples as in the QH-stable-iid split. The validation set includes molecules with 21 to 22 atoms, while the testing set has molecules with 23 to 29 atoms. This task allows for an evaluation of the model's generalization ability under an out-of-distribution training setup.</p><p>QH-dynamic-geo. For this split and the following QH-dynamic-mol split, there are 2, 399 molecular dynamics trajectories, while each trajectory includes 60 geometries. In QH-dynamic-geo, the split is performed geometry-wise. Specifically, for each molecule, 60 geometries are randomly divided into 50 for training, 5 for validation, and 5 for testing. Here, the molecules in the test set are visible during training but the geometric structures are different from training structures.</p><p>QH-dynamic-mol. In this QH-dynamic-mol split, the 2, 399 molecules are divided into training, validation, and testing subsets in a ratio of 0.8/0.1/0.1. Importantly, different from the above QHdynamic-geo setup, all 60 geometries corresponding to a specific molecule are grouped together and assigned to the same subset. This setup introduces a more challenging task than QH-dynamic-geo since the geometries in the testing set correspond to different molecules as those in training.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">Methods</head><p>To predict the quantum Hamiltonian matrix, several quantum tensor networks have been proposed. SchNorb <ref type="bibr">[Sch&#252;tt et al., 2019]</ref> uses pairwise distance and direction as the input geometric information to predict the final Hamiltonian matrix. However, SchNorb lacks the ability to ensure matrix equivariance and relies on data augmentation techniques to encourage equivariance. Another network, DeepH <ref type="bibr">[Li et al., 2022]</ref>, uses invariant local coordinate systems and a global coordinate system to handle the equivariance challenge. It uses the geometric features within these invariant local coordinate systems to predict invariant Hamiltonian matrix blocks. Next, as a post-processing step, DeepH applies a rotation using Wigner D-Matrix to transform the Hamiltonian matrix blocks from local coordinate systems back to the global coordinate system. Currently, DeepH is applied on predicting Hamiltonian matrices for materials. PhiSNet <ref type="bibr">[Unke et al., 2021</ref>] uses an equivariant model architecture that inherently guarantees matrix equivariance. However, current implementation of PhiSNet is limited to supporting single molecule. This limitation arises from the design of the matrix prediction module in PhiSNet, which is designed to predict matrices for the same molecules with fixed matrix size. Therefore, equivariant quantum tensor network QHNet <ref type="bibr">[Yu et al., 2023]</ref> is selected as the main baseline method in the QH9 benchmark currently. QHNet has an extendable expansion module that is built upon intermediate full orbital matrices, enabling its capability to effectively handle different molecules. This flexibility allows QHNet to accommodate various molecules in the QH9 benchmark.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.4">Metrics</head><p>To evaluate the quality of the predicted Hamiltonian matrix, we adopt several metrics that are used to measure both approximation accuracy and computational efficiency.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>MAE on</head><p>Hamiltonian matrix H. This metric calculates the Mean Absolute Error (MAE) between the predicted Hamiltonian matrix and the ground-truth labels from DFT calculation. Each Hamiltonian matrix consists of diagonal blocks and non-diagonal blocks, representing the interactions within individual atoms and the interactions between pairs of atoms, respectively. When the atom pair is distant, the values in the Hamiltonian matrix blocks are typically close to zero. Consequently, as the molecules increase in size, the proportion of distant atom pairs also increases, causing the overall mean value of the Hamiltonian matrix to decrease. Hence, in the subsequent experiments, we compare the MAEs of the diagonal and non-diagonal blocks separately as well as the total MAE on the Hamiltonian matrix.</p><p>MAE on occupied orbital energies &#1013;. Orbital energy, which includes the Highest Occupied Molecular Orbital (HOMO) and Lowest Unoccupied Molecular Orbital (LUMO) energies, is a highly significant chemical property. It can be determined by diagonalizing the Hamiltonian matrix using Equation <ref type="formula">2</ref>. Hence, this metric can serve as a measure to reflect the quality of the predicted Hamiltonian matrix in accurately deducing the desired property. Specifically, it calculates the MAE on all the occupied molecular orbital energies &#1013; derived from the predicted and the ground-truth Hamiltonian matrix.</p><p>Cosine similarity of orbital coefficients &#968;. Electronic wavefunctions can describe the quantum states of molecular systems and are used to derive a range of chemical properties. In order to measure the similarity between the ground-truth wavefunctions and the predicted wavefunctions, we calculate the cosine similarity of the coefficients for the occupied molecular orbitals &#968;. The corresponding  <ref type="formula">2</ref>.</p><p>Optimization step ratio. Besides the metrics assessing molecular properties, this optimization step ratio metric is introduced to measure the quality of the predicted Hamiltonian matrix in accelerating DFT calculation. Specifically, it calculates the ratio of the number of optimization steps between initializing with the predicted Hamiltonian matrix and using a random initialization. When the Hamiltonian matrix is accurately predicted, the Self-Consistent Field (SCF) algorithm is close to the convergence condition, leading to a significant reduction in the number of optimization steps.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Experiments</head><p>Setup. To assess how deep learning approaches perform on the proposed dataset, we conduct experiments on the four designed tasks, as described in Section 3.2. To be more specific, we evaluate the performance of QHNet <ref type="bibr">[Yu et al., 2023]</ref>, a recently proposed SE(3)-equivariant network specifically designed for efficient and accurate quantum Hamiltonian matrix prediction. QHNet is known for its effectiveness and efficiency in handling the task at hand, making it a suitable testing method for our benchmark evaluation. For quantitative evaluation, we use the metrics as introduced in Section 3.4. Our implementation is based on PyTorch <ref type="bibr">[Paszke et al., 2019]</ref>, PyG <ref type="bibr">[Fey and Lenssen, 2019]</ref>, and e3nn <ref type="bibr">[Geiger et al., 2022]</ref>. We train models on either (1) a single 48GB Nvidia GeForce RTX A6000 GPU and Intel Xeon Silver 4214R CPU, or (2) a single Nvidia A100 GPU and Intel Xeon Gold 6258R CPU.</p><p>Following the model setup in QHNet, in all implemented models, we employ five node-wise interaction layers to aggregate messages from neighboring nodes to update the node irreducible representations. We train all models with a total training step of either 210, 000 or 260, 000 using a batch size of 32. To expedite the convergence of model training, following the QHNet setup, we implement a learning rate scheduler. The scheduler gradually increases the learning rate from 0 to a maximum value of 5 &#215; 10 -4 over the first 1, 000 warm-up steps. Subsequently, the scheduler linearly reduces the learning rate, ensuring it reaches 1 &#215; 10 -7 by the final step.</p><p>Overall performance. We first evaluate the overall performance of the model on the four defined tasks by demonstrating its accuracy of the predicted Hamiltonian matrices on the testing set. As summarized in Table <ref type="table">2</ref>, the employed QHNet models can achieve a reasonably low MAE in predicting the Hamiltonian matrices on all proposed tasks. For reference, QHNet can achieve an MAE of 83.12 &#215; 10 -6 E h on the mixed MD17 dataset, which has a similar setup to our QH-dynamic-geo setup. In addition to MAE on Hamiltonian matrices, the trained models also achieve low errors on the predicted occupied orbital energies and orbital coefficients. This aligns with the prior reported work that QHNet is effective to predict the Hamiltonian matrices for multiple molecules <ref type="bibr">[Yu et al., 2023]</ref>. Notably, compared to the existing Hamiltonian matrix datasets, such as MD17 <ref type="bibr">[Chmiela et al., 2017]</ref> and mixed MD17 <ref type="bibr">[Yu et al., 2023]</ref>, our proposed tasks involve predicting Hamiltonian matrices for significantly more molecules. Overall, we anticipate that the proposed new datasets and corresponding tasks can serve as more challenging and realistic testbeds for future research in Hamiltonian matrix prediction.</p><p>Investigation on out-of-distribution generalization. Since we maintain a similar number of training samples for QH-stable-iid and QH-stable-ood, it is feasible to compare the performance of these two settings to investigate the out-of-distribution challenge in predicting Hamiltonian matrices. It To examine the presence of the out-of-distribution issue in the Hamiltonian prediction task, we adopt an alternative evaluation strategy. To be specific, we assess models that have been trained respectively on the QH-stable-iid and QH-stable-ood training sets, employing the same set of samples for evaluation in each instance. Specifically, we use the intersecting set of the QH-stable-iid and QH-stable-ood testing sets as our evaluation dataset. Clearly, the samples contained within this evaluation set are previously unseen during the training phase of either model, thereby maintaining the integrity of the assessment. The evaluation set contains 923 molecules with 23 to 29 atoms. Under this experimental setup, the primary challenge faced by the model trained on the QH-stable-ood training set stems from the novelty of molecular sizes during the evaluation phase. On the other hand, the model trained on the QH-stable-iid training set benefits from having been exposed to such molecular sizes during training. We denote that these two models are trained under out-ofdistribution (OOD) and in-distribution (ID) training schema respectively in Table <ref type="table">3</ref>. By comparing the performance on the identical evaluation set, it becomes apparent that the model employing the ID training schema outperforms its OOD-trained counterpart, across all metrics including Hamiltonian MAE and predicted orbital energies and coefficients. Such a performance gap demonstrates that the out-of-distribution issue in molecular size is actually a valid concern particularly when extending trained models to molecular sizes not encountered during training.</p><p>Geometry-wise vs. molecule-wise generalization. We further explore geometry-wise and moleculewise generalizability by analyzing the difficulty differences between the QH-dynamic-geo and QH-dynamic-mol tasks. We consider the results in Table <ref type="table">2</ref> for these two tasks to be comparable given that both models are trained with a similar number of geometry structures. We note that the model in the QH-dynamic-geo task demonstrates numerically better test performance than the model in the QH-dynamic-mol task. This is consistent with our intention when designing the tasks. Specifically, in QH-dynamic-geo, although the geometric structures in the test set are different, the molecules themselves are not entirely novel to the model due to the exposure during the training phase. In comparison, the QH-dynamic-mol task presents a more challenging and demanding scenario. In particular, the test set geometries in QH-dynamic-mol correspond to entirely different molecules than those seen during training. This task requires the model to generalize from its learned patterns to the unseen molecular structures. To summarize, both tasks serve as valuable testbeds in evaluating the model's generalization ability, and our analysis shows that QH-dynamic-mol task, which requires extrapolating to entirely new molecular structures, is notably more challenging and demanding. We further measure the quality of the predicted Hamiltonian matrix by evaluating its ability in accelerating the DFT calculation. As introduced in Section 3.4, we compute the ratio of optimization steps required when initializing with the predicted Hamiltonian matrix as compared to a random initialization. In this experiment, following our data collection process, we use PySCF <ref type="bibr">[Sun et al., 2018]</ref> to perform the DFT calculation with using B3LYP exchange-correlation functional and def2SVP basis set. We select DIIS as the SCF algorithm for the DFT calculation and set a grid density level of 3 to ensure an accurate DFT calculation. For each dataset, we compute the average optimization step ratio for 50 randomly selected molecules. As shown in Table <ref type="table">4</ref>, when initializing from the predicted Hamiltonian matrices given by QHNet, it requires fewer optimization steps to reach the converged Hamiltonian matrix, which indicates that the predicted Hamiltonian matrix is close to the convergence condition. This experimental result demonstrates that machine learning approaches are helpful in accelerating the DFT calculation.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Conclusion</head><p>We are interested in accelerating computation of quantum Hamiltonian matrices, which fundamentally determine the quantum states of physical systems and chemical properties. While various invariant and equivariant deep learning methods have been developed recently, current quantum Hamiltonian datasets consist of Hamiltonian matrices of molecular dynamic trajectories for only a single and four molecules, respectively. To significantly expand the size and variety of such datasets, we generate a much larger dataset based on the QM9 molecules. Our dataset provides precise Hamiltonian matrices for 130,831 stable molecular geometries and 2,399 molecular dynamics trajectories with 60 geometries in each trajectory. Extensive and carefully designed experiments are conducted to demonstrate the quality of our generated data.</p></div></body>
		</text>
</TEI>
