1 Introduction

Pyrans and fused pyrans possess remarkable biological properties including antimicrobial, antifungal, antitumor, anticoagulant, diuretic, spasmolytic, and anti-anaphylactic activity (Hussein et al. 2012). Moreover, 4H-pyrans play a crucial role as foundational components of a diverse range of natural products. Certain 2-amino-4H-pyrans are used as photoactive materials, pigments, and potentially biodegradable agrochemicals (Safari et al. 2012; Wang et al. 2011). In the field of medicinal chemistry, heterocyclic systems incorporating a quinoline nucleus hold significant importance, as they are prevalent substructures found in biologically active natural compounds. Among them, quinoline compounds featuring a pyranoquinoline core serve as the essential framework for various alkaloids such as flindersine, oricine, and surprisingly. These compounds exhibit a wide spectrum of biological effects, including anti-allergic, psychotropic, anti-inflammatory, and antibacterial activities (Safari et al. 2012; Wang et al. 2011; Romdhane and Jannet 2017). Some applications of pyrano[3,2-c] quinolines include the production of photovoltaic, optoelectronic, fluorescent, luminescent, semiconductor, and photodiode components (Soliman and Yahia 2020; Farag et al. 2019a; Abdel Halim and Ibrahim 2017).

Pyranoquinoline derivatives have gained attention owing to their favorable properties in various applications. They have demonstrated potential for use in nonlinear optical devices (Abdel Halim et al. 2023; Farag et al. 2020), medicine (Uppal et al. 2023), and other fields (Li et al. 2019; Chernyshev et al. 2022). These derivatives exhibit hygienic properties and bacteriolytic activities and show promise in areas such as allergy treatment, inflammation control, and AChE inhibition. They also serve as pharmacophores for the development of psychotropic drugs, treatments for sexually transmitted diseases, and anticancer therapies (Zaman et al. 2019; Asghari et al. 2014; Kantevari et al. 2011). Styryl-quinolines and Au(III) based-dithiolene complexes are effective materials for non-linear optical applications (Upadhyay and Shah 2019).

Quinoline derivatives are used as corrosion inhibitors for iron, whereas pyranopyrimidines with coumarin substituents have shown DNA gyrase inhibitory properties. Organic photovoltaics, known for their cost-effective fabrication and high-energy conversion capabilities, have been explored using novel organic photovoltaic devices. Pyranoquinolinone derivatives are particularly notable for their antitumor/antioxidant activities, protein-monitoring abilities, and potential in the synthesis of antifungal and antibacterial medications (Mostafa et al. 2023).

The nonlinear optical (NLO) effect is at the forefront of current research because pyranoquinolines and their derivatives are crucial for providing the essential functions of frequency shifting, optical modulation, optical switching, optical logic, and optical memory for emerging technologies in fields like telecommunications, signal processing, and optical interconnections (Farag et al. 2019b). As a density surface that simultaneously displays molecular size, shape, and electrostatic potential in terms of color grading, molecular electrostatic potential (MESP) mapped onto an electron is a very useful tool for analyzing the molecular structure and physiochemical characteristics of molecules like biomolecules and medications (Mostafa et al. 2017).

The photophysical, photovoltaic, and optoelectronic properties of some organic molecules were determined using the CAM-B3LYP/6-31G (d,p) level of DFT (Mehboob et al. 2022a, 2022). Modifications with end caps and π-conjugation led to an improvement in the optoelectronic properties of the designed molecules to be used as acceptors for high-efficiency organic solar cells (Mehboob et al. 2022a, 2022). The utilization of the CAM-B3LYP method, coupled with the 6-311 +  + G(d,p) level of DFT, yields more accurate data compared to alternative quantum chemical calculation methods when assessing experimental data. Furthermore, the CAM-B3LYP basis set was employed to theoretically analyze electronic absorption spectra in the gas phase (TD-DFT), utilizing polarized split-valence 6-311 +  + G(d,p) basis sets. Additionally, the application of CLR-PCM in various solvents, namely DMF, acetone, butanol, dioxane, toluene, and xylene, demonstrates a robust agreement with the observed spectra, offering practical significance.

The motivation for this work lies in the comprehensive investigation of the synthesized compound's properties, showcasing its potential in various applications, particularly in the field of photovoltaics. The observed characteristics, both theoretical and experimental, contribute to the advancement and understanding of this novel compound.

The presented structure (APPQ, 4) is classified as an organic semiconductor of small molecules, is specified as an π-conjugated nanostructure structure, and has a delocalization of electrons as well as a large extinction coefficient and good light gain. In this article, we present innovative methods for producing and characterizing thin films and powders of organic semiconductors (APPQ). To further investigate its optoelectronic characteristics, this functional structure was examined using various experimental methods and theoretical procedures. Density functional theory (DFT) was used to describe the structural and spectral characteristics and establish the relationship between the structure and characteristics. DFT is the best tool for this job in this situation. These calculations allow us to describe the applicability field and provide experimentally unavailable information. Owing to advancements in data processing, computations utilizing large-scale basis sets and associated experimental information have recently become achievable. Finally, the optical properties of absorption and photoluminescence of the APPQ were measured, and the suitability of the APPQ/n-Si heterojunction used for applications in the field of organic photovoltaic cells was confirmed and these molecules are related to the novel systems in literature (Mehboob et al. 2020, 2021, 2022; Hussain et al. 2020; Siddique et al. 2021a; Akram et al. 2021).

2 Experimental

2.1 Synthesis and characterization of APPQ

