

# Optimal transport distances to characterise electronic excitations

Annina Z\. Lieberherr,<sup>*∗*&#44;*†*</sup> Paola Gori\-Giorgi,<sup>*‡*&#44;*¶*</sup> and Klaas J\. H\. Giesbertz<sup>*‡*</sup>

${{\mathbin{\dagger }}{\textstyle \textit{Department}}}$ *of Chemistry, University of Oxford, Physical and Theoretical Chemistry Laboratory, South Parks Road, Oxford OX1 3QZ, United Kingdom*

${{\mathbin{\ddagger }}{\textstyle \textit{Department}}}$ *of Chemistry and Pharmaceutical Sciences, Amsterdam Institute of Molecular and Life Sciences (AIMMS), Faculty of Science, Vrije Universiteit Amsterdam, De Boelelaan 1083, 1081HV Amsterdam, The Netherlands*

${{¶}{\textstyle \textit{Microsoft}}}$ *Research AI for Science, Evert van de Beekstraat 354, 1118CZ Schiphol, The Netherlands*

E\-mail: `annina.lieberherr@chem.ox.ac.uk`

**Abstract**

Understanding the character of electronic excitations is important in computational and reaction mechanistic studies, but their classification from simulations remains an open problem\. Distances based on optimal transport have proven very useful in a plethora of classification problems and seem therefore a natural tool to try to tackle this challenge\. We propose and investigate a new diagnostic $\mathrm{Θ}$ based on the Sinkhorn divergence from optimal transport\. We evaluate a ${k{\textstyle \text{-}}}$&#78;N classification algorithm on ${\mathrm{Θ}{\textstyle \text{,}}}$ the popular $\mathrm{Λ}$ diagnostic as well as their combination, and assess their performance in labelling excitations, finding that (i) The combination only slightly improves the classification, (ii) Rydberg excitations are not separated well in any setting, and (iii) $\mathrm{Θ}$ breaks down for charge transfer in small molecules\. We then define a length scale\-normalised version of $\mathrm{Θ}$ and show that the result correlates closely with $\mathrm{Λ}$ for results obtained with Gaussian basis functions\. Using an optimised combination of the two diagnostics together with a different metric is in our opinion the most promising for future classification studies\.

## 1 Introduction

Electronic excitations drive various processes, for example in light harvesting or solar cells, which are important in the exploration of alternative energy sources\. <sup>1,2</sup> There is consequently significant theoretical interest in calculating excited states and their energies, which could then be used to drive non\-adiabatic dynamics and design novel materials\. However, excited state calculations are a computationally expensive problem, and various approximations have been introduced to obtain solutions at lower costs\. Similarly to the ground state problem, methods based on density functional theory (DFT) have become highly popular as they come at a relatively low computational cost but have a solid theoretical foundation, except for approximations that have to be made to the density functional\. <sup>3</sup> Despite decades of effort, there is no ‘one\-fits\-all’ density functional\. <sup>4</sup> In particular for electronic excitations in time\-dependent DFT (TDDFT), <sup>5</sup> where transition energies are calculated within the linear response setting, it has become clear that a functional’s performance can depend heavily on the character of the excitation\. <sup>6</sup>

This is one of the main motivations behind exploring diagnostics that split TDDFT calculated excitations into different types, <sup>7,8</sup> of which there are three\. First, Rydberg excitations to energetically high lying and diffuse Rydberg states\. Secondly, charge transfer (CT) excitations from a donor to an acceptor which is spatially separated from the donor, either within the same molecule (intramolecular) or in different molecules (intermolecular)\. CT excitation can carry especially large errors in TDDFT calculations\. <sup>6</sup> The third group are local excitations, which encompass excitations that fit neither of the other two categories\. With a classifier one can decide a posteriori whether the chosen density functional was suitable and if not, repeat the calculation with a higher\-level functional\. However, such a classification might prove useful beyond picking the right functional\. Assigning a label to a new excitation can be a very tedious process, during which one relies on chemical intuition or has to inspect wavefunctions and/or localised orbitals visually\. With a quantitative method to decide on the character of the excitation, this step could be extremely simplified\. <sup>9</sup>

To this end, Peach *et al\.* &#116;ook advantage of the decomposition of an electronic excitation into single orbital transitions within the TDDFT framework and studied a weighted average of the overlap between initial and final orbitals\. <sup>7</sup> While they did not establish a classification of excitation types, they showed a correlation between their overlap diagnostic and the associated error in excitation energy\. The same trends have been observed in other systems and the overlap diagnostic has been widely applied since its introduction\. <sup>10–12</sup> In a similar spirit Guido *et al\.* &#115;tudied the difference between the electron’s centroid in the initial and final orbitals within a single orbital transition\. <sup>13</sup> The centroid difference is better able to differentiate between CT and valence excitations than the overlap diagnostic, although they stress that the best results were obtained when using them in combination\.

An alternative interpretation of electronic excitations that extends beyond the TDDFT framework is via the formation of an electron\-hole pair (the exciton)\. The resulting exciton formalism opens the door for a multitude of other descriptors like the electron\-hole correlation, the distance between them and the size of the exciton\. All have been used to characterise excited states <sup>8,14</sup> and the latter two have been combined with the overlap diagnostic for classification\. <sup>9</sup> However, Hirose *et al\.* &#97;lso point out that the electron\-hole correlation cannot describe centrosymmetric molecules\. <sup>9</sup> To summarise, while there exist different descriptors for electronic excitations, there is no generally applicable classifier as of yet\. Finally, going back to a density picture in the TDDFT framework, Moore *et al\.* &#99;onsider the modulus of the change in electron density between the initial and final orbitals, which they argue is better suited for a classification\. <sup>15</sup> However, this diagnostic suffers from a similar problem as the overlap: If the supports of the initial and final orbitals become disjoint, there is a plateau value for both of them and they are agnostic to any variations in the orbitals at that point\.

