Introduction

Chemical sensors are devices that allow the determination, identification, and quantification of chemical species present in liquid or gaseous samples. Such devices are composed of chemically selective layers that interact with specific compounds, allowing their detection and quantification [1,2,3].

Among the varied classes of materials that can be employed as active components of chemical sensors, the organic polymers have attracted attention, mainly due to their relative low cost, ease of processing, and versatility of synthesis [4,5,6,7]. In this context, polythiophene derivatives, especially those having side groups, had lead to promising results [8].

The use of sensors based on PT derivatives is extensively reported in the literature. For example, the detection and inactivation of bacterial species in mammalian cells using biocompatible PT-based materials have been proposed [9, 10]. Other examples involve the detection of hydrazine (N2H2) using glassy carbon electrode modified with nanocomposites (PTH)/ZnO [11], the development and manufacturing of amine sensors by PT-based thin film transistors [12], and the use of electrolyte controlled thin film transistors for sensor applications [13].

Despite the number of works on design and characterization of new polymer-based chemical sensors, the interaction mechanisms are complex and difficult to describe [14,15,16,17]. In addition, the typical versatility of synthesis of polymeric materials allows the production of a wide range of to derivatives with varied properties. Recent studies have demonstrated that cyclic oligomers of PT can present unique properties, highlighting the interest in the evaluation/proposition of new PT-based derivatives [18]. However, the design of new compounds by trial and error is impractical from the experimental point of view. In this context, theoretical studies are relevant tools to guide experiments and predict the optoelectronic responses associated with the presence of analytes.

A number of works have reported the use of molecular modeling and simulation to evaluate the chemical sensing properties of the materials [19,20,21], including the evaluation of adsorption processes [22]. However, especially for polymers, most of these studies do not consider an appropriate saturation of the optoelectronic properties of oligomeric systems and details regarding the local reactivity are generally ignored.

In this report, structural, optoelectronic, and reactivity features of nine branched PT derivatives were investigated via electronic structure calculations to identify optimized materials for chemical sensor applications. Adsorption studies were conducted to evaluate the influence of analytes in the optoelectronic properties of the systems. The results indicate the derivatives PT-CCH and PT-CN as promising candidates, presenting high reactivity on side groups (more accessible/exposed sites in thin films). In particular, PT-CN presents promising sensory properties in the presence of a variety of gaseous compounds.

Material and methods

Material

Figure 1 presents the basic structure of PT derivatives considered in this report. The side groups (R) were chosen according to their Hammett indexes, which indicate the tendency of each group to insert or remove electrons in/from the resonant systems [23]. In addition, most of the monomeric units of these derivatives have already been synthesized, facilitating their production and application [24,25,26,27,28,29,30,31,32]. Table 1 presents the inductive (σI) and resonant (σR) Hammett parameters of the groups R. Positive values of are associated with electron withdrawing groups (EWG), while negative values define electron releasing ones (ERGs). Here we have employed the components of the Hammett indexes reported in reference [23].

Fig. 1
figure 1

Basic unit of PT derivatives

Table 1 Side groups considered in the present work and Hammett parameters associated with resonant (σR) and inductive (σI) effects [23]

Water (H2O), ammonia (NH3), hydrogen sulfide (H2S), and sulfur dioxide (SO2) were considered as analytes in the adsorption studies [7, 19, 33, 34]. Three distinct relative density of analytes were considered to investigate quantitative effects in the optoelectronic properties of the compounds: d1, d2, and d3 (i.e., 1, 2, and 3 analytes per oligomer).

Methodology

Oligomeric systems with different sizes of unmodified PT were initially designed and optimized to identify the effective conjugation length of the derivatives. The geometry optimization was conducted in a Hartree-Fock (HF) approach using the semi-empirical method PM6 as implemented in the computational package MOPAC2016 [35]. The choice of PM6 semiempirical method for geometry optimization was based on the number of atoms in the oligomer (higher than 184 atoms). In addition, a number of studies have shown that the use of PM6 semiempirical method in conjunction with DFT calculations can lead to reasonable reproduction of optoelectronic properties of polythiophene derivatives [36,37,38]. The dihedral angles of the oligomers were kept blocked in a planar configuration during the optimization to simulate typical morphologies of the main chains in thin films. Indeed, such planar subsegments are supposed to exist in the polymer thin film and dominate the opto-electronic responses of the devices. In addition, PT derivatives present high crystallinity, so that more planarized polymeric structures are indeed expected in solid state in comparison with solutions [36, 39, 40].