To obtain APPQ, a mixture of 6-ethyl-4,5-dioxo-5,6-dihydro-4H-pyrano[3,2-c]quinoline-3-carbonitrile (1) (0.80 g, 3 mmol) and phenylhydrazine (0.33 g, 3 mmol) in 30 mL of ethanol was refluxed for 45 min. Upon cooling, the resulting yellow powder was filtered and recrystallized using methanol. mp 268–269 °C, yield (0.86 g, 77%). IR (KBr, cm−1): 3450 (OH), 3332, 3190 (NH2), 3066 (CHarom.), 2994, 2850 (CHaliph.), 1675 (C=Oketone), 1655 (C=Oquinolone), 1618 (C=N) and 1578 (C=C). 1H NMR (DMSO-d6, δ, 400 MHz): 1.21 (t, 3H, J = 6.4 Hz, CH2CH3), 4.27 (q, 2H, J = 6.4 Hz, CH2CH3), 6.43 (bs, 2H, NH2 exchangeable with D2O), 6.90 (d, 1H, J = 7.6 Hz, Ar–H), 7.20 (t, 1H, J = 7.2 Hz, Ar–H), 7.43 (t, 1H, J = 7.6 Hz, Ar–H), 7.55–7.59 (m, 3H, Ar–H), 7.61 (d, 1H, J = 7.6 Hz, Ar–H), 7.79 (t, 1H, J = 8.0 Hz, Ar–H), 8.23 (d, 1H, J = 7.2 Hz, Ar–H), 8.32 (s, 1H, H-3pyrazole). 13C NMR (DMSO-d6, δ, 100 MHz): 12.2 (CH3), 38.2 (CH2), 94.3 (C-4pyrazole), 111.5 (C-3quinoline), 118.1, 120.5, 121.2, 123.6, 126.4, 127.0, 128.2, 129.5, 135.3, 139.0 (12Ar-C), 140,6 (C-3pyrazole), 153.5 (C-5pyrazole), 161.3 (C–OH), 171.8 (C-2quinoline as C=O), 191.5 (C=O). Mass spectrum, m/z (Ir %): 374 (M+., 65), 343 (27), 317 (16), 304 (9), 216 (8), 190 (7), 160 (10), 132 (22), 80 (31), 77 (20), 64 (100). Anal. Calcd for C21H18N4O3 (374.40): C, 67.37; H, 4.85; N, 14.96%. Found: C, 67.10; H, 4.60; N, 14.75%.

Melting points were determined using a digital Stuart SMP3 apparatus. Infrared spectra were obtained using FTIR Nicolet IS10 and Perkin-Elmer 293 spectrophotometers with KBr disks as the medium. 1H NMR (300 MHz) and 13C NMR (75 MHz) spectra were recorded on a Mercury-300BB instrument using DMSO-d6 as the solvent and TMS (δ) as the internal standard. Mass spectra were acquired using a GC-2010 Shimadzu Gas chromatography instrument mass spectrometer (70 eV). Elemental microanalyses were performed using a Perkin–Elmer CHN-2400 analyzer.

2.2 Computational details

In this study, computational calculations were performed using the Gaussian 09 software package (Frisch et al. 2009), and the obtained results were analyzed using the GaussView 05 molecular visualization program (Frisch et al. 2009). To determine the optimized geometrical parameters, vibrational frequencies, UV–Vis spectra, electronic transitions, and electronic characteristics such as HOMO–LUMO energies for APPQ, Density Functional Theory (DFT) (Shahab et al. 2015) was employed using the B3LYP hybrid functional (Yanai et al. 2004). The B3LYP functional combines the Lee–Yang–Parr correlation functional (LYP) with Beck's three-parameter hybrid exchange functional (B3), and the Coulomb Attenuating Method (CAM-B3LYP) was utilized (Lee et al. 1988). For a more accurate representation of polar bonding in molecules, the basis set 6-311 +  + G(d,p) basis set with 'd' polarization functions on heavy atoms and 'p' polarization functions on hydrogen atoms was used (Petersson and Allaham 1991). NMR chemical shifts were estimated using the gauge-including atomic orbital (GIAO) approach (Wolinski et al. 1990), employing the same level of theory. Donor–acceptor interactions on the NBO basis were evaluated using the second-order Fock matrix (Sarafran et al. 2007). Geometrical optimization, FMO, MEP, etc. in the context of organic compounds involves finding the most energetically favorable arrangement of atoms in a molecule. This optimization is crucial for understanding the chemical and physical properties of a compound as discussed in the literature (Ans et al. 2019a, 2019b, 2019c, 2019d, 2019e, 2020a, 2020b, 2022; Siddique et al. 2020, 2021, 2022).

2.3 Preparation and characterizations of APPQ films

APPQ thin films were fabricated on different substrates via vacuum thermal evaporation. Morphological analysis was conducted using a JEOL-JSM-636 OLA scanning electron microscope, and the optical properties were assessed using a JASCO–670 spectrophotometer. To investigate the characteristics of the hybrid heterostructure based on APPQ, the current–voltage measurements were conducted under both dark conditions and varying light intensities using a high-impedance Keithley 2635 A.

3 Results and discussion

3.1 Synthesis and molecular structure characterization

A new compound, 3-[(5-amino-1-phenyl-1H-pyrazol-4-yl)carbonyl]-1-ethyl-4-hydroxyquinolin-2(1H)-one (APPQ, 2), was synthesized by treating 6-ethyl-4,5-dioxo-5,6-dihydro-4H-pyrano[3,2-c]quinoline-3-carbonitrile (1) (Ibrahim et al. 2013) with phenylhydrazine in boiling ethanol as shown in Scheme 1. The formation of compound 4 was proposed to involve nucleophilic attack at the C-2 position of the γ-pyrone ring, leading to the formation of intermediate A. Subsequently, pyrazole ring closure occurred through the addition of the amino group to the cyano group (intermediate B), accompanied by proton transfer. The formation of another potential product, compound 3, resulting from the addition of a hydroxyl group to the cyano functional group (intermediate C), was ruled out based on spectral analysis. Computational analysis of compounds 3 and 4 further supports this proposed mechanism.

Scheme 1
scheme 1

Formation of the novel APPQ, 4

