Introduction

Photoswitches are molecules that can be interconverted reversibly between two (or more) different isomers through excitation by light1,2. For many applications, photoswitches with a high quantum yield and conversion efficiency are desired, but usually one finds relaxation to the initial isomer and/or fluorescence as—often undesired—side processes. However, photoswitches that exhibit fluorescence have actually gained some attention, e.g., in fluorescence microscopy or data storage3,4,5. In the context of fluorescent photoswitches, 4-(N,N-dimethylamino)-4’-nitrostilbene (DANS, structure in Fig. 1a) has received interest for possible applications in, e.g., nonlinear optics6,7 or light-emitting diodes8. As a stilbene9, DANS undergoes transcis photoisomerization, similarly to azobenzenes10 and a large class of molecular motors11,12. In addition, this molecule is a push–pull compound due to the electron-accepting NO2 and electron-donating NMe2 groups. Hence, it possesses excited states with strong charge transfer (CT) character13,14,15, which leads to a strong sensitivity of the photophysics and photochemistry of DANS to its environment, e.g., to the viscosity16 or polarity13,17,18 of a solvent. For example, DANS shows very weak fluorescence in unpolar solvents but particularly strong fluorescence in moderately polar solvents13,17,19, and therefore can be used to detect microplastics20 and adulterated fuels21. The photoisomerization efficiency of DANS is likewise affected by the environment13. In more polar environments, the fluorescence and isomerization yields of DANS drop markedly17,22,23.

Fig. 1: Structure and computed/experimental absorption spectrum of 4-(N,N-dimethylamino)-4’-nitrostilbene (DANS).
figure 1

a The trans isomer is shown on the left, while the cis isomer is on the right. Yellow color indicates the six fragments that we define for the analysis of the excited-state transition density discussed below. b Simulated gas-phase absorption spectrum (Gaussian convolution with full-width at half maximum of 0.5 eV) of the trans (black) and cis (gray) isomer computed with TD-CAM-B3LYP/def2-SVP and normalized to the trans isomer. The energies and oscillator strengths for the first five excited states are listed inside panel (b). The experimental spectrum of an unspecified mixture of trans and cis DANS in cyclohexane (blue) is shown as well41.

Besides solvent environments, which have already been studied in detail, previous studies have emphasized that also heterogeneous environments, including metal oxide surfaces like alumina and silica24,25, can have a profound impact on the photophysics and photochemistry of azobenzenes and stilbenes like DANS. Here, relevant applications include single-molecule spectroscopy26 and fluorescence microscopy27,28, or matter-wave interferometry experiments29,30. All of these analytical applications have in common that the target molecules are deposited on a silica glass surface under vacuum conditions, and are subsequently detected via fluorescence. However, for environment-sensitive molecules, such as DANS, the adsorption on the glass surface can severely interfere with the fluorescence detection. Silica glass surfaces are rich in Si–O–Si and Si–OH groups, making it a relatively polar environment for adsorbates and facilitating diverse interactions and adsorption modes, as previously shown for the adsorption of nitro compounds on silica31,32,33 and in particular for DANS by us34. The disordered nature of amorphous silica surfaces provides a nonuniform environment, whose influence on the photophysics and photochemistry of DANS—and other photoswitches35—is expected to be highly nontrivial. Such surface–adsorbate influences on the behavior of photoswitches are important to better understand, e.g., smart materials like photoresponsive coatings of glass36,37.

Considering the above points, in the present work our goal is to investigate the effect of an amorphous silica surface on the absorption spectra and excited states of an adsorbed DANS molecule under vacuum conditions. One of our objectives is to scrutinize how the absorption spectrum varies depending on the different adsorption modes of the molecule on the irregularly shaped surface. To accomplish this, we examine the absorption spectra of a total of 56 adsorption geometries obtained previously34 of the cis and trans isomers. In order to understand the modifications in the spectra, we apply clustering methods and wave function analysis techniques. In addition, we disentangle the components of the molecule surface interaction—deformation of the molecule from its gas-phase geometry to its adsorbed geometry, electrostatic interactions, and polarization of the glass surface—to further understand the factors that contribute to observed changes in the spectrum upon interaction with the glass surface.

Results

Adsorption configurations in the ground state