The optical properties of the optimized oligomers were evaluated in the framework of the time-dependent density functional theory (TD-DFT) [41, 42]. For this purpose, two distinct exchange-correlation hybrid functionals were employed: B3LYP [43,44,45,46] and M06HF [47]. B3LYP is widely used for the study of polymers; however, it presents some restrictions for the description of optical properties of extended structures [48,49,50,51]. In these cases, the use of functionals containing higher exact correlation, such as M06HF, has been proposed as an interesting alternative [50]. For both the cases, it was employed a split-valence double-zeta basis set 6-31G, on all the atoms. The saturation limit and effective conjugation length (neff) of the unmodified PT were analyzed by two extrapolation methods: (i) Meier [52, 53] and (ii) modified Kuhn (MK) [50, 54] (see Supplementary Information for details). Once the oligomeric model was defined, all the derivatives were designed with neff units and optimized in a HF/PM6 approach, blocking the main chain in the plane.

The position of reactive sites on the structure of PT-derivatives was evaluated via Condensed-to-Atomic Fukui Indices (CAFI) [55]. In the framework of conceptual DFT, these indices describe how the electron density of the molecule changes when its total number of electrons (N) is modified (without geometry relaxation). Considering the relative change of the number of electrons, three distinct CAFIs can be defined based on the external chemical species that are supposed to interact with the system: f+, f, and f0 which are associated with the reactivity towards nucleophiles, electrophiles, and free-radicals, respectively (see Supplementary Information for details). The molecular electrostatic potential (MEP) maps were also evaluated for the most relevant systems identified from CAFI analysis. In particular, recent studies indicate that the complementary analyses of CAFIs and MEPs allow the identification of relevant sites for analyte adsorption [56,57,58].

In general, the qualitative results associated with CAFIs are not so sensitive to the size of the basis sets employed in the calculations [55, 58]. To improve the description of the charged systems, a polarized Pople’s basis set was used here (DFT/B3LYP/6-31G(d,p)). Hirshfeld’s partitioning charge method was used to estimate the atomic electronic population to avoid controversial negative CAFI values [59]. The calculations were performed with the aid of Gaussian computational package [60].

Adsorption studies were conducted for 3 systems PT, PT-CN, and PT-CCH, selected from CAFI study. For this purpose, distinct number of analytes (d1 = 1, d2 = 2, and d3 = 3) were placed close to the most reactive sites of the derivatives. Preliminary studies conducted in our group have indicated that saturation effects are noticed for higher densities. The analytes were place on a same face of polymer main chain to mimetize the adsorption process in thin films. The geometries were then optimized in a HF/PM6 approach, considering the third generation of Grimme dispersion correction (PM6-D3), keeping the oligomer main chains blocked in the plane. Such restriction (planar oligomer) was imposed to avoid the dominance of conformational effects in the (electronic) responses on the derivatives. The influence of the analytes was evaluated from the structural distortion of polymer backbone, average adsorption energies, changes in the total density of electronic states (TDOS), and optical absorption spectra.

The structural changes induced by the analytes were estimated from the root mean square deviation of the atomic positions (RMSD-AP) of the adsorbed systems in relation to the isolated oligomers. RMSD-AP values were obtained with the aid QMol computational package [61], considering the alignment of sulfur atoms.

Average adsorption energies were evaluated for each relative density (d1, d2, and d3 for which n = 1, 2, and 3, respectively) (see Supplementary Information for details). No correction was considered to basis set superposition error (BSSE) once the geometries were optimized at a semiempirical level [62, 63].

