Volume 45, Issue 32 pp. 2786-2792
RESEARCH ARTICLE
Open Access

Spin parameter optimization for spin-polarized extended tight-binding methods

Siyavash Moradi

Siyavash Moradi

Department of Chemistry, Technical University of Munich, TUM School of Natural Sciences and Catalysis Research Center, Garching, Germany

Search for more papers by this author
Rebecca Tomann

Rebecca Tomann

Pitzer Center for Theoretical Chemistry, Department of Chemistry, University of California, Berkeley, California, USA

Search for more papers by this author
Josie Hendrix

Josie Hendrix

Pitzer Center for Theoretical Chemistry, Department of Chemistry, University of California, Berkeley, California, USA

Search for more papers by this author
Martin Head-Gordon

Martin Head-Gordon

Pitzer Center for Theoretical Chemistry, Department of Chemistry, University of California, Berkeley, California, USA

Search for more papers by this author
Christopher J. Stein

Corresponding Author

Christopher J. Stein

Department of Chemistry, Technical University of Munich, TUM School of Natural Sciences and Catalysis Research Center, Garching, Germany

Correspondence

Christopher J. Stein, Department of Chemistry, Technical University of Munich, TUM School of Natural Sciences and Catalysis Research Center, Lichtenbergstr. 4, 85748 Garching, Germany.

Email: [email protected]

Search for more papers by this author
First published: 22 August 2024
Citations: 2
Siyavash Moradi and Rebecca Tomann are contributed equally.

Abstract

We present an optimization strategy for atom-specific spin-polarization constants within the spin-polarized GFN2-xTB framework, aiming to enhance the accuracy of molecular simulations. We compare a sequential and global optimization of spin parameters for hydrogen, carbon, nitrogen, oxygen, and fluorine. Sensitivity analysis using Sobol indices guides the identification of the most influential parameters for a given reference dataset, allowing for a nuanced understanding of their impact on diverse molecular properties. In the case of the W4-11 dataset, substantial error reduction was achieved, demonstrating the potential of the optimization. Transferability of the optimized spin-polarization constants over different properties, however, is limited, as we demonstrate by applying the optimized parameters on a set of singlet-triplet gaps in carbenes. Further studies on ionization potentials and electron affinities highlight some inherent limitations of current extended tight-binding methods that can not be resolved by simple parameter optimization. We conclude that the significantly improved accuracy strongly encourages the present re-optimization of the spin-polarization constants, whereas the limited transferability motivates a property-specific optimization strategy.

1 MOTIVATION

Semi-empirical electronic-structure methods offer an attractive balance between computational efficiency and accuracy. This enables the study of large and complex systems that are computationally too demanding for more accurate methods, such as density functional theory (DFT).1-3 The density functional tight-binding method (DFTB)4 is such an approach that significantly reduces the computational cost of DFT, making calculations using standard hardware on large systems5, 6 with several hundred to a few thousand atoms feasible. This method allows for exploration on longer time scales, enabling the investigation of dynamical properties, as recently exemplified by a simulation of the characteristic barriers of a A u 14 – cluster at high-temperature.7 Moreover, DFTB is valuable for structural exploration8 and as a preliminary screening tool for subsequent DFT calculations.9, 10 DFTB compares favorably to full DFT with small basis sets. It is particularly well-suited for covalent systems like hydrocarbons11 and performs surprisingly well in describing metallic bonding with delocalized valence electrons.12 The success of this relatively fast electronic-structure method has prompted further in-depth studies in a variety of target research areas, such as the exploration of chemical reactions and reaction kinetics.13, 14 Additionally, these methods have been instrumental in investigating materials properties such as band structures15 and optical properties,16 enabling the design of novel materials with tailored functionalities.

Among the various fast electronic-structure methods, extended tight-binding (xTB) models have gained particular prominence.17 These models approximate the electronic structure using a minimal basis set, capturing the essential quantum-mechanical interactions at low computational cost. By incorporating elements of valence bond and molecular orbital theories, xTB models can describe a wide range of chemical bonding types and accurately compute ground-state properties such as bond lengths, angles, and vibrational frequencies. GFN2-xTB,18 an extension of the original GFN-xTB19 model, provides improved accuracy in reproducing experimental data and benchmark results, owing to advancements in the parameterization, the inclusion of anisotropic electrostatics, and the density-dependent D4 dispersion correction.20 It mostly retains the computational efficiency of its predecessor. The spin-polarized DFTB method (SDFTB)6 has been successfully applied to investigate for example, metallic clusters, such as the Fe 147 icosahedron.21 The recently published spin-polarized GFN2-xTB (spGFN2-xTB) method22 was benchmarked on main-group thermochemistry datasets including open-shell molecules. The spin-polarization parameters are obtained from PBE calculations (vide infra) and typically not re-optimized in the tight-binding framework. Adopting these parameters directly from another theory is unusual since the tight-binding parameters are typically obtained from fitting to reference data. In this article, we will explore potential gains in accuracy upon re-optimization of the spin-polarization parameters. We will further develop a strategy that allows us to determine which parameters can be optimized with a given reference dataset. This procedure relies on a sensitivity analysis by means of Sobol indices.23 We then analyze the transferability of the re-optimized parameters and discuss optimization strategies for different application scenarios.

