1 Introduction

The idea behind dye-sensitized solar cells (DSSCs), as introduced by Grätzel in 1991, is to imitate the natural process of photosynthesis [1, 2]. Photosynthesis involves two major processes, namely photosystems I and II, which act together to capture and convert light into energy [3]. The common feature of these photosystems is that both contain chlorophyll species that is responsible for most of the light absorption and conversion process. The basic structure of chlorophyll comprises the porphyrin macrocycle and carbonyl groups. This basic design was later applied to the development of photosensitizers for DSSCs.

Zinc porphyrin derivatives as photosensitizers fall into two main categories: meso- and β-substituted porphyrin analogues. The meso-substituted porphyrin analogues produced the highest efficiency for DSSCs of 11.9 % under 1 sun condition [4] as compared to only 7.1 % efficiency for β-substituted porphyrins [5]. Analysis of their individual properties indicated that meso-substituted porphyrins have higher molar extinction coefficients and red-shifted spectra on both Q- and B-bands and have lower HOMO and LUMO energy levels of about 0.4 eV as compared to β-substituted porphyrins [4, 5]. The electrochemical data showed that in push–pull configuration of meso-porphyrin analogues, the HOMO orbital (~−5.3 eV) [4] is almost the same as the ruthenium dyes (~−5.4 eV) [6], while the lowering of the LUMO orbital brings it closer by ~0.5 eV to the Ru-dyes. With these findings, we focused on the enhancement of photophysical properties in meso-substituted porphyrin analogues having a push–pull configuration that contains a distorted porphyrin macrocycle that could lead to a larger red-shift and higher extinction coefficient [7].

The power conversion efficiency (η) can be determined from the following equation:

$$ \eta = {{J_{\text{SC}} V_{\text{OC}} FF} \mathord{\left/ {\vphantom {{J_{\text{SC}} V_{\text{OC}} FF} {P_{\text{inc}} }}} \right. \kern-\nulldelimiterspace} {P_{\text{inc}} }}, $$

where J SC is the short-circuit current density, V OC is the open-circuit voltage, FF is the fill factor, and P inc is the incident solar power of the cell usually measured at 1 sun or AM 1.5 illumination. The J SC is the generation and collection of light-generated carriers that depend on the number of factors, one of which can be exemplified in the equation [8, 9]:

$$ J_{\text{SC}} = \int {qF(\lambda ){\text{LHE}}(\lambda )\Upphi_{\text{inj}} \eta_{\text{collec}} d\lambda } , $$

where q is the unit charge, F(λ) is the photon energy density, LHE(λ) is the light-harvesting efficiency at a given wavelength, Φinj is the electron injection efficiency, and η collec is the charge collection efficiency. In DSSCs, if all the parts of the cell were the same all throughout the experimental procedure except for the dye, most parameters can be held constant except for LHE and Φinj values. Thus, J SC can be increased by widening the coverage of the absorption profile and by proper matching of the excited-state oxidation potential of the dye in relation to the conduction band of the semiconductor surface. Another factor that influences the efficiency of the cell is the V OC, which is the difference between the quasi-Fermi level and the redox potential of the dye. This can be taken as the upper limit for V OC, which can be expressed as [10]:

$$ qV_{\text{OC}} = E_{\text{Fn}} - E_{\text{redox}} = k_{B} T\ln \left( {\frac{{n_{\text{CB}} }}{{N_{\text{CB}} }}} \right) + E_{\text{CB}} - E_{\text{redox}} $$

where q is the unit charge, E Fn is the Fermi level for electrons, E redox is the redox potential of the electrolyte, k B T is the thermal energy composed of the Boltzmann constant and temperature, n CB is the number of electrons in the conduction band, N CB is the accessible density of the CB states, and E CB is the conduction band edge of the semiconductor. Upon the adsorption of dyes onto the semiconductor, the Fermi level of the TiO2 undergoes some displacement due to the injection of electrons to the CB, resulting in the increase in the density of electronic states [11]. The shift of the E CB could be expressed as the following [8, 12, 13]:

$$ \Updelta {\text{CB}} = - \frac{{q\mu_{\text{normal}} \gamma }}{{\varepsilon_{0} \varepsilon }} $$

where γ is the dye’s surface concentration, and μnormal is the component of dipole moment of the individual molecule perpendicular to the surface of the semiconductor surface, and ε 0 and ε are the permittivity of the vacuum and the dielectric constant of the organic layer. In this article, we utilized μads symbol instead of μnormal to distinguish it from the dipole moment of bare dyes (μbare).

