Introduction

Most organic compounds use as inhibitors for the corrosion of mild steel have functional groups (such as carboxyl, amino and carbonyl functional groups) that facilitate their adsorption on the metal surface [13]. For this group of inhibitors, the presence of hetero atoms such as N, O, S and P often enhance the adsorption characteristics of the inhibitors [4].

It has been established that the initial mechanism involved in any corrosion inhibition process is the adsorption of the inhibitor on the metal surface. This adsorption may be through charge transfer (physical adsorption) or donation and acceptance of electron (chemical adsorption) [5]. This implies that the corrosion inhibition process involves an electrophile (usually the metal) and nucleophile (usually the inhibitor) [5].

Some research groups have successfully investigated the effectiveness of some drugs toward the inhibition of the corrosion of metals (including mild steel, aluminum, etc.) in acidic medium [613]. In their respective studies, the drugs are found to be good corrosion inhibitors for the corrosion of metals. Also, several attempts have been made to predict corrosion inhibition efficiency using a number of individual parameters obtained through quantum chemical calculation methods [14]. These trials are often aimed at correlating corrosion inhibition efficiency and some quantum molecular properties such as Frontier molecular energies (energy of the HOMO, EHOMO, and the energy of the LUMO, ELUMO), dipole moment (μ), Mulliken/Lowdin/Heirsfield charges (q) as well as some structural parameters. However, to the knowledge of the authors, this study has not been extended to the inhibition properties of Penicillin G (Pen G), Amoxicillin (Amox) and Penicillin V Potassium (Pen VK) for the corrosion of mild steel in HCl. Therefore, the present study is aimed at investigating inhibitive and adsorption properties of Pen G, Amox and Pen VK. Some quantum chemical calculations shall be carried out to predict the direction of the inhibition process. Density functional theory (DFT) shall be used to predict the possible sites for electrophilic and nucleophilic attacks. The DFT study shall be supported by calculation of potential surface using extended Huckel theory and the identification of HOMO and LUMO diagrams of the inhibitors. Finally, quantitative structure activity relation (QSAR) shall be used to calculate theoretical values for the inhibition efficiency of the inhibitors. The QSAR shall be supported by response surface analysis.

Pen G, Amox and Pen VK are Penicillin compounds whose molecular mass are 372.48, 365.40 and 388.47 g mol-1, respectively. The chemical and optimized structures of Pen G, Amox and Pen VK are presented in Fig. 1. From their structure, it is evident that these compounds have some functional groups as well as some hetero atoms. Consequently, they are expected to be good corrosion inhibitors.

Fig. 1
figure 1

Chemical and optimized structures of Pen G, Amox and Pen VK

Experimental techniques

Materials

Materials used for the study were mild steel sheet of composition (wt %); Mn (0.6), P (0.36), C (0.15) and Si (0.03) and the rest Fe. The sheet was mechanically pressed cut into different coupons, each of dimension, 5 × 4 × 0.11 cm. Each coupon was degreased by washing with ethanol, dipped in acetone and allowed to dry in air before they were preserved in a desicator. All reagents used for the study were Analar grade and double distilled water was used for their preparation.

The inhibitors were supplied by LIVEMOORE Pharmaceutical Company, Ikot Ekpene, Akwa Ibom State, Nigeria and were used without further purification. The concentrations range for the used inhibitors was 2 × 10-4 to 13 × 10-4 M. Each of these concentrations was dissolved in 0.1 M and 2.5 M HCl and preserved in a plastic container for use in gravimetric and gasometric experiments respectively.

Gravimetric method

In the gravimetric experiment, a previously weighed metal (mild steel) coupon was completely immersed in 250 ml of the test solution in an open beaker. The beaker was inserted into a water bath maintained at 303 K. After every 24 hours, the corrosion product was removed by washing each coupon (withdrawn from the test solution) in a solution containing 50% NaOH and 100 g L-1 of zinc dust. The washed coupon was rinsed in acetone and dried in the air before re-weighing. The difference in weight for a period of 168 h was taken as the total weight loss. From the weight loss results, the inhibition efficiency (Eexp) of the inhibitor, the degree of surface coverage (θ) and the corrosion rate of mild steel (CR) were calculated using Eqs. 1 to 3 respectively [1517];

$$ {{\hbox{E}}_{{ \exp }}} = \left( {{1}--{{\hbox{W}}_1}/{{\hbox{W}}_2}} \right) \times {1}00 $$
(1)
$$ {{\theta }} = {1 } - { }{{\hbox{W}}_1}/{{\hbox{W}}_2} $$
(2)
$$ {\hbox{CR}} = \Delta {\hbox{W}}/{\hbox{At}} $$
(3)