To obtain APPQ, a mixture of 6-ethyl-4,5-dioxo-5,6-dihydro-4H-pyrano[3,2-c]quinoline-3-carbonitrile (1) (0.80 g, 3 mmol) and phenylhydrazine (0.33 g, 3 mmol) in 30 mL of ethanol was refluxed for 45 min. Upon cooling, the resulting yellow powder was filtered and recrystallized using methanol. mp 268–269 °C, yield (0.86 g, 77%). IR (KBr, cm−1): 3450 (OH), 3332, 3190 (NH2), 3066 (CHarom.), 2994, 2850 (CHaliph.), 1675 (C=Oketone), 1655 (C=Oquinolone), 1618 (C=N) and 1578 (C=C). 1H NMR (DMSO-d6, δ, 400 MHz): 1.21 (t, 3H, J = 6.4 Hz, CH2CH3), 4.27 (q, 2H, J = 6.4 Hz, CH2CH3), 6.43 (bs, 2H, NH2 exchangeable with D2O), 6.90 (d, 1H, J = 7.6 Hz, Ar–H), 7.20 (t, 1H, J = 7.2 Hz, Ar–H), 7.43 (t, 1H, J = 7.6 Hz, Ar–H), 7.55–7.59 (m, 3H, Ar–H), 7.61 (d, 1H, J = 7.6 Hz, Ar–H), 7.79 (t, 1H, J = 8.0 Hz, Ar–H), 8.23 (d, 1H, J = 7.2 Hz, Ar–H), 8.32 (s, 1H, H-3pyrazole). 13C NMR (DMSO-d6, δ, 100 MHz): 12.2 (CH3), 38.2 (CH2), 94.3 (C-4pyrazole), 111.5 (C-3quinoline), 118.1, 120.5, 121.2, 123.6, 126.4, 127.0, 128.2, 129.5, 135.3, 139.0 (12Ar-C), 140,6 (C-3pyrazole), 153.5 (C-5pyrazole), 161.3 (C–OH), 171.8 (C-2quinoline as C=O), 191.5 (C=O). Mass spectrum, m/z (Ir %): 374 (M+., 65), 343 (27), 317 (16), 304 (9), 216 (8), 190 (7), 160 (10), 132 (22), 80 (31), 77 (20), 64 (100). Anal. Calcd for C21H18N4O3 (374.40): C, 67.37; H, 4.85; N, 14.96%. Found: C, 67.10; H, 4.60; N, 14.75%.

Computational analysis was performed to support the formation mechanism of compound 4 (APPQ) and to reject the suggestion of another product (compound 3). The proposed mechanism in Scheme 1 was confirmed through theoretical calculations (Fig. 1), which revealed that the charge density at C-2 was lower than that of the cyano carbon. Consequently, C-2 becomes a carbon-deficient site that is readily attacked by a nucleophilic reagent (phenyl hydrazine). Moreover, although the NH group in the optimized structure of intermediate A exhibits a lower electron density (0.215) than the OH group (−0.296), the reduced electron density in the NH group can be attributed to the delocalization of the lone pair of electrons over the benzene ring. Another factor influencing the nucleophilic addition of the NH group to the nitrile group in the reaction mechanism is the stabilization energy of the resulting product, APPQ (Scheme 1). Consequently, intermediate A favors the route to intermediate B, and subsequently the final product (APPQ) more preferable than the route to intermediate C and excluded product 3. The computational results obtained for APPQ demonstrated its higher stability and reactivity compared to compound 3, with values of (0.2693 eV and 6.2074 kcal/mol). Additionally, APPQ exhibits lower hardness and higher softness, along with greater electrophilicity, than compound 3. Therefore, APPQ was more stable and reactive than compound 3.

Fig. 1
figure 1

The optimized structure of compounds 1, 2, 3, intermediate A and the product (APPQ). Natural charge of compounds intermediate A and (APPQ)

3.2 Chemical reactivity characteristics

A key factor in Gaussian calculations is the estimation of the HOMO (−donor) and LUMO (−acceptor) energies, and how these energies overlap has a vital impact on the occurrence of various reactions (Yousef et al. 2012; Liu et al. 2012). The most significant stability metric for demonstrating the chemical reactivity and kinetic stability of molecules is the energy gap (ELUMO–EHOMO) (Govindarajan et al. 2012). The chemical reactivity and site selectivity of the molecular systems were explained by the DFT approach. The global reactivity descriptors, as described in the literature (Yanai et al. 2004, Lee et al. 1988) and presented in Table 1, offer a valuable tool for comparing the reactivity of the product APPQ with other molecules under study. These descriptors encompass various factors, as stated in detail in the literature, and are summarized in Table 1. These descriptors were calculated for reactants 1 and 2, as well as for the isolated product APPQ (4), and another anticipated product 3, utilizing the energies of the frontier molecular orbitals (ELUMO, EHOMO), as shown in Table 1 and Fig. 2. The electrophilicity index gauges the amount of energy needed to stabilize a chemical system after transferring an additional electronic charge (∆Nmax) from its surroundings. The direction of charge transfer from nucleophiles to electrophiles is dictated by the electronic chemical potentials of the reactant molecules. Consequently, when a molecule accepts an electronic charge, its energy decreases, leading to a negative electronic chemical potential. Electrophilic charge transfer (ECT) is defined as the difference between the ∆Nmax values of interacting molecules as present in the following equation: ECT = (∆Nmax)1–(∆Nmax)2. The electronic charge (∆Nmax) was calculated for reactant molecules which are 6-ethyl-4,5-dioxo-5,6-dihydro-4H-pyrano[3,2-c]quinoline-3-carbonitrile (1) and phenyl hydrazine (2), as well as for the final product 4. The calculated ECT value for the reactant molecules was 1.124809, indicating the transfer of electron charge from reagent 2 to substrate 1. As a result, molecule 1 can be identified as a global electrophile (electron acceptor), whereas molecule 2 acts as a global nucleophile (electron donor).