Nowadays, theoretical approach offers vital information and interpretation of experimental results and with the advancement of CPU resources allows the simulation of the desired photophysical properties for larger molecules. For the calculation of absorption spectra, the time-dependent density functional theory (TD-DFT) is still one of the leading popular approaches due to its accurate results and reasonable computational cost. However, in DSSCs, where the dyes exhibit larger charge transfer (CT) excitations, a careful consideration should be taken in choosing the exchange–correlation (xc) functional. The most common xc functional in the calculation of excited-state energies in TD-DFT framework is the B3LYP xc functional, which failed tremendously when the calculated energies involved Rydberg and CT states [14, 15]. On the other hand, the use of the long-range-corrected (LRC) xc functional has shown to give reasonable results with energies involving Rydberg and CT energies [1524]. Another property that can be calculated using first-principles approach is the ground-state oxidation potential (GSOP) and excited-state oxidation potential (ESOP), which could give insights into the electron injection and dye regeneration in DSSCs. Many researchers have introduced various methods on how to calculate GSOP and ESOP with good correlation with experimental results [2527].

This work is organized into two sections: In the first part, we undertake a benchmark study, using YD1 [28] as reference, to properly decide on the xc functional to be used in the calculations. The absorption spectrum was assessed based on the different LRC xc functionals, namely LC-ωPBE, LC-BLYP, CAM-B3LYP, and ωB97X-D together with B3LYP xc functional for comparison purposes. The LRC xc functionals can be divided into three categories: (a) the original LRC xc functionals as presented by Hirao and co-workers [3, 29, 30] (LC-BLYP and LC-ωPBE); (b) the Coulomb-attenuated method (CAM-B3LYP) [31], which utilizes the energetic qualities of the B3LYP together with the long-range character having separate parameters for the HF and DFT contributions; and (c) the empirical atomic-pairwise dispersion correction introduced by Head-Gordon and colleagues (ωB97X-D) [32]. Having established the proper methodology to calculate the excited-state energies of the dyes, which can be used as the value of the lowest excitation energy (E 0-0) of the dye, another assessment of pure and hybrid xc functionals, namely B3LYP, BLYP, BHandHLYP, PBE0, PBEHandHPBE, mPWPW91, mPW1K, mPWHandHPW91, M06, and M06-2X, with different Hartree–Fock exchange was done to calculate the ground-state oxidation potential and in turn can be used to calculate the excited-state oxidation potentials. After establishing the proper theoretical methodologies, we proposed eight new dyes with donor-porphyrin-bridge-acceptor configuration (D–P–B–A) having distorted porphyrin macrocycles together with either cyanoacrylic acid or malonic acid as its acceptor moieties. The photovoltaic parameters of the different dyes are predicted based on the coverage of the absorption profile, higher light-harvesting efficiency, better electron charge transfer based on high (hyper)polarizability values, electron injection to the semiconductor, and dye regeneration. This paper further enhances the applicability of the theoretical approach in designing new sensitizers for highly efficient DSSC devices.

2 Computational method

All calculations were performed with Gaussian 09 (G09) program package [33]. The ground-state geometry optimization of the dyes was carried out in gas phase without symmetry constraints using B3LYP hybrid functional at 6-31G(d) basis set.

All TD-DFT calculations were performed at the optimized geometries of the ground states using the LRC xc functionals, wherein it mixes HFE densities nonuniformly by partitioning the two-electron repulsion operator as

$$ \frac{1}{{r_{12} }} = \frac{{1 - \left[ {a + {\text{berf}}\left( {\omega r_{12} } \right)} \right]}}{{r_{12} }} + \frac{{a + {\text{berf}}\left( {\omega r_{12} } \right)}}{{r_{12} }} .$$

The erf term denotes the standard error function, r 12 is the interelectronic distances between electrons at the coordinates r 1 and r 2, and ω is the range-separation or damping parameter. The a and a + b define the fraction of the exact exchange. The first term of the equation describes the short-range effect, and the second term is the long-range part. The default separation parameters based on G09 software for ωB97X-D, CAM-B3LYP, LC-ωPBE, and LC-BLYP are 0.20, 0.33, 0.40, and 0.47 Bohr−1, respectively. To further explore the effect of LRC functional, the excitation energies of the dyes were calculated as a function of ω ranging from 0.10 to 0.30 Bohr−1 at 0.05 Bohr−1 intervals. The UV–Vis spectra were simulated with the SWizard program, revision 4.6 [34], using the Lorentzian model. The half-bandwidths, Δ1/2, were taken to be equal to 2,000 cm−1.

Oxidation potentials were determined from vertical ΔSCF methods calculated by a single-point energy calculation from ground-state geometries of the neutral and oxidized species in THF using different xc functionals with 6-31G(d) basis set. The assessed DFT xc functionals used in the calculation of the oxidation potentials are B3LYP, BLYP, BHandHLYP, PBE0, PBEHandHPBE, mPWPW91, mPW1K, mPWHandHPW91, M06, and M06-2X exchange–correlation functionals. The HandH notation in the functionals represents that it includes 50 % Hartree–Fock exchange.