In this work, we seek to improve the classification of excitations by considering optimal transport properties of electron densities, which promise to avoid the plateau problem\. The article is structured as follows\. After laying out the necessary theory on TDDFT and optimal transport in Sec\. 2, we cover the computational details in Sec\. 3\. In Sec\. 4, we present the results, both confirming previous studies on the overlap diagnostic and new results using descriptors from optimal transport\. Finally, we summarise our findings in Sec\. 5 and propose future directions\.

## 2 Theory

### 2\.1 TDDFT and the $\mathbf{Λ}$ diagnostic

The Kohn–Sham (KS) ground state for an ${N{\textstyle \text{-}}}$&#101;lectron system is a Slater determinant



$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}\mathrm{Ψ}_{s}(\mathbf{x}_{1},\mathinner{\mathpunct{.}\mathpunct{.}\mathpunct{.}},\mathbf{x}_{N})=\mathcal{A}∏\limits _{i=1}^{N}φ_{i}(\mathbf{x}_{i}),&\text{(1)}\end{array}}
$$

where $\mathcal{A}$ anti\-symmetrises and normalises the wave function, $\mathbf{x}_{i}$ is the space\-spin coordinate of the ${i{\textstyle \text{-}}}$&#116;h electron and $φ_{i}$ is the ${i{\textstyle \text{-}}}$&#116;h KS orbital\. <sup>3</sup> The orbitals are solutions to the (time\-independent) KS equations, <sup>16</sup>



$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}\mathinner{\left[−{\frac{1}{2}}\mathrm{Δ}+v_{\mathrm{s}}(\mathbf{r})\right]}φ_{i}(\mathbf{x})=ε_{i}φ_{i}(\mathbf{x}).&\text{(2)}\end{array}}
$$

The ground state is composed of the KS orbitals $φ_{i}$ with the lowest energies $ε_{i}$ (the occupied orbitals)\. Excited states within linear\-response TDDFT are linear combinations of Slater determinants with single orbital excitations into previously unoccupied (or virtual) orbitals ${φ_{a}{\textstyle \text{.}}}$ <sup>5</sup> The excitation energy and the contribution of a single orbital transition can be determined in the linear response picture by solving the Casida equations, <sup>17</sup>

$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}\mathinner{\left(\kern-5pt {{\textstyle \begin{matrix}\rule[-0.59994253em]{0em}{1.99978892em}\kern0.41666667em \kern0.00000127em \textstyle A\displaystyle \kern0.41666667em &\kern0.41666667em \kern0.00000127em \textstyle B\displaystyle \kern0.41666667em \\\rule[-0.59994253em]{0em}{1.99978892em}\kern0.41666667em \kern0.00000127em \textstyle B\displaystyle \kern0.41666667em &\kern0.41666667em \kern0.00000127em \textstyle A\displaystyle \kern0.41666667em \end{matrix}}}\kern-5pt \right)}\mathinner{\left(\kern-5pt {{\textstyle \begin{matrix}\rule[-0.59994253em]{0em}{1.99978892em}\kern0.41666667em \kern0.00000127em \textstyle X\displaystyle \kern0.41666667em \\\rule[-0.59994253em]{0em}{1.99978892em}\kern0.41666667em \kern0.00000127em \textstyle Y\displaystyle \kern0.41666667em \end{matrix}}}\kern-5pt \right)}=\mathrm{Ω}\mathinner{\left(\kern-5pt {{\textstyle \begin{matrix}\rule[-0.59994253em]{0em}{1.99978892em}\kern0.41666667em \kern0.00000127em \textstyle −1\displaystyle \kern0.41666667em &\kern0.41666667em \kern0.00000127em \textstyle 0\displaystyle \kern0.41666667em \\\rule[-0.59994253em]{0em}{1.99978892em}\kern0.41666667em \kern0.00000127em \textstyle 0\displaystyle \kern0.41666667em &\kern0.41666667em \kern0.00000127em \textstyle 1\displaystyle \kern0.41666667em \end{matrix}}}\kern-5pt \right)}\mathinner{\left(\kern-5pt {{\textstyle \begin{matrix}\rule[-0.59994253em]{0em}{1.99978892em}\kern0.41666667em \kern0.00000127em \textstyle X\displaystyle \kern0.41666667em \\\rule[-0.59994253em]{0em}{1.99978892em}\kern0.41666667em \kern0.00000127em \textstyle Y\displaystyle \kern0.41666667em \end{matrix}}}\kern-5pt \right)}.&\text{(3)}\end{array}}
$$

The eigenvalues $\mathrm{Ω}$ are the excitation energies and the eigenvectors $X,Y$ contain the real and imaginary parts of the single orbital transition coefficient, respectively\. Although equation (3) looks simple, the entries of $A$ and $B$ depend on the exact ground state of the system as well as on the exact form of the exchange correlation functional\. Neither of these is currently attainable, but there are various approximations to the exchange\-correlation functional with which excitation energies can be obtained\. <sup>18</sup> However, TDDFT excitation energies can vary greatly in accuracy between different excitation characters and between different functionals\. <sup>6</sup>

It is generally difficult to assign one of the labels ”CT”, ”local” or ”Rydberg” to a given electronic excitation\. Peach *et al\.* &#105;nvestigated energy errors in electronic excitations based on the overlap of the single orbital transitions, <sup>7</sup>