The adsorption of DANS on amorphous silica glass (see Fig. 1a), with emphasis on different molecular orientations and interaction types, was studied elsewhere34. This study presented a comprehensive set of geometry optimizations with plane-wave density functional theory (PBE functional) of DANS on four different amorphous glass surfaces. These optimizations were started from 56 different orientations of the cis and trans isomers: “end-on”, where only a single functional group is close to the surface; “side-on”, involving proximity of hydrogen atoms of the aromatic rings to the surface; and “flat-on”, with the aromatic rings parallel to the surface. For the cis isomer, additional orientations with either no or both functional groups close to the surface (i.e., like a V or Λ, respectively) were considered. All 56 optimized structures from that previous study are shown in Supplementary Figs. 1 and 2 in the Supplementary Information, providing a comprehensive overview of the structural diversity. We note that this set of geometries does not constitute a sampling of a thermodynamic ensemble of adsorbed DANS, but rather a constructed set covering as many different (meta-)stable adsorption geometries as possible, to investigate directly the effects of different interaction motifs. Generally, the lowest-energy adsorption configurations of DANS show multiple molecule–surface contacts34. The strongest interactions are the O–HO hydrogen bonds (HBs) between the NO2 group of DANS and the silica hydroxyl groups. In addition, O–Hπ interactions involving the silica hydroxyl groups and the delocalized electrons of the conjugated system play a significant role in determining the adsorption geometries, e.g., leading to deplanarization of the π system. On the contrary, the NMe2 group does not contribute strongly to the adsorption.

In the present work, we investigate the electronic excited states at these 56 structures. The large diversity in the adsorption geometries—ranging from weakly interacting end-on configurations to flat-on configurations with multiple contacts—enables us to investigate in detail the various possible influences of adsorption motifs on the UV/Vis absorption spectra of DANS.

Gas phase

Before discussing the absorption spectra of adsorbed DANS, we will first briefly characterize the gas-phase excited states for reference. The simulated gas-phase absorption spectra, as well as energies and oscillator strengths, of the trans and cis isomers, are presented in Fig. 1b. These results were obtained with TD-CAM-B3LYP38/def2-SVP39,40, as specified in the Methods section. More details on these and higher electronic states (energies, oscillator strengths, characters, excitation descriptors) are provided in Supplementary Tables 1 and 2. Both isomers show an intense absorption band at low energies (about 3.3 eV) that is separated from the overlapping bands at higher energies (above 4.6 eV). We note that the excitation energies of the cis and trans isomers are very similar, but significant differences in the intensities of the absorption bands are observed. The presence of an isolated low-energy absorption band is confirmed by the experimental absorption spectrum of DANS in cyclohexane41 shown in Fig. 1. The shift between simulation and experiment is partially due to the employed small double-zeta basis set (see Supplementary Fig. 3), which we use for consistency with the expensive nanocluster calculations below, and partially due to the employed exchange-correlation functional42.

The characters of the various excited states were quantified using several descriptors obtained with the TheoDORE package43. For each state, a fragment-based two-dimensional population analysis of the transition density matrix provided a so-called electron-hole correlation matrix that describes from which fragment to which fragment (see fragmentation in Fig. 1a) the excitation occurs44,45. The sum of non-diagonal elements of this matrix indicates the CT character of the state. The CT descriptors are given in Supplementary Tables 1 and 2, the electron-hole correlation matrices are shown in Supplementary Figs. 4 and 5.

In both isomers, the S1 state at about 3.3 eV exhibits the highest oscillator strengths, although the state absorbs much more strongly in the trans than in the cis isomer (fosc of 1.6 vs. 0.6). The S1 has a pronounced CT character (CT of 0.80 vs. 0.84), with the excitation occurring mainly from the π2 and CC fragments to the π1 and NO2 fragments (Fig. 1a). Such intense ππ* excitations with large CT contribution are characteristic for push–pull molecules like DANS. The difference in oscillator strength between trans and cis isomer can be explained by the bent and non-planar structure of the cis isomer, which reduces the corresponding transition dipole moment.

The next two excited states (S2 and S3) in both isomers are dark nπ* excitations localized on the NO2 group (CT ≈ 0.2). These states do not contribute to the absorption spectrum (see the gap between the first and second band in Fig. 1b), although they might in principle contribute to nonradiative processes. All other excited states only occur above 4.5 eV. We find that the computed S4 to S9 states all exhibit various ππ* characters, with different degrees of CT character. Here, localized ππ* states tend to be darker than CT-dominated ππ* states.

Considering the prominence of the first absorption band and its relevance for the photophysics and photochemistry of DANS, the subsequent discussion of the effect of adsorption on the spectrum will be focused on the first bright CT state.

Absorption spectra of DANS on the surface of silica

In our previous study34 on the adsorption of DANS on silica, all optimizations and analyses were carried out with plane-wave DFT using periodic boundary conditions. In the present work, we apply a nanocluster approach and switch to atomic orbital-based TD-DFT calculations using ORCA46, due to the lower computational cost and the availability of sophisticated wave function analysis tools from TheoDORE. With this in mind, for each of the 56 optimized structures, a unit cell was extracted and the dangling bonds were saturated with –H or –OH termini. The so-obtained systems consisted of the DANS molecule attached to a glass nanocluster with dimensions of roughly 24 Å × 18 Å × 10 Å (about 330 atoms); an example is shown in Fig. 2a. Absorption spectra for all 56 structures were then computed at the TD-CAM-B3LYP/def2-SVP level of theory (nine states), followed by Gaussian convolution. Fig. 2b and c present the absorption spectra for all these structures, sorted by the excitation energy of the first bright CT state. The spectra are marked with alpha-numeric labels, corresponding to one of the four different glass surfaces and the initial orientation in our previous work34. All structures are shown in Supplementary Figs. 1 and 2, energies and oscillator strengths are given in Supplementary Tables 3 and 4.