The nonlinear optical (NLO) properties were calculated at B3LYP and M06-2X xc functionals from ground-state structures with 6-31G(d) basis set in gas phase using the finite field approach with the strength of electric field set at 0.001 a.u. The mean molecular isotropic polarizability, α, is defined as the mean value of three diagonal elements of the polarizability tensor, α = 1/3 (α xx  + α yy  + α zz ), and the anisotropy of polarizability is given by

$$ \Updelta \alpha = \left[ {\frac{{\left( {\alpha_{xx} - \alpha_{yy} } \right)^{2} + \left( {\alpha_{xx} - \alpha_{zz} } \right)^{2} + \left( {\alpha_{yy} - \alpha_{zz} } \right)^{2} }}{2}} \right]^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 2}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{$2$}}}} . $$

The tensor of the static first-order hyperpolarizability is a result of the third derivative of the energy with respect to the electric field components. The total first-order hyperpolarizability, βtot, is calculated as

$$ \beta_{\text{tot}} = \left[ {\left( {\beta_{xxx} + \beta_{xyy} + \beta_{xzz} } \right)^{2} + \left( {\beta_{yyy} + \beta_{yxx} + \beta_{yzz} } \right)^{2} + \left( {\beta_{zzz} + \beta_{zxx} + \beta_{zyy} } \right)^{2} } \right]^{{{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 2}}\right.\kern-\nulldelimiterspace} \!\lower0.7ex\hbox{$2$}}}} . $$

For rapid screening of the dyes, all solvent effects were assessed using the conductor-like polarizable continuum model (C-PCM) [35].

3 Results and discussion

3.1 Benchmark calculations

3.1.1 Excitation energies

A benchmark calculation was performed to determine the proper functional to be used in the assessment of properties of the newly designed push–pull meso-porphyrin analogues. Using YD1 as reference (Fig. 1), the excitation energies and oscillator strengths were calculated using TD-ωB97X-D, TD-CAM-B3LYP, TD-LC-ωPBE, and TD-LC-BLYP long-range-corrected exchange–correlation functionals. The B3LYP exchange functional was also included in the calculation for comparison purposes.

Fig. 1
figure 1

Molecular structure of YD1

Table 1 gives the absolute difference between the theoretical and experimental data together with the mean absolute error (MAE) of YD1 calculated at TD-DFT at different long-range functionals with 6-31G(d) basis set in ethanol using C-PCM framework. The first two transition states were credited to the Q y - and Q x -bands, respectively, while the two transitions with highest oscillator strengths were designated as the B-bands, representing the two perpendicularly polarized electronic transitions [36]. The theoretical values of the B-band were calculated from the weighted averages of the two transitions with the highest oscillator strengths.

Table 1 Absolute errors (nm) of the excited-state energies of YD1 calculated at TD-DFT/6-31G(d)//B3LYP/6-31G(d) in ethanol using C-PCM framework calculation

As shown in Table 1, the B3LYP, LC-ωPBE, and LC-BLYP xc functionals at the Q ave-bands were red-shifted by 20.3, 19.1, and 26.3 nm, respectively, to the experimental data, while ωB97X-D and CAM-B3LYP were shifted, respectively, by 17.3 and 28.0 nm to the red, as compared to the experimental results. But at the B-bands, all functionals were blue-shifted as compared to the experimental results. Interestingly, B3LYP functional produced lowest MAE with experimental results as compared to the long-range functionals. Among the long-range-corrected exchange–correlation functionals, ωB97X-D produced the lowest MAE of 26.1 nm followed closely with LC-ωPBE having an MAE value of 28.9 nm.

In order to get the bigger picture on which xc functional properly depicts the excitation energies, we further analyze the individual transitions if it follows the Gouterman’s four-orbital model [37]. Based on Gouterman’s model, generally there are four contributing molecular orbitals (MO) involved in the optical transitions of porphyrin analogues: HOMO-1, HOMO, LUMO, and LUMO+1. Spatial analysis of the four MOs indicated that they have the same features as presented in zinc porphyrin (ZnTPP) without substituents at the meso- or β-positions[17]; thus, the assignment of orbitals in ZnTPP could still be used in the designation of the transition states of meso-substituted porphyrin analogues. The order of the major contributing MOs for YD1 is HOMO-1 → LUMO-1 > HOMO → LUMO+1 > HOMO-1 → LUMO > HOMO → LUMO [17]. These transitions are designated as B y , B x , Q x , and Q y , respectively, which comprise the B- and Q-bands. Analysis of the major contributing MOs at the transition states involved in the B- and Q-bands indicated that all long-range functionals follows the Gouterman’s four MOs model (Table S1, supplementary information). However, for B3LYP functional, it involves an additional HOMO-2, which is almost degenerate with HOMO-1, unlike in LRC xc functionals, where the HOMO-1 and HOMO-2 were nondegenerate orbitals. In B3LYP, there were some spurious MO transitions at the Q x - and B x -bands, such as the HOMO-1 → LUMO transition usually assigned to the Q x -band that was located at the third transition state in the B3LYP functional and the B x -band of B3LYP functional that undergoes HOMO-2 → LUMO+1 transition, which was supposed to be a HOMO → LUMO+1 transition. Instead, the HOMO → LUMO+1 transition was located at the second transition state, which was a part of the Q-band. Taking the above considerations into account, although B3LYP functional gave a good correlation with the excitation energies to the experimental results, the most proper exchange–correlation functionals to calculate excitation energies were those with long-range corrections, specifically with ωB97X-D, since B3LYP contains spurious MO transitions.