$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}\mathrm{Λ}={\frac{∑\nolimits _{i,a}c_{ia}\mathinner{\left\langle \mkern5mu {\vert }φ_{a}{\vert }\mkern5mu \middle\vert \mkern5mu {\vert }φ_{i}{\vert }\mkern5mu \right\rangle }}{∑\nolimits _{i,a}c_{ia}}},&\text{(4)}\end{array}}
$$

where $c_{ia}={\vert }X_{ia}+iY_{ia}{\vert }^{2}$ is the contribution of the excitaiton $φ_{i}\mathrel{→}φ_{a}$ and $\mathinner{\left\langle \mkern5mu {\vert }φ_{a}{\vert }\mkern5mu \middle\vert \mkern5mu {\vert }φ_{i}{\vert }\mkern5mu \right\rangle }$ is the overlap of the (modulus of the) orbitals\. They studied a set of eleven molecules with the PBE, B3LYP and CAM\-B3LYP functionals and evaluated $\mathrm{Λ}$ for a total of 59 excitations\. While $\mathrm{Λ}$ gives some insight into the expected error magnitude for different DFT functionals, it is not able to distinguish between the different excitation types without prior knowledge: Though $\mathrm{Λ}$ values of local and Rydberg excitations are well separated, CT excitations fall across almost the whole range of ${\mathrm{Λ}{\textstyle \text{.}}}$ Hence, one cannot make conclusions about the excitation type based on $\mathrm{Λ}$ alone\. Optimal transport might be able to help\.

### 2\.2 An Optimal Transport diagnostic

At the heart of optimal transport lies the problem of finding a plan to transport a source probability density into a target probability density\. <sup>19</sup> As we will be looking at electronic orbitals ${φ_{i,a}{\textstyle \text{,}}}$ it is only natural to use the probability densities $ρ_{i,a}={\vert }φ_{i,a}{{\vert }^{2}{\textstyle \text{.}}}$ The (entropically regularised) optimal transport problem is <sup>20</sup>

$$
{\textstyle \begin{array}{rll}\rule[-1.30557124em]{0em}{2.70541763em}\displaystyle \rule[-0.59994253em]{0em}{1.99978892em}\kern0pt \displaystyle {\mathcal{W}_{2,ε}^{2}(ρ_{i},ρ_{a})=\operatorname*{min}\limits _{π∈\mathrm{Π}(ρ_{i},ρ_{a})}∫\nolimits _{\mathbb{R}^{3}×\mathbb{R}^{3}}}\textstyle &\displaystyle \kern0pt \displaystyle {{}c(\boldsymbol{r},\boldsymbol{r}^{\prime })π(\boldsymbol{r},\boldsymbol{r}^{\prime })\mathrm{d}\boldsymbol{r}\mathrm{d}\boldsymbol{r}^{\prime }}\textstyle &\displaystyle \\\rule[-0.59994253em]{0em}{1.99978892em}\displaystyle \rule[-0.59994253em]{0em}{1.99978892em}&\displaystyle \kern0pt \displaystyle {{}+ε{\mathrm{K}\mathrm{L}}\mathinner{\left(π\middle\vert ρ_{i}\otimes ρ_{a}\right)},}\textstyle &\displaystyle \text{(5)}\end{array}}
$$

where $\mathrm{Π}(ρ_{i},ρ_{a})$ is the set of joint probability densities $π$ with marginals $ρ_{i}$ and ${ρ_{a}{\textstyle \text{,}}}$



$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}∫\nolimits _{\mathbb{R}^{3}}π(\boldsymbol{r},\boldsymbol{r}^{\prime })\mathrm{d}\boldsymbol{r}^{\prime }=ρ_{i}(\boldsymbol{r}),\kern5.69046pt ∫\nolimits _{\mathbb{R}^{3}}π(\boldsymbol{r},\boldsymbol{r}^{\prime })\mathrm{d}\boldsymbol{r}=ρ_{a}(\boldsymbol{r}^{\prime }),&\text{(6)}\end{array}}
$$

and we use the regularised optimal transport problem problem with the Kullback\-Leibler divergence ${\mathrm{K}\mathrm{L}}\mathinner{\left(π\middle\vert ρ_{i}ρ_{a}\right)}$

$$
{\textstyle \begin{array}{rll}\rule[-1.30557124em]{0em}{2.73207855em}\displaystyle \rule[-0.59994253em]{0em}{1.99978892em}\kern0pt \displaystyle {{\mathrm{K}\mathrm{L}}(π{\vert }ν)=}\textstyle &\displaystyle \kern0pt \displaystyle {{}∫\nolimits _{\mathbb{R}^{3}×\mathbb{R}^{3}}π(\boldsymbol{r},\boldsymbol{r}^{\prime })\operatorname{log}\nolimits {\frac{π(\boldsymbol{r},\boldsymbol{r}^{\prime })}{ν(\boldsymbol{r},\boldsymbol{r}^{\prime })}}\mathrm{d}\boldsymbol{r}\mathrm{d}\boldsymbol{r}^{\prime }}\textstyle &\displaystyle \\\rule[-0.9722379em]{0em}{2.3720843em}\displaystyle \rule[-0.59994253em]{0em}{1.99978892em}&\displaystyle \kern0pt \displaystyle {{}+∫\nolimits _{\mathbb{R}^{3}×\mathbb{R}^{3}}\mathinner{\left(ν(\boldsymbol{r},\boldsymbol{r}^{\prime })−π(\boldsymbol{r},\boldsymbol{r}^{\prime })\right)}\mathrm{d}\boldsymbol{r}\mathrm{d}\boldsymbol{r}^{\prime }}\textstyle &\displaystyle \text{(7)}\end{array}}
$$