Fig. 2: Simulated absorption spectra of DANS in vacuum and adsorbed in various orientations at different amorphous silica glass surfaces.
figure 2

a Example structure of DANS plus silica nanocluster (structure D3). b, c Simulated absorption spectra of all the 56 geometries of (b) trans-DANS and (c) cis-DANS on the surface of silica at TD-CAM-B3LYP/def2-SVP level of theory including nine excited states. The spectra were obtained by Gaussian convolution (full-width at half maximum of 0.5 eV). The spectra are sorted according to the excitation energy of the first bright CT state. The small labels give the excitation energies of the least and most shifted states. All spectra use the same normalization factor. The gas-phase spectra for both isomers serve as references and are labeled as “ref.” (black lines). The alpha-numeric labels of the 56 structures correspond to the ones used in Supplementary Figs. 1 and 234.

The spectra in Fig. 2 reveal a wide range of spectral shifts, relative to the gas-phase reference spectra. Most spectra exhibit a significant red shift of the excitation energies, with the exception of a few orientations (one for trans and six for cis DANS) that are blueshifted. The position of the first bright CT excitation varies by about 0.8 eV for the trans isomer (from 2.6 to 3.4 eV) and by nearly 1.2 eV for the cis one (from 2.3 to 3.4 eV). The higher energy bands also exhibit various absolute and relative shifts, which can be observed, e.g., in the varying shape of the higher-lying absorption band. Variations in the intensity of the bands can be seen, however they are not as significant as the differences in excitation energy. We note that, to the best of our knowledge, no experimental absorption spectra of DANS on amorphous silica glass in vacuum are available for comparison.

The observed variations in energy and intensity of the absorption spectrum of DANS clearly illustrate that the silica surface environment has a substantial effect on electronic excitations. This raises the question which particular components of the molecule–surface interaction lead to the observed changes. In the following, we will answer this question using a three-step, data-driven protocol. First, we will classify the different absorption spectra based on the character of the excitations, using clustering of the electron-hole correlation matrix. Subsequently, we will perform a decomposition of the excitation energies and oscillator strengths in different contributions. Finally, we will relate the results with the underlying adsorption geometries.

Clustering of absorption spectra based on electron-hole correlation

The elements of the electron-hole correlation matrix—as the ones in Supplementary Figs. 4 and 5—provide a fine-grained quantification of the transition character of an excited state. Hence, we use the electron-hole correlation matrix of the first bright excited state as a feature vector in K-means clustering (see details in the “Methods section”) to divide the 56 computed absorption spectra into different classes for further analysis. Utilizing the elbow method and silhouette score, we identified the optimal number of clusters. For the trans isomer, six clusters were found, whereas for the cis isomer, using more than two clusters reduced the similarity within the clusters. The results of the clustering are shown in Fig. 3. The center panels depict the obtained clusters within the space defined by the two principal components of highest variance, PC1 and PC2. The spectra falling within the obtained clusters are arranged around the cluster plots. The average electron-hole correlation matrices for all clusters are shown in Supplementary Fig. 6. The loadings of the PCs (i.e., the composition of these vectors in terms of the electron-hole correlation matrix elements) are shown in Supplementary Figs. 7 and 8. A list of which geometries are in which cluster is given in Supplementary Table 5.

Fig. 3: K-Means clustering of electron-hole correlation matrix elements derived from transition densities shown with the corresponding spectra.
figure 3

The clustering was performed separately on (a) trans-DANS adsorbed on glass and (b) cis-DANS adsorbed on glass. The clusterings (center plots) were carried out on the elements of the electron-hole correlation matrix obtained from the transition densities with the fragments presented in Fig. 1a. The spectra (plots surrounding the clusterings) are plotted separately by cluster, with “n” denoting the number of spectra in the cluster. The position of the gas-phase reference is denoted by in the two center plots for the clustering results and the corresponding reference spectra are shown in black in the individual eight panels (see also Fig. 1b). All cluster spectra are normalized to the trans gas-phase reference spectrum.

We begin the discussion with the clusters obtained for trans-DANS (Fig. 3a). In the space spanned by the first two principal components (PC1/PC2), three clusters are clearly separated from the others. Cluster 1 (blue) is located at the left of the cluster plot in Fig. 3a at negative values of PC1, whereas cluster 2 (red) at the top right of the plot is found at values of PC1 and PC2. Cluster 3 (orange) is located at positive values of PC2. The remaining clusters (4–6) are partially overlapping in the plotted space, and additional PCs are required to distinguish among them (see Supplementary Fig. 9).