Table 1 Calculated ELUMO, EHOMO, energy band gap, ionization potential (IP), electron affinity (EA), electronegativity (χ), global hardness (\(\eta \)), chemical potential (v), global electrophilicity index (ω), global softness (S) and additional electronic charge (\(\Delta \) Nmax) in eV for the reactants 1 & 2 and the expected products 3 &APPQ, using B3LYP/6–311 +  + G(d,p)
Fig. 2
figure 2

Molecular orbitals (HOMO —»LUMO, HOMO−1 —»LUMO and HOMO−2 —» LUMO) of APPQ at the B3LYP/6-311G (d,p) basis set

In contrast to compound 1, which exhibits a low chemical potential and high electrophilicity index, compound 2 displays a low electrophilicity index and high chemical potential, indicating its nucleophilic activity (Table 1). The product 4 (APPQ) possesses a higher electrophilicity index (ω = 4.433508 eV) than reactant molecule 2 (ω = 1.8786 eV), indicating that molecule 4 (APPQ) is a stronger electrophile than molecule 2.

Further, a good nucleophile is characterized by low values of (ω), while a good electrophile is characterized by high values of (ω) (hydroxynaphthalen-2-yl)methylene)-N-(pyridin-2-yl) hydrazinecarbothioamide and its Mn(II) Ni(II) 2012). The importance of hardness (η) and softness (S) is to measure molecular stability and reactivity. The more polarized and reactive molecules have a small energy gap and are known as soft molecules. Thus, compound APPQ (S = 0.513258 eV−1) is more soft than other compounds. While compound 3 has the most hardness. Additionally, Pauling defined electronegativity as an atom's capacity to draw an electron to itself within a molecule (Pauling et al. 1960). So, compound 1 has more electronegativity than other compounds. Table 1 shows the chemical softness and other factors of APPQ compared to those with similar structures. The values of these factors for APPQ were very close to those reported for similar structures, with only a small margin of error from the calculations. This indicates that the results are reliable and accurate (Wolinski et al. 1990; Sarafran et al. 2007; Ans et al. 2019a; 2020).

3.3 Molecular geometry of APPQ

The structure of APPQ was identified using density functional theory and the B3LYP and CAM-B3LYP functional calculations. The CAM-B3LYP method, combined with the 6-311++G(d,p) level of DFT, provides more precise data when compared to alternative quantum chemical methods in the analysis of experimental data. Moreover, the CAM-B3LYP basis set was employed to theoretically examine electronic absorption spectra in the gas phase (TD-DFT) using polarized split-valence 6-311++G(d,p) basis sets. Additionally, the application of the Corrected Linear Response Polarizable Continuum Model (CLR PCM) in solvents like DMF, acetone, butanol, dioxane, toluene, and xylene demonstrates a strong agreement with the observed spectra, indicating practical utility. Without applying any symmetry restrictions, the primary structural characteristics of APPQ, such as bond lengths, bond angles, and dihedral angles, were optimized using the 6-311++G(d,p) basis set. Table 2 displays the corresponding values. Fig. 3 also shows the number of atoms in the compounds examined for this investigation.

Table 2 (a) Selected optimized geometrical structure parameters for APPQ computed at B3LYP/6-311 +  + G(d,p) and CAM/B3LYP/6-311 +  + G(d,p)
Fig. 3
figure 3

a Experimental and b Calculated IR spectrum, c Correlation graph between experimental and calculated IR wavenumbers of APPQ at B3LYP/6-311 +  + G (d,p)

Since there is no experimental data for APPQ, certain structural properties of APPQ have been compared to those of related systems with known crystal structures (Kafka et al. 2013; Vishnupriya et al. 2013). The experimental structure of a comparable molecule described in the literature and the optimized structure of APPQ were found to be remarkably comparable. The optimized structure of APPQ resembled the experimental structure of a related molecule from the literature, demonstrating the accuracy and realism of the optimization (Kafka et al. 2013; Vishnupriya et al. 2013). The chemical mentioned in the title has C1 symmetry. The bond lengths and angles of APPQ differed slightly from those noted in the literature (Kafka et al. 2013; Vishnupriya et al. 2013). The computations revealed that APPQ has a larger C–O bond length.

Particularly in the fingerprint area (1400–600 cm-1) of the IR spectra of APPQ, there were numerous overlapping and complicated bands. In the current study, only distinct and clear-seen bands were discussed. The experimental and computed (scaled) wavenumbers are listed in Table 3 along with the assignments for each. To better match the experimental data, the computed wavenumbers were scaled down by 0.9613. The B3LYP-derived correlation coefficient (R2 = 0.996) revealed that the two sets of values were in good agreement with one another. The correlation graph in Fig. 3 lacks any dots between 1700 and 2850 cm−1 because the molecule's functional groups are not located there.

Table 3 Experimental and calculated vibrational frequencies in cm−1 of APPQ using DFT/B3LYP 6-311 +  + G (d, p) with the proposed assignments

3.4 1H NMR and 13C NMR spectroscopy of APPQ

The chemical shifts for 1H and 13C NMR were computed using the GIAO method. The chemical shifts for 1H and 13C NMR were computed using the GIAO method employing B3LYP and the 6-311 +  + G(d,p) basis set. The experimental and calculated values of 1H and 13C NMR chemical shifts of the title compound are shown in Tables 4 and 5. The 1H and 13C NMR spectra charts are given in Figs. S1 and S2, respectively. Comparing the chemical shift data of 1H and 13C NMR appeared that, the symmetrical protons and carbons were observed as the signal value in the experimental chart but seen differently in the theoretical chart. For example, the methyl (CH3) protons appeared in the experimental chart as a triplet signal at δ 1.21 ppm, but in the theoretical chart, three signals appeared at δ 1.08, 1.17, and 1.32 ppm. However, the value of the experimental signal between the three theoretical values indicates excellent agreement between the experimental and theoretical results. H-3pyrazole was seen theoretically at δ 7.49, while experimentally at δ 8.32. The amino protons were recorded theoretically as two signals at δ 4.34 and 7.67, meanwhile, these protons were seen experimentally as broad signals at δ 6.43. Further, the aromatic protons were seen theoretically in the range δ 7.46–7.87, while appeared experimentally in the range δ 6.71–8.23.