where W1 and W2 are the weight losses (g) for mild steel in the presence and absence of the inhibitor, θ is the degree of surface coverage of the inhibitor, \( \Delta {\hbox{W}} = {{\hbox{W}}_2}--{ }{{\hbox{W}}_1} \), A is the area of the mild steel coupon (in cm2), t is the period of immersion (in hours) and W is the weight loss of mild steel after time, t.

Gasometric method

Gasometric methods were carried out at 303 K as described in the literature [18, 19]. From the volume of hydrogen gas evolved per minute, inhibition efficiencies were calculated using Eq. 4.

$$ \;{{\hbox{E}}_{{ \exp }}} = \left( {1 - \frac{{V_{Ht}^1}}{{V_{Ht}^o}}} \right)\; \times \;100 $$
(4)

where \( V_{Ht}^1 \) and \( V_{Ht}^o \) are the volumes of H2 gas evolved at time, ‘t’ for inhibited and uninhibited solutions respectively.

Quantum chemical calculations

Single point energy calculations were carried out using AM1, PM6, PM3, MNDO and RM1 Hamiltonians in the MOPAC 2008 software for Windows. Calculations were performed on an Hp compatible Intel Pentium V (2.8 GHz, 4 GB RAM) computer. The following quantum chemical indices were calculated: the energy of the highest occupied molecular orbital (EHOMO), the energy of the lowest unoccupied molecular orbital (ELUMO), the dipole moment (µ), the total energy (TE), the electronic energy (EE), the ionization potential, the cosmo area (cosAr) and the cosmo volume (CosVol).

The Mulliken and Lowdin charges (q) for nucleophilic and electrophilic attacks were computed using GAMES computational softwares. Correlation type and method used for the calculation was MP2 while the basis set was MINI.

Statistical analyses were performed using SPSS program version 15.0 for Windows. Non-linear regression analyses were performed by unconstrained sum of squared residuals for loss function and estimation methods of Levenberg-Marquardt using SPSS program version 15.0 for Windows. Response surface analysis was carried out using Design expert (version 7.1.6) software.

Results and discussion

Effect of inhibitors’ concentration

Figure 2 shows the variation of weight loss of mild steel with concentration for the corrosion of mild steel in 0.1 M HCl containing various concentration of Pen G at 303 K. Similar plots were also obtained for Amox and Pen VK (plots not shown). From Fig. 2, it is evident that weight loss of mild steel for the blank (0.1 M HCl) is higher than those obtained for solutions of HCl containing various concentrations of the inhibitor(s) indicating that the corrosion rates of mild steel in HCl solutions is retarded by these inhibitors. Weight loss of mild steel was also found to decrease with decreasing temperature but increased with increase in the concentration of the inhibitors indicating that the inhibition efficiencies of the inhibitors increase with increasing concentration but decrease with increase in temperature. These also suggest that the inhibitors are adsorption inhibitors and that their adsorption is consistent with the mechanism of physical adsorption [20]. Literature reveals that for a physical adsorption mechanism, the inhibition efficiency of the inhibitor decreases with increasing temperature but for a chemical adsorption mechanism, the inhibition efficiency increases with increasing temperature [21].

Fig. 2
figure 2

Variation of weight loss with time for the corrosion of mild steel in 0.1 M HCl containing various concentrations of (a) Pen G (b) Amox (c) Pen VK at 303 K respectively. d represent the plot of weight loss versus time for the corrosion of mild steel in 0.1 M HCl (blank) at 303 K

Table 1 presents the inhibition efficiencies of various concentrations of Pen G, Amox and Pen VK for the corrosion of mild steel in 0.1 M HCl at 303 and 333 K. The corrosion rates of mild steel in similar media are also presented in Table 1. Table 1 confirms that the corrosion rates of mild steel decrease with decreasing concentration of the inhibitors but decrease with increase in temperature. Also, the inhibition efficiencies of the inhibitors increase with increasing concentration of the inhibitors but decrease with increase in temperature. It was also observed that values of inhibition efficiency obtained from gasometric analysis are comparable to those obtained from gravimetric method.

Table 1 Corrosion rates of mild steel in various media and inhibition efficiencies of Pen G, Amox and Pen VK for the corrosion of mild steel in HCl at various temperatures

Effect of temperature

The activation energies for the corrosion of mild steel in HCl solutions (containing various concentrations of the inhibitors) were calculated using the logarithm form of the Arrhenius equation (Eq. 5) [22]

$$ \log \frac{{C{R_2}}}{{C{R_1}}} = \frac{{{E_a}}}{{2.303R}}\left( {\frac{1}{{{T_1}}} - \frac{1}{{{T_2}}}} \right) $$
(5)