2 THEORY

2.1 Spin-polarization in extended tight-binding methods

The total spGFN2-xTB energy expression which has been recently implemented in the Q-Chem software package24, 25 (QChem-xTB) is given by
E QChem xTB = E rep + E EHT + E IES + IXC + E AES + E AXC + E spin (1)
and is similar to the one in Reference 22 with the exception of the Fermi and D4 terms. The abbreviations refer to the repulsion (rep), extended Hückel-type (EHT), isotropic electrostatic (IES) and isotropic exchange-correlation (IXC), anisotropic electrostatic (AES) and anisotropic exchange-correlation (AXC) energies and the spin-polarization contribution.
We consider the dependence of the energy on the spin densities with a spin-polarization term,6, 12, 26 which has the following form
E spin 1 2 A N l A l A p A l p A l W A l l (2)
where p A l represent the differences between α and β Mulliken populations for an orbital on atom A with angular momentum l .
The universal atomic constants W A l l — the spin-polarization parameters — can be computed for free atoms by determining the second derivatives of the DFT total energy expressions in relation to the magnetization density. Using Janak's theorem,27 we can express these parameters via the dependence of the orbital energies on the orbital occupation.
W A l l = 1 2 ε l n l ε l n l (3)
where the n l and n l are the atomic occupation numbers for alpha and beta electrons, respectively, and the ε l are the Kohn–Sham eigenvalues.
The Hamiltonian matrix elements for the spin-polarization term are given by
H μ ν = ± 1 2 S μ ν l A W A l + W A l l p A l (4)
where S μ ν is the overlap matrix and the plus and minus signs correspond to α and β electrons, respectively.

2.2 Sensitivity analysis

Sensitivity analysis quantifies the dependence of an output on variations of the input variables. Rather than deriving expected outcomes or probability distributions, it provides a range of possible output values linked to each input set.

Sobol's technique relies on decomposing the variance of the model output into individual components, each representing the variance of the input parameters at progressively higher dimensions.23, 28 The contribution of each individual input parameter and groups of them to the total variance of the model output is determined. The first-order Sobol indices are a measure for the contribution of each input variable individually to the total variance, while the total-order Sobol indices also include the interaction of each parameter with all the parameters. Small differences between first and total-order Sobol indices indicate negligible interactions between the parameters. We note no significant difference between first and total order Sobol indices, which justifies the sequential optimization scheme. It is important to recognize that Sobol sensitivity analysis is not designed to pinpoint the sources of input variability. Instead, it merely reveals the impact and magnitude of such variability on the model output. Consequently, it is unsuitable for identifying the origin(s) of variance.

The output of the model, for which the sensitivity to input parameters is being evaluated, is g ( x ) . In the probabilistic interpretation of the parameters, g ( x ) is considered a random variable with a mean ( g 0 ) and variance (V)29
g 0 = g ( x ) d x , V = g ( x ) 2 d x g 0 2 . (5)
The Sobol method entails decomposing the variance (V) by assigning contributions to the impacts of individual parameters and the collective impacts of pairs of parameters. This is initially accomplished by decomposing the function g ( x ) into
g ( x ) = g 0 + i = 1 s g i x i + i = 1 s i j s g i j x i , x j + g 1 s x 1 , x 2 , , x s . (6)
The analysis of variance representation for g ( x ) relies on the fulfillment of the condition as shown below
g i 1 , , i i s x i 1 , , x i s d x k = 0 for k = i 1 , , i s . (7)
Due to this characteristic, squaring the sides of Equation (6) and integrating the results leads to the decomposition expression for variance
V = i = 1 k V i + i < j V i j + i < j < l V i j l + + V 1 , 2 , , k . (8)
The Sobol sensitivity indices are subsequently defined for each specific group of parameters as
S i 1 i s = V i 1 i s V . (9)
S i = V i V is the first-order contribution from i t h input parameter to the output variance and S i j = V i j V is used to compute the additional second-order contribution from the interaction between i th and j th parameters. Total order sensitivity indices are defined as the sum of all the sensitivity indices as S T i = S i + S i j i j + + S 1 i . . s .

