본문 펼치기
## OPEN
# Prediction of Absorption Spectrum Shifts in Dyes Adsorbed on Titania
[Vishwesh Venkatraman](http://orcid.org/0000-0001-7609-2245) <sup>*</sup> , Amsalu Efrem Yemene & John de Mello
Dye adsorption on metal-oxide films often results in small to substantial absorption shifts relative to
the solution phase, with undesirable consequences for the performance of dye-sensitized solar cells
and optical sensors. While density functional theory is frequently used to model such behaviour, it is too
time-consuming for rapid assessment. In this paper, we explore the use of supervised machine learning
to predict whether dye adsorption on titania is likely to induce a change in its absorption characteristics.
The physicochemical features of each dye were encoded as a numeric vector whose elements are the
counts of molecular fragments and topological indices. Various classification models were subsequently
trained to predict the type of absorption shift i.e. blue, red or unchanged (|Δ _λ_ | ≤ 10 nm). The models
were able to predict the nature of the shift with a good likelihood (~80%) of success when applied to
unseen data.
The light-harvesting properties of dye-sensitized metal oxides find a number of applications in photonic
devices and chemical probes. They constitute a significant area of current research, and are key components of
many devices including dye-sensitized solar cells <sup>1</sup>, photo-electrochemical water splitters <sup>2</sup> and optical filters <sup>3–5</sup> .
General requirements of the constituent dyes include broad absorption spectra (preferably extending into the
near-infrared portion of the solar spectrum) accompanied by large extinction coefficients <sup>1</sup> . To meet these objectives, numerous organic <sup>6</sup> and metal-based <sup>7</sup> dyes have been designed <sup>8</sup>, employing varying donors (D), _π_ -bridges,
and acceptors (A) including but not limited to the following configurations: D- _π_ -A, D-A- _π_ -A <sup>9</sup> and D-D- _π_ -A <sup>10</sup> .
Each dye is further chemisorbed onto a semiconducting metal oxide photoanode (usually TiO211), to provide a
mesoporous metal-oxide dye interface at which efficient separation of photo-generated electron-hole pairs can
occur. The nature of the donors, acceptor/anchoring groups and the strength of the dye-semiconductor coupling,
all have a significant impact on the photostability and photochemical behaviour.
Broad absorption spectra are desirable for light harvesting. However, it is often seen (particularly for
metal-free dyes) that the UV-vis absorption peaks of the dyes adsorbed on TiO2 photoelectrodes are substantially
shifted, compared to those in solution. While for some dyes, there is little or no change (for some a broadening of
the peak is seen), peaks in other cases can be shifted by 100 nm or more <sup>12,13</sup> in either direction, greatly complicating the design and selection of candidate dyes. Reasons attributed to such phenomena include the deprotonation
of the carboxylic/cyanoacrylic anchoring group, _π_ -stacking interactions, complexation with metal ions and dye
aggregation <sup>9,14–19</sup> . On adsorption, deprotonation can result in a carboxylate-TiO2 unit that is a weaker electron
acceptor than the native carboxylic acid <sup>20,21</sup> . Furthermore, during the sensitization process, significant dye aggregation can occur <sup>22</sup> . While J-aggregates lead to a red-shift, formation of H-aggregates causes a blue-shift, leading
to a damping of the absorption efficiency. The aggregation behaviour is however very dye-specific. Complexation
with metal ions such as aluminium, iron, tin, titanium and chromium are also seen to induce red-shifts particularly for anthocyanin dyes <sup>23–25</sup> owing to the suspected formation of a quinoidal structure <sup>14</sup> . In the case of catechol
anchoring groups <sup>26</sup>, absorption shifts have been attributed to the increased dipole moment of the Ti-ligand complex via an induced charge transfer dipole under excitation <sup>27</sup> . Solvatochromism also has a significant impact on
the relative spectral shifts. For instance, it has been shown that in polar solvents, the electron-withdrawing power
of the carboxylic acid decreases as a result of a partial deprotonation in the excited state <sup>28</sup> . The use of different
sensitization solvents is also seen to affect the adsorption characteristics of dyes <sup>29,30</sup> .
So far, understanding the origin of these spectral changes and their possible effects, has largely been based
on comparative studies of the dye in solution and in its adsorbed state. Selecting a dye purely on the basis of
its solution-phase properties has until now been a unreliable task. Theoretical investigations have focused on
analysing the aggregation behaviour <sup>31–35</sup> and impact of the anchoring groups <sup>29</sup>, using density functional theory
(DFT) and _ab initio_ methods <sup>36</sup> . Calculations of excited-state properties using time-dependent DFT (TD-DFT)
Department of Chemistry, Norwegian University of Science and Technology, 7491, Trondheim, Norway. *email:
[vishwesh.venkatraman@ntnu.no](mailto:vishwesh.venkatraman@ntnu.no)
methods <sup>35,37,38</sup> are generally seen to agree well with the experimental measurements <sup>39,40</sup> . However, such tasks
require considerable time and are therefore, not suitable for rapid screening tasks involving a large number of
molecules. An additional challenge is to identify the dye-oxide binding mode which will change depending on the
structure of the dye and the binding groups. For example, the —COOH group can form monodentate ester-like,
bidentate chelate or bidentate bridging linkages <sup>41,42</sup> . In the absence of any prior knowledge, multiple combinations
must be tested, thereby adding to the computational effort.
Machine learning (ML) approaches capable of identifying embedded correlations between structure (represented appropriately) and property have been successfully used in materials science and computational chemistry <sup>43–47</sup> . We therefore ask the question: based only on the knowledge of a dye molecule's chemical structure
and its absorption spectrum in a given solvent, can we use data-driven ML techniques to predict the type of
absorption shift? To this purpose, the UV-Vis absorption peaks in solution and on a metal oxide were extracted
from literature for ~2000 dyes. The change in the maximum absorption wavelength from solution-phase to
metal-oxide-supported was used to categorise the dyes as blue-shifted, red-shifted or unchanged. Supervised
machine learning models were then trained to distinguish between the classes using descriptors such as molecular fragment counts and topological indices that are easily calculated from the dye structure. Our results show
that using cheaply derived structure descriptors, the classification models can achieve 80% success in predicting
the type of absorption shift.
Methods
Data curation. Absorption data in solution and on TiO2 for ~2000 metal-free dyes were extracted from
around 500 literature articles. Other metal oxides such as ZnO, NiO and SnO2 were not considered as the available data was too limited. For some dyes, the reported absorption peaks (from different studies) in the same solvent
were found to be significantly different and were therefore omitted. We further considered only those cases for
which values were recorded in pure solvents and without any additives such as chenodeoxycholic acid. In the end,
a total of 1961 observations corresponding to 1861 unique dyes were obtained. For these compounds, the difference in the absorption maxima ( _λ_ ) i.e. Δ _λ_ = _λ_ maxsoln - _λ_ maxTiO2 ranged between −220 to +190 nm (see Fig. F1 in the
ence in the absorption maxima ( _λ_ ) i.e. Δ _λ_ = _λ_ maxsoln - _λ_ maxTiO2 ranged between −220 to +190 nm (see Fig. F1 in the
Supplementary Material-II). The structures spanned various donor classes such as triphenylamines, phenothiazines, carbazoles, coumarins etc. with varying numbers and types of anchoring groups — catechol, hydroxylpyridium <sup>48</sup>, cyanoacrylic, pyrimidine (see Fig. 1). In the assembled data, the dyes were divided into ten separate
groups based on the solvent (see Table 1). The molecular structures (SMILES format), absorption properties and
associated references are provided in Table S1 in the Supplementary Material-I.
Nature of the shift. The nature of the spectral shift was determined (see Fig. 2) by thresholding the difference between the solution phase and solid-state maxima (Δ _λ_ = _λ_ maxsoln - _λ_ maxTiO2) with respect to the following
soln
max
ence between the solution phase and solid-state maxima (Δ _λ_ = _λ_ maxsoln - _λ_ maxTiO2) with respect to the following
criteria:
soln
max
= <sup></sup> <sup></sup> B, if Δ _λ_
_SB_ : _NR_ = <sup></sup> <sup></sup> <sup></sup> B,NR, otherwiseif Δ _λ_ - 10 nm
<sup></sup> <sup></sup>
<sup></sup>
_SB_ : _N_ : _R_ = N,R, ifif Δ− _λ_ 10 nm< −10 nm≤Δ _λ_ ≤
_B_ : _N_ : _R_
= N,R, ifif Δ− _λ_ 10 nm< −10 nm≤Δ _λ_
N, if −10 nm ≤Δ _λ_ ≤ 10 nm
R, if Δ _λ_ < −10 nm
B, otherwise
= <sup></sup> <sup></sup> BN, if Δ _λ_
_SBN_ : _R_ = <sup></sup> <sup></sup> <sup></sup> BN,R, otherwiseif Δ _λ_ < −10 nm
<sup></sup> <sup></sup>
<sup></sup>
where _B_, _R_, and _N_ indicate a blue shift, red shift and little or no change respectively. Instead of using a strict cut-off
of 0, deviations of 10 nm or less were designated _N_ . Figure 3 provides a solvent-wise distribution of the experimentally derived categories. For a majority of the cases associated with weakly polar solvents such as DCM, THF
and CHCl3, a blue-shifted absorption is seen, while red-shifted behaviour becomes more prominent as polarity
increases. This may be attributed to a more efficient solvation of the dyes in the polar solvents <sup>49</sup> .
The categories can be further grouped into _NR_ (no change + red shift) or _BN_ (blue-shift + no change). In
the context of machine learning, a balanced distribution of the instances across the classes (50% to class A and
50% to class B) is preferred. Owing to the presence of higher number of instances for a given category, classification learners run the risk of predicting everything as one or the other class <sup>50</sup> . To this end, we analysed three
different schemes (I) the first where three different groups _B_, _N_ and _R_ are established, (II) the second merges the
red-shifted dyes with those indicating little or no change — _B_ / _NR_ and lastly, (III) merging the blue-shifted and no
change — _BN_ / _R_ . When considering three independent groups — _B_, _N_, _R_, the class distributions (2:1:1) are slightly
skewed towards the blue. For the second case ( _B_ : _NR_ ), a near 1:1 ratio is seen for most solvents is seen, with the
exception of DMF for which a majority of the cases belong to the _NR_ category. The converse holds true for the
third case ( _NB_ : _R_ ), where the distribution of the categories is found to be significantly skewed (2.5:1) in favour of
_NB_ for a majority of the solvents. Consequently, in this paper, we focus mainly on the _B_ : _NR_ cases where the data
is well balanced and more likely to yield a more effective classification.
Molecular descriptors. For a statistical structure-property relationship to be established, the molecules
need to be represented in a way that captures their physicochemical characteristics. In cheminformatics, these
representations are typically referred to as molecular descriptors <sup>51</sup> i.e. a vector of numbers that captures the
Figure 1. Prominent donors and anchoring groups present in the dyes included in the data set.
chemical information in a computer-interpretable form. Machine learning approaches use these vectors to infer
a predictive model from the training data. Here, we have employed the following schemes to encode each dye:
_Atom-bond sequences._ The first set of descriptors are extracted by enumerating all the shortest paths (successive
connected atom-bond sequences) between each pair of atoms <sup>52</sup> . The descriptor calculation was carried out using
the ISIDA Fragmentor2017 software <sup>53</sup> . The minimum and maximum length of the atom-bond sequences were
set to 3 and 6 respectively.
<u>Distribution</u>
<u>B:NR</u> <u>B:N:R</u> <u>NB:R</u>
<u>Solvent</u> _<u>NObs</u>_
Range
<u>(nm)</u> _<u>P</u>_ <u>′</u>
<u>Chloroform (CHCl3)</u> <u>258</u> −94–134 <u>4.1</u> <u>141:117</u> <u>141:67:50</u> <u>208:50</u>
<u>Dichloromethane (DCM)</u> <u>753</u> −219–190 <u>3.1</u> <u>429:324</u> <u>429:188:136</u> <u>617:136</u>
<u>Tetrahydrofuran (THF)</u> <u>493</u> −116–140 <u>4</u> <u>205:288</u> <u>205:117:171</u> <u>322:171</u>
<u>Ethanol (EtOH)</u> <u>174</u> −207–102 <u>5.2</u> <u>47:127</u> <u>47:51:76</u> <u>98:76</u>
<u>Methanol (MeOH)</u> <u>39</u> −21–122 <u>5.1</u> <u>15:24</u> <u>15:12:12</u> <u>27:12</u>
<u>Acetonitrile (MeCN)</u> <u>55</u> −109–108 <u>5.8</u> <u>22:33</u> <u>22:7:26</u> <u>29:26</u>
<u>Toluene</u> <u>36</u> −22–64 <u>2.4</u> <u>16:20</u> <u>16:11:9</u> <u>27:9</u>
<u>1,4-dioxane</u> <u>19</u> −71–33 <u>4.8</u> <u>3:16</u> <u>3:3:13</u> <u>6:13</u>
<u>Dimethylformamide (DMF)</u> <u>114</u> −92–115 <u>6.4</u> <u>20:94</u> <u>20:35:59</u> <u>55:59</u>
<u>Dimethylsulfoxide (DMSO)</u> <u>20</u> −38–62 <u>7.2</u> <u>11:9</u> <u>11:3:6</u> <u>14:6</u>
<u>Overall</u> <u>1915</u> −219–190 <u>—</u> <u>909:1052</u> <u>909:494:558</u> <u>1403:558</u>
Table 1. Number of data points ( _NObs_ ) grouped according to the solvent in which the spectra were measured.
The third column shows range of the shift (in nm) calculated as _λ_ maxsoln - _λ_ maxTiO2. The relative polarities ( _P_ ′) for the
The third column shows range of the shift (in nm) calculated as _λ_ maxsoln - _λ_ maxTiO2. The relative polarities ( _P_ ′) for the
solvents are taken from Snyder <sup>104</sup> . The last column shows the distribution of the categories formed by
combining dyes that show no/little change ( _N_ ), red-shift ( _R_ ) or blue-shift ( _B_ ) after adsorption on TiO2.
soln
max
Figure 2. Nature of the spectral shift based on the positions of the absorption peaks corresponding to the
solution phase ( _λ_ maxsoln) and solid-state maxima ( _λ_ maxTiO2). The difference between the two values:
soln
solution phase ( _λ_ maxsoln) and solid-state maxima ( _λ_ maxTiO2). The difference between the two values:
Δ _λ_ = _λ_ maxsoln - _λ_ maxTiO2 is used to determine whether there is a blue shift, red shift or no change upon adsorption.
soln
maxsoln) and solid-state maxima ( _λ_ maxTiO
maxTiO2 is used to determine whether there is a blue shift, red shift or no change upon adsorption.
max
_Topological indices._ The second set of descriptors includes constitutional indices (number of hetero atoms and
aromatic rings, hydrogen bond acceptors and donors) as well as topological indices (derived from chemical graph
representations) that take into account the connectivity along with atom and bond labels. Popular descriptors
include the electrotopological state <sup>54</sup> (EState) indices that encode the topology and electronic environment of
molecular fragments. Other variables include MOE-type descriptors <sup>55</sup> that are based on an approximate accessible van der Waals surface area calculation for each atom, along with some other atomic property. Here, we have
included properties such as _logP_ (octanol/water), molar refractivity, and partial charge within a binned range
(corresponding to a subdivision of the molecular surface area). The descriptors were computed using the open
source cheminformatics toolkit RDKit <sup>56</sup> . For a preset bin size ( _k_ ), the calculated descriptors include SlogP–VSA _k_
(capture hydrophobic and hydrophilic effects), SMR–VSA _k_ (polarizability) and PEOE–VSA _k_ (capture electrostatic
interactions). The descriptors were computed using the open source cheminformatics toolkit RDKit <sup>56</sup> .
The descriptors were selected to capture relevant features of the dye's chemical structure and without resorting
to DFT or other computationally intensive calculations. Each structure was therefore described by a vector of
length 2060 (solvent polarity was added as an additional descriptor) with computations taking less than 3 minutes
to calculate all descriptors for the entire data set.
Machine learning. In order to identify machine learning models capable of discriminating between the
different types of shifts ( _B_ / _N_ / _R_ ), six popular classification schemes were explored: linear discriminant analysis <sup>57</sup>
(LDA), _k_ -nearest neighbours ( _k_ -NN), kernel-based support vector machines <sup>58</sup> (SVM), and tree-based models
such as classification and regression trees <sup>59</sup> (CART), random forests <sup>60</sup> (RF) and gradient boosting machines <sup>61</sup>
(GBM). Linear discriminant analysis works by identifying a linear combination of the variables (projection onto
a smaller subspace) that best separates the classes. The _k_ -NN algorithm classifies an object based on a majority
vote of its _k_ nearest neighbours that are identified by calculating the Euclidean distance from the point of interest
(the class of which is to be determined) to all the points in training set. Support vector machines perform classification by finding the hyperplane that maximizes the margin between the classes <sup>58</sup> . For a two-dimensional space,
the hyperplane is a line that divides a plane into two parts such that each class lies on either side. The vectors that
Figure 3. Distribution of the absorption shifts with respect to the solvents. The letter “B” indicates a blue shift,
while “N” and “R” correspond to no change (|Δ _λ_ | ≤ 10) or a red shift respectively. The solvents are sorted in
increasing order of polarity from left to right. Polarity values are listed in Table 1. Additional plots are provided
in the Supplementary Material-II.
define this hyperplane are the support vectors. The tree-based models output a series of if-then-else statements
where the features are systematically checked to determine a final result. While the CART approach produces a
single tree, both random forests and GBM are ensemble approaches where the outcome is the combination of the
the decisions from multiple models. The difference lies in the way the trees are built: RF builds deep independent
trees, while GBM creates successive models with each tree improving on the previous i.e. they seek to improve the
result based on the current estimate.
Statistical modelling. Analysis of the data started with the removal of descriptor columns with little or no
variation and those containing missing values (due to an inability to calculate one or more descriptors). The data
was then split randomly into independent calibration (75%) and test (25%) sets. The presence of highly correlated variables (multicollinearity) can affect predictive performance. Following previous studies <sup>62,63</sup>, a pair-wise
squared correlation cut-off of 0.90 was applied to the training set, whereby only one (arbitrarily determined)
among the correlated pair of variables was retained. This reduced the number of variables from 2000 to around
200. In order to select the best model parameters (e.g. number of trees for RF, depth of the tree, number of neighbours to be considered ( _k_ -NN)), a five-fold cross-validation was employed, followed by randomization tests to
reduce the risk of overfitting. A grid search was carried out to identify the optimal parameter combinations for
the ML models used. The modelling was carried out using _R_ <sup>64</sup> . Owing to the class imbalance in the data, models
trained using performance metrics such as the accuracy are biased towards the more frequent class (sensitive to
class skews), and may suffer from a lack of generalizability. We have therefore assessed classification performance
using the balanced accuracy <sup>65,66</sup> which is defined as the average accuracy obtained on all classes:
_m_
<u>1</u> ∑ _m_ _<u>ki</u>_
_m_ _i_ _ni_
<u>1</u>
_BACC_ = ∑
_m_
_<u>i</u>_
_i_
_m_
_i_ _ni_ (1)
where _ki_ is the number of correct predictions in class _i_, _m_ is the number of classes and _ni_ is the number of examples
in class _i_ . Other metrics such as the average accuracy (the average per-class effectiveness of a classifier), sensitivity
(the true positive rate - TPR) and specificity (the true negative rate - TNR) are also reported for comparison <sup>67</sup> .
_m_ _<u>tpi</u>_ + _<u>tni</u>_
_i_ _<u>tp</u>_ + _<u>tni</u>_ + _<u>fp</u>_
_<u>tpi</u>_ + _<u>tni</u>_ + _<u>fpi</u>_ + _<u>fni</u>_
_<u>i</u>_ + _<u>tni</u>_ + _<u>fpi</u>_ + _<u>fni</u>_
_<u>i</u>_ + _<u>tni</u>_
+
_ACC_ = _i_ _<u>tpi</u>_ + _<u>tni</u>_ + _<u>fpi</u>_ +
=
∑
_m_ (2)
Figure 4. Box plots showing the distribution of the absorption shifts (irrespective of the solvent) based on the
(A) class of the dyes and (B) the anchoring groups used. ( A ) The “misc” category includes various dyes based
on pyrazoline, naphthoquinone, N,N-dialkylaniline <sup>105</sup>, julolidine <sup>106</sup>, bithiazole <sup>107</sup>, cyclohexadiene <sup>108</sup> etc. ( B )
The “misc” category includes dyes with anchoring groups that include thiazolidine <sup>73</sup>, aldehyde, hydantoin <sup>109</sup>,
isophorone <sup>71</sup>, phosphonic acid and pyrimidine <sup>110</sup> . Numbers on the right are the counts of cases found in each
category.
_<u>i</u>_
_TPR_ = ∑ _mi_ _<u>tpi</u>_ + _<u>i</u>_
=
_m_ _<u>tpi</u>_
_i_ _<u>tp</u>_ +
_<u>tpi</u>_ + _<u>fni</u>_
_m_ (3)
_<u>i</u>_ + _<u>fni</u>_
_<u>i</u>_
_TNR_ = ∑ _mi_ _<u>tnitn</u>_ + _<u>i</u>_
=
_m_ _<u>tni</u>_
_i_ _<u>tni</u>_ +
_<u>tni</u>_ + _<u>fpi</u>_
_m_ (4)
_<u>i</u>_ + _<u>fpi</u>_
where, for an individual class _Ci_ - _tpi_, _fpi_, _tni_ and _fni_ are the true positive, false positive, true negative and false
negative counts respectively.
Results and Discussion
Manual analysis of the data. In order to ascertain if there were any noticeable patterns associated with the
absorption shifts, the experimental data was analysed with respect to the class of the dye, the conjugated spacers
used, and the number and types of anchoring groups. Figure 4A,B summarize the data in terms of the dye class
and type of anchoring groups, respectively. For simplicity, we have ignored the solvent medium allowing for a
broader analysis. Examination of Fig. 4A, shows that dyes based on imidazole <sup>12,68</sup> exclusively show red shifts,
while those based on pyranylidene <sup>69</sup> exclusively show blue shifts. All other dye classes exhibit both blue and red
shifts.
Analysis of the anchoring groups (Fig. 4B) suggests that, those containing catechol, pyridine, and barbituric
acid are largely red-shifted. The particularly large red shifts in the catechol group are attributable to their ability to strongly adsorb on to the TiO2 surface <sup>70</sup> as well as the increased dipole moment of the surface-bound
metal-ligand complex <sup>26,27</sup> . For some of the other groups such as isophorone <sup>71</sup>, malononitrile <sup>72</sup>, thiazolidine <sup>73</sup> and
benzoic acid <sup>74</sup>, a majority of the cases are blue-shifted. The impact of multiple anchoring groups <sup>75</sup> was also studied
(see Fig. F2 in the Supplementary Material-II). The number of dyes containing multiple anchoring groups was low
(~170). Nonetheless, for the cases studied, there was no significant correlation between the number of anchoring groups and the size or direction of the spectral shift. While for some cases, little or no change was observed,
others showed moderate to large shifts in either direction <sup>76–80</sup> . Wu _et al_ . <sup>77</sup> observed the maximum absorption
peak of three triphenylamine dyes in acetonitrile/tert-butanol (1:1, V/V) showed a red-shift with an increasing
anchoring group number. Compared to the spectra in solution, the peaks did not show any change on the TiO2
film, which was attributed to the cancelling effect of J-type aggregation and deprotonation. For squarylium dyes
in particular, Connell _et al_ . <sup>81</sup>, have shown that the position of dye anchoring points can influence hydrophobicity
and contact angle of dyes adsorbed to TiO2 surfaces, which in turn can affect the absorption properties. In order
<u>Method</u>
<u>B:N:R</u> <u>NB:R</u> <u>B:NR</u>
<u>TRAIN</u> <u>TEST</u> <u>TRAIN</u> <u>TEST</u> <u>TRAIN</u> <u>TEST</u>
<u>GBM</u> <u>0.68</u> <u>0.71</u> <u>0.73</u> <u>0.72</u> <u>0.73</u> <u>0.72</u>
<u>RF</u> <u>0.71</u> <u>0.76</u> <u>0.76</u> <u>0.80</u> <u>0.76</u> <u>0.80</u>
<u>CART</u> <u>0.61</u> <u>0.61</u> <u>0.65</u> <u>0.65</u> <u>0.65</u> <u>0.65</u>
_<u>k</u>_ <u>-NN</u> <u>0.65</u> <u>0.70</u> <u>0.71</u> <u>0.66</u> <u>0.71</u> <u>0.66</u>
<u>LDA</u> <u>0.52</u> <u>0.53</u> <u>0.60</u> <u>0.59</u> <u>0.60</u> <u>0.59</u>
<u>SVM</u> <u>0.71</u> <u>0.73</u> <u>0.77</u> <u>0.79</u> <u>0.77</u> <u>0.79</u>
Table 2. Balanced accuracies obtained by the ML models for the calibration and test data.
examine the impact of mixed solvents, a total of 146 dyes in 12 different solvent mixtures were analysed. The
absorption behaviour for dyes in mixed solvents is shown in Fig. F3 in the Supplementary Material-II. With the
exception of solvent mixtures — methanol(MeOH)/chloroform(CHCl3), tert-butanol/acetonitrile(MeCN), ethanol(EtOH)-dichloromethane(DCM) and tetrahydrofuran(THF)-DCM, others had fewer than 10 instances. The
dyes using tert-butanol/MeCN and MeOH/CHCl3 as solvents exhibited a greater tendency to blue-shift. For dyes
in EtOH-DCM all three categories were equally represented while, for those in THF-DCM, a higher tendency to
blue-shift was observed.
Several _π_ -conjugated systems such as furan, thiophene and fused aromatic rings have been incorporated into
the D- _π_ -A architecture as _π_ -linkers <sup>82</sup> . These units not only affect the light absorption regions of the DSSCs, but
also influence the electron injection into the TiO2 surface. For the dyes investigated in this study, a majority
of the structures contained thiophene <sup>83</sup> and its derivatives (such as thienothiophene <sup>84</sup>, indacenodithiophene <sup>85</sup>,
dithienopyrrole <sup>86</sup> ) as the _π_ -bridge. Figure F4 in Supplementary Material-II provides a box-plot of the absorption
shifts for the various _π_ -linkers (over 40 categories identified) used in the dyes. The conjugated spacers based
on vinylene, ethynylene, furan, thiazole, thiophene and other fused aromatic segments (indole <sup>87</sup>, fluorene <sup>88</sup>,
benzothiadiazole <sup>89</sup> ) showed similar peak shifts in both directions. Other groups such as diphenylquinoxaline <sup>90</sup>,
1-chlorobuta-1,3-diene <sup>91</sup>, dithienobenzotriazole <sup>92</sup> and dithienobenzofurazan <sup>93</sup> found in a limited number of
cases were largely associated with red-shifted peaks. On the other hand, those containing linkers based on fused
thiophene derivatives such as dithienopyrrolobenzotriazole <sup>94</sup>, cyclopentadithiophene <sup>95</sup>, thienothienopyrrole <sup>96</sup>,
silolodithiophene <sup>97</sup> were blue shifted by more than 50 nm compare to the solution.
In conclusion, while for some choices of the dye class, anchoring groups and _π_ -spacers we can identify clear
patterns, in most cases there is no obvious pattern that can be discerned to predict the nature of the shift. In order
to consider more formally, the effect of the structure on the adsorption behaviour, we employ machine learning
the problem of predicting the type of the spectral shift and infer which features influence a set of observations.
Classification performance. Table 2 summarizes the performance of the ML models across the calibration
and test sets. In most cases, values for the two sets closely match one other, suggesting that the models generalize
well. A comparative evaluation shows that both RF and SVM outperform other models on all classification tasks.
The best performance is seen for the case _B_ : _NR_, where the RF model achieves a cross-validated _BACC_ = 0.76
during training and a slightly higher value of 0.80 on the test set containing 484 data points. On the same data set
however, the LDA model performs only marginally better than random and achieves only a 50% accuracy on the
other sets. Other models ( _k_ -NN, RF, SVM, GBM) are relatively more successful in separating classes by non-linear
boundaries. Although the other binary classification problem _NB_ : _R_ has a moderate class imbalance ( ~ 2 5:1. ), RF
classification accuracies are only slightly lower with _BACC_ of 0.72 on the calibration and 0.73 on the test set.
In the case of the multiclass _B_ : _N_ : _R_ problem, a _BACC_ = 0.71 for the calibration data is obtained. Corresponding
values for the test set are somewhat higher at 0.76. To better understand the classification performance, the ML
predictions for the test set was examined on a class-wise basis. Values of the per class balanced accuracy ( _BACC_ ),
sensitivity ( _TPR_ ) and specificity ( _TNR_ ) are shown as bar plots in Fig. 5. For the blue-shifted ( _B_ ) cases, all models
show a high sensitivity, albeit with a fairly high rate of false alarms (decreased specificity). Given that there are
twice as many cases of blue-shifted dyes, the classifier favours the majority class. A common practice to address
the class imbalance problem is to balance them artificially where, for instance, cases from the minority class are
replicated or alternatively by ignoring cases from the majority class. However, for the data sets in this study, no
visible improvement in performance was observed when such schemes were used.
Descriptor analysis. Compared to the CART scheme which uses a single tree, the tree-based ensemble
models such as RF and GB are somewhat “black box” in nature given that they use multiple trees to arrive at a
given outcome. We have therefore attempted to interpret the models by way of variable importance plots (shown
in Fig. 6) that provide a qualitative understanding of the contribution that each input variable makes to the
model <sup>98,99</sup> . We focus on the RF models that show the best performance. To this end, we examined the 10 most
significant variables in the RF model trained for each task. The variable contributions are scaled to have a maximum value of 100 and those with higher values are expected to have a high predictive power. Given that the data
contains various solvents, the relative polarity ( _P_ ′) is a major contributor. To assess the impact of a single descriptor, we calculated the accuracy of the classifier obtained by setting a threshold (typically the mean) on the value
of the variable <sup>98</sup> . For the test set, the constitutional descriptor “FractionCSP3” (fraction of sp3-hybridized carbon
atoms) yielded a single variable classifier with an accuracy of 54% and 58% for the entire data. The BalabanJ
descriptor is indicative of a large degree of branching of the molecule. This agrees with the experimental data
Figure 5. Bar plots showing the multiclass prediction performance on the test data. For each model, the perclass balanced accuracy, sensitivity and specificity are compared.
Figure 6. Variable importance plots for the RF model computed for each task: _B_ / _NR_, _B_ / _N_ / _R_ and _NB_ / _R_ . Only
the top 10 most important variables are shown for each task. The bars show the contribution of the matching
feature to the prediction. A missing bar for a given variable indicates that the said variable was ranked lower.
which shows that the large size of branched dyes can lead to a poor dye loading on the TiO2 surface <sup>28,100</sup> . The
E-state descriptors (MinEStateIndex, MaxEStateIndex, MinAbsEStateIndex, MaxAbsEStateIndex) for each atom
in a given molecule reflect the steric and electronic effects of the surrounding atoms.
External validation. In order to test the performance of the ML models on unseen data, we examined
the absorption behaviour for 3 dyes quercetin, 2,5-dihydroxytetraphthalic acid and carminic acid (purchased
from Sigma-Aldrich) in ethanol and THF (see Fig. 7). Experimental details are provided in the Supplementary
Material. While two of the dyes (T01, T02) show negligible change on adsorption, carminic acid (T03) shows
a very small blue shift. However, based on the selected criteria (|Δ _λ_ | ≤ 10) they are categorized as _NR_ . The RF
predictions for the dyes are listed in Table 3, which shows that all instances are correctly classified. We also
investigated electronic absorption spectra of the isolated dye as well as those adsorbed on titania using a (TiO2)9
cluster <sup>101</sup> . The Gaussian 09 <sup>102</sup> calculations were carried out using the B3LYP functional and the 6-31G(d,p) basis
Figure 7. Structures of 3 dyes quercetin, 2,5-dihydroxytetraphthalic acid and carminic acid (purchased from
Sigma-Aldrich).
maxsoln <u>λ TiO2max</u>
<u>Dye</u> <u>Solvent</u> <u>λ</u> maxsoln
<u>TiO2max</u> <u>Shif</u> <u>ML</u> <u>DFT</u>
T01
T02
T03
<u>Ethanol</u> <u>373</u> <u>376</u> <u>NR</u> <u>NR</u> <u>NR</u>
<u>THF</u> <u>370</u> <u>376</u> <u>NR</u> <u>NR</u> <u>NR</u>
<u>Ethanol</u> <u>372</u> <u>370</u> <u>NR</u> <u>NR</u> <u>NR</u>
<u>THF</u> <u>376</u> <u>370</u> <u>NR</u> <u>NR</u> <u>NR</u>
<u>Ethanol</u> <u>495</u> <u>487</u> <u>NR</u> <u>NR</u> <u>NR</u>
<u>THF</u> <u>497</u> <u>487</u> <u>NR</u> <u>NR</u> <u>NR</u>
Table 3. Comparison of the experimental and machine learning (RF) predictions for dyes (T01: quercetin,
T02: 2,5-dihydroxytetraphthalic acid and T03: carminic acid shown in Fig. 7) in different solvents. The UV-VIS
absorption spectra for the dyes in ethanol and THF and on TiO2 are shown in Figs F5–F7 in the Supplementary
Material-II.
<u>Category</u> <u>BACC</u> <u>ACC</u> <u>Sensitivity</u> <u>Specificity</u>
<u>B:NR</u> <u>0.81</u> <u>0.83</u> <u>0.77</u> <u>0.85</u>
<u>NB:R</u> <u>0.81</u> <u>0.75</u> <u>0.94</u> <u>0.67</u>
<u>B:N:R</u> <u>0.71</u> <u>0.73</u> <u>0.56</u> <u>0.86</u>
Table 4. Classification performance for the RF model on a second independent test set.
set for the C, H, O and N atoms and the effective core potential LANL2DZ basis set for the Ti atoms. Solvent
effects were considered using the using the conductor-like polarizable continuum model <sup>103</sup> (CPCM) along with
the CAM-B3LYP functional. Computation times varied between 6–10 hours per structure. Although TD-DFT
was not able to accurately predict the absorption peaks, its performance with respect to identifying the nature of
the shift is comparable with that of the ML approach, albeit at a much higher computational cost.
The predictive performance of the RF model was also tested on an additional unseen data set. A second round
of literature search was undertaken that yielded an additional set of 60 data points corresponding to 34 diverse
dyes that included triphenylamine, indoline, bodipy, julolidine, and pyrenoimidazole based donors. Solvents in
this list included dichloromethane (14 cases), THF (19), acetonitrile (6), toluene (9), DMF (6) and methanol (6).
Table 4 summarizes the performance of the RF model on the second test set. The evaluation metrics are similar to
those seen for the initial test set and reinforce the initial assessment of generalizability of the models.
Overall, the ML models, trained using only “two-dimensional” information consisting of atom types and
connectivity, are capable of identifying dyes that have a propensity to blue- or red-shift on adsorption. A similar
theoretical assessment using TD-DFT approaches requires the calculations to be carried out on both the isolated
dye molecule isolated and adsorbed on TiO2 clusters <sup>32</sup> . While the descriptor calculations are completed in less
than a second, evaluations using DFT/TD-DFT approaches took more than 6–8 hours per structure. On the
other hand, despite not being provided with the details about contributing factors such as the adsorption mode
and strength of dye-cluster coupling, the ML models are able to deduce the nature of the absorption shift with
reasonable accuracy (~70–80%).
In this work, we have outlined a data-driven approach that we believe could serve as a useful tool to exclude
dyes adsorbed on TiO2 that are likely to exhibit undesirable photosensitization behaviour. We have shown that the
approach can indicate the exact nature of the spectral shift in 70–80% of the dyes inspected. The predictive models afford a higher reliability than any experienced human expert. In addition, the advantages in terms of speed
and versatility will certainly outweigh any possible gains that may be achieved with the more time-consuming
DFT-based approaches. The models can be easily integrated into material screening frameworks that allow for the
rapid computational assessment of candidate structures.
Data availability
The data used in the article were manually extracted from literature. The molecular structures (in SMILES
format), values of the spectral shift and corresponding references have been made available in the Supplementary
Information. Scripts used in the calculation of the molecular descriptors are available upon request.
Received: 31 July 2019; Accepted: 4 November 2019;
Published: xx xx xxxx
References
1. Hagfeldt, A., Boschloo, G., Sun, L., Kloo, L. & Pettersson, H. Dye-sensitized solar cells. _Chem. Rev._ 110 [, 6595–6663, https://doi.](https://doi.org/10.1021/cr900356p)
[org/10.1021/cr900356p (2010).](https://doi.org/10.1021/cr900356p)
2. Brennaman, M. K. _et al_ . Finding the way to solar fuels with dye-sensitized photoelectrosynthesis cells. _J Am. Chem. Soc._ 138,
[13085–13102, https://doi.org/10.1021/jacs.6b06466 (2016).](https://doi.org/10.1021/jacs.6b06466)
3. Dandin, M., Abshire, P. & Smela, E. Optical filtering technologies for integrated fluorescence sensors. _Lab Chip_ 7 [, 955, https://doi.](https://doi.org/10.1039/b704008c)
[org/10.1039/b704008c (2007).](https://doi.org/10.1039/b704008c)
4. Yamazaki, M. _et al_ . Non-emissive colour filters for fluorescence detection. _Lab Chip_ 11 [, 1228, https://doi.org/10.1039/c0lc00642d](https://doi.org/10.1039/c0lc00642d)
(2011).
5. Yamazaki, M., Krishnadasan, S., deMello, A. J. & deMello, J. C. Non-emissive plastic colour filters for fluorescence detection. _Lab_
_Chip_ 12 [, 4313, https://doi.org/10.1039/c2lc40718c (2012).](https://doi.org/10.1039/c2lc40718c)
6. Lee, C.-P. _et al_ . Recent progress in organic sensitizers for dye-sensitized solar cells. _RSC Adv._ 5 [, 23810–23825, https://doi.](https://doi.org/10.1039/c4ra16493h)
[org/10.1039/c4ra16493h (2015).](https://doi.org/10.1039/c4ra16493h)
7. Urbani, M., Grätzel, M., Nazeeruddin, M. K. & Torres, T. Meso-substituted porphyrins for dye-sensitized solar cells. _Chem. Rev._
114 [, 12330–12396, https://doi.org/10.1021/cr5001964 (2014).](https://doi.org/10.1021/cr5001964)
8. Venkatraman, V., Raju, R., Oikonomopoulos, S. P. & Alsberg, B. K. The dye-sensitized solar cell database. _J. Cheminf_ . 10 [, https://](https://doi.org/10.1186/s13321-018-0272-0)
[doi.org/10.1186/s13321-018-0272-0 (2018).](https://doi.org/10.1186/s13321-018-0272-0)
9. Li, W., Wu, Y., Zhang, Q., Tian, H. & Zhu, W. D-a-p-a featured sensitizers bearing phthalimide and benzotriazole as auxiliary
acceptor: Effect on absorption and charge recombination dynamics in dye-sensitized solar cells. _ACS Appl. Mater. Inter._ 4,
[1822–1830, https://doi.org/10.1021/am3001049 (2012).](https://doi.org/10.1021/am3001049)
10. Namuangruk, S. _et al_ . D-d-p-a-type organic dyes for dye-sensitized solar cells with a potential for direct electron injection and a
high extinction coefficient: Synthesis, characterization, and theoretical investigation. _J. Phys. Chem. C_ 116 [, 25653–25663, https://](https://doi.org/10.1021/jp304489t)
[doi.org/10.1021/jp304489t (2012).](https://doi.org/10.1021/jp304489t)
11. Zilberberg, K., Meyer, J. & Riedl, T. Solution processed metal-oxides for organic electronic devices. _J Mater. Chem. C_ 1, 4796,
[https://doi.org/10.1039/c3tc30930d (2013).](https://doi.org/10.1039/c3tc30930d)
12. Kumar, D., Thomas, K. R. J., Lee, C.-P. & Ho, K.-C. Novel pyrenoimidazole-based organic dyes for dye-sensitized solar cells. _Org._
_Lett._ 13 [, 2622–2625, https://doi.org/10.1021/ol2006874 (2011).](https://doi.org/10.1021/ol2006874)
13. Hua, Y. _et al_ . New phenothiazine-based dyes for efficient dye-sensitized solar cells: Positioning effect of a donor group on the cell
performance. _J Power Sources_ 243 [, 253–259, https://doi.org/10.1016/j.jpowsour.2013.05.157 (2013).](https://doi.org/10.1016/j.jpowsour.2013.05.157)
14. Cherepy, N. J., Smestad, G. P., Grätzel, M. & Zhang, J. Z. Ultrafast electron injection: implications for a photoelectrochemical cell
utilizing an anthocyanin dye-sensitized TiO2 nanocrystalline electrode. _J Phys. Chem. B_ 101 [, 9342–9351, https://doi.org/10.1021/](https://doi.org/10.1021/jp972197w)
[jp972197w (1997).](https://doi.org/10.1021/jp972197w)
15. Cheng, M. _et al_ . Efficient organic dye-sensitized solar cells: Molecular engineering of donor-acceptor-acceptor cationic dyes.
_ChemSusChem_ 6 [, 2322–2329, https://doi.org/10.1002/cssc.201300481 (2013).](https://doi.org/10.1002/cssc.201300481)
16. Cheng, M. _et al_ . Effect of the acceptor on the performance of dye-sensitized solar cells. _Phys. Chem. Chem. Phys._ 15 [, 17452, https://](https://doi.org/10.1039/c3cp52314d)
[doi.org/10.1039/c3cp52314d (2013).](https://doi.org/10.1039/c3cp52314d)
17. Fakis, M. _et al_ . Excited state and injection dynamics of triphenylamine sensitizers containing a benzothiazole electronaccepting
group on TiO2 and al2o3 thin films. _J Phys. Chem. C_ 118 [, 28509–28519, https://doi.org/10.1021/jp509971q (2014).](https://doi.org/10.1021/jp509971q)
18. Margalias, A. _et al_ . The effect of additional electron donating group on the photophysics and photovoltaic performance of two new
metal free d-p-a sensitizers. _Dye. Pigment._ 121 [, 316–327, https://doi.org/10.1016/j.dyepig.2015.05.028 (2015).](https://doi.org/10.1016/j.dyepig.2015.05.028)
19. Bahng, H.-W., Hagfeldt, A. & Moser, J.-E. Donor effect on the photoinduced interfacial charge transfer dynamics of d-p-a
diketopyrrolopyrrole dye sensitizers adsorbed on titanium dioxide. _J Phys. Chem. C_ 122 [, 19359–19369, https://doi.org/10.1021/acs.](https://doi.org/10.1021/acs.jpcc.8b04819)
[jpcc.8b04819 (2018).](https://doi.org/10.1021/acs.jpcc.8b04819)
20. Hagberg, D. P. _et al_ . A novel organic chromophore for dye-sensitized nanostructured solar cells. _Chem. Commun_ . 2245 [, https://doi.](https://doi.org/10.1039/b603002e)
[org/10.1039/b603002e (2006).](https://doi.org/10.1039/b603002e)
21. Lin, L.-Y. _et al_ . Organic dyes containing coplanar diphenyl-substituted dithienosilole core for efficient dye-sensitized solar cells. _The_
_J. Org. Chem._ 75 [, 4778–4785, https://doi.org/10.1021/jo100762t (2010).](https://doi.org/10.1021/jo100762t)
22. Zhang, L. & Cole, J. M. Dye aggregation in dye-sensitized solar cells. _J Mater. Chem. A_ 5 [, 19541–19559, https://doi.org/10.1039/](https://doi.org/10.1039/c7ta05632j)
[c7ta05632j (2017).](https://doi.org/10.1039/c7ta05632j)
23. Bayer, E., Egeter, H., Fink, A., Nether, K. & Wegmann, K. Complex formation and flower colors. _Angewandte Chemie Int. Ed. Engl._
5 [, 791–798, https://doi.org/10.1002/anie.196607911 (1966).](https://doi.org/10.1002/anie.196607911)
24. Goto, T. & Kondo, T. Structure and molecular stacking of anthocyanins—flower color variation. _Angewandte Chemie Int. Ed. Engl._
30 [, 17–33, https://doi.org/10.1002/anie.199100171 (1991).](https://doi.org/10.1002/anie.199100171)
25. Dangles, O., Elhabiri, M. & Brouillard, R. Kinetic and thermodynamic investigation of the aluminium-anthocyanin complexation
in aqueous solution. _J. Chem. Soc., Perkin Trans._ 2 [, 2587–2596, https://doi.org/10.1039/p29940002587 (1994).](https://doi.org/10.1039/p29940002587)
26. An, B.-K., Hu, W., Burn, P. L. & Meredith, P. New type II catechol-thiophene sensitizers for dye-sensitized solar cells. _J. Phys. Chem._
_C_ 114 [, 17964–17974, https://doi.org/10.1021/jp105687z (2010).](https://doi.org/10.1021/jp105687z)
27. Rajh, T. _et al_ . Surface restructuring of nanoparticles: an efficient route for ligand-metal oxide crosstalk. _J. Phys. Chem. B_ 106,
[10543–10552, https://doi.org/10.1021/jp021235v (2002).](https://doi.org/10.1021/jp021235v)
28. Fischer, M. K. R. _et al_ . D-π-a sensitizers for dye-sensitized solar cells: Linear vs branched oligothiophenes. _Chem. Mater._ 22,
[1836–1845, https://doi.org/10.1021/cm903542v (2010).](https://doi.org/10.1021/cm903542v)
29. Zhang, L., Cole, J. M. & Dai, C. Variation in optoelectronic properties of azo dye-sensitized TiO2 semiconductor interfaces with
different adsorption anchors: Carboxylate, sulfonate, hydroxyl and pyridyl groups. _ACS Appl. Mater. Inter._ 6 [, 7535–7546, https://](https://doi.org/10.1021/am502186k)
[doi.org/10.1021/am502186k (2014).](https://doi.org/10.1021/am502186k)
30. Fang, H. _et al_ . Effects of molecular structure and solvent polarity on adsorption of carboxylic anchoring dyes onto TiO2 particles in
aprotic solvents. _Langmuir_ 33 [, 7036–7042, https://doi.org/10.1021/acs.langmuir.7b01442 (2017).](https://doi.org/10.1021/acs.langmuir.7b01442)
31. Fantacci, S., Angelis, F. D. & Selloni, A. Absorption spectrum and solvatochromism of the [ru(4,4′-COOH-2,2′-bpy)2(NCS)2]
molecular dye by time dependent density functional theory. _J Am. Chem. Soc._ 125 [, 4381–4387, https://doi.org/10.1021/ja0207910](https://doi.org/10.1021/ja0207910)
(2003).
32. de Armas, R. S. _et al_ . Real-time TD-DFT simulations in dye sensitized solar cells: The electronic absorption spectrum of alizarin
supported on TiO2nanoclusters. _J. Chem. Theory Comput._ 6 [, 2856–2865, https://doi.org/10.1021/ct100289t (2010).](https://doi.org/10.1021/ct100289t)
33. Sousa, C., Tosoni, S. & Illas, F. Theoretical approaches to excited-state-related phenomena in oxide surfaces. _Chem. Rev._ 113,
[4456–4495, https://doi.org/10.1021/cr300228z (2012).](https://doi.org/10.1021/cr300228z)
34. Zhang, L., Liu, X., Rao, W. & Li, J. Multilayer dye aggregation at dye/TiO2 interface via π-π stacking and hydrogen bond and its
impact on solar cell performance: A DFT analysis. _Sci. Rep_ . 6 [, https://doi.org/10.1038/srep35893 (2016).](https://doi.org/10.1038/srep35893)
35. Mendizabal, F., Mera-Adasme, R., Xu, W.-H. & Sundholm, D. Electronic and optical properties of metalloporphyrins of zinc on
TiO2 cluster in dye-sensitized solar-cells (DSSC). a quantum chemistry study. _RSC Adv._ 7 [, 42677–42684, https://doi.org/10.1039/](https://doi.org/10.1039/c7ra08648b)
[c7ra08648b (2017).](https://doi.org/10.1039/c7ra08648b)
36. Pastore, M. & Angelis, F. D. Aggregation of organic dyes on TiO2 in dye-sensitized solar cells models: An ab initio investigation.
_ACS Nano_ 4 [, 556–562, https://doi.org/10.1021/nn901518s (2009).](https://doi.org/10.1021/nn901518s)
37. de Armas, R. S., San-Miguel, M. A., Oviedo, J., Márquez, A. & Sanz, J. F. Electronic structure and optical spectra of catechol on
TiO2nanoparticles from real time TD-DFT simulations. _Phys. Chem. Chem. Phys._ 13 [, 1506–1514, https://doi.org/10.1039/](https://doi.org/10.1039/c0cp00906g)
[c0cp00906g (2011).](https://doi.org/10.1039/c0cp00906g)
38. Agrawal, S. _et al_ . Optical properties and aggregation of phenothiazine-based dye-sensitizers for solar cells applications: A combined
experimental and computational investigation. _J Phys. Chem. C_ 117 [, 9613–9622, https://doi.org/10.1021/jp4026305 (2013).](https://doi.org/10.1021/jp4026305)
39. Jacquemin, D., Wathelet, V., Perpète, E. A. & Adamo, C. Extensive TD-DFT benchmark: Singlet-excited states of organic molecules.
_J Chem. Theory Comp._ 5 [, 2420–2435, https://doi.org/10.1021/ct900298e (2009).](https://doi.org/10.1021/ct900298e)
40. Adamo, C. & Jacquemin, D. The calculations of excited-state properties with time-dependent density functional theory. _Chem. Soc._
_Rev._ 42 [, 845–856, https://doi.org/10.1039/c2cs35394f (2013).](https://doi.org/10.1039/c2cs35394f)
41. Anselmi, C., Mosconi, E., Pastore, M., Ronca, E. & Angelis, F. D. Adsorption of organic dyes on TiO2 surfaces in dyesensitized solar
cells: interplay of theory and experiment. _Phys. Chem. Chem. Phys._ 14 [, 15963, https://doi.org/10.1039/c2cp43006a (2012).](https://doi.org/10.1039/c2cp43006a)
42. Calogero, G., Bartolotta, A., Marco, G. D., Carlo, A. D. & Bonaccorso, F. Vegetable-based dye-sensitized solar cells. _Chem. Soc. Rev._
44 [, 3244–3294, https://doi.org/10.1039/c4cs00309h (2015).](https://doi.org/10.1039/c4cs00309h)
43. Rajan, K. (ed.) _Informatics for Materials Science and Engineering_ (Elsevier, 2013).
44. Agrawal, A. & Choudhary, A. Perspective: Materials informatics and big data: Realization of the “fourth paradigm” of science in
materials science. _APL Mater._ 4 [, 053208, https://doi.org/10.1063/1.4946894 (2016).](https://doi.org/10.1063/1.4946894)
45. Ramprasad, R., Batra, R., Pilania, G., Mannodi-Kanakkithodi, A. & Kim, C. Machine learning in materials informatics: recent
applications and prospects. _npj Comp. Mater_ . 3 [, https://doi.org/10.1038/s41524-017-0056-5 (2017).](https://doi.org/10.1038/s41524-017-0056-5)
46. Butler, K. T., Davies, D. W., Cartwright, H., Isayev, O. & Walsh, A. Machine learning for molecular and materials science. _Nat._ 559,
[547–555, https://doi.org/10.1038/s41586-018-0337-2 (2018).](https://doi.org/10.1038/s41586-018-0337-2)
47. Gubernatis, J. E. & Lookman, T. Machine learning in materials design and discovery: Examples from the present and suggestions
for the future. _Phys. Rev. Mater._ 2 [, 120301, https://doi.org/10.1103/PhysRevMaterials.2.120301 (2018).](https://doi.org/10.1103/PhysRevMaterials.2.120301)
48. Zhao, J., Yang, X., Cheng, M., Li, S. & Sun, L. Molecular design and performance of hydroxylpyridium sensitizers for dye-sensitized
solar cells. _ACS Appl. Mater. Inter._ 5 [, 5227–5231, https://doi.org/10.1021/am4010545 (2013).](https://doi.org/10.1021/am4010545)
49. Reichardt, C. & Welton, T. _Solvents and Solvent Effects in Organic Chemistry_ (Wiley-VCH Verlag GmbH & Co. KGaA, 2010).
50. Japkowicz, N. & Stephen, S. The class imbalance problem: A systematic study1. _Intell. Data Anal._ 6 [, 429–449, https://doi.](https://doi.org/10.3233/IDA-2002-6504)
[org/10.3233/IDA-2002-6504 (2002).](https://doi.org/10.3233/IDA-2002-6504)
51. Todeschini, R. & Consonni, V. (eds) _Molecular Descriptors for Chemoinformatics_ (Wiley-VCH Verlag GmbH & Co. KGaA, 2009).
52. Baskin, I. Chapter 1. fragment descriptors in SAR/QSAR/QSPR studies, molecular similarity analysis and in virtual screening. In
Varnek, A. (ed.) _Chemoinformatics Approaches to Virtual Screening_ [, 1–43, https://doi.org/10.1039/9781847558879-00001 (Royal](https://doi.org/10.1039/9781847558879-00001)
Society of Chemistry, 2008).
53. Ruggiu, F., Marcou, G., Solov’ev, V., Horvath, D. & Varnek, A. Isida fragmentor (2017).
54. Hall, L. H. & Kier, L. B. Electrotopological state indices for atom types: A novel combination of electronic, topological, and valence
state information. _J Chem. Inf. Model._ 35 [, 1039–1045, https://doi.org/10.1021/ci00028a014 (1995).](https://doi.org/10.1021/ci00028a014)
55. Labute, P. A widely applicable set of descriptors. _J. Mol. Graph. Model._ 18 [, 464–477, https://doi.org/10.1016/s1093-3263(00)00068-](https://doi.org/10.1016/s1093-3263%0x2800%0x2900068-1)
[1 (2000).](https://doi.org/10.1016/s1093-3263%0x2800%0x2900068-1)
[56. Landrum, G. Rdkit: Open-source cheminformatics software, https://www.rdkit.org/ (2018).](https://www.rdkit.org/)
57. McLachlan, G. J. _Discriminant Analysis and Statistical Pattern Recognition_ (John Wiley & Sons, Inc., 1992).
58. Luts, J. _et al_ . A tutorial on support vector machine-based methods for classification problems in chemometrics. _Anal. Chim. Acta_
665 [, 129–145, https://doi.org/10.1016/j.aca.2010.03.030 (2010).](https://doi.org/10.1016/j.aca.2010.03.030)
59. Loh, W.-Y. Classification and regression trees. _WIRES Data Min Knowl._ 1 [, 14–23, https://doi.org/10.1002/widm.8 (2011).](https://doi.org/10.1002/widm.8)
60. Breiman, L. Random forests. _Mach. Learn._ 45 [, 5–32, https://doi.org/10.1023/a:1010933404324 (2001).](https://doi.org/10.1023/a:1010933404324)
61. Friedman, J. H. Greedy function approximation: A gradient boosting machine. _The Annals Stat._ 29, 1189–1232 (2001).
62. Dearden, J., Cronin, M. & Kaiser, K. How not to develop a quantitative structure-activity or structure-property relationship
(QSAR/QSPR). _SAR QSAR Env. Res._ 20 [, 241–266, https://doi.org/10.1080/10629360902949567 (2009).](https://doi.org/10.1080/10629360902949567)
63. Tropsha, A. Best practices for QSAR model development, validation, and exploitation. _Mol. Inf._ 29 [, 476–488, https://doi.](https://doi.org/10.1002/minf.201000061)
[org/10.1002/minf.201000061 (2010).](https://doi.org/10.1002/minf.201000061)
64. R Core Team. _R: A Language and Environment for Statistical Computing_ . R Foundation for Statistical Computing, Vienna, Austria
(2017).
65. Carrillo, H., Brodersen, K. H. & Castellanos, J. A. Probabilistic performance evaluation for multiclass classification using the
posterior balanced accuracy. In _ROBOT2013: First Iberian Robotics Conference_ [, 347–361, https://doi.org/10.1007/978-3-319-](https://doi.org/10.1007/978-3-319-03413-3_25)
[03413-3_25 (Springer International Publishing, 2014).](https://doi.org/10.1007/978-3-319-03413-3_25)
66. Tharwat, A. Classification assessment methods. _Appl. Comp. Inf._ 0 [, 0, https://doi.org/10.1016/j.aci.2018.08.003 (2018).](https://doi.org/10.1016/j.aci.2018.08.003)
67. Sokolova, M. & Lapalme, G. A systematic analysis of performance measures for classification tasks. _Inf. Process. Manag._ 45,
[427–437, https://doi.org/10.1016/j.ipm.2009.03.002 (2009).](https://doi.org/10.1016/j.ipm.2009.03.002)
68. Karthik, D., Kumar, V., Thomas, K. J., Li, C.-T. & Ho, K.-C. Synthesis and characterization of thieno[3,4-d]imidazolebased organic
sensitizers for photoelectrochemical cells. _Dye. Pigment._ 129 [, 60–70, https://doi.org/10.1016/j.dyepig.2016.02.009 (2016).](https://doi.org/10.1016/j.dyepig.2016.02.009)
69. Marco, A. B. _et al_ . Pyranylidene/thienothiophene-based organic sensitizers for dye-sensitized solar cells. _Dye. Pigment._ 161,
[205–213, https://doi.org/10.1016/j.dyepig.2018.09.035 (2019).](https://doi.org/10.1016/j.dyepig.2018.09.035)
70. Liu, Y., Dadap, J. I., Zimdars, D. & Eisenthal, K. B. Study of interfacial charge-transfer complex on TiO2particles in aqueous
suspension by second-harmonic generation. _J Phys. Chem. B_ 103 [, 2480–2486, https://doi.org/10.1021/jp984288e (1999).](https://doi.org/10.1021/jp984288e)
71. Chen, Y.-C., Lin, Y.-Z., Cheng, Y.-T. & Chang, Y. J. Synthesis of novel isophorone-based dyes for dye-sensitized solar cells. _RSC Adv._
5 [, 96428–96436, https://doi.org/10.1039/c5ra17898c (2015).](https://doi.org/10.1039/c5ra17898c)
72. Qian, X. _et al_ . Indeno[1,2- b]indole-based organic dyes with different acceptor groups for dye-sensitized solar cells. _Dye. Pigment._
139 [, 274–282, https://doi.org/10.1016/j.dyepig.2016.12.028 (2017).](https://doi.org/10.1016/j.dyepig.2016.12.028)
73. Naik, P., Su, R., Elmorsy, M. R., El-Shafei, A. & Adhikari, A. V. New di-anchoring a–π-d–π-a configured organic chromophores for
DSSC application: sensitization and co-sensitization studies. _Photochem. Photobiol. Sci._ 17 [, 302–314, https://doi.org/10.1039/](https://doi.org/10.1039/c7pp00351j)
[c7pp00351j (2018).](https://doi.org/10.1039/c7pp00351j)
74. Song, X. _et al_ . Influence of ethynyl position on benzothiadiazole based d–a–π–a dye-sensitized solar cells: spectral response and
photovoltage performance. _J Mater. Chem. C_ 4 [, 9203–9211, https://doi.org/10.1039/c6tc03418g (2016).](https://doi.org/10.1039/c6tc03418g)
75. Kumar, D. & Wong, K.-T. Organic dianchor dyes for dye-sensitized solar cells. _Mater_ . _Today Energy_ 5 [, 243–279, https://doi.](https://doi.org/10.1016/j.mtener.2017.05.007)
[org/10.1016/j.mtener.2017.05.007 (2017).](https://doi.org/10.1016/j.mtener.2017.05.007)
76. Liu, J. _et al_ . Mesoscopic titania solar cells with the tris(1,10-phenanthroline)cobalt redox shuttle: uniped versus biped organic dyes.
_Energy Env. Sci._ 4 [, 3021, https://doi.org/10.1039/c1ee01633d (2011).](https://doi.org/10.1039/c1ee01633d)
77. Wu, G. _et al_ . Multiple-anchoring triphenylamine dyes for dye-sensitized solar cell application. _J Phys. Chem. C_ 118, 8756–8765,
[https://doi.org/10.1021/jp4124265 (2014).](https://doi.org/10.1021/jp4124265)
78. Jiang, S., Fan, S., Lu, X., Zhou, G. & Wang, Z.-S. Double d–π–a branched organic dye isomers for dye-sensitized solar cells. _J. Mater._
_Chem. A_ 2 [, 17153–17164, https://doi.org/10.1039/c4ta03451a (2014).](https://doi.org/10.1039/c4ta03451a)
79. Connell, A. _et al_ . Multiple linker half-squarylium dyes for dye-sensitized solar cells; are two linkers better than one? _J. Mater. Chem._
_A_ 3 [, 2883–2894, https://doi.org/10.1039/c4ta06896c (2015).](https://doi.org/10.1039/c4ta06896c)
80. Raju, T. B., Vaghasiya, J. V., Afroz, M. A., Soni, S. S. & Iyer, P. K. Twisted donor substituted simple thiophene dyes retard the dye
aggregation and charge recombination in dye-sensitized solar cells. _Org. Elec._ 50 [, 25–32, https://doi.org/10.1016/j.orgel.2017.07.019](https://doi.org/10.1016/j.orgel.2017.07.019)
(2017).
81. Connell, A. _et al_ . A study of dye anchoring points in half-squarylium dyes for dye-sensitized solar cells. _J. Mater. Chem. A_ 2,
[4055–4066, https://doi.org/10.1039/c3ta15278b (2014).](https://doi.org/10.1039/c3ta15278b)
82. Prachumrak, N. _et al_ . Improvement of d–π–a organic dye-based dye-sensitized solar cell performance by simple triphenylamine
donor substitutions on the π-linker of the dye. _Mater. Chem. Front._ 1 [, 1059–1072, https://doi.org/10.1039/c6qm00271d (2017).](https://doi.org/10.1039/c6qm00271d)
83. Shen, P. _et al_ . Efficient triphenylamine dyes for solar cells: Effects of alkyl-substituents and π-conjugated thiophene unit. _Dye._
_Pigment._ 83 [, 187–197, https://doi.org/10.1016/j.dyepig.2009.04.005 (2009).](https://doi.org/10.1016/j.dyepig.2009.04.005)
84. Zhang, G. _et al_ . Employ a bisthienothiophene linker to construct an organic chromophore for efficient and stable dye-sensitized
solar cells. _Energy Environ. Sci._ 2 [, 92–95, https://doi.org/10.1039/b817990e (2009).](https://doi.org/10.1039/b817990e)
85. Chen, J.-H. _et al_ . Organic dyes containing a coplanar indacenodithiophene bridge for high-performance dye-sensitized solar cells.
_J. Org. Chem._ 76 [, 8977–8985, https://doi.org/10.1021/jo201730a (2011).](https://doi.org/10.1021/jo201730a)
86. Dong, H. _et al_ . Twisted fused-ring thiophene organic dye-sensitized solar cells. _J. Phys. Chem. C_ 120 [, 22822–22830, https://doi.](https://doi.org/10.1021/acs.jpcc.6b06604)
[org/10.1021/acs.jpcc.6b06604 (2016).](https://doi.org/10.1021/acs.jpcc.6b06604)
87. Wang, Y., Wan, Z., Jia, C. & Yao, X. Indole-based organic dyes with different electron donors for dye-sensitized solar cells. _Synth._
_Met._ 211 [, 40–48, https://doi.org/10.1016/j.synthmet.2015.10.024 (2016).](https://doi.org/10.1016/j.synthmet.2015.10.024)
88. Marzari, G. _et al_ . Fluorous molecules for dye-sensitized solar cells: Synthesis and characterization of fluorene-bridged donor/
acceptor dyes with bulky perfluoroalkoxy substituents. _J. Phys. Chem. C_ 116 [, 21190–21200, https://doi.org/10.1021/jp305884u](https://doi.org/10.1021/jp305884u)
(2012).
89. Bolisetty, M. P., Li, C.-T., Thomas, K. J., Bodedla, G. B. & Ho, K.-C. Benzothiadiazole-based organic dyes with pyridine anchors for
dye-sensitized solar cells: effect of donor on optical properties. _Tetrahedron_ 71 [, 4203–4212, https://doi.org/10.1016/j.](https://doi.org/10.1016/j.tet.2015.04.089)
[tet.2015.04.089 (2015).](https://doi.org/10.1016/j.tet.2015.04.089)
90. Li, S.-R., Lee, C.-P., Kuo, H.-T., Ho, K.-C. & Sun, S.-S. High-performance dipolar organic dyes with an electrondeficient
diphenylquinoxaline moiety in the π-conjugation framework for dye-sensitized solar cells. _Chem.: Eur. J_ 18 [, 12085–12095, https://](https://doi.org/10.1002/chem.201201000)
[doi.org/10.1002/chem.201201000 (2012).](https://doi.org/10.1002/chem.201201000)
91. Lokhande, P. K. M. _et al_ . Multi-dentate carbazole based schiff base dyes with chlorovinylene group in spacer for dyesensitized solar
cells: A combined theoretical and experimental study. _Chem._ 4 [, 4044–4056, https://doi.org/10.1002/slct.201803940 (2019).](https://doi.org/10.1002/slct.201803940)
92. Ni, J.-S., Yen, Y.-C. & Lin, J. T. Organic sensitizers with a rigid dithienobenzotriazole-based spacer for high-performance dye
sensitized solar cells. _J Mater. Chem. A_ 4 [, 6553–6560, https://doi.org/10.1039/c6ta02275h (2016).](https://doi.org/10.1039/c6ta02275h)
93. Ni, J.-S. _et al_ . Organic dyes incorporating the dithieno[30,20:3,4;200,300:5,6]benzo[1,2-c]furazan moiety for dye-sensitized solar
cells. _ACS Appl. Mater. Inter._ 6 [, 22612–22621, https://doi.org/10.1021/am5067145 (2014).](https://doi.org/10.1021/am5067145)
94. Huang, Z.-S. _et al_ . Dithienopyrrolobenzotriazole-based organic dyes with high molar extinction coefficient for efficient dye
sensitized solar cells. _Dye. Pigment._ 125 [, 229–240, https://doi.org/10.1016/j.dyepig.2015.10.022 (2016).](https://doi.org/10.1016/j.dyepig.2015.10.022)
95. Li, X. _et al_ . Insight into quinoxaline containing d–π–a dyes for dye-sensitized solar cells with cobalt and iodine based electrolytes:
the effect of π-bridge on the HOMO energy level and photovoltaic performance. _J Mater. Chem. A_ 3 [, 21733–21743, https://doi.](https://doi.org/10.1039/c5ta07254a)
[org/10.1039/c5ta07254a (2015).](https://doi.org/10.1039/c5ta07254a)
96. Wang, Z. _et al_ . Asymmetric 8h-thieno[20,30:4,5]thieno[3,2-b]thieno[2,3-d]pyrrole-based sensitizers: Synthesis and application in
dye-sensitized solar cells. _Org. Lett._ 19 [, 3711–3714, https://doi.org/10.1021/acs.orglett.7b01465 (2017).](https://doi.org/10.1021/acs.orglett.7b01465)
97. Gao, Y. _et al_ . Effect of an auxiliary acceptor on d–a–π–a sensitizers for highly efficient and stable dye-sensitized solar cells. _J Mater._
_Chem. A_ 4 [, 12865–12877, https://doi.org/10.1039/c6ta05588e (2016).](https://doi.org/10.1039/c6ta05588e)
98. Guyon, I. & Elisseeff, A. An introduction to variable and feature selection. _J. Mach. Learn. Res._ 3, 1157–1182 (2003).
99. Elith, J., Leathwick, J. R. & Hastie, T. A working guide to boosted regression trees. _J Anim. Ecol._ 77 [, 802–813, https://doi.](https://doi.org/10.1111/j.1365-2656.2008.01390.x)
[org/10.1111/j.1365-2656.2008.01390.x (2008).](https://doi.org/10.1111/j.1365-2656.2008.01390.x)
100. Meier, H., Huang, Z.-S. & Cao, D. Double d–π–a branched dyes – a new class of metal-free organic dyes for efficient dye-sensitized
solar cells. _J Mater. Chem. C_ 5 [, 9828–9837, https://doi.org/10.1039/c7tc03406g (2017).](https://doi.org/10.1039/c7tc03406g)
101. de Armas, R. S., Miguel, M. Á. S., Oviedo, J. & Sanz, J. F. Coumarin derivatives for dye sensitized solar cells: a TD-DFT study. _Phys._
_Chem. Chem. Phys._ 14 [, 225–233, https://doi.org/10.1039/c1cp22058f (2012).](https://doi.org/10.1039/c1cp22058f)
102. Frisch, M. J. _et al_ . Gaussian 09, revision b.01. Gaussian, Inc., Wallingford CT, (2010).
103. Takano, Y. & Houk, K. N. Benchmarking the conductor-like polarizable continuum model (CPCM) for aqueous solvation free
energies of neutral and ionic organic molecules. _J. Chem. Theory Comput._ 1 [, 70–77, https://doi.org/10.1021/ct049977a (2004).](https://doi.org/10.1021/ct049977a)
104. Snyder, L. R. Classification off the solvent properties of common liquids. _J Chromatogr. Sci._ 16 [, 223–234, https://doi.org/10.1093/](https://doi.org/10.1093/chromsci/16.6.223)
[chromsci/16.6.223 (1978).](https://doi.org/10.1093/chromsci/16.6.223)
105. Duerto, I. _et al_ . DSSCs based on aniline derivatives functionalized with a tert -butyldimethylsilyl group and the effect of the
π-spacer. _Dye. Pigment._ 148 [, 61–71, https://doi.org/10.1016/j.dyepig.2017.07.063 (2018).](https://doi.org/10.1016/j.dyepig.2017.07.063)
106. Wu, G. _et al_ . Julolidine dyes with different acceptors and thiophene-conjugation bridge: Design, synthesis and their application in
dye-sensitized solar cells. _Synth. Met._ 180 [, 9–15, https://doi.org/10.1016/j.synthmet.2013.07.028 (2013).](https://doi.org/10.1016/j.synthmet.2013.07.028)
107. Lai, L.-F. _et al_ . New bithiazole-functionalized organic photosensitizers for dye-sensitized solar cells. _Dye. Pigment._ 96, 516–524,
[https://doi.org/10.1016/j.dyepig.2012.10.002 (2013).](https://doi.org/10.1016/j.dyepig.2012.10.002)
108. Chen, K.-F. _et al_ . Photophysical studies of dipolar organic dyes that feature a 1,3-cyclohexadiene conjugated linkage: The
implication of a twisted intramolecular charge-transfer state on the efficiency of dye-sensitized solar cells. _Chem. Eur. J._ 16,
[12873–12882, https://doi.org/10.1002/chem.201001294 (2010).](https://doi.org/10.1002/chem.201001294)
109. Guo, F.-L. _et al_ . Metal-free sensitizers containing hydantoin acceptor as high performance anchoring group for dyesensitized solar
cells. _Adv. Func. Mater._ 26 [, 5733–5740, https://doi.org/10.1002/adfm.201601305 (2016).](https://doi.org/10.1002/adfm.201601305)
110. Wu, Z., Li, X., Ågren, H., Hua, J. & Tian, H. Pyrimidine-2-carboxylic acid as an electron-accepting and anchoring group for dye
sensitized solar cells. _ACS Appl. Mater. Inter._ 7 [, 26355–26359, https://doi.org/10.1021/acsami.5b07690 (2015).](https://doi.org/10.1021/acsami.5b07690)
Acknowledgements
This work was supported through a grant (Grant No. 262152) from the Research Council of Norway (RCN).
Author contributions
V.V. and J.M. conceived the study. V.V. collected the data, performed the calculations, analysed the results
and wrote the manuscript. A.E.Y. performed the experimental validation for the dyes. J.M. helped revise the
manuscript. All authors discussed and commented on the manuscript.
Competing interests
The authors declare no competing interests.
Additional information
Supplementary information [is available for this paper at https://doi.org/10.1038/s41598-019-53534-2.](https://doi.org/10.1038/s41598-019-53534-2)
Correspondence and requests for materials should be addressed to V.V.
Reprints and permissions information [is available at www.nature.com/reprints.](http://www.nature.com/reprints)
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and
institutional affiliations.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International
License, which permits use, sharing, adaptation, distribution and reproduction in any medium or
format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this
article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the
material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the
[copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.](http://creativecommons.org/licenses/by/4.0/)
© The Author(s) 2019