for computational efficiency\. <sup>20</sup> Because of the entropic regularisation, Eq\. (5) can unituitively be non\-zero even if the orbitals $φ_{i}$ and $φ_{a}$ are identical, which can be fixed by defining the Sinkhorn divergence, <sup>21</sup>

$$
{\textstyle \begin{array}{rll}\rule[-0.68595123em]{0em}{2.08579763em}\displaystyle \rule[-0.59994253em]{0em}{1.99978892em}\kern0pt \displaystyle {S(ρ_{i},ρ_{a})=}\textstyle &\displaystyle \kern0pt \displaystyle {{}\mathcal{W}_{2,ε}^{2}(ρ_{i},ρ_{a})−{\frac{1}{2}}\mathinner{\left[\mathcal{W}_{2,ε}^{2}(ρ_{i},ρ_{i})+\mathcal{W}_{2,ε}^{2}(ρ_{a},ρ_{a})\right]},}\textstyle &\displaystyle \text{(8)}\end{array}}
$$

which will therefore be used from here on\.

Fig\. 1 motivates the use of the Sinkhorn divergence to study electronic excitations: Consider the case where the target density ${{\textstyle \text{(}}ρ_{a}}$ in Eq\. (5)) is a translation of the source density ${ρ_{i}{\textstyle \text{.}}}$ This could be a crude model of CT with an increasing number of linker fragments between donor and acceptor, for which Mewes and Dreuw have already found a linear dependence of exciton\-based diagnostics\. <sup>14</sup> As soon as the supports of source and target density become disjoint, the overlap is zero and stays zero for any larger translations\. It is in that sense blind to translations above some threshold, and $\mathrm{Λ}$ will tend towards zero\. The optimal transport derived quantities are expected to behave very differently\. If the regularisation parameter $ε$ goes to 0, the squared Wasserstein distance $\mathcal{W}_{2,0}^{2}$ would be quadratic in the displacement\. While the Sinkhorn divergence $S$ overestimates the Wasserstein distance, it should behave similarly for small enough ${ε{\textstyle \text{.}}}$ The Sinkhorn divergence’s sensitivity for translations motivates us to propose a new diagnostic,

![Figure](<lec-images-d1b22ecfb4b271547680178326df8bdc8eb13cb42e5e8361c3e977247747bfd4/diagram-1.png>)



Figure 1: (Qualitative) demonstration of overlap measurements and the Sinkhorn divergence when studying translations, here for Gaussian source and target densities\.



$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}\mathrm{Θ}={\frac{∑\nolimits _{i,a}c_{ia}S(ρ_{i},ρ_{a})}{∑\nolimits _{i,a}c_{ia}}},&\text{(9)}\end{array}}
$$

with the single orbital contribution $c_{ia}$ as in Eq\. (4)\.

## 3 Computational details

We calculated $\mathrm{Λ}$ and $\mathrm{Θ}$ for the same set of molecules as studied by Peach *et al\.*&#44; because their data set includes many examples of the three different excitation types\. <sup>7</sup> The set includes the four small molecules ${{\textstyle \text{N}}{}_{2}{\textstyle \text{,}}}$ CO, HCl and formaldehyde, five larger molecules (dipeptide, ${β{\textstyle \text{-}}}$&#100;ipeptide, tripeptide, N\-phenylpyrrole (PP) and 4\-(N,N\-dimethylamino)benzonitrile (DMABN)) and conjugated polymer systems: acenes (1\-5 monomers) and polyacetylene (PA) oligomers (2\-5 monomers), all of which are shown in Fig\. S1\. Calculating $\mathrm{Λ}$ allows us to verify our data before studying the new diagnostic ${\mathrm{Θ}{\textstyle \text{.}}}$ Electronic excitation energies were calculated with Turbomole, <sup>22</sup> using the ${d{\textstyle \text{-}}}$&#97;ug\-cc\-pVTZ basis set for ${{\textstyle \text{N}}{}_{2}{\textstyle \text{,}}}$ ${{\textstyle \text{H}}{}_{2}{\textstyle \text{CO}}}$ and CO and the cc\-pVTZ basis set for the remaining molecules\. <sup>23–27</sup> The SCF convergence threshold was ${{\textstyle \text{10}}{}^{−7}}$ and the multiple grid `m3` was used for the DFT calculation\. <sup>28</sup> At the end of a converged TDDFT calculation, Turbomole prints a list of single orbital contributions $c_{ia}$ (for $c_{ia}>0.0{5{\textstyle \text{)}}}$ and the involved orbitals, which can be obtained on a grid\. The grid data is then used to calculate $\mathrm{Λ}$ by numerical quadrature and $\mathrm{Θ}$ with the `geomloss` package (version `0.2.5`)\. <sup>29</sup> In order to calculate Sinkhorn divergences, the orbital grids have to be chosen large enough to contain all electronic density (in practice, we chose the grids big enough to contain at least 99% of the density)\. We use an equidistant grid with spacing of 0\.8 Bohr for all molecules\.

We will use a ${k{\textstyle \text{-}}}$&#110;earest neighbour classifier, where each data point is labelled according to the label carried by the majority of the point’s nearest $k$ neighbours in the training set (here about 80% of the entire data set)\. <sup>30</sup> In our case the 13 nearest neighbours determine a point’s label, which corresponds approximately to the square root of the training set size\.

## 4 Results and Discussion

### 4\.1 The dataset

The calculated excitation energies, $\mathrm{Λ}$ and $\mathrm{Θ}$ values are available in the supplementary information\. The energies and ${\mathrm{Λ}{\textstyle \text{s}}}$ agree very well with previously reported values except for the PBE excitation in the third PA oligomer, where our ${\mathrm{Λ}{\textstyle \text{s}}}$ seem swapped, and the CAM\-B3LYP $D{}^{1}\mathrm{Δ}$ and $I{}^{1}\mathrm{Σ}^{−}$ excitations in CO, where our ${\mathrm{Λ}{\textstyle \text{s}}}$ are much smaller in the Turbomole results\. In the other cases any deviations are likely due to differences between different quantum chemistry programs, different grids or different convergence thresholds for the SCF iterations\.