The theoretical absorption spectra of the isolated and adsorbed PT-derivatives were obtained in a TD- DFT/B3LYP/6-31G approach, considering the first five singlet excitation states. The spectrum convolutions were performed with the aid of Gabedit computational package [64].

Results and discussions

Optoelectronic properties of PT derivatives: effect of side groups

Figure 2 and Table 2 illustrate the results coming from Meier and MK extrapolations of TDDFT/B3LYP/6-31G calculations. The MK (Meiers) fit leads to bandgap (main peak position) of around 2.0 eV (606 nm), which is consistent with values reported elsewhere [65, 66]. The larger deviations observed for M06HF XC functional motivated the use of B3LYP in the subsequent analyses (see Supplementary Information for details).

Fig. 2
figure 2

a Meier and b MK extrapolations data

Table 2 Meier and MK extrapolation data for unmodified polythiophene

Figure 3 illustrates the results coming from CAFI analysis for all the derivatives. Blue and red colors show the position of inert and reactive sites, respectively. The other colors indicate sites with intermediate reactivity according to a RGB scale (i.e., red > orange > yellow > green > blue).

Fig. 3
figure 3

Structure and CAFI obtained for a PT (unmodified), b PT-F, c PT-CH3, d PT-OH, e PT-NH2, f PT-CN, g PT-C6H5, h PT-CCH, i PT-NO2, and j PT-OCH3

Note that unmodified PT present high reactivity on the sulfur atoms, similarly to PT-F, PT-CH3 and PT-OH derivatives (Fig. 3b, c, and d). For PT-NH2, PT-C6H5, PT-NO2, and PT-OCH3 (Fig. 3e, g, i, and j), it is noticed a shift of the reactivity towards terminal regions, suggesting the existence of an efficient electropolymerization process in these systems, which is indeed reported for PT-C6H5 and PT-OCH3 [67, 68]. The asymmetries of the reactivities noticed for most of the branched systems are compatible with those reported for monomers and dimers of PT-derivatives [69]. Finally, PT-CN and PT-CCH show high reactivity mainly on the side groups. In particular, it is an interesting feature for chemical sensor applications, since the presence of reactive sites on more exposed regions tend to facilitate/improve the polymer-analyte interactions [56, 57]. Moreover, such feature leads to a protective effect on the polymer main chain, avoiding the rapid degradation of the polymer optoelectronic properties [56]. In this sense, the derivatives PT-CCH and PT-CN were selected for the adsorption studies. Unmodified PT system was also considered for comparison purposes. The relevance of the side groups in PT-CCH and PT-CN (charge accumulation) in relation to PT is evidenced from the analysis of MEPs (see Figure S2).

To better evaluate the influence of the side groups on the optoelectronic properties of PT systems, the energy of the frontier orbitals (highest occupied and lowest unoccupied molecular orbitals, HOMO and LUMO), and the variation of the electronic gaps in relation to unmodified PT were evaluated, as presented in Fig. 4.

Fig. 4
figure 4

a Effect of side groups in the energy of the frontier molecular orbitals and b the changes induced in the electronic gaps in relation to unmodified PT

Note that PT-OH, PT-CH3, PT-C6H5, PT-NH2, and PT-OCH3 have high HOMO levels (above 5 eV), which suggests that these derivatives present reduced chemical stability in relation to unmodified PT [70]. No significant changes are observed for PT-F and PT-CCH and increased stabilities are noticed for PT-CN and PT-NO2. The attachment of side groups leads to systems with reduced bandgaps, which is more evident for PT-OH, PT-NH2, PT-NO2, and PT-OCH3. In particular, the promising compounds identified by CAFI analysis show electronic gaps that are very similar to unmodified PT, suggesting a similar optoelectronic performance.

Figure 5 shows the TDOS around the frontier levels of the PT derivatives. The results were separated in three subgroups (based on their similarity) to facilitate the visualization. Shaded curve and dashed lines indicate the TDOS and HOMO/LUMO levels of unmodified PT.

Fig. 5
figure 5

Comparative analysis of the total density of states of the systems (unmodified PT is represented as shaded curves)