The first-order sensitivity indices quantify the fractional contribution of an individual parameter to the output variance. Second-order sensitivity indices are utilized to gauge the fractional contribution of interactions among parameters to the output variance. Total-order sensitivity indices encompass first-, second-, and higher-order effects, necessitating an evaluation across the entire parameter space. Higher sensitivity index values indicate a greater influence of corresponding model parameters.

Performing sensitivity analysis, particularly using methods like Sobol indices, is crucial for understanding the impact of model parameters on the overall performance of computational methods such as spGFN2-xTB. It allows us to identify which parameters significantly influence the model output and, equally important, to what extent. Sobol indices provide a quantitative measure of the contributions of individual parameters and their interactions to the variability in predictions. By conducting sensitivity analysis, we gain valuable insights into the robustness and reliability of a given model, helping to prioritize efforts in refining parameters that play a pivotal role. This knowledge not only enhances the accuracy of predictions but also guides targeted optimizations, ensuring a more efficient and tailored approach to parameter tuning across diverse chemical and physical systems. We use SALib,30 an open-source Python package designed for sensitivity analysis. Because SALib offers a decoupled workflow, it does not interact with the computational or mathematical model directly. Rather, SALib is in charge of creating the model inputs to calculate the sensitivity indices from the model outputs.

2.3 Parameter optimization

For the optimization of the spin-polarization parameters, we employed the zeroth-order Powell algorithm. Focusing on the most common elements in organic molecules (hydrogen, carbon, nitrogen, oxygen, and fluorine), we initially optimized the parameters to align our computational results with the reference data obtained from the W4-11 dataset.31 In this paper, we will denote the subset of the W4-11 dataset with molecules that only contain the above elements as W4-11-HCONF.

Since the spin-polarization term must lead to a decrease in energy, the spin-polarization constants must have negative values, and we chose the bounds [ 0 . 1 , 0], Hartree in our parameter optimization. The lower bound was chosen based on a survey on the parameters published from PBE-derived results of Equation (3).22 This choice also ensures that the total energy is not erroneously dominated by the spin-polarization term.

Implementation in Q-Chem: We implemented a modified sp-GFN2-xTB variant in the Q-Chem24, 25 package. For this reimplementation, we build on Q-Chem's integral library and SCF routines and we ignore the Fermi term. To achieve accurate calculations and efficient convergence during the Self-Consistent Field (SCF) procedure, we apply the DIIS (Direct Inversion in the Iterative Subspace32, 33) algorithm. For the definition of reference valence shell occupations, we followed the occupations in the spGFN2-xTB method18 with the exception of nitrogen, which we treat with the reference valence shell occupation 2 s 2 2 p 3 instead of fractional reference occupations. Details of the implementation will be described in a forthcoming article.

3 RESULTS

3.1 Atomization and reaction energies

We start with a sensitivity analysis of the spin-polarization parameters for the W4-11-HCONF subset to gain insight into the individual impacts of these parameters for atomization energies. We restrict the optimization to W s s for hydrogen, and W s s , W s p , and W p p for carbon, oxygen, nitrogen, and fluorine. This initial exploration allows us to unravel the nuanced contributions of each parameter to the overall variability in calculated results. Figure 1 shows first-order and total-order Sobol indices for the spin-polarization parameters evaluated for W4-11-HCONF.

Details are in the caption following the image
Total-order (blue) and first-order (red) Sobol sensitivity indices of thirteen spin parameters evaluated for the W4-11-HCONF subset.

This analysis reveals the importance of the parameters. Notably, W s s for hydrogen and the W p p parameter for the remaining elements have the most influence on the quality of the calculations while W s s and W s p demonstrated minimal impact for these elements. This is to be expected since atomization reactions of closed-shell molecules are studied and the spin-density dependence is determined by the open-shell ground states of the individual atoms.  

Table 1 shows the results of two optimization strategies. For sequential optimization, spin-polarization parameters were optimized in the sequence hydrogen, carbon, nitrogen, oxygen, and fluorine and the parameters that were already optimized were held constant. This step-wise scheme generally simplifies the optimization problem.