### 4\.2 Optimal transport results

The regularisation parameter $ε$ in Eq\. (5) is determined based on the maximum value of the cost function ${d_{\mathrm{m}\mathrm{a}\mathrm{x}}{\textstyle \text{,}}}$



$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}ε=10^{−σ}d_{\mathrm{m}\mathrm{a}\mathrm{x}},&\text{(10)}\end{array}}
$$

with integer ${σ{\textstyle \text{.}}}$ In order to determine a suitable ${σ{\textstyle \text{,}}}$ we calculated $\mathrm{Θ}$ for the dipeptide and ${{\textstyle \text{N}}{}_{2}}$ molecules at different ${σ{\textstyle \text{,}}}$ the results of which are included in the supplementary information (Tab\. S1)\. These molecules have drastically different grid sizes and are therefore good edge cases to test ${σ{\textstyle \text{.}}}$ For $σ={4{\textstyle \text{,}}}$ $\mathrm{Θ}$ is captured to within 2% of its true value, which is sufficient for the purpose of this article and was therefore used in all further calculations\.

![Figure](<lec-images-d1b22ecfb4b271547680178326df8bdc8eb13cb42e5e8361c3e977247747bfd4/diagram-2.png>)



Figure 2: Comparison of $\mathrm{Θ}$ (left) and $\mathrm{Λ}$ (right) with the error in excitation energy\. From top to bottom, the TDDFT functionals are PBE, B3LYP and CAM\-B3LYP\.

To start, we compare both $\mathrm{Θ}$ and $\mathrm{Λ}$ with the error in the electronic excitation energy (Fig\. 2), analogously to Fig\. 2 in Ref\. 7\. The two diagnostics exhibit opposite trends: $\mathrm{Θ}$ increases while $\mathrm{Λ}$ decreases with the excitation error\. Further, $\mathrm{Θ}$ is generally large for Rydberg excitations and small for local excitations\. The inverse is true for ${\mathrm{Λ}{\textstyle \text{,}}}$ which we can reason as follows: In Rydberg excitations, the electron is excited to a very diffuse and highly delocalised orbital\. On the one hand, it will only have very small density within the support of the initial orbital and $\mathrm{Λ}$ is small\. On the other hand, in order to satisfy the marginals, the transport plan $π$ will have non\-zero entries far away from its diagonal, resulting in a large ${\mathrm{Θ}{\textstyle \text{.}}}$ In contrast, local excitations have high overlap between the initial and final orbials, which results in a large ${\mathrm{Λ}{\textstyle \text{.}}}$ Simultaneously, little overall density has to be transported over a small distance and therefore $\mathrm{Θ}$ will be small\.\
Turning our attention to CT excitations, we note that, contrary to our expectations, the CT $\mathrm{Θ}$ values lie between Rydberg and local values, similarly to the $\mathrm{Λ}$ values\. This makes both $\mathrm{Λ}$ and $\mathrm{Θ}$ unlikely to be suitable classifiers, which is also apparent from the results of a ${k{\textstyle \text{-}}}$&#110;earest neighbours classifier trained using either $\mathrm{Θ}$ or $\mathrm{Λ}$ (Fig\. 3, first two panels): The ${\mathrm{Λ}{\textstyle \text{-}}}$&#99;lassifier (Fig\. 3a) performs well for both local and Rydberg excitations, but labels almost all CT excitations wrong\. The ${\mathrm{Θ}{\textstyle \text{-}}}$&#99;lassifier (Fig\. 3b) performs better for CT excitations but worse for the other excitation types\. It should be noted that we are trying to classify imbalanced data (there are more local excitations than others), which might incur additional errors\. However, it is clear from Fig\. 2 that even imbalanced learning would not produce a very good classifier: The CT excitations are simply too spread out to allow for this\.



![Figure](<lec-images-d1b22ecfb4b271547680178326df8bdc8eb13cb42e5e8361c3e977247747bfd4/diagram-3.png>)



(a)



![Figure](<lec-images-d1b22ecfb4b271547680178326df8bdc8eb13cb42e5e8361c3e977247747bfd4/diagram-4.png>)



(b)



![Figure](<lec-images-d1b22ecfb4b271547680178326df8bdc8eb13cb42e5e8361c3e977247747bfd4/diagram-5.png>)



(c)



Figure 3: Confusion matrix of a ${k{\textstyle \text{-}}}$&#78;N classification using $\mathrm{Λ}$ only (a), $\mathrm{Θ}$ only (b) and both (c)\.

Instead, we could take advantage of the opposite trends of $\mathrm{Θ}$ and $\mathrm{Λ}$ and train a classifier on the joint $\mathrm{Θ}$ and $\mathrm{Λ}$ values\. Its confusion matrix is shown in Fig\. 3c\. The two\-dimensional classification can only partially recover the advantages of each of the one\-dimensional classifiers: It is as good as the $\mathrm{Λ}$ classifier for Rydberg excitations, as good as the $\mathrm{Θ}$ classifier for local excitations (therefore worse than if we were to use ${\mathrm{Λ}{\textstyle \text{)}}}$ and lies between the other classifiers for CT excitations\.