Since the long-range-corrected functionals are dependent on the damping or separation parameter [16], an assessment of ω was conducted on YD1 using ωB97X-D, LC-ωPBE, and LC-BLYP xc functionals. CAM-B3LYP was not included in the assessment due to its long-range parameter not reaching a + b = 1, but instead gives only 0.65 of the exact exchange at large interelectronic distances, which could result in the sensitivity changes in the separation parameter from molecular structure [16, 38]. Table 2 shows the relative error of the different long-range exchange functionals compared with experimental results at various separation parameters. The results showed that the error is dependent on the type of algorithm used to calculate the LRC xc functional. ωB97X-D gives the lowest MAE of 23.3 nm at ω = 0.25 Bohr−1, while LC-ωPBE and LC-BLYP LRC xc functionals, which have almost the same way in the calculation of the long-range parameter showed very similar trend, where a decreasing MAE value of up to ω = 0.15 Bohr−1 was observed. An analysis of the contributing orbitals in relation to the changes in the separation parameter yielded that the changes in ω introduced some errors in the contributing orbitals for each transition (Tables S2 to S4, supporting information). Spurious MO transitions can be seen using the ωB97X-D xc functional at ω = 0.25 Bohr−1, which produced three transitions with high oscillator strengths that were not present in the other calculations with different separation parameters (Table S2, supporting information). For LC-ωPBE and LC-BLYP functionals (Tables S3 and S4, supporting information), where it gave very similar trend based on MAE and its major contributing MOs to the vertical transitions, the lowest MAE at ω = 0.15 Bohr−1 showed also spurious MO transitions where the B x -band undergoes HOMO-2 → LUMO+1 transition. Even the HOMO → LUMO+1 transition, assigned as Q x -band, was located at the third transition state. Taking all the above considerations, the most appropriate functional that could depict the absorption spectra of YD1 is the ωB97X-D functional with the default separation parameter of 0.20 Bohr−1. It should be noted that the use of an extended basis sets [39] or the implementation of an explicit solvation model [4042] could provide a more realistic depiction of the dye in solvent condition that gives closer agreement with the experimental excitation energies. From our results, Q y -band undergoes HOMO → LUMO transition, wherein the LUMO has a higher MO contribution from the carboxylic acid, which has a greater tendency to form H-bonding with ethanol species that could be more affected when explicit species are added to the calculations. Our results produced an error at this band of 0.09 eV using TD-ωB97X-D with C-PCM solvation model, that is about 50 % lower than the threshold value of 0.15 eV, which is the limit for the comparison of the theoretical and experimental results. Thus, we expect that the inclusion of explicit molecules in the calculation could produce only small changes in the excitation energies.

Table 2 Absolute errors (nm) of the excited-state energies of YD1 calculated at TD-DFT/6-31G(d)//B3LYP/6-31G(d) in ethanol using C-PCM framework calculation at different separation parameters

3.1.2 Oxidation potential

The ground-state oxidation potential is related to the total electron attachment energy in solution which can be rigorously calculated by obtaining the free-energy difference between the neutral and the oxidized ground-state species in solution (ΔG ox) [2527]. This method requires the inclusion of the translational, rotational, and vibrational contribution to the total partition function, which is computationally expensive, especially for large systems. Another way to estimate the vertical GSOP is by taking the energy difference calculated in solution between the neutral and oxidized species at the same geometry\( \left( {\Updelta G_{\text{ox}}^{v} } \right) \). This estimation neglects the relaxation of the oxidized system. A more computationally inexpensive method in the calculation of the vertical GSOP is by applying the Koopmans’ theorem where it only uses the HOMO energy (εHOMO). Due to the size of the molecules in consideration, we only applied the last two methods in the calculation of the GSOP. Since the calculation of the oxidation potential is xc functional dependent, we conducted an assessment of different pure and hybrid xc functionals with different Hartree–Fock exchange values, namely B3LYP, BLYP, BHandHLYP, PBE0, PBEHandHPBE, mPWPW91, mPW1K, mPWHandHPW91, M06, and M06-2X.