Table 4 Experimental and calculated 1H NMR chemical shift values for APPQ using B3LYP/6-311 +  + G (d,p)
Table 5 Experimental and calculated 13C NMR chemical shift values for APPQ using B3LYP/6-311 +  + G (d,p)

Further, some information was deduced from the data on chemical shifts of certain carbon atoms and their electron density. For example, the δ values for CH2 and CH3 carbons are 11.7/12.2 (cal./exp.) and 39.0/38.2 (cal./exp.), respectively, which corresponds to electron density −0.417/−0.100 (cal./exp.) confirming increasing of δ values for Sp3 hybridized carbons by decreasing the electron density (deshielding). In addition, the current compound contains two electrons repelling NH2 and OH groups that increase the electron density over C-4pyrazole and C-3quinoline, respectively. The electron density of C-4pyrazole (−0.131) is higher than C-3quinoline (1.463), this difference in electron density is directly related to the difference in electron negativity between nitrogen and oxygen atoms. Therefore, the δ value of C-4pyrazole (111.9/94.3; cal./exp.) is lower than C-3quinoline (115.8/111.5; cal./exp.), indicating more deshielding of C-4pyrazole as compared with C-3quinoline. Moreover, although the pyrazole ring contains three carbon atoms, they differ in their chemical shift values due to the difference in electron density over these atoms. C-3pyrazole and C-5pyrazole are affected by the electron-withdrawing mesomeric of C = Npyrazole, meanwhile, C-5pyrazole is additionally affected by the electron-withdrawing inductive effect of the NH2 group. Thus, C-5pyrazole is more deshielded (electron density 0.696) than C-3pyrazole (electron density −0.014), and therefore, C-5pyrazole is observed at higher δ value (155.9/153.5; cal./exp.) than C-3pyrazole (146.1/140.6; cal./exp.). Because C-4pyrazole is only affected by electron repelling mesomeric effect of the NH2 group, it has a higher electron density (0.131) inside the pyrazole ring and therefore lower δ value (111.9/94.3; cal./exp.). Finally, the chemical shift (δ) values of the two carbonyl carbons (C=Oquinoline and C=Oketone) are (163.8/171.8; cal./exp.) and (190.9/191.5; cal./exp.), respectively. These values agree well with the electron density over these carbons −1.44 and −0.74, respectively.

Figs. S1 and S2 depict the correlation graph between the computed and experimental chemical shifts for 1H and 13C NMR, respectively. The linear equation for the correlation graph is Y = 0.9 21 X + 0.448 for 1H NMR and Y = 0.999 X—2.76 for 13C NMR, where Y is the experimental chemical shift for 1H and 13C NMR and X is the computed 1H and 13C NMR chemical shift (in ppm.) (Al-Otaibi et al. 2015). The correlation coefficients (R2 = 0.96) for 1H NMR and (R2 = 0.99) for 13C NMR demonstrate that the theoretical and experimental chemical shifts agree well. Except for the proton of the OH group, which is not seen in the spectrum, the observed and computed chemical shift values in 1H NMR exhibit good agreement (Szafran et al. 2007).

3.5 UV–Visible absorption spectroscopy

The UV–Vis absorption spectrum was theoretically computed using the TD-DFT method, the 6-311 +  + G(d,p) basis set, the CAM-B3LYP functional, and the solvent effect was considered using the Integral Equation Formalism Polarizable Continuum Model (IEFPCM) (Karabacak 2009; Roeges et al. 1994). The utilization of the CAM-B3LYP method, coupled with the 6-311 +  + G(d,p) level of DFT, yields more precise data compared to alternative quantum chemical approaches when cross-referenced with experimental data. Additionally, the CAM-B3LYP method, employing the Coulomb-attenuating method and the polarized split-valence 6-311 +  + G(d,p) basis sets, is employed to theoretically investigate electronic absorption spectra in the gas phase (TD-DFT). Furthermore, the inclusion of the CLR-PCM in diverse solvents such as DMF, acetone, butanol, dioxane, toluene, and xylene demonstrates a commendable.

In Table 6, the vertical excitation energies, oscillator strength (f), and associated absorption wavelengths of the experimental and manufactured UV data are compared. The TD-DFT results for the low-intensity bands (Q-region) and high-intensity bands were obtained in the gas phase as well as in polar solvents (butanol, DMF, and acetone) and non-polar solvents (dioxane, toluene, and xylene) to understand the effect of polarity on electronic transitions between HOMO and LUMO energy levels of APPQ (Karabacak 2009; Roeges et al. 1994). The corresponding spectra are shown in Fig. 4 along with the electronic spectra of APPQ in butanol, DMF, and acetone. Dioxane, toluene, and xylene can be used to create a spectrum with seven bands at 460, 430, 385, 365, 295, 280, and 265 nm. There were slight shifts in the band locations as the solvent polarity increased from dioxane, toluene, and xylene to butanol, DMF, and acetone. This implies independence from the solvent because the polarity of both the excited and ground states is consistent across many solvents. Butanol, DMF, and acetone resulted in a decrease in the intensity of the band. As shown by their intensities, which range from −1000 to 11,000, all seven bands were thought to be the result of transitions involving the (π–π*) and (n-π*) states.