where Ea is the activation energy, R is the gas constant, CR1 and CR2 are the corrosion rates of mild steel at the temperatures, T1 (303 K) and T2 (333 K) respectively. Values of Ea calculated from Eq. 5 are presented in Table 2. From the results obtained, the activation energies for the corrosion of mild steel in the presence of the inhibitors are lower than the value obtained for the blank and are also lower than the threshold value of 80 kJ mol-1 required for the mechanism of chemical adsorption. Therefore, the adsorption of Pen G, Amox and Pen VK on mild steel surface supports the mechanism of physical adsorption [23].

Table 2 Some thermodynamics parameters for the adsorption of Pen G, Amox and Pen VK

Thermodynamics/adsorption considerations

In order to calculate the heat of adsorption (Qads) of the inhibitors on mild steel surface, Eq. 6 was used [24]:

$$ {Q_{ads}} = 2.303R\left[ {\log \left( {\frac{{{\theta_2}}}{{1 - {\theta_2}}}} \right) - \log \left( {\frac{{{\theta_1}}}{{1 - {\theta_1}}}} \right)} \right] \times \left( {\frac{{{T_{1X}}{T_2}}}{{{T_2} - {T_1}}}} \right)kJmo{l^{ - 1}} $$
(6)

where θ2 and θ1 are the degrees of surface coverage of the inhibitor at the temperatures, 333 K (T2) and 303 K (T1) respectively. R is the gas constant. Calculated values of Qads are also presented in Table 2. From the results obtained, it can be seen that the adsorption of the inhibitors on mild steel surface is exothermic.

The adsorption characteristics of the inhibitors was verified by fitting data obtained for the degree of surface coverage (θ) into different adsorption isotherms including Langmuir, Freundlich, Temkin, Flory Huggins, Bockris-Swinkle, Frumkin and El Awardy et al. adsorption isotherms. The tests reveal that the adsorption of Pen G, Amox and Pen VK is consistent with Langmuir adsorption model. The Langmuir adsorption model relates the degree of surface coverage of the inhibitor (θ) to the its concentration as follows [25],

$$ {{\theta }} = {\hbox{KC}} \times {1/}\left( {{1} + {\hbox{KC}}} \right) $$
(7)

where K designates the adsorption equilibrium constant and C is the concentration of the inhibitor in the bulk solution. From the rearrangement of Eqs. 6, 8 and 9 are obtained,

$$ {\text{1}}/{\text{K}} + {\text{C}} = {\text{C}}/\theta $$
(8)
$$ { \log }\left( {{\hbox{C}}/{{\theta }}} \right) = {\hbox{logC}} - {\hbox{logK}}. $$
(9)

Using Eq. 9, plots of log(C/θ) versus logC are expected to be linear provided the assumptions establishing the Langmuir adsorption isotherm are valid. Figure 3 shows Langmuir isotherms for the adsorption of Pen G, Amox and Pen VK on mild steel surface. Values of Langmuir adsorption parameters deduced from the plots are recorded in Table 3. Table 3 reveals that the slopes and the R2 values are very close to unity indicating strong adherence of the adsorbed inhibitors to the assumptions of Langmuir [26].

Fig. 3
figure 3

Langmuir isotherm for the adsorption of Pen G, Amox and Pen VK at 303 and 333 K

Table 3 Langmuir parameters for the adsorption for Pen G, Amox and Pen VK on mild steel surface

The equilibrium constant of adsorption obtained from the slopes of the Langmuir isotherms were used to calculate the free energies for the adsorption of Pen G, Amox and Pen VK on the surface of mild steel. The free energy of adsorption of an inhibitor is related to the equilibrium constant of adsorption according to Eq. 10 [27],

$$ \Delta {\hbox{G}}_{{ads}}^0 = - {2}.{3}0{\hbox{3RTlog}}\left( {{55}.{\hbox{5K}}} \right) $$
(10)

where K is the equilibrium constant of adsorption, 55.5 is the molar concentration of water, ΔGads is the free energy of adsorption of the inhibitor, R is the gas constant and T is the temperature. The free energies calculated from Eq. 9 are also presented in Table 3. From the results, it is significant to note that the free energies of adsorption are less than the threshold value of -40 kJ mol-1 required for chemical adsorption. This result is consistent with electrostatic transfer of charge from the inhibitor to the metal surface and supports the mechanism of physical adsorption [28]

Quantum chemical study

From the experimental study, it is found that Pen G, Amox and Pen VK are good adsorption inhibitors for the corrosion of mild steel in HCl solutions. However, an insight into the correlation between the molecular properties of these compounds and their inhibition potential were not provided in the experimental approach. In this section, a theoretical study of the inhibitors is presented. The inhibition potentials of the compounds are correlated with molecular properties including the Frontier molecular energies, the Mulliken and Lowdin charges, the dipole moment, the cosmo area, cosmo volume, ionization potential, electron affinity, global hardness, global softness and electronegativity.