The experimental GSOP for YD1 is −5.42 eV in THF [28]. The conversion of the experimental potential with respect to the normal hydrogen electrode to electron volts (eV) was based on the approximation introduced by Nozik and colleagues [43]. Figure 2 shows that the \( \Updelta G_{\text{ox}}^{\text{v}} \) calculations from the different exchange–correlation functionals consistently deviate positively, meaning that \( \Updelta G_{\text{ox}}^{\text{v}} \) values were systematically higher than the actual GSOP value, whereas there were inconsistent deviations between the true GSOP value and the εHOMO. From \( \Updelta G_{\text{ox}}^{\text{v}} \) data (Fig. 2), the M06-2X provide that smallest deviation from the experimental data of 0.09 eV, and the largest deviation of 0.96 eV belongs to the B3LYP xc functional. The M06-2X functional was more than two times better correlated functional than previously proposed mPW1K for the calculation of GSOP [25]. On the other hand, the absolute deviation from the experimental data based on the HOMO energy ranges from 0.20 to 1.33 eV, with M06 and BLYP functionals having the smallest and largest deviation, respectively. It is also observed that increasing the Hartree–Fock exchange, regardless of how it is calculated, resulted in the lowering of the GSOP value. The best model to calculate the GSOP is using the \( \Updelta G_{\text{ox}}^{\text{v}} \) method with M06-2X xc functional.

Fig. 2
figure 2

Schematic energy levels of YD1 calculated at different exchange–correlation functionals with 6-31G(d) basis set in THF using C-PCM framework. GSOP values are calculated with \( \Updelta G_{\text{ox}}^{\text{v}} \) (black lines) and HOMO energy (red lines). ESOP values are calculated with \( \Updelta G_{\text{ox}}^{v} - E_{0 - 0} \) (black lines) and HOMO − E 0-0 (red lines), where E 0-0 is determined from the TD-ωB97X-D/6-31G(d)//B3LYP/6-31G(d) in THF using C-PCM framework calculation

The location in the energy level of the excited-state oxidation potential is very important in the estimation of the extent of electron injection to the conduction band of the semiconductor surface. A vertical approximation to the true ESOP can be acquired from the difference between the GSOP and E0-0. A simple estimate of E0-0 is the lowest vertical excitation energy of the system at the ground-state geometry, which can be readily calculated using the TD-DFT theoretical framework [44, 45]. Based on the benchmark study on the excitation energies in Sect. 3.1.1, the E 0-0 was calculated using TD-ωB97X-D xc functional with the same solvent as the calculation of the GSOP. It was found that the E0-0 value is equal to 2.02 eV, which is 0.20 eV larger than the actual experimental value of 1.82 eV, which was obtained experimentally from the absorption edge [28]. As shown in Fig. 2, the relative error based on the actual ESOP value increases in the order of M06-2X < mPWHandHPW91 < PBEHandHPBE < mPW1K < M06 < PBE0 < BHandHLYP < B3LYP < mPWPW91 < BLYP. The M06-2X functional produced the nearest ESOP value of −3.31 eV, deviating by 0.29 eV from the true ESOP value [28]. The overestimation of the ESOP values are very common with this type of methodology, but still produced acceptable errors as observed in current DFT-based methods [25].

3.2 Molecular design of meso-substituted distorted porphyrin analogues

Based on the optimized theoretical methodologies, we proposed eight porphyrin analogues with donor-porphyrin-bridge-acceptor configuration shown in Fig. 3. The donor was modified by interchanging methyl group with methoxy and extending the π-conjugation. The acceptor group was assessed based on cyanoacrylic or methylenemalonic acid group.

Fig. 3
figure 3

Molecular structures and labeling scheme of porphyrins with push–pull configuration

Fig. 4
figure 4

Bidentate chelating modes of the analogues

3.2.1 Electronic structure

The structural features of a dye play a vital role in the photophysical properties and also the orientation of the dye at the surface of the semiconductor. So it is important to look in the basic conformation of the dye. Figure 3 shows the molecular structure of the porphyrins having a molecular design based on a D–P–B–A configuration, and their corresponding geometrical parameters compared with YD1 (Fig. 1) are presented in Table 3. The replacement of dienyl instead of 2-butyne produced a more distorted porphyrin macrocycle as shown in Table 3 due to the increased steric hindrance effect. The extension of the donor group by adding ethyne between the porphyrin macrocycle and diphenylamine (Fig. 3) produced more planar structure. A more distorted porphyrin macrocycle was seen when the cyano group was replaced with another carboxylic moiety.

Table 3 Dihedral angles and the dipole moment of the bare (μbare) and adsorbed (μads) porphyrin analogues calculated at B3LYP/6-31G(d) in gas phase

The nonplanarity of porphyrin occurs for mostly steric and electronic reasons. The nonplanarity also introduces some changes in the molecular orbital energies where the distortion resulted in the stabilization of the LUMO orbital as shown in Fig. 5. The molecules with cyano group were more stabilized at the LUMO orbital as compared to the malonic acid. This lowering was caused by the increased electron-withdrawing capability of the cyano group as compared to the carboxylic acid even though porphyrins with two carboxylic acids have more distortion at the porphyrin macrocycle. The increase in conjugation at the donor moiety introduced more splitting at the HOMO-1 and HOMO-2 energies. However, the amount of splitting between the HOMO-1 and HOMO-2 energies was more pronounced in methyl- than methoxy-substituted porphyrins. The same trend was observed when the molecular orbital energy levels were calculated using the common B3LYP functional (Figure S1, supplementary information) except for the HOMO-1 and HOMO-2 energies, which are almost degenerate. This structural distortion could lead to more red-shifting of the absorption spectra as seen in substituted porphyrins [7].