To understand better why, let us consider the regions of overlap of CT excitations with local and Rydberg excitations, respectively\. Rydberg and CT excitations might be difficult to distinguish with the diagnostics used here because there is a property that is completely ignored: diffusivity\. We do not have the ability to discern an excitation into a diffuse orbital from one into a translated orbital\. Additional metrics that can identify Rydberg orbitals, such as the average distance of the electron to the center of the molecule or higher order moments, might provide a better classification in combination with ${\mathrm{Θ}{\textstyle \text{.}}}$ In the same spirit, Hirose *et al\.* &#112;reviously used a combination of $\mathrm{Λ}$ and the electron\-hole distance relative to the exciton size to classify excitations\. <sup>9</sup>

One good example of coinciding CT and local excitations are the CT excitations in the HCl molecule\. Since the excitations only take place across one hydrogen\-chloride bond, the associated Sinkhorn divergences are very small ${{\textstyle \text{(}}\mathrm{Θ}}$ on the order of 4 ${{\textstyle \text{Bohr}}{}^{2}{\textstyle \text{)}}}$ and similar to typical $\mathrm{Θ}$ values for local excitations in the same molecule\. This is in fact not the only molecule where CT excitations are associated with surprisingly low values of $\mathrm{Θ}$ but rather a common situation which occurs in all molecules with CT excitation considered here\.

We have now pointed out multiple times that there are opposite trends in $\mathrm{Θ}$ and ${\mathrm{Λ}{\textstyle \text{.}}}$ For two Gaussian densities with the same variance, there is even an explicit relation between them,



$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}\operatorname{log}\nolimits \mathrm{Λ}+{\frac{\mathrm{Θ}}{4σ^{2}}}=C,&\text{(11)}\end{array}}
$$

with a constant ${C{\textstyle \text{,}}}$ which motivates us to define a new optimal transport diagnostic where the Sinkhorn divergence is normalised by the variance of the electron position,



$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}\mathrm{Θ}^{\prime }={\frac{1}{∑\nolimits _{i,a}c_{ia}}}∑\limits _{i,a}c_{ia}{\frac{S(ρ_{i},ρ_{a})}{\sqrt{\mathopen{⟨}r^{2}\mathclose{⟩}_{i}\mathopen{⟨}r^{2}\mathclose{⟩}_{a}}}},&\text{(12)}\end{array}}
$$

with



$$
{\textstyle \begin{array}{cr}\displaystyle \mathopen{}\mathopen{⟨}r^{2}\mathclose{⟩}_{x}=∫\nolimits r^{2}ρ_{x}\mathrm{d}\boldsymbol{r},&\text{(13)}\end{array}}
$$

and we have assumed that the center of the molecule lies at the origin\. Plotting the new $\mathrm{Θ}^{\prime }$ against $\operatorname{log}\nolimits \mathrm{Λ}$ (Fig\. 4) reveals a close correlation between the two, which confirms that they capture the same information\. Note that Turbomole uses Gaussian basis sets, which may have an influence on the striking correlation in Fig\. 4 and we reserve the study of other basis functions to future work\.

Fig\. 5 shows the confusion matrices for ${k{\textstyle \text{-}}}$&#78;N classifiers trained on the $\mathrm{Θ}^{\prime }−\operatorname{log}\nolimits \mathrm{Λ}$ data set\. While the $\operatorname{log}\nolimits \mathrm{Λ}$ classifier (Fig\. 5a) does not improve significantly on the $\mathrm{Λ}$ classifier (Fig\. 3a), we see a much better performance of the $\mathrm{Θ}^{\prime }$ classifier (Fig\. 5b) on $\mathrm{Θ}$ (Fig\. 3b)\. Again, the combination does not seem to offer much additional improvement, but the current data set is too small to allow for quantitative conclusions\.

![Figure](<lec-images-d1b22ecfb4b271547680178326df8bdc8eb13cb42e5e8361c3e977247747bfd4/diagram-6.png>)



Figure 4: Combined plot of $\mathrm{Θ}^{\prime }$ and $\operatorname{log}\nolimits \mathrm{Λ}$ for the present set of excitations\. The background colours correspond to the boundaries from a ${k{\textstyle \text{-}}}$&#78;N classification\.



![Figure](<lec-images-d1b22ecfb4b271547680178326df8bdc8eb13cb42e5e8361c3e977247747bfd4/diagram-7.png>)



(a)



![Figure](<lec-images-d1b22ecfb4b271547680178326df8bdc8eb13cb42e5e8361c3e977247747bfd4/diagram-8.png>)



(b)



![Figure](<lec-images-d1b22ecfb4b271547680178326df8bdc8eb13cb42e5e8361c3e977247747bfd4/diagram-9.png>)



(c)



Figure 5: Confusion matrix of a ${k{\textstyle \text{-}}}$&#78;N classification using $\operatorname{log}\nolimits \mathrm{Λ}$ only (a), $\mathrm{Θ}^{\prime }$ only (b) and both (c)\.

## 5 Conclusion

There is currently no reliable way to classify electronic excitations into CT, Rydberg and local excitations\. In this report we studied two diagnostics, the overlap\-based ${\mathrm{Λ}{\textstyle \text{,}}}$ <sup>7</sup> the optimal transport\-based $\mathrm{Θ}$ and their combination to classify an electronic excitation via its ${k{\textstyle \text{-}}}$&#110;earest neighbours\. There are strengths and issues in both $\mathrm{Λ}$ and $\mathrm{Θ}$ and their combination gives a compromise, but it still does not give a viable classifier\. We argued that CT excitations can be similar to local excitations in $\mathrm{Θ}$ and $\mathrm{Λ}$ if the donor and acceptor are close together, especially in small molecules\. We further argued that $\mathrm{Θ}$ and $\mathrm{Λ}$ cannot distinguish between CT and Rydberg excitations because neither of them captures the diffusivity of the final orbital in a Rydberg excitation\.