Table 4 presents values of quantum chemical parameters calculated through semi-empirical approach. The energy of the Frontier molecular orbital is often associated with the reactivity of a molecule. The energy of the highest occupied molecular orbital (EHOMO) is an index for predicting the ease of electron donation while the energy of the lowest occupied molecular orbital (ELUMO) represents the tendency toward the acceptance of electron [29]. Therefore increasing value of EHOMO indicates the disposition of the inhibitor to donate an electron to the vacant d-orbital of the metal. This may lead to enhancement of the inhibition efficiency through better adsorption. From the results of the study, it is evident that the order for the decrease in the EHOMO of the inhibitors (i.e., Pen G > Amox > Pen VK) is consistent with the order obtained for the decrease in the average inhibition efficiencies of the inhibitors. It is also significant to point out that EHOMO is related to the ionization potential (IP) of a molecule. This explains why the value of correlation coefficient (r) between EHOMO and IP was -1.00.

Table 4 Calculated quantum chemical parameters of Pen G, Amox and Pen VK

It has also been found that an inhibitor does not only donate an electron to the unoccupied d orbital of the metal ion but can also accept electrons from the d orbital of the metal leading to the formation of a feedback bond. Therefore, the tendency for the formation of a feedback bond would depend on the value of ELUMO. The lower the ELUMO, the easier is the acceptance of electrons from the d-orbital of the metal [30]. Based on the values of ELUMO, the order obtained for the decrease in inhibition efficiency (Pen G > Amox > Pen VK) was also similar to the one obtained from experimental results.

The energy gap \( \left( {\Delta {\hbox{E}} = {{\hbox{E}}_{{LUMO}}} - { }{{\hbox{E}}_{\rm{HOMO}}}} \right) \) is an important stability index [31]. A large energy gap implies that in a chemical reaction, the molecule is stable and vice versa. A hard molecule has a large energy gap while a soft molecule has a small energy gap. Therefore a soft molecule is more reactive than a hard molecule because a decrease in ΔE leads to easier polarization. Consequently, the inhibition efficiency of the inhibitors is expected to increase with decreasing value of the energy gap [32]. The results obtained from quantum chemical calculations show that for all the Hamiltonians (PM6, PM3, AM1 and MNDO), the energy gap decreases in the following order, Pen G > Amox > Pen VK, which agrees with the experimental results.

The dipole moment (μ) is an index that can also be used for the prediction of the direction of a corrosion inhibition process. μ is related to the distribution of electrons in a molecule. Although literature is inconsistent on the use of μ as a predictor for the direction of a corrosion inhibition reaction, it is generally agreed that the adsorption of polar compounds possessing high dipole moments on the metal surface should lead to better inhibition efficiency [33]. From the results of experimental and theoretical studies, the inhibition efficiency of Pen G is the highest while that of Pen VK is the least. Therefore, these results do not support the assumption that the inhibitor with the highest value of μ is the best inhibitor because Pen VK (which has the least inhibition efficiency) has the highest value of μ. Similar deviation from this assumptions have been reported by other researchers [34].

The relationship between the total energy (TE), electronic energy (EE), core-core repulsion energy (C-C), cosmo area (CosAr) and cosmo volume (CosVol) of the inhibitors and their average inhibition efficiencies was also studied and it was found that these parameters increase with increasing value of inhibition efficiency and support the order (Pen G > Amox > Pen VK) obtained from experimental results and other quantum chemical parameters.

Quantitative structure activity relationship (QSAR)

QSAR can be used to relate the inhibition efficiency of most inhibitors to structure parameters (quantum and topological) which can be theoretically calculated with the ultimate aim of obtaining a molecular design of new corrosion inhibitors. El Ashry et al. [35], stated that QSAR is a useful tool for the development of new corrosion inhibitors. This arises from the fact that the development of equations for calculating the corrosion inhibition efficiency may lead to a prediction of the efficiency of new inhibitors that are structurally related.

Attempts were made to correlate the average inhibition efficiencies of the inhibitors with some quantum chemical parameters. Figure 4 shows the plots for the variation of the experimental inhibition efficiencies of the inhibitors with some quantum chemical parameters. From the plots it can be seen that there is a strong linear relationship (R2 ranged from 0.840 to 0.999) between the inhibition efficiencies of the inhibitors and the observed quantum chemical parameters. The quantum chemical parameters used for the plotting of Fig. 4 are those obtained from PM6 calculations. Plots for PM3, AM1 and MNDO Hamiltonians are not shown but R2 values for these models were found to range from 0.876 to 0.999 (which still indicated high correlations). The equation representing the respective variation of inhibition efficiency (y-axis) with the observed quantum chemical parameters (x-axis) are also indicated in the plots. Figure 4 further indicates that there is a strong correlation between the inhibition efficiencies of the inhibitors and the calculated quantum chemical parameters.