The spectra of cluster 1 (blue) are very similar to the gas-phase absorption spectrum (black), with only small redshifts and very consistent oscillator strengths for all states. The similarity with the gas-phase spectrum can also be appreciated in the average electron-hole correlation matrix (Supplementary Fig. 6a). The excitation hole is mainly localized on the π2 ring, whereas the excited electron is distributed between the NO2 and π1 ring. This close resemblance of the excited states of cluster 1 with the gas-phase states hints at small molecule–surface interactions. This notion is confirmed by checking the four geometries contained in cluster 1 (Supplementary Table 5)—the corresponding geometries (A1, B1, C1, D1) are those where DANS is perpendicular to the surface and only the NMe2 functional group is in contact with the surface. Previously34, we have found that this specific orientation only exhibits weak C-HO HBs from DANS to the glass surface. Given that there are only weak interactions between glass and DANS in the ground state, one can expect that also the excited state is not strongly affected by the presence of the surface. The weakness of the adsorbate–glass interaction can be found directly in the electron-hole correlation matrices. To see this, we turn our attention to PC1, which separates cluster 1 from the other clusters. As shown in Supplementary Fig. 7a, PC1 shows positive correlations with excitations to/from the SiO2 cluster. As cluster 1 is located at strongly negative values of PC1, it can be followed that cluster 1 exhibits a lower involvement of the SiO2 fragment in the excitation character of the first bright state, compared to all other clusters. Although the contribution of the SiO2 fragment appears to be very small in all of the clusters, the difference between cluster 1 (below 1%, Supplementary Fig. 6a) and the other clusters (1–2%, Supplementary Fig. 6b–f) is statistically significant. Hence, the contribution of the SiO2 fragment in the electron-hole correlation matrix of the first bright CT state appears to be a useful indicator of adsorbate–surface interactions.

Cluster 2 (red) contains only one spectrum (corresponding to structure B3), which is the only one that is blueshifted relative to the gas-phase reference. In fact, in cluster 2, the bright CT state switches in order with the lowest dark local nπ* state (Supplementary Table 3). The electron-hole correlation matrix (Supplementary Fig. 6b) indicates a diminished CT character, with strongly reduced hole contributions on the NMe2 group and the adjacent π2 ring, compared to the gas-phase reference. Instead, the bright state has increased local excitation contributions on the nitrophenyl moiety (NO2+π1 fragments). These changes in the state character of the bright CT state are the reason why cluster 2 is located far away from the other clusters. Inspection of geometry B3 reveals that, besides an HB from glass to the NO2 group, there is an O–HN HB from glass pointing to the NMe2 group, which is not present in any other geometry. This interaction can be identified as the reason for the diminished CT character and blueshift of the bright state.

Cluster 3 collects the spectra with small but non-zero redshifts and noticeably lower oscillator strengths, compared to cluster 1 or the gas-phase geometry. Cluster 3 is characterized by electron-hole correlation matrices (Supplementary Fig. 6c) that are relatively close to the gas-phase one but with slightly reduced CT character and with a slight involvement of the glass. The two involved structures exhibit a (relatively weak) HB to the NO2 group and a molecular orientation parallel to the surface. Furthermore, an O–Hπ HB to the CC bridge and one of the rings can be discerned in the two structures.

The remaining clusters 4–6, show some overlap in the space spanned by PC1 and PC2, so we plot those along PC3 and PC4 in Supplementary Fig. 9. Broadly speaking, these clusters involve all redshifted spectra of trans-DANS. All of the corresponding geometries involve at least one O–HO HB to the NO2 group.

The spectra in cluster 4 (purple) show a strong redshift for the first bright state. This cluster can be divided in two subsets of spectra. Four spectra exhibit an increased oscillator strength relative to the gas-phase reference, and inspection of the geometries (Supplementary Fig. 1) shows that these are the structures (A2, B2, C2, D2) where DANS is oriented perpendicular to the surface, with only the NO2 group in contact with the glass. The other five spectra show a diminished oscillator strength arising from orientations where DANS is oriented sideways, touching the surface with its edge (A4, C3, C4, C5, D3 in Supplementary Fig. 1). Both subsets share the presence of strong O–HO HBs to NO2, whereas the contact of the aromatic H atoms with the glass seems to not affect the excitation character. The average electron-hole correlation matrix (Supplementary Fig. 6d) shows that in cluster 4 the excited electron is more strongly drawn onto the NO2 group than in other clusters, consistent with the strong HBs found.

Cluster 5 displays spectra closely resembling those of cluster 4 with a significant shift towards lower energies, and decreased oscillator strength. The electron-hole correlation matrix (Supplementary Fig. 6e) indicates that in cluster 5 a larger fraction of the excited electron is localized in the π system (fragments π1, CC, π2) than in cluster 4. It is noteworthy that despite cluster 5 appears to be similar to cluster 4 in terms of excitation characters, distinct differences are evident in the structures (cluster 5: A5, B4, B5, C6, D4, D5). Cluster 5 is characterized by structures where DANS is oriented parallel to the glass surface, enabling interactions of both functional groups and the π system with the glass.