We then showed that there is an apparent relation between $\operatorname{log}\nolimits \mathrm{Λ}$ and a modified diagnostic ${\mathrm{Θ}^{\prime }{\textstyle \text{,}}}$ which is a length scale\-corrected version of ${\mathrm{Θ}{\textstyle \text{.}}}$ The combination of $\mathrm{Θ}^{\prime }$ and $\operatorname{log}\nolimits \mathrm{Λ}$ gives the best classifier explored in this work, but more studies are necessary into whether $\mathrm{Θ}^{\prime }$ is also a sensible diagnostic in programs that use non\-Gaussian orbitals\. Combining the diagnostics explored here with criteria explored in earlier work <sup>8–10,13–15</sup> will be useful to identify Rydberg orbitals and in turn, Rydberg excitations\.

While this work was being finalised, a study that shares similar ideas has appeared\. <sup>31</sup> We reach similar conclusions, but we have also key differences, like the use of the entropic regularisation to accelerate calculations and a different look at possible classifications\.

## Acknowledgement

The authors thank Stijn de Baerdemacker for pointing out Eq\. (11), David Tew for helpful comments and advice on the Turbomole calculations, Joe Cooper for helpful discussions about Rydberg excitations, Giulia Luise for helpful discussions about the Sinkhorn divergence as well the `geomloss` package, Derk Kooi for advice on the initial version of the Sinkhorn algorithm, and Hans Chan for helpful suggestions on the manuscript\. Annina Lieberherr was supported by a Berrow Foundation Lord Florey Scholarship and, during the initial phase of this work, by the University Research Fellowship at the Vrije Universiteit Amsterdam\.

## Supporting Information Available

The supplementary information shows the molecules considered here, the convergence of $\mathrm{Θ}$ with the regularisation parameter $σ$ and a link to a github repository\. The data needed to reproduce the results here is contained in the file `si_data.csv`\.

## References

**(1)** Scholes, G\. D\. Introduction: Light Harvesting\. *Chemical Reviews* **&#50;017**&#44; *117*&#44; 247–248\.

**(2)** Hagfeldt, A\.; Boschloo, G\.; Sun, L\.; Kloo, L\.; Pettersson, H\. Dye\-Sensitized Solar Cells\. *Chemical Reviews* **&#50;010**&#44; *110*&#44; 6595–6663\.

**(3)** Cancès, E\., Friesecke, G\., Eds\. *Density Functional Theory*&#59; Springer International Publishing, 2023\.

**(4)** Medvedev, M\. G\.; Bushmarinov, I\. S\.; Sun, J\.; Perdew, J\. P\.; Lyssenko, K\. A\. Density functional theory is straying from the path toward the exact functional\. *Science* **&#50;017**&#44; *355*&#44; 49–52\.

**(5)** Ullrich, C\. A\. *Time Dependent Density Functional Theory*&#59; Oxford Graduate Texts, 2006\.

**(6)** Maitra, N\. T\. Charge transfer in time\-dependent density functional theory\. *Journal of Physics: Condensed Matter* **&#50;017**&#44; *29*&#44; 423001\.

**(7)** Peach, M\. J\. G\.; Benfield, P\.; Helgaker, T\.; Tozer, D\. J\. Excitation energies in density functional theory: An evaluation and a diagnostic test\. *The Journal of Chemical Physics* **&#50;008**&#44; *128*&#44; 044118\.

**(8)** Mewes, S\. A\.; Plasser, F\.; Dreuw, A\. Communication: Exciton analysis in time\-dependent density functional theory: How functionals shape excited\-state characters\. *The Journal of Chemical Physics* **&#50;015**&#44; *143*&#44; 171101\.

**(9)** Hirose, D\.; Noguchi, Y\.; Sugino, O\. Quantitative characterization of exciton from *GW*&#43;Bethe\-Salpeter calculation\. *The Journal of Chemical Physics* **&#50;017**&#44; *146*&#46;

**(10)** Dev, P\.; Agrawal, S\.; English, N\. J\. Determining the appropriate exchange\-correlation functional for time\-dependent density functional theory studies of charge\-transfer excitations in organic dyes\. *The Journal of Chemical Physics* **&#50;012**&#44; *136*&#46;

**(11)** Leang, S\. S\.; Zahariev, F\.; Gordon, M\. S\. Benchmarking the performance of time\-dependent density functional methods\. *The Journal of Chemical Physics* **&#50;012**&#44; *136*&#46;

**(12)** Kornobis, K\.; Kumar, N\.; Wong, B\. M\.; Lodowski, P\.; Jaworska, M\.; Andruniów, T\.; Ruud, K\.; Kozlowski, P\. M\. Electronically Excited States of Vitamin B12: Benchmark Calculations Including Time\-Dependent Density Functional Theory and Correlated ab Initio Methods\. *The Journal of Physical Chemistry A* **&#50;011**&#44; *115*&#44; 1280–1292\.

**(13)** Guido, C\. A\.; Cortona, P\.; Mennucci, B\.; Adamo, C\. On the Metric of Charge Transfer Molecular Excitations: A Simple Chemical Descriptor\. *Journal of Chemical Theory and Computation* **&#50;013**&#44; *9*&#44; 3118–3126\.

**(14)** Mewes, S\. A\.; Dreuw, A\. Density\-based descriptors and exciton analyses for visualizing and understanding the electronic structure of excited states\. *Physical Chemistry Chemical Physics* **&#50;019**&#44; *21*&#44; 2843–2856\.