Fig. 4
figure 4

Variation of experimental inhibition efficiencies (Eexp) of the inhibitors with (a) HOMO energy, (b) LUMO energy (c) Energy gap (d) Cosmo area (e) Cosmo volume and (f) Ionization potential (IP) using PM6 model

To further establish the formation of a feedback bond, multiple linear regressions were performed between the experimental inhibition efficiencies and the energy of the HOMO and the LUMO. The regressions yielded Eqs. 11, 12, 13 and 14 for PM6, PM3, AM1 and MNDO models respectively,

$$ {{\hbox{E}}_{{ \exp }}} = 0.{4831}{{\hbox{E}}_{{HOMO}}} + {1}.{131}{{\hbox{E}}_{{LUMO}}} + {1}0{6}.{6481} $$
(11)
$$ {{\hbox{E}}_{{ \exp }}} = 0.{4634}{{\hbox{E}}_{\rm{HOMO}}} + {1}.0{89}{{\hbox{E}}_{\rm{LUMO}}} + { 58}.{9}0{82} $$
(12)
$$ {{\hbox{E}}_{{ \exp }}} = {3}.{1982}{{\hbox{E}}_{\rm{HOMO}}} + 0.{3766}{{\hbox{E}}_{{LUMO}}} + 0.0{552} $$
(13)
$$ {{\hbox{E}}_{{ \exp }}} = {1}.{8222}{{\hbox{E}}_{{HOMO}}} + { }0.{23}0{3}{{\hbox{E}}_{{LUMO}}} + { }0.000{3}. $$
(14)

The positive value obtained for the coefficients of EHOMO and ELUMO (Eqs. 11 to 14) suggests that the formation of a feedback bond is dependent on the synergistic interaction of ELUMO and EHOMO. Figure 5 shows the response surface plot for the effect of EHOMO and ELUMO (keeping other effects constant) on the inhibition efficiency of the inhibitors. The information reveals by this 3D plot is consistent with the findings expressed by Eqs. 11 to 14. The response surface plots for other Hamiltonians (PM3, AM1 and MNDO) are not presented but were found to reveal information similar to the ones obtained from PM6 model. On the other hand, when all the quantum chemical parameters (namely, EHOMO, ELUMO, ELUMO-HOMO, TE, EE, C-C, CosAr, CosV, IP and μ) were used for the modeling, it was difficult to establish a simple relation (such as the ones expressed by Eqs. 11 to 14). This implies that there exists a complex nature of interactions (between the various quantum chemical parameters) in the corrosion inhibition process.

Fig. 5
figure 5

Response surface plot showing the variation of experimental inhibition efficiency with EHOMO and ELUMO (other variables held constant; ELUMO-HOMO = 7.77e V, TE = -3780 eV, EE = -30800 eV, C-C = 27500 eV, CosAr = 348 , CosVol = 413, IP = 8.75 eV and μ = 9.42 eV) obtained from PM6 model

The linear model approximate inhibition efficiency (ETheor) as follows [36]

$$ {{\hbox{E}}_{{Theor}}} = {\hbox{A}}{{\hbox{x}}_{{i}}}{\hbox{C}} + {\hbox{B}} $$
(15)

where A and B are the regression coefficients determined by regression analysis, xi is a quantum chemical index characteristic of the molecule i, C is the experimental concentration of the inhibitor. The above linear approach did not give a good correlation between the experimental and theoretical inhibition efficiencies therefore, a non linear model (Eq. 15) proposed by Lukovitis et al., [37], for the study of interaction of corrosion inhibitors with metal surface in acidic solutions has been used. This model is based on the Langmuir adsorption isotherm which assumes that the coverage of the metal surface by the inhibitor’s molecule is the primary cause of corrosion inhibition [38]

$$ {{\hbox{E}}_{{Theor}}}\left( \% \right) = \frac{{\left( {{\text{A}}{{\text{x}}_{{j}}}{\text{ + B}}} \right) \times {{\text{C}}_{{i}}} \times 100}}{{1 + \left( {{\hbox{A}}{{\hbox{x}}_{{j}}} + {\hbox{B}}} \right){{\hbox{C}}_{{i}}}}}. $$
(16)

Using the non linear model, multiple regressions were performed between the inhibition efficiencies of the inhibitors and some quantum chemical indices. By solving Eq. 16 for the different Hamiltonians Eqs. 17 to 20 were obtained for PM6, PM3, AM1 and MNDO, respectively.