Note that unmodified PT and PT-F present very similar distributions of electronic states. Slight shifts of the frontier levels to higher energies (with small changes in the TDOS) are noticed for PT-CH3, PT-C6H5, and PT-CN, while shifts to lower energies are observed for PT-CCH. Appreciable changes around the original band gap of PT are noticed for PT-OH, PT-OCH3, PT-NH2, and especially for PT-NO2.

The theoretical absorption spectra of the systems are presented in Fig. 6 (see Table S1 for details). Note that the optical absorption of the derivatives is between those expected for polymer films and single crystals [71], mainly due to the spatial restrictions imposed to the chains during geometry optimizations. In general, the optical spectrum of unmodified PT consists of two peaks at 625 nm, associated with a \(\pi \rightarrow \pi ^{*}\) (HOMO-LUMO) transitions, which is higher than those estimated from Meier fit (Table 1), and at 547 nm, composed by HOMO-1→LUMO+ 1, HOMO-2→LUMO e HOMO→LUMO+ 2 transitions. Very similar optical responses are noticed for PT-CN and PT-C6H5 in relation to the unmodified PT, while slight red-shifts are observed for PT-CH3, PT-F, and PT-CCH derivatives. Significative bathochromic effects are noticed for PT-OCH3, PT-OH, and PT-NH2, with a quenching of the main peak amplitude. No significative absorption could be identified for PT-NO2 by considering only 5 transitions, i.e., only dark transitions are obtained for this derivative (see Supplementary Information for details).

Fig. 6
figure 6

Comparative analysis of the optical absorption spectra of the PT derivatives

Note that the side groups OCH3, OH, and NH2 lead to derivatives with absorbance in the infrared region, indicating them as promising materials for photovoltaic applications. Most of the others systems presents the main peaks at the visible range. Given the similarity between the optoelectronic properties of the derivatives and unmodified PT, most of the structures have been employed in varied devices. For instance, PT-CH3 [24, 72, 73] and PT-C6H5 [25, 74] based composites have been explored in electrochromic and electrochemical devices and for biological applications. PT-OCH3 composites have some relevant optoelectronic applications [26, 75]. PT-CN based structures have a wide range of applications in organic electronics as pure and composite material [28, 76]. PT-NO2 and PT-NH2 monomers have been employed for the adsorption of metallic ions in solution [29, 30, 77], and few works have reported the applications of PT-CCH [27, 78], PT-OH [31], and PT-F [32] in photovoltaics. In spite of these applications, most of these materials have been explored only as monomeric structures or as composites.

However, it is important to note the relevance of side groups in the position of frontier orbitals and optoelectronic properties that could be tuned for varied applications. For instance, despite presenting similar optical properties, the derivatives show distinct HOMO and LUMO levels which could be appropriately chosen to improve charge transfer, injection, and/or collection in organic devices (i.e., improving the matching with electrodes work functions and frontier levels of donor/acceptor materials). In this sense, to guide the search for new functional PT-based materials, multiple linear regressions (MLR) were conducted to establish quantitative relationships between Hammett parameters of side groups and the energy of Kohn-Sham frontier molecular orbitals (KS-FMO).

Figure 7 shows the most representative correlations obtained between HOMO and LUMO energies (EHOMO and ELUMO) and the Hammett parameters of the side groups.

Fig. 7
figure 7

Correlation between the energies of the frontier orbitals of the derivatives and the Hammett parameters of the ligands: a EHOMO and b ELUMO

Note that EHOMO and ELUMO values correlate negatively with σI and σR, similarly to that observed in polypyrrole and polyfuran-based systems [58, 79]. Correlation parameters of 0.94 and 0.96 were obtained between the predicted values of HOMO and LUMO (from MLR) and those coming from DFT calculations, respectively. In general, it is noticed that the KS-FMO energies decrease when stronger electron withdrawing groups are attached to the PT unit. It is noticed a dominance of resonant and inductive effects on the HOMO and LUMO, respectively. It is interesting to highlight that the set of simple linear equations provided in Fig. 7 can guide the search for new PT derivatives for varied applications only by considering tabulated Hammett indexes of the substituents.

Adsorption studies