TABLE 1. Optimized spin parameters for W4-11-HCONF subset from two different optimization approaches and default parameters taken from Reference 22.
Default W Sequential optimization W Simultaneous optimization W
H s s −0.071550 −0.020539 −0.020578
C s s −0.030200 −0.026541 −0.030650
C s p / p s −0.025025 −0.011574 −0.003557
C p p −0.022725 −0.046363 −0.045573
N s s −0.033000 −0.033796 −0.033939
N s p / p s −0.027475 −0.027861 −0.028144
N p p −0.025475 −0.029340 −0.029484
O s s −0.035100 −0.037118 −0.036986
O s p / p s −0.029500 −0.030460 −0.030598
O p p −0.027825 −0.065741 −0.065757
F s s −0.036900 −0.024022 −0.024519
F s p / p s −0.031200 −0.040506 0 . 039640
F p p −0.029900 −0.010484 −0.010632

The sequential optimization strategy allowed us to reduce the root mean square error (RMSE) from 49.23 to 15.09 kcal/mol for the W4-11-HCONF subset. In addition, we optimized all the parameters simultaneously, and as expected this optimization resulted in a slightly lower RMSE of 14.88 kcal/mol for the W4-11-HCONF subset. The good agreement of spin-polarization parameters obtained with both approaches signals a minor correlation between the individual parameters as already expected from the agreement between the first- and total-order Sobol indices in Figure 1.

In Table 2, we summarize results for several datasets to analyze the transferability of the W4-11-HCONF-optimized parameters. These datasets include a second set of atomization energies (Alkatom1934), radical-stabilisation energies (RSE4335), hydrogen combustion,36 and rearrangements in radical cations (RC2135).

TABLE 2. RMSE in kcal/mol, using spin parameters obtained from sequential optimization of the W4-11-HCONF dataset.
Default W Optimized W
W4-11-HCONF 49.22 15.09
Alkatom19 30.54 14.79
RSE43 3.89 1.61
Hydrogen Combustion 21.96 10.50
RC21 22.00 18.98

With the sequentially optimized parameters, the RMSE for Alkatom19 was reduced from 30.54 to 14.79 kcal/mol. This substantial improvement points toward a principal transferability of optimized spin-polarization parameters between different datasets. In the case of RSE43, the optimized parameters reduced the error by more than half, from 3.98 to 1.61 kcal/mol.

The datasets discussed so far were based on energy differences between minimum structures. An analysis of the performance of spin-polarized GFN2-xTB for non-equilibrium structures is especially useful since this allows us to demonstrate the power of the method for the understanding of chemical reactivity, which the initial method was not parameterized for. We therefore included a dataset with 19 intrinsic reaction coordinates (IRCs) for hydrogen combustion.36 Using the sequentially optimized parameters from Table 1 led to an RMSE reduction from 21.96 to 10.50 kcal/mol for the intrinsic reaction coordinates of the hydrogen combustion dataset. Comparing the IRC curves obtained by the default and optimized spin parameters in Figure 2 with the DFT reference data reveals that the generally poor performance of GFN2-xTB can be significantly enhanced with improved spin-polarization parameters.

Details are in the caption following the image
IRCs for several hydrogen combustion reactions with default and optimized spin-polarization parameters. The energy (in kcal/mol) is shown for the DFT reference calculations employing the ω B97X-V functional37 and the cc-pVTZ basis set in black, QChem-xTB with default parameters in green and QChem-xTB with optimized parameters in blue.

However, in the case of radical-cation rearrangements in the RC21 dataset, the error reduction was more modest, from 22.00 to 18.89 kcal/mol. This indicates that while the optimized parameters exhibit transferability across various datasets targeting similar properties, other properties or systems may pose challenges that necessitate further refinement.

3.2 Limits of transferability

While the transferability of optimized spin-polarization parameters to different datasets has been promising in the cases discussed so far, the W4-11-HCONF optimized spin-polarization constants yielded poor results when applied to the AC12 dataset of singlet-triplet gaps for a set of aryl carbenes.38 The default parameters yielded an error of approximately 7 kcal/mol, whereas the application of optimized parameters resulted in an unexpected increase of the error to 23.59 kcal/mol. This discrepancy underscores the challenge of achieving transferability across different molecular properties using a single set of optimized parameters in the framework of GFN2-xTB.