Cluster 6 exhibits the strongest redshifts of the first bright CT state among all the clusters. The structures (A3, A6) exhibit a parallel orientation of DANS to the glass—similar to cluster 5—but additionally a slight bend, ensuring optimal contact with the glass surface. In cluster 6, the electron-hole correlation matrix (Supplementary Fig. 6f) indicates that the excited electron is not only localized on the NO2 group but due to strong interaction partially extends to the SiO2 fragment as well.

In the cis isomer (Fig. 3b), the K-means cluster identifies only two larger clusters, which are distinguished along PC1. Based on the average electron-hole correlation matrices (Supplementary Fig. 6g–h) and the loadings of PC1 (Supplementary Fig. 8a), it can be observed that cluster 1 contains spectra that are very similar to the gas-phase reference. In contrast, cluster 2 shows decreased local excitation on the π1, CC, and π2 fragments and an increased charge transfer to the NO2 fragment. The difference between the two clusters can also clearly be seen from the absorption spectra in Fig. 3b. Cluster 1 exhibits spectra that are not significantly shifted from the gas-phase spectrum, whereas cluster 2 collects all spectra where the first bright CT is redshifted. Inspection of the structures contained in clusters 1 and 2, it can be observed that cluster 1 collects all the structures without HBs to the NO2 functional group. Thus, HBs to the NO2 group induce a redshift in the absorption, as also observed in the trans isomer. The types of contacts that are present in cluster 1—HBs to the π system or involving the NMe2 group—seem to not strongly affect in the absorption spectrum.

Overall, the K-means clustering of the electron-hole correlation matrix elements of the first bright CT state achieved a satisfactory division of the 56 absorption spectra. There seem to be systematic correlations of the spectra with adsorption motifs (DANS orientation, HBs, π system–surface contacts), as we will discuss further below. It is also noteworthy that the clustering identified clearly distinguishable sets of absorption spectra, without taking into account the excitation energies and oscillator strengths in the feature vectors. In the next step, we will therefore perform a decomposition analysis of the excitation energies and oscillator strengths.

Decomposition analysis of the absorption spectra

Although the previous section has shown that the adsorption of DANS on the glass nanocluster leads to substantial changes in the positions and intensities of the absorption bands, it does not explain the physical origins of the various shifts. Therefore, we have performed a decomposition analysis of the excitation energy and oscillator strength of the first bright CT state. This analysis allows dissecting the change in these quantities—relative to the gas-phase reference—into deformation contributions, electrostatic contributions, and polarization contributions.

For the decomposition analysis, we consider four different vertical excitation calculations for each of the 56 structures. The first set of calculations is the full TD-DFT calculations of the entire system, with basis functions on all atoms of DANS and the SiO2 fragment. These are the calculations discussed above; here, we label them as “full”. In the second set of calculations, the entire SiO2 fragment was replaced by point charges47 and the TD-DFT repeated with electrostatic embedding. The basis functions on DANS and the position of all atoms remained unchanged; these calculations are labeled as “charges”. In the third set of calculations, the SiO2 fragment was entirely removed, and only DANS, with the same coordinates as in “charges” and “full”, was kept. These calculations are labeled “deformed”. The fourth calculation is the gas-phase reference calculation, as discussed already above. Using these four sets of calculations, the deformation contributions are given as “deformed” minus “reference”, the electrostatic contribution from “charges” minus “deformed”, and the polarization contribution from “full” minus “charges”. The obtained contributions for each of the 56 structures, sorted by cluster, are shown in Fig. 4 as stacked bar charts. The individual contributions are listed in Supplementary Tables 69.

Fig. 4: Decomposition analysis of the excitation energies and oscillator strengths of the first bright charge transfer state.
figure 4

a, c show the excitation energies, while (b, d) depict the oscillator strengths of trans-DANS and cis-DANS, respectively. Starting from the gas-phase values (trans: 3.36 eV and 1.56; cis: 3.28 eV and 0.56), the effect of adsorption is split into three steps. Black: Deformation contribution (difference between using the gas-phase optimized reference geometry of DANS and the deformed geometry of DANS optimized on the surface). Dark gray: Electrostatic contribution (difference between using the deformed geometry without glass and the deformed geometry with glass represented by point charges). Light gray: Polarization contribution (difference between representing glass by point charges and the full nanocluster TD-DFT calculation). The change in standard deviation of excitation energies (ΔσE) and oscillator strength (\(\Delta {\sigma }_{{f}_{osc}}\)) is presented within the boxes in each panel. The colors at the bottom of each panel indicate the clusters obtained in Fig. 3.

In Fig. 4, we additionally quantify the change in standard deviation of the excitation energies and oscillator strengths. For the “reference” calculations, the standard deviation is formally zero (as all structures have the same reference). As the deformation, electrostatic, and polarization contributions are added step by step, the excitation energies and oscillator strengths spread. Hence, the change in standard deviation (Δσ, boxes in Fig. 4) quantifies how much of the above-discussed spread in absorption spectra is caused by which of the three effects.