Table 6 Experimental and Computed excitation energies (eV), electronic transition configurations, and oscillator strengths (ƒ) for the optical transitions of the absorption bands in the UV–vis. regions (involving HOMOs) of APPQ at CAM-B3LYP/6-311 +  + G(d,p)
Fig. 4
figure 4

Experimental and calculated electronic absorption spectra of APPQ in different solvents

The ten highest-occupied molecular orbitals (φ59-1φ90) and the ten lowest-occupied molecular orbitals (φ71-1φ80) are involved in electron excitation for the excited configurations in the APPQ model. The calculated transitions and transitions observed in the experiments match each other satisfactorily. The first (n-π*)1 state is centered at approximately 450, 430, and 450 nm in dioxane, toluene, and xylene, respectively, which are non-polar solvents. With wavelengths of approximately 460, 450, and 460 nm, the theoretical predictions for this band are in excellent agreement with the experimental observations. φ60-70-1φ71-85 are the configurations in charge of this band. A wavelength of 450 nm was obtained from the calculations in the gas phase.

At approximately 440, 439, and 440 nm, the same (n-π*)1 state was observed in polar solvents (butanol, DMF, and acetone). According to Table 6, the theoretical calculations in these solvents successfully recreated the bands at approximately 445, 447, and 450 nm. The second through seventh states exhibit a similar pattern, which is consistent with the first state. The n–π* and π–π* transitions were typified by these apparent absorption bands. The solvent causes a 3–4 nm blue or red shift in the absorption band, which corresponds to the maximal absorption of APPQ. The theoretical and experimental vertical excitation energies and related oscillator strengths for APPQ are listed in Table 6.

3.6 Molecular electrostatic potential

The electrophilic (electron-rich region) and nucleophilic (electron-poor region) reactive sites can be estimated using the molecular electrostatic potential (MESP). In the MESP, the red and blue areas represent electron-rich and electron-poor regions, respectively, whereas the green zone represents a virtually neutral region. The change in electrostatic potential created by a molecule is substantially responsible for the binding of a drug to its receptor-binding sites since the binding site in general is predicted to comprise opposite areas of electrostatic potential. An MESP map of the APPQ is displayed in Fig. 5 and was created using the Gauss View software with optimized geometry. Assessment of electrophilic (electron-rich) and nucleophilic (electron-poor) reactive sites is possible using the molecular electrostatic potential (MESP). In the MESP, the green zone denotes a roughly neutral region, whereas the red and blue portions denote the electron-rich and electron-poor regions, respectively. The change in electrostatic potential brought on by a chemical plays a key role in the binding of a drug to its receptor-binding sites because binding sites often contain areas of opposite electrostatic potential. An MESP map of the APPQ is shown in Fig. 5 and was produced using the Gauss view program at its optimized geometry. The MESP of the molecule, which is distinguished by the yellowish-red color, makes it easy to see the most significant negative potential region surrounding the oxygen and nitrogen atoms of the (nitrile group), as well as the binding site for electrophilic assault. The most positively charged protons in the molecule are protons H24, H33, and H34, whereas the rest of the molecule appears to have a neutral electrostatic potential.

Fig.5
figure 5

Molecular surfaces a–c of APPQ using B3LYP/6–311 +  + G(d,p)

3.7 Natural bond orbital analysis

B3LYP/6-311 +  + G(d,p) and Gaussian09 software were used to calculate the Natural Bond Orbital (NBO). Charge transfer, conjugative interactions, intramolecular bonding, and intermolecular bonding may all be investigated using these computations. The stabilizing energy value depends on the degree of coupling between the electron donors and acceptors, as well as the degree of conjugation in the system. The second-order Fock matrix was used in the NBO analysis to examine how the donor (i) and acceptor (j) bonds interact. Through this interaction, an empty non-Lewis orbital acquires the electron occupancy that was previously in the idealized Lewis structure. The delocalization from donor (i) to acceptor (j) stabilizes at a certain energy E(2). In this system, a larger E(2) value denotes more conjugation and stronger interaction between the electron donors and acceptors. The intense interactions discovered using NBO analysis are shown in Table 7. System stabilization is caused by strong intramolecular hyperconjugative interactions, which increase electron density (ED) and intramolecular charge transfer (ICT). the following are some particular interactions:

Table 7 Second order perturbation theory analysis of Fock matrix in NBO basis E(2) values (kcal/mol) for the optimized structure APPQ

Natural Bond Orbital (NBO) calculations (Cheng et al. 1991) were carried out using the B3LYP/6-311 +  + G(d,p) method in the Gaussian09 program. This offers a helpful starting point for research on intramolecular and intermolecular bonding and bond interactions, as well as charge transfer and conjugative interactions in molecular systems. The higher the stabilizing energy value, the stronger the bond between electron donors and electron acceptors, or, more specifically, the greater the tendency of electron donors to donate to electron acceptors, and the greater the degree of conjugation of the entire system. The donor (i)–acceptor (j), or the interaction between the donor and acceptor level bonds, was examined in the NBO investigation using the second-order Fock matrix (Karabacak 2009; Roeges et al. 1994).

This interaction causes the vacant non-Lewis orbital to lose its occupancy due to the electron NBO concentration of the idealized Lewis structure. Table 7 illustrates the potential for intense engagement in NBO. The system was stabilized as a result of increased electron density (ED) and intramolecular charge transfer (ICT) due to strong intramolecular hyperconjugative interactions. 24.86 kcal mol−1 is stabilised between C3–C4 from N32 of n1 (N32) * (C3–C4), which raises ED (0.45e).

3.8 Natural population analysis and natural charges

Table 8 displays the natural charge and population of the total electrons on the subshells, as well as the natural electronic configuration of the APPQ active sites at the B3LYP/6-311 +  + G (d,p) level. The most negative centers were found in O18, O23, O28, N10, N29, N30, and N32. The most positive centers were found in the protons (H24, H33, and H34) and carbon atoms connected to these heteroatoms, indicating a restricted supply of electrons from the static electricity of the APPQ molecule. In addition, according to a natural population study, APPQ has 98 coordinated electrons in the subshells, 98 total Lewis electrons, and 98 non-Lewis electrons.

