## 3 Results and Discussion
### Calculated vs. Experimental: The Explanation of Electrochemical Behavior  
In order to define the origin of the electrochemical activity of pyridones, it was essential to sum up their structure, bearing in mind pH dependency. DFT calculations were employed for the purpose of detailed structural characterization. Considering the presence of an acid proton present in the structure, it was expected that the examined compounds would be subjected to tautomerism and/or deprotonation depending on pH value. According to the calculations employed for pyridone **9**, more than one form was present in the solution, as depicted in Figure 5: three protonated forms (**9A**, **9B** and **9C**) and one deprotonated (**9D**) form. Moreover, the corresponding relative energies of the forms and their amounts are shown in Table 1. Corresponding geometries of the forms are provided in Supplementary Materials (Figure S3, Supplementary Materials). Calculations showed that the most stable protonated form of compound **9** corresponded to the structure protonated at C5 (**A** form), whereas the other protonated forms were present in significantly lower amounts. Considering that calculations in a vacuum gave inadequate results, they are not included in further discussion. The B3 LYP method in water showed too big of a difference between **9A** and other protonated forms, whereas the stability order was consistent with calculations obtained by the M06-2X method. It is interesting to state that these calculations proved that the deprotonation of all protonated forms led to a sole anionic form, depicted by the structure of **9D**. In order to reveal the presence of certain forms of compound **9** at different pH values, calculated UV-Vis spectra of the optimized geometries were compared with the border cases of experimentally obtained ones (pH 1.81 and pH 11.58). It was shown that peaks appearing at 210 nm and beneath overlapped with solvent absorption; therefore, the absorption peaks of **9A** and **9C** were difficult to detect in experimental UV-Vis spectra (Figure 6a). Therefore, as seen in Figure 6a, spectra obtained for compound **9** at pH 1.81 formally correspond to the optimized spectra of form **9B**. The dominant peak at 310 nm at a lower pH value shifted bathochromically to 316 nm with the rise of the pH value. Moreover, as seen in Figure 6a  
Figure 4: SWVs of the GC electrode in the presence of 5 \(\times\) 10\({}^{-4}\) M pyridones **5–9** in BR electrolyte with pH 1.81 (**a**) and in BR electrolyte with pH 9.94 (**b**). Accumulation time 2 s at E = \(-\)0.4 V (SCE); step size 5 mV; pulse size 25 mV; frequency 2 Hz; and scan rate 1 mV s\({}^{-1}\). Figure 6b depicts the distribution of frontier molecular orbitals (HOMO-LUMO) of the different forms of compound **9**, along with their energies and corresponding energy gaps. The lowest gap corresponds to **9D** (2.94 eV) which is in accordance with the UV-Vis absorption maximum of this form, which is bathochromically shifted compared to other forms of **9**. The largest energy gap can be observed for form **9A** with a corresponding absorption maximum at the lowest wavelength (250 nm). In Figure 6b, it can be observed that HOMO orbitals of forms **9B** and **9D** are mainly distributed over the pyridine ring, while in form **9A,** the HOMO orbital is dispersed over the whole molecule. The LUMO orbital of all three forms is localized over the pyridinium ring, suggesting that electron transfer occurs from the pyridine towards the pyridinium ring. According to pH-dependent UV-Vis spectra analyses and DFT calculations, the relationship between the electrochemical behavior and the structure of compound **9** (Figure 3) is as follows: acidic media (pH 1.81, 2.96 and 4.46) favored the protonated form, and peaks emerging in CV could be ascribed mainly to the oxidation of **9A** (Figure 5). With higher pH values (pH 6.4-11.98), the share of the protonated forms decreased, whereas the reaction current increased.