The decomposition analysis of the excitation energies of the trans isomer in Fig. 4a provides several hints about the effect of adsorption on the excited states. Cluster 1 (structures with only the NMe2 group in contact with SiO2) shows practically zero deformation contributions, consistent with the weak interaction of the molecule with the surface. Unlike in the other clusters, the electrostatic contribution is positive, as the interaction of the glass with the NMe2 group removes electron density from the latter and thus diminishes the push–pull effect. Only the polarization contribution is consistently negative for cluster 1. Clusters 2 and 3 exhibit very small electrostatic and polarization contributions to the excitation energy, distinguishing them from other clusters. They differ in the sign of the deformation contribution, where in cluster 2 deformation increases the excitation energy, and in cluster 3 lowers it. In general, this shows that the existing contacts between molecule and surface are not strong in these geometries. The excitation energy contributions to clusters 4 and 5 are very similar, with rather small deformation contributions. The electrostatic contributions tend to dominate the overall redshifts (more than − 0.2 eV for most geometries), mostly by stabilizing charge of the excited electron on the NO2 group via O–HO HBs. The polarization contribution is very small for the end-on subset of cluster 4 (A2, B2, C2, D2), which indicates that the polarization contribution to the excitation energy depends on contacts between the π system with the glass. Cluster 6, which contains the structures with the most redshifted geometries, exhibits significant contributions from all three interaction types. This cluster shows the largest deformation contributions among all the trans structures, due to the significant bending of the molecule that maximizes the interactions with the surface. A large electrostatic contribution from HBs to NO2 and a sizable polarization contribution from π–glass contacts complete the picture.

For the cis isomer, the contributions to the excitation energy are given in Fig. 4c. We can observe large differences between the two clusters. Cluster 1 (those structures without HBs to NO2) shows very small or slightly positive deformation contributions and no large redshifts from the other contributions. Four structures (B11, C13, D11, D13) exhibit a positive electrostatic contribution, sharing the common feature of having O–Hπ interactions solely with the π2 ring adjacent to the NMe2 group. Conversely, all structures with interactions with the π1 ring adjacent to NO2 (A14, B7, D7, D12) feature a negative electrostatic component. Compared to cluster 1, cluster 2 shows relatively consistent redshifts, with small contributions from deformation and polarization. The electrostatic component provides the bulk of the redshift, originating from the HBs to the NO2 group. Structure B14 appears to be an outlier in this figure, exhibiting only a small redshift, although the excitation character is more consistent with cluster 2.

The deformation, electrostatic, and polarization contributions to the oscillator strengths are shown in Fig. 4b (trans) and d (cis). For trans DANS, many structures show a very large reduction in oscillator strength from deformation, which is canceled by the electrostatic contribution. This observation is due to the mixing of the bright CT state with the close-lying dark nπ* state in the “deformed” calculations, which reduces the oscillator strength of the one state strongly but increases the oscillator strength of the other state accordingly. Adding the electrostatic interaction with the glass then demixes the states and restores the oscillator strength of the considered state. Another observation for the trans isomer is that in most cases, the polarization contribution reduces the oscillator strength. The only exceptions are the eight structures (A1, A2, B1, B2, C1, C2, D1, D2) with end-on orientations, where DANS is perpendicular to the surface and only the NO2 or NMe2 group is in contact with the surface. Hence, it appears that interactions of the glass with the π system systematically reduce oscillator strengths. For the cis isomer, the mixing of ππ* and nπ* is much less prevalent, enabling a less obstructed view on the contributions to the oscillator strength. In general, we find that the oscillator strength is most strongly modified by the deformation contribution, which can be either positive or negative. There is only very little electrostatic contribution; the polarization contribution tends to be zero or slightly negative.

The results in Fig. 4 are succinctly summarized by the changes in standard deviations induced by the three energy distributions (ΔσE values in the boxes in the figure). For the excitation energies, the electrostatic contribution clearly provides the largest shifts and produces the largest spread in excitation energies. As discussed, the electrostatic contribution is closely tied to the presence or absence of HBs to the NO2 group, which is where the excited electron is localized in the bright ππ* state. The deformation and polarization contributions are smaller, although they also tend to redshift the excitation energies. Overall, the redshifts can be larger for the cis than the trans isomer. For the oscillator strength, we can observe that the deformation of the molecule is the main influence, although in the trans isomer, the polarization of the glass can enhance or diminish the oscillator strength, depending on the molecular orientation.

Discussion

Last, we have scrutinized the degree of correlation between the obtained electronic state characters and the adsorption geometries (e.g., orientation, number, and type of contacts) of DANS on the glass surface. In Fig. 5, we plot the clusters that were discussed above in the space of the most important geometric parameters. These parameters were obtained from a principal component analysis of several metrics (see Fig. 5 caption and Methods section). The most important observation from Fig. 5 is that the clusters—obtained solely from analyzing the electron-hole correlation matrix of the bright ππ* state—show up as clearly distinguishable clusters in the space of the relevant geometric parameters. This cluster stability indicates that the effect of the glass on the spectrum of DANS can be predicted readily from a small set of geometric features of the adsorption geometry.