Table 8 Natural charge, natural population analysis for APPQ

3.9 Nonlinear optical analysis

In this investigation, the initial hyperpolarizability of the title compound was determined using the finite field method and B3LYP and CAM-B3LYP/6-311 +  + G (d, p) basis sets (Zhang et al. 2010). Table 9 displays the results for the electronic dipole moment μi (i = x, y, z), polarizability αij, and first-order hyperpolarizability βijk. The calculated dipole moment for the B3LYP level was 1.5580 D, whereas that for the CAM-B3LYP level was 1.5370 D. A well-known molecule called P Nitroaniline (PNA) is utilized as a model system to investigate the nonlinear optical (NLO) characteristics of molecular systems. Because the title chemical had no experimental values listed in the literature, PNA was used in this investigation as a reference molecule. A B3LYP level's computed polarizability αtot, of 52.14 × 10–24 esu and the calculated polarizability of the CAM-B3LYP level of 46.89 × 10–24 esu are both twice as high as the polarizability of the PNA molecule.

Table 9 Total static dipole moment (μ), mean polarizability ( < α˃), anisotropy of the polarizability (Δα), mean first-order hyperpolarizability ( < β˃), and second order hyperpolarizability ( < y˃), for APPQ using DFT/B3LYP and CAM-B3LYP/6–311 +  + G (d, p)

The new compound has a computed first hyperpolarizability total of 35.52 × 10–33 esu for B3LYP level and 15.82 × 10–33 esu for CAM-B3LYP level, which is greater (by two times for B3LYP level and CAM-B3LYP level) than that of the typical NLO material PNA (15.5 × 10–33 esu) (Cheng et al. 1991). Furthermore, APPQ's second-order hyperpolarizability, or y, was calculated to be 4.82 × 10–35 esu for B3LYP levels and −2.04 × 10–35 esu for CAM-B3LYP levels, which is three times higher than that of PNA molecules. Additionally, for the molecule under investigation, the lowest value of DR and the greatest value of HRS both confirmed short bond lengths, indicating improved selectivity. We conclude that the current compound is a desirable subject for future investigations of nonlinear optical characteristics.

3.10 Thermodynamic properties

The values of some thermodynamic parameters for the current compound, including zero-point vibrational energy, rotational temperatures, rotational constants, and energies at a standard temperature of 298 K, were obtained at the HF and DFT levels using the B3LYP/CAM-B3LYP functional with the 6-311 +  + G(d,p) basis set (Table 10). The total energy and translational, rotational, and vibrational values are somewhat higher when calculated in HF than in B3LYP or CAM-B3LYP. They can be used to predict chemical reaction trajectories in the thermochemical field and to determine other thermodynamic energies using thermodynamic function relationships and the second law of thermodynamics (Zhang et al. 2010). It was impossible to apply any of the thermodynamic calculations to a solution because they were performed in the gas phase.

Table 10 Calculated thermodynamic parameters of APPQ

3.11 Morphological characterization of APPQ

Scanning electron microscopy (SEM) is a highly effective technique that allows high-resolution analysis of the morphology of diverse materials. SEM offers useful insights into the structure and surface characteristics of these materials when analyzing their aggregation and microrod forms. Figures6a–d show the SEM images of the surface morphology of APPQ at various magnifications. The photos show that the surface of APPQ is composed of tightly packed, agglomerated micro rods that have a wide variety of shapes. Furthermore, the dispersion of micro rods is not uniform, even if the surface retains a homogeneous structure. Each aggregate is made up of numerous distinct micro-rods with an average size ranging from 1 to 3 µm, according to an analysis of the morphological microstructural characteristics.

Fig. 6
figure 6

SEM image for the surface morphology of various magnifications of APPQ

These micro rods can be imaged in depth using scanning electron microscopy (SEM), which enables researchers to examine their sizes, surface textures, and other important properties. Studying their growth processes, characteristics, and possible uses requires such information. The APPQ sizes that were discovered provide proof of the superior calibration of the deposited APPQ surface. This superior quality is anticipated to enable effective charge carrier transmission, leading to exceptional electrical and optoelectronic performances (El-Mahalawy et al. 2022).

3.12 Photoluminescence properties of APPQ

The photoluminescence (PL) spectrum of APPQ at ambient temperature is shown in Fig. 7. The spectrum was obtained at an excitation wavelength of 350 nm. With an energy of 2.17 eV, the direct transition of APPQ through the inter-band is responsible for the observed band in the spectrum. The impact of the molecular vibrational dynamics on the emission spectra is revealed by the Lorentz vibronic subbands. In particular, there were broad peaks with three vibronic sub-bands centered at 570 nm. These sub-bands have peaks at 450 and 560 nm and a lower peak at 660 nm.

Fig. 7
figure 7

Spectral dependence of Photoluminescence of APPQ thin films

According to previous studies, the singlet–singlet state transition (S2–S0, S1–S0) is responsible for the emission peaks in the visible region. The molecule travels from a higher-energy excited state (S2 or S1) to a lower-energy ground state (S0) during transitions that involve electronic energy levels. The resulting energy differential correlates with the emitted visible light and creates visible peaks in the spectrum (Almotiri et al. 2022).

3.13 Optical characteristics of APPQ thin films

The correlation between the photon energy and absorption coefficient is shown in Fig. 8a. A visible Q-band at 2.9 eV (427.6 nm) and a UV Soret band at 3.25 eV (381.53 nm) are two different bands with significant absorption peaks. According to Yousef et al. (2012), these peaks are a result of electronic transitions between the molecular orbitals π → π* and n → π*. The remarkable absorption properties of APPQ thin films offer important benefits for a variety of photodetection applications and high-efficiency photovoltaic cells (Roushdy et al. 2022).