Fig. 5
figure 5

Molecular orbital energy levels (eV) of YD1 and porphyrin analogues calculated at M06-2X/6-31G(d)//B3LYP/6-31G(d) in THF using C-PCM framework

As discussed in the introduction, the shift in the conduction band of the semiconductor could lead to an increase in the V OC. This shift can be assessed based on the increase in the μads of the adsorbed molecules pointing outward from the semiconductor surface. Usually, a cluster or slab surface models of the semiconductor are used in the analysis of the absorbed dyes. However, Chen and colleagues [13] have introduced a simple way to calculate μads using dye–titanium complex shown in Fig. 4. We consider two modes of adsorption of malonic acid: In the first mode, only one carboxylic acid chelates with the semiconductor surface (1-COOH, Fig. 4), and in the other mode of adsorption, both carboxylic acids chelate with the semiconductor surface (2-COOH, Fig. 4). Of the two modes of adsorption of malonic acid in TiO2 surface, 1-COOH mode of adsorption is more stable by only an average of 3.2 kcal mol−1 compared to the 2-COOH counterparts.

As shown in Table 3, all analogues produced more than twice the μads of YD1. The methoxy-containing analogues have lower μads values compared to their methyl counterparts. And the extension of π-conjugation at the donor region increases the μads values by more than 47 %. This infers that the A2 and B2 analogues would likely shift the CB of the semiconductor toward the vacuum energy level than the A1 and B1 analogues, thus producing qualitatively higher V OC values. Between the cyanoacrylic and methylenemalonic acid acting as the acceptor moieties, the analogues with cyanoacrylic acid were higher than 3 % of μads values compared to the methylenemalonic counterparts, which means that those with cyanoacrylic acid produced higher V OC values than methylenemalonic acid, which is also observed in organic dyes with coumarin donor moieties [46]. The large difference in μads values between the 1-COOH and 2-COOH chelating modes of the B analogues can be explained based on Fig. 6, wherein B2 analogues with 2-COOH adsorption modes were more bent as evidenced by a more significant μ x -axis in 1-COOH than in 2-COOH.

Fig. 6
figure 6

Optimized geometries and dipole moment vector of adsorbed B2-OMe calculated at B3LYP/6-31G(d) in gas phase

3.2.2 Nonlinear optical properties

Nonlinear optical properties determine the intramolecular charge delocalization in push–pull molecular configurations. Thus, the NLO properties could be used as a tool to describe the efficiency of electron charge transfer of the sensitizer, which could influence the short-circuit current density and the solar cell efficiency in general [4749]. It was observed in porphyrin analogues [47] and in other organic dyes [48, 49] that the increase in NLO properties correlated well with the increase in the photovoltaic performances of the dyes. Table 4 lists the NLO properties such as the polarizabilities (α), polarizability anisotropy (Δα), the highest β tensor (β xxx ), and the first-order hyperpolarizability (βtot) of the porphyrin analogues calculated with B3LYP and M06-2X functionals. As observed in Table 4, those analogues with cyanoacrylic group have higher nonlinear optical properties as compared to their malonic acid counterpart due to the higher electron-withdrawing capability of the cyano group as compared to the carboxylic acid. The extension of the π-conjugation or addition of the methoxy group at the donor moiety also increases all NLO properties for both functionals. The unidirectionality of the system can be assessed based on the amount of difference in magnitude between the two highest β tensor components. And for all analogues, the β xxx tensors were about 5–15 times higher than the next highest tensor, β xxy tensor, which indicates that all analogues undergo unidirectional CT capability. However, for YD1, the difference between the β tensors was higher compared with the other porphyrin analogues under consideration, which was 37 and 21 times for B3LYP and M06-2X functionals, respectively. This was due to the planar structure of YD1 at the porphyrin-bridge-acceptor configuration as indicated with C5-C4–C4′-C4″ dihedral angle where YD1 only has 1.83° as compared to the other porphyrin analogues, which has more than 30°. However, the magnitude at the β xxx tensor for YD1 is smaller by 21–82 % for all analogues, except for B1-Me, which has almost comparable β xxx tensor to YD1 when it was calculated with the B3LYP functional. Larger differences were observed when NLO properties were calculated at M06-2X functional with a difference ranging from 18 to 105 % including B1-Me. The results indicated inconsistencies when B3LYP functional was used in the calculation of hyperpolarizabilities, which can be accredited to self-interaction error [50]. Thus, only the results from the M06-2X xc functional will be discussed in the succeeding sections.