Fig. 5: Scatter plots of the clusters based on the electron-hole correlation matrices in the space of the most important geometric parameters.
figure 5

The plots were generated using principal component (PC) analysis with several distances of the different fragments of DANS from the glass, the bond length alteration (BLA) parameter, the mean angle of the aromatic rings to the glass plane, and, for the cis isomer, the distances between the two nitrogen atoms. The first four PCs for the trans isomer, shown in panel (a), and the first two PCs for the cis isomer, presented in panel (b), were then used as a coordinate system to plot the clusters from Fig. 3. The gray arrows qualitatively describe the loadings of the employed PCs. BLA refers to the variation in bond lengths between alternating single and double bonds that influence the delocalized electrons within a molecule. The labels with “far” and “close”, such as NMe2, NO2, CC, and π1, indicate the distance of different fragments of the molecule from the surface; “flat-on” describes how parallel the molecule is to the surface. All these properties become more pronounced in the direction indicated by the arrow.

Combining the findings from all sections and the results presented in Fig. 5 leads to the following conclusions. Trans and cis DANS generally tend to exhibit redshifted absorption spectra when adsorbed to glass, compared to the gas phase. The observed shifts in the spectra have several origins. (i) The biggest influence comes from O–HO HBs between the surface hydroxyl groups and the NO2 group of DANS, which are energetically very favorable according to our previous work34. These HBs increase the electron-accepting capacity of the NO2 group and thus enhance the “push–pull” properties of DANS. This leads to increased CT character of the bright states and a significant redshift of the excitations. This effect is predominantly electrostatic, although it also produces deformations of the molecule by increasing the bond-length alteration48,49 in the conjugated π system. This is because the HBs increase the quinoid character of the ground state50. (ii) The opposite influence can be observed for O–HN HBs to NMe2, which reduces the electron donor capacity of the NMe2 group. Consequently, such HBs produce blueshifted excitations with reduced CT character and increased localization on the nitrophenyl group. This effect is also mostly electrostatic and reduces the bond-length alteration of the π system. However, O–HN HBs to NMe2 are energetically less favorable than O–HO HBs to the NO2 group34, so overall HBs are expected to produce redshifted spectra. (iii) Other types of contacts of DANS with the glass surface have much smaller effects on the excitation energies. This includes both O–Hπ contacts from glass hydroxyl groups to the aromatic rings of DANS and C–HO contacts from the methyl and aromatic C–H groups of DANS to glass O atoms. Each of these contacts tends to provide very small redshifts, which can add up to a noticeable redshift if a sufficient number of these contacts are present. These redshifts are only observable in the “full” (all-atom) TD-DFT calculations, indicating that they are due to polarization. (iv) Adsorption also has a (less noticeable) effect on the intensity of the first absorption band. Here, it can be observed that the oscillator strengths are most sensitive to the adsorption-induced deformation of the geometry of DANS. In the trans isomer, deformation can lead to the mixing of the bright CT ππ* state and a dark nπ* state, which is undone after the electrostatic interaction with the surface is included. In the cis isomer, deformation can increase or decrease the oscillator strength significantly, mostly by controlling the dihedral angle of the CC bridge. Furthermore, for the trans isomer, there is a systematic effect where oscillator strength is increased for perpendicular orientations and decreased for parallel orientations. This effect is due to the polarization of the glass, as it can only be observed in the “full” TD-DFT calculations.

Overall, it appears that the strongest interaction of DANS with the silica surface—the hydrogen bonding to the NO2 group—is also the interaction that has the largest effect on the absorption spectrum. This significant influence arises because the hydrogen bonding with the surface reinforces the push–pull properties of DANS. This amplification effect might be useful for the various applications of DANS, e.g., in nonlinear optics. Moreover, the effects that we have described in this work might also apply similarly to other push–pull conjugated systems, if their electron acceptor groups are accessible to hydrogen bonding. Given that the interaction with the glass surface significantly affects the absorption spectrum, we also anticipate substantial changes in the fluorescence compared to the gas phase, as was demonstrated in previous studies for stilbene24,25. These findings provide a solid foundation for further investigation into how fluorescence versus nonradiative decay is influenced by the interaction with the silica surface.

Methods

Previously34, we examined the adsorption of DANS on amorphous glass surfaces to identify important interactions. The study included optimizing six different orientations for the trans isomer and eight orientations for the cis isomer on four surfaces, resulting in a total of 56 structures. The optimizations were carried out with the Perdew–Burke–Ernzerhof (PBE) exchange-correlation functional along with D3 dispersion correction and Becke–Johnson damping51,52, within a large unit cell (23.74 Å × 18.28 Å × 40.45 Å), applying plane-wave density functional theory (DFT). We note that these optimized structures do not constitute a thermodynamic ensemble, but rather a broad set of structures representing many different interaction motifs. Our previous study provides more details on the optimization settings34.