To understand the cause of this poor performance, we performed a sensitivity analysis specific to the AC12 dataset. As evident from Figure 3 and in line with our chemical understanding of carbenes, the analysis revealed a key parameter, W p p of carbon, as the sole influential factor in accurately predicting the singlet-triplet gap. Addressing this, we optimized only W p p of carbon for this dataset alone. Starting from the previously optimized parameters for W4-11-HCONF ( W p p ( C ) = 0 . 046363 ) , we reoptimized this single particular to W p p ( C ) = 0 . 015818 , thereby decreasing the error to only 2.96 kcal/mol. This highlights the significant impact of this single parameter on the calculated singlet-triplet gap.

Details are in the caption following the image
Sensitivity analysis of spin parameters for the AC12 dataset within QChem-xTB.

If, by contrast, we only keep W p p of carbon at the value optimized for the W4-11-HCONF subset and optimize all other parameters, the error, initially at 26.76 kcal/mol, is only insignificantly reduced to 23.19 kcal/mol. This analysis underscores the importance of sensitivity analysis in identifying relevant parameters to optimize.

The general lack of transferability emphasizes the system-specific nature of the spin parameters within this extended tight-binding method. While it is generally desirable to devise a universal parameter set, our study highlights the potential of tailoring parameters for a given system to yield more accurate results.

The lack of parameter transferability extends to ionization potential (G21IP) and electron affinity (G21EA) datasets, for which we again applied the parameters optimized for the W4-11-HCONF subset.

For the G21IP dataset of ionization potentials, the default parameters yielded an error of 201.03 kcal/mol, which decreased to 200.12 kcal/mol for the optimized parameters. Similarly, the G21EA dataset of electron affinities, yielded only a modest error reduction from 96.75 kcal/mol with default parameters to 94.48 kcal/mol with optimized parameters.

These catastrophically high errors are obviously not a result of an erroneous description of spin-polarization but rather stem from the minimal basis set used within GFN2-xTB. The contraction of orbitals upon adding a positive charge to a molecule cannot be captured by a minimal basis set. The same is true for negative charges and the extension of orbitals. These findings are an immediate consequences of the fixed minimal basis set in the GFN2-xTB model, which cannot accurately capture orbital expansions and contractions involved in processes where the charge of a system changes. While extended tight-binding methods certainly excel in predicting many molecular properties at low computational cost, the accurate prediction of ionization potentials and electron affinities demands larger or more flexible basis sets.39 An approach to yield better results for ionic species from DFTB methods is a reparameterization of the Hubbard derivative entering the third-order correction.40, 41 It has been demonstrated that such an approach can considerably reduce the error also for the G21 dataset42 while it has been noted that further extensions such as using two parameters per element might be necessary to further improve the results.

4 CONCLUSION

In conclusion, we showed the significant increase in accuracy that can be achieved by a reoptimization of spin-polarization parameters within GFN2-xTB. The sequential and simultaneous optimization approaches, guided by sensitivity analysis using Sobol indices, demonstrated significant improvements in accuracy, particularly for the W4-11-HCONF subset. However, we encountered challenges concerning the transferability of the optimized parameters for different datasets, especially when different properties were targeted. The sensitivity analysis proved to be a valuable tool to identify the parameters with the largest impact on the results for a given dataset. Despite these limits on transferability, we emphasize that a significant error reduction could be achieved by reoptimization for the datasets studied here. This certainly motivates to optimize the spin-polarization parameters based on fits to reference data — as has been done for almost all parameters within GFN2-xTB — rather than deriving them from DFT via Janak's theorem. Importantly, the aforementioned challenges associated with transferability encourage a system- or property-specific optimization rather than aiming for a completely general method. For those datasets where transferability was limited, it was found that errors associated with the formulation of the extended tight-binding methods themselves outweighed any potential gains in accuracy associated with parameter optimization; in case of ionization potentials end electron affinities, the lack of flexibility in the minimal basis set is certainly the biggest source of error, whereas for the AC12 dataset with carbene singlet-triplet gaps, the requirement of DFTB approaches to define a reference occupation to calculate the shell-wise Mulliken charges introduces a bias that leads to an imbalanced description of the two states considered. This is a major limitation of these approaches that motivates further studies that are currently ongoing in our labs.

ACKNOWLEDGMENTS

We thank Songyuan (Adam) Xu for beginning our xTB implementation during an internship in 2019. Open Access funding enabled and organized by Projekt DEAL.

    CONFLICT OF INTEREST STATEMENT

    The authors declare the following competing financial interest(s): M.H.-G. is a part-owner of Q-Chem Inc, whose software was used for all developments and calculations reported here.

    DATA AVAILABILITY STATEMENT

    All benchmark data sets used in this study are publicly available and cited in the manuscript.

      The full text of this article hosted at iucr.org is unavailable due to technical difficulties.