Fig. 8
figure 8

Plot of photon energy dependence of a Absorption coefficient, b Skin depth, c (αhν)1/2 of APPQ thin films

Figure 7b shows that the skin depth (= 1/α) significantly decreased with increasing photon energy in the absorption spectral area (Hassanien et al. 2016). This decline is explained by the fact that some of the incident photon energy is used to create electron–hole pairs. It should be noted that the skin depth was greater than the film thickness (350 nm) by approximately 2200 nm. This implies that regardless of the incident photon energy within the absorption range of the film, the full bulk of the sample can be effectively used for the creation of electron–hole pairs. The suitability of the APPQ film as an active layer in organic photovoltaic devices was demonstrated by the correlation between its high skin depth values and comparatively low extinction coefficient values.

To determine the type of electronic transition and energy gap (Eg) value, Tauc's relation was employed (Tauc et al. 1972). Figure 8c illustrates the link between the photon energy and (E)1/2, which results in an indirect energy gap of approximately 2.35 eV. This figure is less than the energy gap discovered by calculating the HOMO–LUMO energy difference by DFT analysis, as previously reported. Because the DFT method relies on approximations and exchange–correlation functionals, the energy gap for organic compounds derived from calculations is greater than that from experimental measurements. The complicated nature of the electronic correlations and excitations in organic compounds may not be accurately captured by these approximations, causing variations in the expected energy gap (Abdul Mumit et al. 2020).

The Urbach empirical law connects the absorption coefficient (α) to the photon energy (h v) for low-energy photons (shown in Fig. 8d) (Urbach et al. 1953). In general, it is believed that this energy is caused by localized states that arise within the optical gap. These states in amorphous and low-crystalline materials are connected to the disorder. The large absorption band within the optical gap in the case of APPQ indicated an Urbach energy of approximately 250 meV.

3.14 Current–voltage and photovoltaic characteristics of APPQ-based heterojunction

A schematic diagram of the APPQ /n-Si heterojunction is shown in Fig.9 for measuring the dark current density–voltage (J–V) under the influence of light. The charge transport mechanism in the heterojunction based on APPQ was investigated using current–voltage measurements at a temperature of 300 K, shown in Fig. 10a. The measured current–voltage (J–V) characteristics show how diodes behave in both forward and reverse biases. At lower voltages, the current initially remained constant. However, the current demonstrated a steady increase above a turn-on voltage of roughly 1.4 V together with a series resistance of 100 K. Different transports inside the device are responsible for this behavior. The dark J–V characteristics are significant for evaluating the electrical characteristics of diodes and determining the heterojunction parameters. As shown in Fig. 10a, J–V measurements were used to assess the essential properties of the APPQ-based heterojunction. The rectification ratio at a bias voltage of 1.5 V and temperature of 300 K was approximately 120.

Fig. 9
figure 9

Schematic illustration of Au/ EHQPP/ n-Si/In heterojunction

Fig. 10
figure 10

a Dark J–V characteristics, b Loaded J–V characteristics under illumination of 80 mW/cm2 of APPQ–based heterojunction

The loaded current–voltage characteristics of the APPQ-based heterojunction under illumination of 80 mW/cm2 are shown in Fig. 10b. When the solar device is illuminated, the J–V curve is shifted down by the amount of photocurrent generated. The shifting of J–V curves in the fourth quadrant represents that the cell is a generator of electricity. From Fig. 10b, the fourth quadrant part is extracted for obtaining the solar cell parameters. The photocurrent at zero bias (Jsc), which represents the short-circuit current density, was calculated and found to be 5.05 × 10–4 A. The voltage at zero current, or the open-circuit voltage Voc, was measured to be 0.62 V. The J–V curves were affected significantly by varying the illumination intensity, proving that the APPQ /n-Si heterojunction is a strong candidate for photovoltaic and photodetector applications. The output power of the heterojunction can also be calculated as a function of the potential and was found to be 0.225 mW/cm2. The electron–hole pairs created by the incident light can improve the photovoltaic properties. This remarkable device setup additionally promoted the distinctive photovoltaic properties of APPQ-based devices.

Furthermore, the obtained photovoltaic parameters in our study were consistent with those documented by Zouhair et al. (2019), A. Aboulouard et al. (2021), Hachi et al. (2018), and Mandal et al. (2020). The calculated value was also assessed to explore the potential applications of the material in photovoltaics. Hence, the photovoltaic parameters collectively indicate the potential utilization of the APPQ/n-Si heterojunction as a photovoltaic device. This is attributed to the feasible electron injection process between APPQ and n-Si, along with subsequent regeneration, rendering it suitable for photovoltaic applications.

4 Conclusion

In summary, DFT was used to analyze the novel structure APPQ, which was created when substrate 1 reacted with phenylhydrazine. The optimized geometrical parameters including bond lengths, bond angles, and dihedral angles were calculated and compared with experimental data. Theoretical values for the 1H and 13C chemical shifts were also calculated and were found to be in very good agreement with the experimental results. The computations of the electronic properties including the UV–Vis spectra and electron transitions were compared with the experimental findings. The initial hyperpolarizability of APPQ is greater than most organic structures, a typical NLO material, making it a promising candidate for nonlinear optical applications. All theoretical results were in good agreement with the actual data, and the thermodynamic parameters and electronic absorption characteristics of the molecule were also obtained. An indirect allowed transition with an energy gap of 2.3 eV was observed in the APPQ absorption spectra. Based on the dark I–V characteristics of APPQ, thin films of heterojunction devices may exhibit good rectification properties. Compared to the majority of heterojunctions based on organic materials, the photovoltaic characteristics have a high Voc of 0.62 V and acceptable output power. The results show that APPQ-based nanostructured devices can be used in solar cell applications.