Table 4 Mean molecular isotropic polarizabilities (α), polarizability anisotropies (Δα), highest first-order hyperpolarizability tensor (β xxx ), and total first-order hyperpolarizabilities (βtot) values of push–pull porphyrin analogues at different exchange–correlation functionals with 6-31G(d) basis set

Since polarizability is a measure of the response of electrons against electric field, the large α value means that the electrons are easier to move from the donor to the acceptor group. And YD1 gave the highest α compared with the other porphyrin analogues because of the planar configuration of YD1. In general, the polarizability and hyperpolarizability values increase in the order of B1-Me < B1-OMe < A1-Me < A1-OMe < B2-Me < B2-OMe < A2-Me < A2-OMe.

3.2.3 Optical properties

The structural changes influence the degree of conjugation as well as hyperconjugation, resulting in essential shifts in the spectral properties. Figure 7 shows the simulated absorption spectra of the porphyrin analogues calculated at TD-ωB97X-D/6-31G(d)//B3LYP/6-31G(d) in ethanol using C-PCM framework. As shown in Fig. 7, all the analogues were red-shifted as compared to YD1. The red-shifting were more pronounced at the Q-band reaching up to 56 nm than the B-band, which only shifted up to 27 nm. The analogues with cyanoacrylic acid (A analogues: A1-Me, A1-OMe, A2-Me, and A2-OMe) were more red-shifted than those analogues with malonic acid (B analogues: B1-Me, B1-OMe, B2-Me, and B2-OMe). This is due to the higher electron-withdrawing property of the cyano group as evidence by higher NLO properties as mentioned in Sect. 3.2.2.

Fig. 7
figure 7

Simulated absorption spectra of YD1, (a) A porphyrin and (b) B porphyrin analogues calculated at TD-ωB97X-D/6-31G(d)//B3LYP/6-31G(d) in ethanol using C-PCM framework

For all analogues, the first-transition-state energy predominantly undergoes HOMO → LUMO transition. The red-shift of the spectra, based on the first transition, increases in the order of YD1 < B1-Me < B1-OMe < A1-Me < B2-Me < A1-OMe < B2-OMe < A2-Me < A2-OMe. This trend is almost the same observed in the NLO calculations except for the reversal of the A1-OMe and B2-Me analogues. The two highest vertical transitions representing the two perpendicularly polarized electronic transitions at the B-band show almost the same trend as the red-shifting of the analogues at the Qy-band, except for A1-OMe and B2-OMe. The oscillator strengths at the Q-bands of π-extended porphyrin analogues (A2 and B2 analogues) were two times higher than that of those analogues without π-conjugation at the donor moiety (A1 and B1 analogues). This indicates that the A2 and B2 analogues could absorb more light at the longer wavelength side. The results show that the distortion of the porphyrin macrocycle and the introduction of a more withdrawing acceptor group could introduce more red-shifting of the absorption spectra and cause the oscillator strengths to increase especially at the Qy-band. This is very important when designing molecules for DSSCs, since it can accommodate more light for electron transfer to the semiconductor.

To further support the optical properties, a calculation of light-harvesting efficiency was done on the porphyrin analogues and was compared to the reference molecule, YD1. The light-harvesting efficiency is the fraction of light intensity absorbed by the dye in dye-sensitized solar cells. It can be expressed as LHE = 1–10a = 1–10f, where a is the experimental absorbance, and f is the oscillator strength, which can be derived from TD-DFT theoretical calculations. Instead of reporting as LHE, we utilized instead the relative LHE (RLHE), which uses the same equation of the LHE, but the f is taken as the ratio of f dye/f YD1. Usually, the light-harvesting efficiency of the dye is taken from the maximum absorption band of the organic molecule, but for porphyrin dyes, the absorption profile is composed of Q- and B-bands. As presented in Table 5, two values are shown representing the RLHE values of the Qy-band [RLHE(Qy)] and the B-band (RLHE(B)). For the B-band, a weighted mean average was used to determine the f dye. As shown in Table 5, all RLHE(Qy) values were greater than 0.900, which indicates that all porphyrin analogues exhibit better light-harvesting capability than YD1 at the Qy-band. But, at the B-band, all analogues are lower than 0.900, except for B2-Me and B2-OMe. Taking into account both bands, the average RLHE (RLHEave) indicates that all dyes have an efficient RLHE, except for B1-Me as compared to YD1.

Table 5 Ratio of the oscillator strength (f dye/f YD1), relative light-harvesting efficiency (RLHE), electron injection (ΔG inject, eV), and dye regeneration (ΔG reg, eV)

3.2.4 Electron injection and dye regeneration