**(15)** Moore, B\.; Sun, H\.; Govind, N\.; Kowalski, K\.; Autschbach, J\. Charge\-Transfer Versus Charge\-Transfer\-Like Excitations Revisited\. *Journal of Chemical Theory and Computation* **&#50;015**&#44; *11*&#44; 3305–3320\.

**(16)** Kohn, W\.; Sham, L\. J\. Self\-Consistent Equations Including Exchange and Correlation Effects\. *Physical Review* **&#49;965**&#44; *140*&#44; A1133–A1138\.

**(17)** Casida, M\. E\. *Recent Advances in Density Functional Methods*&#59; WORLD SCIENTIFIC, 1995; pp 155–192\.

**(18)** Toulouse, J\. *Density Functional Theory*&#59; Springer International Publishing, 2022; pp 1–90\.

**(19)** Peyré, G\.; Cuturi, M\. Computational Optimal Transport: With Applications to Data Science\. *Foundations and Trends® in Machine Learning* **&#50;019**&#44; *11*&#44; 355–607\.

**(20)** Cuturi, M\. Sinkhorn distances: Lightspeed Computation of Optimal Transport\. *Advances in Neural Information Processing Systems* **&#50;013**&#44;

**(21)** Ramdas, A\.; Trillos, N\.; Cuturi, M\. On Wasserstein Two\-Sample Testing and Related Families of Nonparametric Tests\. *Entropy* **&#50;017**&#44; *19*&#44; 47\.

**(22)** Balasubramani, S\. G\. et al\. TURBOMOLE: Modular program suite for *ab initio* &#113;uantum\-chemical and condensed\-matter simulations\. *The Journal of Chemical Physics* **&#50;020**&#44; *152*&#44; 184107\.

**(23)** Dunning, T\. H\. Gaussian basis sets for use in correlated molecular calculations\. I\. The atoms boron through neon and hydrogen\. *The Journal of Chemical Physics* **&#49;989**&#44; *90*&#44; 1007–1023\.

**(24)** Kendall, R\. A\.; Dunning, T\. H\.; Harrison, R\. J\. Electron affinities of the first\-row atoms revisited\. Systematic basis sets and wave functions\. *The Journal of Chemical Physics* **&#49;992**&#44; *96*&#44; 6796–6806\.

**(25)** Woon, D\. E\.; Dunning, T\. H\. Gaussian basis sets for use in correlated molecular calculations\. IV\. Calculation of static electrical response properties\. *The Journal of Chemical Physics* **&#49;994**&#44; *100*&#44; 2975–2988\.

**(26)** Schuchardt, K\. L\.; Didier, B\. T\.; Elsethagen, T\.; Sun, L\.; Gurumoorthi, V\.; Chase, J\.; Li, J\.; Windus, T\. L\. Basis Set Exchange: A Community Database for Computational Sciences\. *J\. Chem\. Inf\. Model\.* **&#50;007**&#44; *47*&#46;

**(27)** Pritchard, B\. P\.; Altarawy, D\.; Didier, B\.; Gibsom, T\. D\.; Windus, T\. L\. A New Basis Set Exchange: An Open, Up\-to\-date Resource for the Molecular Sciences Community\. *J\. Chem\. Inf\. Model* **&#50;019**&#44;

**(28)** Eichkorn, K\.; Weigend, F\.; Treutler, O\.; Ahlrichs, R\. Auxiliary basis sets for main row atoms and transition metals and their use to approximate Coulomb potentials\. *Theoretical Chemistry Accounts: Theory, Computation, and Modeling (Theoretica Chimica Acta)* **&#49;997**&#44; *97*&#44; 119–124\.

**(29)** Feydy, J\.; Séjourné, T\.; Vialard, F\.\-X\.; Amari, S\.\-i\.; Trouve, A\.; Peyré, G\. Interpolating between Optimal Transport and MMD using Sinkhorn Divergences\. Proceedings of the Twenty\-Second International Conference on Artificial Intelligence and Statistics\. 2019; pp 2681–2690\.

**(30)** Cover, T\.; Hart, P\. Nearest neighbor pattern classification\. *IEEE Transactions on Information Theory* **&#49;967**&#44; *13*&#44; 21–27\.

**(31)** Wang, Z\.; Liang, J\.; Head\-Gordon, M\. Earth Mover’s Distance as a metric to evaluate the extent of charge transfer in excitations using discretized real\-space densities\. *Journal of Chemical Theory and Computation* **&#50;023**&#44; *19*&#44; 7704–7714\.

## TOC Graphic



Some journals require a graphical entry for the Table of Contents\. This should be laid out “print ready” so that the sizing of the text is correct\.

Inside the `tocentry` environment, the font used is Helvetica 8 pt, as required by *Journal of the American Chemical Society*&#46;

The surrounding frame is 9 cm by 3\.5 cm, which is the maximum permitted for *Journal of the American Chemical Society* &#103;raphical table of content entries\. The box will not resize if the content is too big: instead it will overflow the edge of the box\.

This box and the associated title will always be printed on a separate page at the end of the document\.



---

## About this conversion

“Optimal transport distances to characterise electronic excitations” by Annina Z. Lieberherr, Paola Gori-Giorgi, Klaas J. H. Giesbertz. [Original arXiv submission, 2308.09118v2](https://arxiv.org/abs/2308.09118v2). Shared under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/), as identified by the exact-version arXiv record.

Linneon LLC converted the original LaTeX submission to continuous Markdown and HTML using LEC on October 14, 2026. Pagination and page furniture are removed; tables, notes and figures are arranged for continuous reading. HTML mathematics uses MathJax. These reading copies are not the official publication and do not imply endorsement by the authors, their institutions or arXiv. Original notices are retained. Dates generated by the source may reflect recompilation.

[Read the supporting information](supplement/2308.09118v2--supplement-full.html).