$$ {\hbox{E}} = \frac{{\left( {0.966{{\text{E}}_{{HOMO}}} + {\text{LUMO}} + 0.9992\cos {\text{Vol}} + {\text{IP}} + {{\mu }} + 154.975} \right) \times {\text{C}} \times 100}}{{\left( {1 + \left( {0.966{{\hbox{E}}_{{HOMO}}} + {\hbox{LUMO}} + 0.9992\cos {\hbox{Vol}} + {\hbox{IP}} + {{\mu }} + 154.975} \right)} \right.}} $$
(17)
$$ {\text{E}} = \frac{{\left( {0.965{{\text{E}}_{{\text{HOMO}}}} + {\text{LUMO}} + 0.9998\cos {\text{Vol}} + {\text{IP}} + \mu + 118.87} \right) \times {\text{C}} \times 100}}{{\left( {1 + \left( {0.966{{\text{E}}_{{\text{HOMO}}}} + {\text{LUMO}} + 0.9992\cos {\text{Vol}} + {\text{IP}} + \mu + 154.975} \right)} \right.}} $$
(18)
$$ {\hbox{E}} = \frac{{\left( {0.964{{\text{E}}_{{HOMO}}} + {\text{LUMO}} + 0.9995\cos {\text{Vol}} + {\text{IP}} + {{\mu }} + 134.64} \right) \times {\text{C}} \times 100}}{{\left( {1 + \left( {0.964{{\hbox{E}}_{{HOMO}}} + {\hbox{LUMO}} + 0.9995\cos {\hbox{Vol}} + {\hbox{IP}} + {{\mu }} + 134.64} \right)} \right.}} $$
(19)
$$ {\hbox{E}} = \frac{{\left( {0.965{{\text{E}}_{{HOMO}}} + {\text{LUMO}} + 0.9994\cos {\text{Vol}} + {\text{IP}} + {{\mu }} + 138.44} \right) \times {\text{C}} \times 100}}{{\left( {1 + \left( {0.965{{\hbox{E}}_{{HOMO}}} + {\hbox{LUMO}} + 0.9994\cos {\hbox{Vol}} + {\hbox{IP}} + {{\mu }} + 138.44} \right)} \right.}} $$
(20)

Values of theoretical inhibition efficiencies obtained for the different models, using Eqs. 17 to 20 are presented in Table 5 while the variation of the experimental inhibition efficiencies with the theoretical inhibition efficiencies (calculated for the various Hamiltonians) are presented in Figs. 6, 7, and 8. It can be seen from the figures that the correlations between the experimental inhibition efficiencies and the theoretical inhibition efficiencies are high (R2 ≈ 1.0) indicating that QSAR can adequately be used to study the corrosion inhibition behavior of Penicillin compounds.

Table 5 Theoretical inhibition efficiencies of Pen G, Amox and Pen VK obtained from various models
Fig. 6
figure 6

Variation of experimental inhibition efficiency (Eexp) of Pen G with the theoretical inhibition efficiencies (ETheor) obtained from various models

Fig. 7
figure 7

Variation of experimental inhibition efficiency (Eexp) of Amox with the theoretical inhibition efficiencies (ETheor) obtained from various models

Fig. 8
figure 8

Variation of experimental inhibition efficiency (Eexp) of Pen VK with the theoretical inhibition efficiencies (ETheor) obtained from various models

DFT study

The premise behind the density functional theory (DFT) is that the energy of a molecule can be determined from the electron density instead of a wave function [39]. The principles of DFT have been adopted for the calculation of some quantum chemical descriptors.

From the values of the ground state energy of the systems, the ionization energy (IE) and the electron affinity (EA) of the inhibitors were calculated using Eqs. 21 and 22 respectively [40],

$$ {\hbox{IE}} = {{\hbox{E}}_{\left( {{\text{N }}-{ 1}} \right)}} - { }{{\hbox{E}}_{\left( {{N}} \right)}} $$
(21)
$$ {\hbox{EA}} = {{\hbox{E}}_{\left( {{N}} \right)}} - {{\hbox{E}}_{\left( {{{N}} + !} \right)}} $$
(22)

where E(N–1), E(N) and E(N+1) are the ground state energies of the system with N-1, N and N+1 electrons respectively. Calculated values of IE and EA are presented in Table 6. There was no significant difference (P > 0.05) between the values of IE calculated from Eq. 21 and those obtained through the values of EHOMO (Table 4). The insignificant different can be attributed to the fact that semi-empirical calculations estimate ionization energy through the value of EHOMO while Eq. 21 is based on the finite difference methods. Ionization energy measures the tendency toward loss of electron while electron affinity measures the tendency toward the acceptance of electron indicating that IE is closely related to EHOMO while EA is related to ELUMO. In this case, two systems, Fe (in mild steel) and inhibitor are brought together hence electron will flow from the lower system with lower electronegativity (inhibitor) to the system with higher electronegativity until the chemical potential becomes equal. Based on the decreasing value of IE and increasing value of EA, the trends for the decrease in the inhibition efficiency were similar to those obtained for EHOMO and ELUMO, respectively.

The concept of global hardness is given by the following equation [41],

$$ {\left. {{{\eta }} = {{{\delta }}^2}{\hbox{TE}}/{{\delta }}{{\hbox{N}}^2}} \right)_{{{V}}\left( {{r}} \right)}} = {1/2}{\left( {{{\delta }}\Upsilon /{{\delta N}}} \right)_{{{V}}\left( {{r}} \right)}} $$
(23)

where ϒ is the chemical potential of the electrons, TE is the total energy of the electrons, N is the number of electrons and V(r) is the external potential of the system. Using the finite difference approximation, the global harness and softness \( \left( {{\hbox{S}} = {{1/\eta }}} \right) \) were calculated as follows [42].

Table 6 Quantum chemical descriptors of Pen G, Amox and Pen VK
$$ {{\eta }} = \left[ {\left( {{{\hbox{E}}_{\left( {{\text{N }}-{ 1}} \right)}} - {{\hbox{E}}_{\left( {{N}} \right)}}} \right)--\left( {{{\hbox{E}}_{\left( {{N}} \right)}} - { }{{\hbox{E}}_{\left( {{{N}} + !} \right)}}} \right)} \right] $$
(24)
$$ {\hbox{S}} = {1}/\left[ {\left( {{{\hbox{E}}_{\left( {{\text{N }}-{ 1}} \right)}} - {{\hbox{E}}_{\left( {{N}} \right)}}} \right)--\left( {{{\hbox{E}}_{\left( {{N}} \right)}} - { }{{\hbox{E}}_{\left( {{{N}} + !} \right)}}} \right)} \right] $$
(25)

Values of η and S calculated from Eqs. 24 and 25 respectively, are also presented in Table 6. These parameters are related to the energy gap (ΔE) of the inhibitors. A hard molecule has a large energy gap while a soft molecule has small energy gap implying that a soft molecule is more reactive than a hard molecule. From the results obtained, it can be seen that Pen G has the highest value of S (hence the least value of η) while Pen VK has the least value of S (hence highest value of η). Therefore, the expected trend for the decrease in inhibition efficiencies of the inhibitors is Pen G > Amox > Pen VK. This trend supports the findings obtained from experiments.

Assuming that the total number of valence electrons in an inhibitor is N, then it is significant to state that it is not possible for the inhibitor to transfer all the N electrons to Fe (in the mild steel). Therefore the fraction of electron transferred, δ can be expressed as follows [43],

$$ \delta = \left( {{{{\chi }}_{{Fe}}} - {{{\chi }}_{{inh}}}} \right)/{2}\left( {{{{\eta }}_{{Fe}}} + {{{\eta }}_{{inh}}}} \right) $$
(26)

where χFe and χinh are the electronegativity of the inhibitor and Fe respectively.\( {{\chi }} = \left( {{\hbox{IP}} + {\hbox{EA}}} \right)/{2} \). ηFe and ηinh are the global hardness of Fe and the inhibitor respectively. Validation of Eq. 26 was achieved by adopting the theoretical value of χFe = 7ev and ηFe = 0 for the computation of δ values. Values of δ obtained from Eq. 26 are also presented in Table 6. The results indicate that there is no significant difference (P > 0.05) between the fraction of electrons transferred in each case. Therefore the concept of using δ values alone may not be significant in predicting the direction of the corrosion inhibition process.

Local selectivity

The local selectivity of an inhibitor was analyzed using condense Fukui and condensed softness functions. This function allows for the distinction of each part of the inhibitor’s molecule on the basis of its chemical behavior due to different substituent functional groups. The Fukui function is stimulated by the fact that if an electron δ is transferred to an N electron molecule, it will tend to distribute so as to minimize the energy of the resulting N + δ electron system. The resulting change in electron density of the nucleophilic (f+) and the electrophilic (f+) Fukui functions can be calculated using the finite difference approximation as follows [44],

$$ {{\hbox{f}}^{+} } = {\left( {{{\delta \rho }}\left( {\hbox{r}} \right)/{{\delta N}}} \right)^{+} }_{{\upsilon }}{ = }{{\hbox{q}}_{\left( {{{N}} + {1}} \right)}}--{{\hbox{q}}_{\left( {{N}} \right)}} $$
(27)
$$ {\hbox{f}} = {\left( {{{\delta \rho }}\left( {\hbox{r}} \right)/{{\delta N}}} \right)^{-} }_{{\upsilon }}{ = }{{\hbox{q}}_{\left( {{N}} \right)}}--{{\hbox{q}}_{\left( {{{N - 1}}} \right)}}, $$
(28)

where ρ, q(N+1), q(N) and q(N-1) are the density of electron, the Mulliken (Lowdin) charge of the atom with N+1, N and N-1 electrons respectively.

The local softness, s for an atom is the product of the condensed Fukui function (f) and the global softness (S), as shown in Eqs. 29 and 30 [45]

$$ {{\hbox{s}}^{+} } = \left( {{{\hbox{f}}^{+} }} \right){\hbox{S}} $$
(29)
$$ {{\hbox{s}}^{-} } = \left( {{{\hbox{f}}^{-} }} \right){\hbox{S}}. $$
(30)

The local softness contains the same information as the condensed Fukui function plus additional information about the total molecular softness, which is related to the global reactivity with respect to a reaction partner. From the calculated values of Fukui and local softness parameters which are presented in Tables 7, 8, and 9 respectively, it is expected that the site for nucleophilic attack is the place where the value of f+ or S+ is maximum and this corresponds to the carboxylic functional groups in Pen G, Amox and Pen VK, respectively. This information is clearly indicated in the HOMO diagrams of the three inhibitors (Fig. 9) which shows that the carboxylic functional group is the likely sites for nucleophilic attack. On the other hand, the expected site for electrophilic attack is controlled by f- or s-. If the protonated forms of the inhibitors molecules have a net positive charge, it can be stated that the most likely sites for nucleophilic attack in Pen G, Amox and Pen VK is in the phenyl ring. Figure 9 also presents the LUMO diagram for these compounds. From Fig. 9, it can be seen that the LUMO resides around the phenyl rings in the inhibitors confirming that the phenyl rings are prone to electrophilic attack.

Table 7 Fukui and global softness indices for nucleophilic and electrophilic attacks in Pen G calculated from Mulliken (Lowdin) charges
Table 8 Fukui and global softness indices for nucleophilic and electrophilic attacks in Amox calculated from Mulliken (Lowdin) charges
Table 9 Fukui and global softness indices for nucleophilic and electrophilic attacks in Pen VK calculated from Mulliken (Lowdin) charges
Fig. 9
figure 9

Molecular orbitals of Pen G, Amox and Pen VK showing the HOMO and LUMO

Mechanism of inhibition

The inhibition effect of Pen G, Amox and Pen VK can be ascribed to the adsorption of the inhibitors on the surface of mild steel. This adsorption may be physical adsorption or chemical adsorption, depending on the adsorption strength. Adsorption cause by van der Waals and Coulombic interaction are described as physiosorption, whereas chemical adsorption is due to the interaction between the π electrons of the inhibitor molecules and the d orbital of iron (in the mild steel). In corrosion inhibition process, physical adsorption inevitably precedes chemisorption. After physical adsorption, the inhibitors are chemically adsorbed on the metal surface. From the values of the Fukui and global softness functions, it is evident that the mechanisms of inhibition by the three inhibitors are similar. Therefore, the scheme shown in Fig. 10 is proposed as the possible mechanism for the inhibition of the corrosion of mild steel in HCl solutions by Pen G, Amox and Pen VK. It is also significant to note that the difference between the inhibition efficiency of Pen G and Amox is that Amox has hydroxyl and amino groups. These functional groups are electron withdrawing groups hence they have the tendency of drawing electrons away from the reaction center (-I effect). Consequently, the inhibition efficiency of Amox is expected to be lower than that of Pen G as seen in this study. It is also interesting to note that the electron withdrawing effects of these functional groups in Amox supersedes the advantages offered by the higher molecular weight of Amox over Pen G. As a rule, the inhibition efficiency of an inhibitor should increase with an increase in molecular weight but it is not applicable to Amox. Similarly, the presence of potassium ion (which is highly electropositive) limits the potential of Pen VK as an inhibitor compared to that of Pen G.

Fig. 10
figure 10

Proposed mechanism for the inhibition of the corrosion of mild steel by Pen G, Amox and Pen VK

Conclusions

Pen G, Amox and Pen VK are good adsorption inhibitors for the corrosion of mild steel in HCl solutions. The adsorption of these inhibitors is exothermic, spontaneous and their adsorption behaviors can best be described by Langmuir adsorption isotherm. Although the mechanism of physical adsorption is proposed, the possibility of chemical adsorption proceeding physisorption has been highlighted.

Theoretical and experimental approaches have been used to investigate the direction of inhibition of the corrosion of mild steel by these inhibitors and the strength of inhibition decreases in the order, Pen G > Amox > Pen VK.