The driving force of the electron injection (ΔG inject) is an important property that could help increase the J SC values. This can be calculated based on the free-energy difference between the excited-state oxidation potential and the conduction band of TiO2. The CB of TiO2 at pH 7 is −4.05 eV (−0.45 V vs. NHE) [43]. In general, the ΔG inject is directly proportional to the electron injection efficiency, Φinj. ESOP is calculated from the difference in \( \Updelta G_{\text{ox}}^{\text{v}} \) and E 0-0. The E 0-0 is taken from the first transition state of the TD calculation using ωB97X-D functional in THF. As shown in Fig. 8, the E 0-0, which is also considered to be the band gap, increases in the order of A2-OMe < A2-Me < B2-OMe < A1-OMe < B2-Me < A1-Me < B1-OMe < B1-Me < YD1, consistent with the red-shifting of the absorption spectra. As shown Table 5, all porphyrins with a cyanoacrylic group as its acceptor moiety have a lower ΔG inject ranging from 0.01–0.13 eV. This is due to the stabilization of the ESOP energies when cyanoacrylic acid was used an acceptor in porphyrin analogues. But, comparing it with Ru-dyes, the proposed porphyrin dyes have still relatively higher ΔG inject that can still effectively inject electrons to the semiconductor surface. Majority of the malonic acid–containing porphyrin compounds have higher ΔG inject than YD1 and the porphyrins with cyanoacrylic acid. This electron injection was also depicted in the MO spatial distribution of the analogues of bare and adsorbed dyes as shown in Figures S2 to S4 (supplementary information), indicating that the newly designed dyes are better compared with the YD1 analogue. The increase in electron transfer, which also suggests better electron injection, was also depicted with the increase in μads compared with the μbare (Table 3).

Fig. 8
figure 8

Theoretical oxidation potentials (eV) of YD1 and porphyrin analogues calculated at M06-2X/6-31G(d)//B3LYP/6-31G(d). The band gap was based on the E 0-0 transition calculated at TD-ωB97X-D/6-31G(d)//B3LYP/6-31G(d). All calculations were carried out in THF using C-PCM framework

Dye regeneration is an important operating process in the DSSCs wherein the oxidized dye formed after electron injection is regenerated by the redox electrolyte. Herein, dye regeneration (ΔG reg) is calculated from the difference between the ground-state oxidation potential and the redox potential of the electrolyte. Commonly, the iodide/triiodide redox couple was used in DSSCs applications with a standard potential of −4.85 eV (0.35 V vs. NHE) [51]. In order to have an efficient dye regeneration, the ΔG reg should be about 0.2 eV [25, 51]. Based on Table 5, the dyes falling within this category were A2-OMe, B2-Me, and B2-OMe. For A1-Me, which has a higher ΔG reg than YD1, it could produce higher potential loss, which could decrease the efficiency of the cell.

4 Conclusions

In this study, we have utilized DFT/TD-DFT approach to investigate eight meso-substituted porphyrin analogues having donor-porphyrin-bridge-acceptor configuration. The donor moiety was modified by changing the methyl group with methoxy and the addition of ethyne between the donor and porphyrin macrocycle. The dyes were further evaluated by varying the acceptor groups with cyanoacrylic acid and methylenemalonic acid. Benchmark calculations were first done on the reference molecule, YD1, to find which xc functional is appropriate to calculate the excitation energies and oxidation potentials. An assessment of xc functionals for the calculation of excitation energies were done by using long-range-corrected xc functionals (TD-LC-ωPBE, TD-LC-BLYP, TD-CAM-B3LYP, and TD-ωB97X-D) and with the common hybrid xc functional (B3LYP), while the xc functionals that were used to calculate the oxidation potentials were B3LYP, BLYP, BHandHLYP, PBE0, PBEHandHPBE, mPWPW91, mPW1K, mPWHandHPW91, M06, and M06-2X. Based on the results of the benchmark calculations, the most appropriate functional to calculate excitation energies was the TD-ωB97X-D functional using the default separation parameter, although B3LYP functional yielded the lowest MAE values, but contains spurious MO transitions. For the calculation of the ground-state oxidation potential, it was found that M06-2X showed the best correlation with experimental results.

The effect of the distortion of the macrocycle and the introduction of the π-conjugation at the donor moiety produced more red-shifted spectra with higher oscillator strengths, especially at the Q-bands. These resulted in a higher light-harvesting efficiencies compared with YD1, which could enhance the J SC values. Aside from higher LHE values, the newly designed dyes also have higher NLO properties with unidirectional CT characteristics, which are very beneficial for DSSCs. It was found that cyanoacrylic acid produced higher dipole moments vertical outwards the semiconductor surface than those analogues with methylenemalonic acid as its acceptor group. Among the dyes, A2-OMe and B2-OMe could likely produce higher solar cell efficiencies due to the red-shifted spectra, higher LHE, and better dye injection, and the GSOP falls within the 0.2 eV limit when \( I^{ - } /I_{3}^{ - } \) redox couple was used as an electrolyte, which could minimize the excessive loss of voltage. This shows that the use of theoretical calculations before synthesis can rigorously screen and propose a new set of dyes that could result in highly efficient dyes for DSSCs.