Due to the high reactivity on the side groups, the derivatives PT-CCH and PT-CN were selected for the adsorption studies. Unmodified PT were also considered for comparison. Figure 8 presents the influence of the analytes on the structural features of these systems after geometry optimization.

Fig. 8
figure 8

Structural changes of PT, PT-CCH and PT-CN main chains in the presence of a H2O, b H2S, c NH3, and d SO2 analytes

It is possible to note that the unmodified PT present less expressive distortions regardless the type and relative concentration of the analytes. On the other hand, PT-CN presents the highest degree of changes for the different chemical species. Intermediary effects are noticed for PT-CCH. This result suggests a more effective interaction of the derivatives PT-CN and PT-CCH with the analytes.

An interesting feature shown in Fig. 8 is the less expressive structural changes observed for d2 densities (2 analytes per oligomer). This result can be linked to the absence of analytes at the central region of the oligomeric chains, which apparently leads to more expressive distortions in the systems. This effect is not noticed for SO2, in which a proportionality between the structural changes and the number of analytes is observed.

Another relevant feature is the high distortion of PT-CN/NH3 system at d3 density. A detailed analysis of the system indicates the formation of N(analyte)-S(oligomer) chemical bindings after adsorption, suggesting that the polymer-analyte interaction can be accompanied by the chemical degradation of the polymer. This effect was not observed for the other densities but points out the plausibility of the interaction between the NH3 and sulfur atoms of the main chain as already observed in other systems [80], probably due to the nitrogen lone pair.

Figure 9 presents the average values of adsorption energies obtained for each derivative-analyte system.

Fig. 9
figure 9

Average adsorption energy between oligomers and analytes

It is noticed a significant variation of the adsorption energies among the systems. In particular, PT-CN presents the highest binding energies for all the analytes, which is less expressive for H2S. The higher standard deviation noticed for PT-CN/NH3 system is linked to degradation effects noticed at d3. These results indicate PT-CN as an optimized derivative for chemical sensor applications in comparison to unmodified PT. Anomalous results are noticed for PT-CCH, with (a slightly) stronger interaction with H2O and NH3. The adsorption energies obtained for unmodified PT are compatible with those reported by Shokuhi Rad et al [19].

Figure 10 shows the TDOS of unmodified PT, PT-CCH, and PT-CN, respectively, before and after the adsorption of H2O, H2S, NH3, and SO2. The shaded areas represent the TDOS of isolated oligomers, red, green, and blue lines represent, respectively, the relative densities d1, d2, and d3.

Fig. 10
figure 10

TDOS of a PT, b PT-CCH, and c PT-CN isolated and after the adsorption with H2O, H2S, NH3, and SO2 analytes at three distinct densities d1, d2, and d3

The results allow us to estimate the influence of the analytes in the optical and electrical response of the systems. In general, it is noted that the presence of SO2 leads to the formation of additional levels within the derivatives bandgaps (between − 3.5 and − 4.0 eV), more specifically around the HOMO of the unmodified PT and PT-CCH, and on the LUMO of PT-CN. This effect depends on the relative density of analytes. The new levels are localized over the analytes and can act as doping/trapping centers for electronic charge carriers. Indeed, the strong effects of SO2 on the derivatives are consistent with a recent study reported by Shokuhi Rad, which suggests the efficient detection of SOx by polythiophene derivatives [7].

The presence of H2O and H2S does not lead to significant changes around the frontier levels of the compounds. For these analytes, the formation of new levels is noticed around − 7.0 and − 8.0 eV. Some slight changes are observed for PT-CN/H2O system with a displacement of the HOMO and LUMO to higher energies.

Non expressive changes are observed for the PT/NH3 and PT-CCH/NH3 systems. On the other hand, relevant HOMO/ LUMO energy offsets are noticed for PT-CN/NH3, especially for d3 with a slight increase of electronic gap, that is consistent with the high structural distortions reported in Fig. 8.