Vertical excitation calculations

For the present excited-state calculations, we switch from plane-wave DFT to atomic-orbital-based time-dependent DFT (TD-DFT), as implemented in ORCA46. To this end, we saturated the unit cells of each of the 56 structures with missing –H or –OH termini, leaving the coordinates of all original atoms of the unit cell unchanged from the optimizations performed with plane-wave DFT. All saturated structures are available online53, and the script used to saturate the unit cell can be found on GitHub54. Subsequently, for each structure, nine excited states were computed with TD-DFT within the Tamm-Damcoff approximation55,56,57,58,59, using the Coulomb-Attenuating Method Becke 3-Parameter Lee–Yang–Parr (CAM-B3LYP) functional38. This function was chosen for its good performance for intramolecular CT excitations42 and it has also been demonstrated to perform well for DANS60, whereas the PBE function used in the previous work is not adequate for excited state calculations. For further details regarding the choice of the functional and Tamm-Damcoff approximation, please see Supplementary Figs. 10 and 11, and Supplementary Note 1. We used the def2-SVP basis set throughout39,40. The RIJCOSX approach61 was used to speed up these expensive calculations (about 4300 basis functions). Oscillator strengths were obtained in the length gauge. To obtain the theoretical absorption spectra, Gaussian convolution (with a full width at half-maximum of 0.5 eV) of the vertical excitation results was applied. The gas-phase spectra were obtained in the same way, using the ground state geometry optimized with the same PBE-D3 plane-wave DFT approach34 as used for the adsorbed structures. For the gas-phase spectra (Fig. 1), 30 states were computed, confirming that 9 states are sufficient to cover the spectrum below approximately 200 nm.

Wave function analysis

We characterize the excited states in terms of their transition density via TheoDORE 3.043. The system was divided into six fragments: the NO2 group, the phenyl ring adjacent to NO2 (denoted as π1), the CC bridge, the phenyl ring near NMe2 (π2), the NMe2 group, and silica nanocluster (SiO2), as shown in Fig. 1a. Using these fragments, a two-dimensional Löwdin population analysis of the transition density matrices44,45 provided the electron-hole correlation matrices discussed above. The CT number is computed as the sum of all off-diagonal elements.

Clustering

To classify the bright ππ* excited state of the 56 structures, we applied K-means62 clustering with the scikit-learn library63 in Python. The employed feature vectors are the (flattened) 6 × 6 electron-hole correlation matrices. The vectors of all 56 structures were standardized together by removing the mean and scaling to unit variance, separately for each of the 36 features. Subsequently, clustering was carried out separately for the trans and cis isomers. We used the elbow method to determine a suitable number of clusters by examining the variance, and the silhouette score to assess the clustering quality and ensure each data point was well matched to its cluster. To visualize the outcome of the clustering, we performed a principal component analysis on the standardized data and displayed the positions of the data points in the space of the PCs with the largest variance. Furthermore, the average electron-hole correlation matrices of all clusters (not standardized) are shown in Supplementary Fig. 6, and the loadings of the relevant PCs (standardized) in Supplementary Figs. 7 and 8.

The scatter plots of the clusters in Fig. 5 use the same clusters as obtained from the electron-hole correlation matrices. These clusters were plotted in the space of the most important PCs of a principal component analysis carried out on standardized feature vectors containing geometric parameters. The parameters include: for each of the five fragments of DANS (Fig. 1a) the two shortest distances to any surface O atom; the average of the angles of the phenyl rings with the mean plane of the surface; the bond-length alternation parameter48,49 of DANS; and for cis additionally the distance between the two N atoms. The raw geometric parameters are compiled in Supplementary Tables 10 and 11.

Decomposition analysis

For the decomposition analysis, for each of the 56 structures, we considered four calculations. The “full” calculations were performed with basis functions on DANS and the entire silica nanocluster. For the “charge” calculations, the silica nanocluster was replaced by point charges. We used + 1.80 for Si connected to OH, + 1.86 for Si not connected to OH, − 0.84 for O in OH, − 0.93 for O in SiOSi, and + 0.43 for H47. In the “deformed” calculation, the silica nanocluster is removed altogether, but the geometry of DANS is fixed to the geometry obtained in the plane-wave DFT optimizations in the presence of the surface. For the “reference” calculation, the geometry of DANS in vacuum was optimized using plane-wave DFT with PBE-D3. We calculated the standard deviation for all four calculations using the equation: \(\sigma =\sqrt{\frac{1}{N}\mathop{\sum }_{i = 1}^{N}{({x}_{i}-\bar{x})}^{2}}\) where x is the excitation energy or oscillator strength and \(\bar{x}\) is their mean, respectively. Subsequently we determined the differences between the standard deviations (σdeformation = σdef − σref; σelecrostatic = σcharge − σdef; σpolarization = σcharge − σfull;).