Given the typical hole transport property of PT-based materials, the changes induced around the HOMO of the derivatives are of great relevance in their electronic responses [81]. In fact, varied responses can be expected depending on the architecture of the devices and on the monitored properties. For instance, the displacement of the occupied levels to high energies can lead to a reduction of intrinsic hole injection barriers, facilitating the injection/collection of charges at electrode/polymer interface and influencing the electrical current of the PT-based devices. Inside the bulk, such sites can act as charge traps, leading to an intensification of space-charge effects, that can reflect in significative changes in the charge transport and capacitance of the systems. Another important feature that must be considered is the reduction of the bandgap noticed for SO2. This effect suggests a drastic change in the optoelectronic properties of the systems after SO2 adsorption.

Indeed, the effect of the analytes on the electronic structure of the adsorbed systems can be interpreted considering the relative alignments between the FMOs of the constituents (oligomer and the analytes, see Fig. 5 and S5) [58]. In this sense, SO2 inserts unoccupied energy levels into the electronic gap of the derivatives, changing most of their electronic properties after the adsorption. Some interaction is also expected for NH3 with derivatives with low LUMO levels (e.g., PT-CN). In this sense, considering the FMOs of atmospheric compounds (see Fig. S5), no significant effects on PT properties should be expected for N2 and CO2. On the other hand, strong interactions could be noticed for O2 on the PT-derivatives with higher LUMOs, including the unmodified compound, that can explain the charge transfer associated with the degradation of PT-based compounds [82]. In particular, the absence of effective energy levels alignments with atmospheric gases indicates that PT-CN could be employed as a very selective chemical sensor for SO2 and NH3, even with the exposition to the atmosphere.

Figure 11 shows the theoretical optical absorption spectra of the systems before and after adsorptions. The results obtained for PT/SO2 and PT-CCH/SO2 were not displayed due to the low intensity of the first 5 transitions. In particular, this characteristic is associated with low overlap between the resulting frontier orbitals, e.g., the LUMO is very located on the analytes while the HOMO lies on the polymer main chain (see Supplementary Information).

Fig. 11
figure 11

Theoretical optical absorption spectra of the systems a PT/H2O, PT/H2S, PT/NH3; b PT-CCH/H2O, PT-CCH/H2S, PT-CCH/NH3; and c PT-CN/H2O, PT-CN/H2S, PT-CN/NH3, and PT-CN/SO2 at three distinct relative densities d1 (red), d2 (green), and d3 (blue)

Slight changes are noticed for unmodified PT, with more significant bathochromic effects for H2O, that do not depend on the relative density of analytes (no quantitative responses). No significant changes are noticed for PT-CCH systems. Concerning the PT-CN, red-shifts are noticed for H2O, NH3, and SO2 for all the densities. The dissonant effect obtained for NH3 at d3 is associated with polymer degradation.

All derivatives show significant changes due to the presence of SO2, which is mainly associated with the formation of new localized states in the polymer band gap. In the case of PT-CN, given the smaller changes of the HOMO and LUMO, the effect of SO2 is not so drastic, allowing its detection in a more quantitative way.

In general, the optical responses indicate low sensitivity of the systems to the presence of the analytes. This effect was expected and is associated with the spatial restriction imposed on the polymer main chain during optimization. It is noteworthy that the results presented above should be enhanced in real systems, where a higher conformational flexibility is expected. In this context, considerable optical response should be expected for PT in relation to H2O; and PT-CN with respect to all the analytes, evidencing the enhanced response of the branched system for chemical sensor applications.

Conclusions

Structural, electronic, optical, and reactivity properties of branched polythiophene derivatives were evaluated to identify optimized compounds for chemical sensor applications and assess details of the polymer-analyte interactions.

Comparative analysis between the different derivatives indicates that the presence of side groups can lead to significant variations in the optoelectronic properties of PT derivatives. In particular, it is observed that a suitable choice of the substituents can lead to systems with higher reactivity on more accessible regions that is promising for chemical sensor applications, in particular for PT-CCH and PT-CN derivatives.

Adsorption studies indicate PT-CN as the most promising candidate, presenting relevant optoelectronic properties, increased stability against oxidizing agents and significative structural and optoelectronic response to the presence of all the analytes.