1 Introduction

Corrosion is one of the biggest problems encountered by the industrial sector since it used acid as the main solution in the daily processes. The general aggressivity of the acid solutions make it easy for the corrosive attack on the metallic materials [1]. Acid solutions are widely used in industry. The most important areas of application being acid pickling, industrial acid cleaning, acid descaling and oil well acidizing [2].

HCl is generally used in the treatment of steel and ferrous alloys. Because of the general aggression of acid solutions, inhibitors are commonly used to reduce the corrosive attack on metallic materials [3]. Among the alternative corrosion inhibitors, organic compounds containing polar functions with nitrogen, oxygen, or sulfur atoms as well as heterocyclics containing conjugated double bonds have been reported as effective inhibitors of mild steel corrosion in acidic media [4]. The existing data show that most organic inhibitors act by adsorption on the metal surface. This phenomenon is influenced by the nature and surface charge of metal, by the type of aggressive electrolyte and by the chemical structure of inhibitors [5].

Quantum chemical calculations may supplement the experimental studies or even predict with confidence some experimentally unknown properties. Density functional theory (DFT) in particular, has been applied to analyze the characteristics of the inhibitor/surface mechanism and to determined the electronic structure and reactivity of the molecule in corrosion inhibition studies [6].

Up to now, many N-heterocyclic compounds such as pyrimidine derivatives [7], the tetrazole derivatives [8], triazole derivatives [9] were used for the corrosion inhibition of iron or steel in acidic media. The quinoline derivatives are one of the important constituents of pharmacologically active synthetic compounds [10], including biological activities [11]. Accordingly, the aim of this paper is to study the inhibiting action of a new organic compound containing 8-hydroxyquinoline. The electrochemical behaviour of mild steel in HCl media in the absence and presence of inhibitor namely QTB have been studied by potentiodynamic polarization, electrochemical impedance spectroscopy techniques and gravimetric methods. The effect of temperature (298–328 K) on corrosion and inhibition processes are thoroughly assessed and discussed. Thermodynamic parameters governing the adsorption process were also calculated and discussed. Theoretical calculations were performed using using DFT and Monte Carlo simulations and correlated with the inhibiting effect of QTB.

2 Experimental Details

2.1 Synthesis of Inhibitor QTB

The synthesis of 2-(4,5-dihydro-4-((8-hydroxyquinolin-5-yl)methyl)tetrazol-1-yl) benzamide (QTB) is described according to the following reaction (Scheme 1). Acetic acid was added with stirring to a suspension of 2-aminobenzamide (5 × 10−3 mol), and 5-azidomethyl-8-quinolinol (1 g, 5 × 10−3 mol) in triethylorthoformate (5 × 10−3 mol), and the mixture was refluxed for 12 h. The progress of the reaction was monitored by TLC using hexane–acetone (4:6, v/v) as eluent. The mixture was neutralized by NaOH addition solution and then it was extracted with dichloromethane. The organic phase was recovered and dried over anhydrous MgSO4 and then evaporated. The residue obtained was purified by silica gel column chromatography with n-hexane–acetone mixture (6:4, v/v) as the mobile phase, to give 2-(4,5-dihydro-4-((8-hydroxyquinolin-5-yl)methyl)tetrazol-1-yl) benzamide (QTB).

Scheme 1
scheme 1

Synthesis of the compound QTB

The structure of the (QTB) was confirmed by 1H NMR and 13C NMR spectra.

1H NMR (300 MHz, Me2SO-d6), δppm = 6.533–8.835 (m, 10H, quinoline and benzamide), 3.948 (s, 2H, quinoline-CH2-tetrazol), 4.655(s, 2H, –CH2 of tetrazol).

13C NMR (300 MHz, Me2SO-d6), δppm = 53.097 (quinoline-CH2-tetrazol); 111.321, 127.838, 128.950, 133.777, 119.954, 120.341, 122.291, 138.042, 148.372 (CH-quinoline and aniline); 127.918, 139.672, 128.950, 129.304, 136.373, 152.740, (C-quinoline and aniline); 86.423 (–CH2–tetrazol), 168.926 (C=O).

The 1H NMR, 13C NMR spectra are attached in supplementary data.

2.2 Solutions

The acid solutions (1 M HCl) were prepared by dilution of analytical grade 37% HCl with distilled water. The concentration range of the used 2-(4,5-dihydro-4-((8-hydroxyquinolin-5-yl)methyl)tetrazol-1-yl) benzamide (QTB) was 10−6 to 10−3 M, it is noted that the studied organic product is highly soluble in dimethyl sulfoxide (DMSO).

2.3 Gravimetric and Electrochemical Measurements

Gravimetric measurements were carried out in a double-walled glass cell equipped with a thermostated cooling condenser. The mild steel specimen used in this study had a rectangular form (1.5 cm × 1.5 cm × 0.3 cm) with a chemical composition (in wt%) of 0.370% C, 0.230% Si, 0.680% Mn, 0.016% S, 0.077% Cr, 0.011% Ti, 0.059% Ni, 0.009% Co, 0.160% Cu and the remainder iron (Fe) were used for electrochemical and gravimetric studies. The surface of the test electrode was mechanically abraded by different grades of emery papers with 220 up to 1200, rinsed with distilled water, cleaned with acetone and finally dried at hot temperatures. Then, the loss in weight was determined by analytic balance after 6 h of immersion at 298 K. Triplicate experiments were performed in each case and the mean value of the weight loss was calculated.

Electrochemical experiments were conducted using an electrochemical measurement system Tacussel Radiometer PGZ 100 controlled by a PC supported by Voltamaster 4 Software. The potentiodynamic polarization curves and electrochemical impedance spectroscopy (EIS) were carried out in a standard three-electrode cell. The saturated calomel electrode (SCE) and the platinum electrode were used as reference and auxiliary electrode, respectively, while the mild steel specimen was used as working electrode in an exposed surface area of 1 cm2. Before starting the experiments, the working electrode was immersed in test solutions for 30 min to attain a steady state open circuit potential (Eocp). After measuring of Eocp, the electrochemical measurements were performed. The potential was swept to anodic potentials by a constant sweep rate of 0.5 mV s−1 and potential was scanned in the range of − 800 to − 200 mV/SCE relative to the corrosion potential. The impedance diagrams are given in the Nyquist representation. The electrochemical impedance spectroscopy (EIS) measurements were performed with a frequency range of 100 kHz to 10 mHz and amplitude of 5 mV with 10 points per decade.

2.4 Quantum Chemical Calculations

Quantum chemical calculations were performed by density functional theory (DFT) level with the non-local correlation functional B3LYP, combining Becke’s three-parameter exchange functional with the correlation functional of Lee et al. at basis sets 6-31G(d,p) [12, 13].The following quantum chemical parameters were considered: the energy of the lowest unoccupied molecular orbital (ELUMO), the energy of the highest occupied molecular orbital (EHOMO), energy band gap ΔE = EHOMO − ELUMO, the electron affinity (A), the ionization potential (I) and the number of transferred electrons (ΔN).

2.5 Monte Carlo Simulations

Monte Carlo simulations were carried out to model the mode of adsorption of the investigated inhibitor molecule on Fe(110) surface. The adsorption locator code implemented in the Material Studio (MS) 8.0 software was adopted in this simulation. Fe(110) crystal surface was selected for this simulation and to represent MS because it is the most stable surface [14]. The condensed phase optimized molecular potentials for atomistic simulation studies (COMPASS) force field was used for the simulation of all molecules and systems [15]. The simulation of the corrosion inhibitor molecule designated as QTB on Fe(110) surface was carried out to locate the low-energy adsorption sites of the potential corrosion inhibitors on Fe surface.

3 Results and Discussion

3.1 Weight Loss Measurements

The corrosion of mild steel in 1 M HCl medium of QTB at 298 K was studied by weight loss measurements. The corrosion parameters obtained by conducting weight loss measurements for mild steel in the absence and presence of different concentration of QTB in 1 M HCl after 6 h of immersion at 298 K are given in Table 1.

Table 1 Gravimetric results of mild steel in 1 M HCl without and with addition of QTB at 298 K

From the weight loss results, the inhibition efficiency ηω(%) was calculated using Eq. 1:

$$\eta_{\omega } \left( \% \right) \, = \frac{{C_{R } - C_{{R({\text{inh}})}} }}{{C_{R} }} \times 100$$
(1)

where CR and CR(inh) represent the corrosion rates in the absence and presence of the inhibitor in HCl solution and θ is the degree of surface coverage of the inhibitor. The values of percentage inhibition efficiency and corrosion rate obtained from weight loss method at different concentrations at 298 K are summarized in Table 1.

It has been observed that the inhibition efficiency of this compound increases with the increase in concentration attain 85.1% for 10−3 M. This increase can be attributed to the adsorption of this compound at the mild steel/acid solution interface. The height inhibitions of the studied triazole is may be due to the interactions between the π electrons of the aromatic systems and unshared electrons pairs of the heteroatoms (− N, − O) which form a bond with the vacant 3d orbitals of the metal surface leading to the formation of a protective film.

3.2 Potentiodynamic Polarization Measurements

Figure 1 shows current–potential characteristics resulting from cathodic and anodic polarization curves of steel in 1 M HCl without and with various concentrations of the synthesized inhibitor (from 1 × 10−6 to 1 × 10−3 M) at 298 K. The electrochemical parameters such as corrosion current (icorr), corrosion potential (Ecorr), cathodic Tafel slope (βc) for QTB obtained from polarization measurements are listed in Table 2. However, the electrochemical parameters such as corrosion current density (icorr), corrosion potential (Ecorr) and cathodic Tafel slope (βc) obtained by curve fitting using the following equation:

$$i = i_{\text{a}} + i_{\text{c}} = i_{\text{corr}} \left\{ {\exp \left[ {b_{\text{a}} \times \left( {E - E_{\text{corr}} } \right)} \right] - \exp \left[ {b_{\text{c}} \times \left( {E - E_{\text{corr}} } \right)} \right]} \right\}$$
(2)

where icorr is the corrosion current density (A cm−2), ba and bc are the Tafel constants of anodic and cathodic reactions (V−1), respectively. These constants are linked to the Tafel slopes β (V/dec) in usually logarithmic scale given by Eq. (3):

$$\beta = \frac{\ln 10}{b} = \frac{2.303}{b}$$
(3)
Fig. 1
figure 1

Polarization curves for mild steel in 1 M HCl containing different concentrations of QTB at 298 K

Table 2 Electrochemical polarization parameters for corrosion of mild steel in 1 M HCl with different concentrations of QTB at 298 K

The inhibition efficiency was evaluated from the measured icorr values using the following relationship:

$$\eta_{\text{PP}} \left( \% \right) = \frac{{i_{\text{corr}}^{ 0} - i_{\text{corr}} }}{{i_{\text{corr}}^{ 0} }} \times 100$$
(4)

where \(i_{\text{corr}}^{ 0}\) and icorr are the corrosion current densities for mild steel electrode in the uninhibited and inhibited solutions, respectively.

The Table 2 shows an increase in inhibition efficiency, while the corrosion current density decreased with increasing of the inhibitor concentration. This may be due to the adsorption of inhibitor on mild steel/acid interface. Clearly, icorr decreased remarkably while ηpp increased with the increasing of the inhibitor concentration, and the maximum (ηpp) is up to 89.3% at 10−3 M of inhibitor. There is no definite trend in the shift of Ecorr in the presence of corrosion inhibitor, therefore, the synthesized inhibitor can be arranged as a mixed-type inhibitor, and the inhibitory action is caused by the geometric blocking effect [16]. Namely, the inhibitory action comes from the reduction of the reaction area on the surface of the corroding metal. From the polarization curves, it was noted that the curves were shifted toward lower current density region. However, the cathodic Tafel slopes (βc) change with the QTB addition suggesting that studied molecule was first adsorbed onto the electrode surface and impeded by merely blocking the reaction sites of the steel surface without affecting the cathodic reaction.

3.3 Electrochemical Impedance Spectroscopy

The corrosion-inhibiting properties of QTB on mild steel was also investigated by electrochemical impedance spectroscopy (EIS). Figures 2a and 3 represented as Nyquist and Bode-phase plots, respectively, show the impedance spectra for mild steel corrosion in HCl solution with and without various concentrations of QTB. In all the studied frequency range, the Nyquist plots (Fig. 2a) show single semicircles which correspond to one time constant in Bode plots. Inspection of Fig. 2a revealed that the increasing of QTB concentration increases the size of the capacitive loop. (Figure 2a). This increase is linked to the adsorption of inhibitor molecules on the metal inteface. Generally, this type of diagram indicates that the corrosion reaction is controlled by transfer charges process on a heterogeneous and irregular solid surface electrode [17]. The depressed capacitive loops at the higher frequencies is usually linked to the frequency dispersion also to inhomogeneities, mass transport process and roughness of steel surface [18].

Fig. 2
figure 2

aThe Nyquist plots of mild steel in 1 M HCl containing various concentrations of synthesized compound at 298 K and b the Equivalent electrochemical circuit for fitting of the results

Fig. 3
figure 3

Bode plots (a) and phase angle (b) for mild steel in 1 M HCl in the absence and presence of different concentrations of QTB

However, impedance behavior can be explained using a simple equivalent circuit (Fig. 2b) composed of the solution resistance (Rs), charge transfer resistance (Rct) and constant phase element (CPE) were calculated and summarized in Table. The use of CPE to obtain more accurate study of impedance behavior of the electric double layer, CPE was used as the alternative for capacitor and which expressed by foloweiy equation

$$Z_{CPE} = A^{ - 1} (iw)^{ - n}$$
(5)

where A is the CPE constant, n is the CPE exponent (ranges from 0 to 1), i2 = − 1 is an imaginary number and w is the angular frequency.

However, The double layer usually (Cdl) behaves as a constant phase element (CPE) when the value of n is equal to unity, the Cdl values are obtained by exploiting the next formula (5) [42]:

$$C_{\text{dl}} = \left( {A_{{}} R_{\text{ct}}^{1 - n} } \right)^{1/n}$$
(6)

The protection efficiency obtained from the charge transfer resistance is calculated using the following equation:

$$\eta_{z} = \frac{{R_{\text{ct}}^{i} - R_{\text{ct}}^{0} }}{{R_{\text{ct}}^{i} }} \times 100$$
(7)

where, and \(R_{\text{ct}}^{0}\) and \(R_{\text{ct}}^{i}\) are the charge transfer resistance in absence and in presence of inhibitor, respectively.

The Bode diagrams have two levels: the first at high frequency is attributed to the resistance of the electrolyte Rs and the second at low frequency is attributed to the charge transfer resistor Rct. The module of the impedance |Z| low frequency that is related to the charge transfer resistance increases with the increase in the concentration of inhibitor, this shows that the inhibitory power of this compound increases with the increase in concentration that can be attributed to the adsorption of inhibitor molecules on the surface of steel.

Table 3 indicate that the charge transfer resistance Rct values increased and the double-layer capacitance Cdl values decreased with increasing inhibitor concentration. The inhibition efficiency values (ηz%) increases with the inhibitor concentrations to reach a maximum of 88.14% at 10−3 M. The increase in Rct value can be attributed to the formation of protective film on the metal/solution interface. However, it should be noted that the value of the proportional factor A of CPE changed in a regular manner way with QBT concentrations. The increase of the values of n when compared with 1 M HCl and with concentration can be linked to some decrease of the surface heterogeneity, due to the adsorption of the QBT molecules on the active adsorption sites whereas, the decrease in the Cdl values may be caused by a decrease in the local dielectric constant and/or an increase in the thickness of the electrical double layer, indicating that the inhibitors function by adsorption at the metal surface [19, 20].

Table 3 Electrochemical data for mild steel in 1 M HCl in the absence and presence of different concentrations of QTB at 298 K

3.4 Effect of Solution Temperature

The influence of temperature on the inhibition performance of QTB for mild steel in 1 M HCl electrolyte was examined by potentiodynamic polarization measurements (Fig. 4) and the extracted parameters are listed in Table 4.

Fig. 4
figure 4

Polarization curves for mild steel in 1 M HCl without and with 10−3 M of QTB at different temperatures

Table 4 Electrochemical parameters of mild steel in 1 M HCl without and with optimum concentration of QTB at different temperatures

From results given in Table 4, a modification of corrosion potential with increase in temperature. Whereas, the inhibition efficiency decreased with increasing temperature as a result of the higher dissolution of mild steel at higher temperature, which might cause the desorption of QTB from the mild steel surface [21].

The activation parameters of the corrosion process were calculated at the different temperatures, without and with QTB. In addition, the activation energy (Ea) was determined using the icorr values obtained from the potentiodynamic polarization curves, according to equation [22]:

$$i_{corr} = \, k \, exp \, \left( { - \frac{{E_{a} }}{RT}} \right)$$
(8)

An alternative formula of the Arrhenius equation which can determine the activation enthalpy (ΔHa) and entropy (ΔSa) using the following equation:

$$i_{\text{corr}} = \frac{{{\text{R}}T}}{\text{Nh}}\exp \left( {\frac{{\Delta S_{a} }}{R}} \right)\exp \left( {\frac{{\Delta H_{a} }}{{{\text{R}}T}}} \right)$$
(9)

where icorr is the corrosion current density, h is the Planck’s constant, N is the Avogadro number, R is the universal gas constant, Ea is the activation energy for the corrosion process, k is the Arrhenius pre-exponential constant and T is the absolute temperature [23].

Figure 5 present the variation of the corrosion current density logarithm as a function of the absolute temperature inverse. A straight lines are obtained with regression coefficients close to unity.

Fig. 5
figure 5

Ln icorr vs. 1/T for mild steel in 1 M HCl in the without and with optimum concentration of QTB

Figure 6 shows a plot of Ln (icorr/T) vs. 1/T. Straight lines are obtained with a slope of ΔHa/R and an intercept of Ln (R/Nh + \(\Delta S_{a}\) /R) from which the values of ΔSa and ΔHa are calculated.

Fig. 6
figure 6

Ln (icorr/T) versus 1000/T for mild steel in 1 M HCl solution in the absence and presence of synthesized compound

The addition of QTB leads to an increase in the apparent activation energy Ea from 37.64 to 47.61 kJ mol−1 which indicates that the dissolution of mild steel in HCl electrolyte in the presence of synthesized compound is lower than the free electrolyte. This increase probably was attributed to physisorption of QBT on the steel surface [24, 25]. However, the enthalpy value is greater in the presence of QBT (45.01 kJ mol−1) than in its absence (35.04 kJ mol−1). The positive sign of enthalpy reflects the endothermic nature of the dissolution process. Moreover, the large negative value of ΔSa (− 59.78 J mol−1 K−1) implies that there is decrease in the disorder during the transformation of the reactants into complex [26].

3.5 Adsorption Isotherm

To evaluate the adsorption process of phytochemical organic compound on the steel surface, adsorption isotherms are employed to describe the adsorption process. Among different adsorption isotherms, the Langmuir adsorption isotherm is the most fundamental so was tested at first. The correlation between θ and QTB concentration can be studied by Eq. 10.

$$\frac{\text{C}}{\theta } = \frac{1}{\text{K}}\, + \,{\text{C}}$$
(10)

where K is the equilibrium constant of the adsorption process and θ (ηpp/100) is the fraction of metal surface covered by the QTB. The variation plot of C/θ versus C (Fig. 7) gives straight lines with a correlation coefficient close to unity suggesting that the adsorption of QTB on the mild steel surface obeyed a Langmuir adsorption isotherm [27,28,29,30]. The value of equilibrium constant (K) was calculated from the interception of the straight line in Fig. 7. The equilibrium constant is related to the standard-free energy of adsorption (\(\Delta G_{\text{ads}}^{^\circ }\)) by the following equation (Eq. 11):

$$\Delta G_{\text{ads}}^{^\circ } = - {\text{R}}T\,\ln \left( {55.5\;{\text{K}}} \right)$$
(11)

where the 55.5 in the above formula is the concentration of water.

Fig. 7
figure 7

Langmuir adsorption isotherm of QTB on mild steel surface in 1 M HCl at 298 K

Generally, the standard-free energy of adsorption values of − 20 kJ mol−1 or less negative are associated with an electrostatic interaction between charged molecules and charged metal surface (physisorption); those around − 40 kJ mol−1 or higher involve charge sharing or transfer from the inhibitor molecules to the metal surface to form a coordinate covalent bond (chemisorption). The considered \(\Delta G_{\text{ads}}^{^\circ }\) value as delineated in Table 5 is lower than − 40 kJ mol−1 which implies that the absorption process is of the chemisorption nature [31].

Table 5 Adsorption parameters of QTB for mild steel corrosion in 1 M HCl

3.6 Quantum Chemical Calculation

3.6.1 Optimization, Distribution of the Electronic Density and Calculation of the Main Quantum Parameters of Compound QTB

The DFT theory is a very important method for studying the reactivity of inhibitory molecules [32]. In this sense, we will follow a well structured procedure using several very precise descriptors. The first factor is the densities HOMO and LUMO; this is shown in Fig. 8 with the electrostatic contour and the optimized molecule of QTB. According to this figure, it is clear that the electron density HOMO is located on the entire molecular surface of QTB, while the LUMO density is distributed around the aromatic cycles of quinoline.

Fig. 8
figure 8

Optimized structure, HOMO and LUMO of QTB molecule

The values of the EHOMO and ELUMO energies are calculated using DFT based on Beck’s three-parameter exchange functional and Lee–Yang–Parr nonlocal correlation functional (B3LYP) and the 6–31 G* orbital basis sets for all atoms as implemented in Gaussian 09 program [33, 34]. From these values, we can extract the different parameters' structural quantum of compound QTB such as ΔEgap (ELUMO − EHOMO), the dipole moment (μ), the total electronegativity (χ), the overall hardness (η), the chemical softness (σ), electrophile index (ω), nucleophile index (ε), and the number of electrons transferred from the inhibitor to the surface of the metal (ΔN110); these parameters are tabulated in Table 6.

Table 6 Calculated quantum parameters of QTB inhibitor

The results of the table shows that the high value of EHOMO (− 4.807 eV) and the low value of ELUMO (− 1.405 eV) reflect that the ability to give and accept the molecule electrons studied is very important, respectively. This indicates that the adsorption capacity of this inhibitor QTB on the metal surface increases with the variation of these energies. Concerning the number of electrons transferred (ΔN110), if the value of ΔN110 < 3.6, the inhibitory performance of a molecule has increased with the increase of the electron donating capacity of this molecule to the metal surface [35, 36]. The number of electron transfer (ΔN) was calculated using the following equation [37]:

$$\Delta N = \frac{{\chi_{\text{Fe}} - \chi_{\text{inh}} }}{{2\left( {\eta_{\text{Fe}} + \eta_{\text{inh}} } \right)}}$$
(12)

where χFe and χinh denote the absolute electronegativity of iron and the inhibitor molecule, respectively, and ηFe and ηinh denote the absolute hardness of iron and the inhibitor molecule, respectively. The values of χFe and ηFe are taken as 7 eV mol−1 and 0 eV mol−1, [38, 39] respectively.

In that case, the value of ΔN110 is also recorded in Table 6; it shows that the inhibitory power resulting from electron donation is in very good agreement with the Lukovit study [12]. The consequence of this behavior facilitates the transfer of electrons between the test molecule and the electrode surface.

This finding suggests that the inhibition efficiency increases with increasing softness and decreases on increasing the hardness of the inhibitor molecules. Absolute electronegativity (χ), global hardness (η) and global softness (σ) are estimated using the equations [40, 41].

$$\chi = \frac{I + A}{2}$$
(13)
$$\eta = \frac{I - A}{2}$$
(14)
$$\sigma = \frac{1}{\eta } = - \frac{2}{{E_{\text{HOMO}} - E_{\text{LUMO}} }}$$
(15)

The ionization potential (I) and the electron affinity (A) are defined as follows equations:

$$I = - E_{\text{HOMO}}$$
(16)
$$A = - E_{\text{LUMO}}$$
(17)

From Table 6, we observed that the high values of \(\chi_{\text{inh}}\) and \(\eta_{\text{inh}}\) indicate that our inhibitor is very reactive with the metal surface of iron.

On the other hand, to measure the ability to accept electrons from a molecule we used the electrophilicity index (ω). On the other side, the nucleophilicity index (ε) is another element for measuring the electron donating power of this molecule. Therefore, a molecule with a lower value of ε and a higher value of ω is considered a good corrosion inhibitor [42].

$$\omega_{\text{inh}} = \frac{{\chi_{\text{inh}}^{2} }}{{2\eta_{\text{inh}} }}$$
(18)
$$\varepsilon_{inh} = \frac{1}{{\omega_{inh} }}$$
(19)

From Table 6, it is well noted that the electrophilicity and nucleophilicity agree with the experimental results.

3.6.2 Active Sites of the QTB Molecule

When an organic molecule carries several atoms and heteroatoms either as donors or acceptors of electrons, it is considered as an effective inhibitor against corrosion [43]. For this purpose, we used well-known methods such as the Mulliken atomic charges, the total electronic densities mapped and the Fukui indices (FI). Fig. 9 represents the Mulliken atomic charge distribution of QTB. The representation of the atomic charges of the inhibitory molecule QTB shows that atoms carrying negative charges are considered as electron donor sites (nucleophiles) lorsqu’ils interagissent avec la surface du fer pour former des liaisons de coordination. Therefore, Fig. 9 shows that oxygen, nitrogen and some carbon atoms carry more negative charges according to the following sequence: N3, C10, O11, C12, N13, N14 and N15 while the carbon atoms C2, C4, C7, C17, C18 and C24 contain a high density of positive charges. This indicates that these atoms play a role as active sites accepting electrons from iron orbitals to form bonds of retro-donation. In parallel, the total electronic densities mapped are also shown in Fig. 9. The strong electron density is represented by a red color and the low electron density is represented by a blue color [44,45,46]. The high electron density (yellow to red color) is delocalized around the oxygen atom of the hydroxy group which is directly related to the quinoline family of QTB, this could be easily attributed to free doublets of electrons on this atom. Contrarily, the low electron density presented by green and blue colors is located on some carbon and nitrogen atoms and. Thus, atoms have strong electronic densities. They could be good candidates for adsorbing on the surface of Fe (low electron density).

Fig. 9
figure 9

Distribution of the total electron density mapped and the Mulliken atomic charges of the QTB molecule

The Fukui index (IF) is the third parameter which describes a local reactivity of an inhibitory molecule. This method allows us to distinguish the different functional groups responsible for nucleophilic and/or electrophilic attacks [47, 48]. These are determined, respectively, by the maximum values of \(f_{k}^{ + }\) and \(f_{k}^{ - }\). Such that a high value of \(f_{k}^{ + }\) measures the electron density variations when a molecule has received an additional electron and \(f_{k}^{ - }\) measure the electron density when a molecule loses electron [49, 50]. Table 7 collates the various calculated values of Fukui indices. These parameters are shown in Fig. 10.

Table 7 Calculated Fukui indices of QTB molecule using GGA/BOP function with DNP (3.5) base
Fig. 10
figure 10

Bar graphs of Fukui indices of the molecule studied

Analysis of the results obtained in Table 7 and Fig. 10 shows that the QTB molecule has the highest values of \(f_{k}^{ + }\), these last ones are localized on the atoms. N13, N14, N15 and N16. These cities can be accepted electrons while the highest values of \(f_{k}^{ - }\) shows that atoms N13, C6 and O31 are able to give electrons which leads to the increase of QTB compound adsorption capacity on the metal surface.

We conclude that the results obtained by the local reactivity (IF) study confirm the results obtained by the total electron density and the Mulliken atomic charge.

3.6.3 Protonation Effect on the Quantum Parameters of QTB

The QTB compound has several active sites available for protonation, but in this work we chose the two N3 and N14 nitrogen atoms as shown in Fig. 11 as the two most favorable sites for protonation. Our chosen based on several factors, On the one hand the molecular electrostatic potential and the effective atomic charge of Mulliken and on the other hand the proton affinity (PA). The latter is a very important descriptor for determining the chemical reactivity of a molecule. Indeed, the molecule that has this lower descriptor, so it is more reactive (Table 8).

Fig. 11
figure 11

Atoms available for the protonation of the QTB molecule

Table 8 Main values of the quantum parameters of the protonated and unprotonated QTB molecule

PA is calculated from the total energies of the compound studies according to the following equation:

$${\text{PA}} = E_{T} ({\text{Inhibitor}}\;{\text{protoned}}) - E_{T} ({\text{Inhibitor}}) - E_{T} \left( {{\text{H}}_{3} {\text{O}}^{ + } } \right) + E_{T} \left( {{\text{H}}_{2} {\text{O}}} \right)$$
(20)

To determine the site and/or sites most favorable for protonation for the two protonated nitrogen atoms (N3 and N14) we did several protonation tests each time, we protonate an atom, and in the end the protonation is done both at the same time.

The results are shown in Fig. 12. The latter shows that the weak mapped electronic density presented by a blue color (positive region) is localized on the entire molecular surface of QTB and well condensed on the protonated atoms. The main values of the chemical quantum parameters of the protonated and unprotonated studied molecule are recorded in Table 8.

Fig. 12
figure 12

Electrostatic property of the protonated QTB molecule

The analysis of Table 8 shows that after the protonation of QTB molecule in the different sites of the nitrogen atoms, the EHOMO values of QTB compound are shifted to values which are more negative than the EHOMO values of QTB neutral.

This indicates that the protonated forms of compound studied have an ability to accept electrons higher than the neutral form [47]. Whereas, the electron donor capacity (ΔN110) of protonated QTB was decreased and negative compared to the unprotonated form, this means that donating electrons from the inhibitory molecule to the metal surface is no longer possible [46]. These results probably show that the interaction between these protonated inhibitors and the surface of the iron is electrostatic in nature.

The proton affinity of molecule is a necessary parameter to measure its basicity. According to this theory, the Lewis acids and bases are described in terms of electron pair transfers. A Lewis base is an electron pair donor and indeed, Les inhibiteurs de corrosion sont des bases de Lewis [50]. It should be noted that the value of proton affinity increases negatively which leads to its inhibitory efficiency also increasing. PA values are also listed in Table 8, the comparison between the different PA values of the protonated molecule QTB shows that the double protonation of the nitrogen atoms leads to the decrease in the AP value; this indicates that the chemical reactivity increases of protonated QTB and sorted in the following order:

$${\text{PA}}\left( {{\text{QTB}}\left( {{\text{N}}_{3} {\text{N}}_{14} } \right){\text{H}}^{2 + } } \right) > {\text{PA}}\left( {{\text{QTB}}\left( {{\text{N}}_{3} } \right){\text{H}}^{ + } } \right) > {\text{PA}}\left( {{\text{QTB}}\left( {{\text{N}}_{14} } \right){\text{H}}^{2 + } } \right)$$

3.7 Monte Carlo (MC) Simulations of the QTB Molecule

To understand the mechanism and the mode of action of a molecule on a metal surface we performed the simulation by the Monte Carlo method. The study of the adsorption behavior of the QTB molecule on the surface Fe(110) in the gaseous and aqueous phase. The inhibitory molecule QTB was optimized before being placed on the surface of the Fe(110). Figure 13 shows the energy curve according to the optimization steps of QTB in neutral and isolated form using the DMol3/m-GGA/BOP/DNP basic set.

Fig. 13
figure 13

Energy optimization of neutral QTB molecule using DMol3/m-GGA/BOP/DNP

Figure 13 shows that the inhibitory molecule QTB has an optimal energy of (− 1174.175 Ha), Corresponding stability of QTB in neutral forms. The adsorption energy distribution for the Fe (110)/(QTB) system obtained by the adsorption localization module is shown in Fig. 14. The latter shows that the adsorption energy of the QTB molecule reaches (− 51.0 kcal mol−1) this value is considered as the suitable adsorption energy on the metal surface of Fe(110).

Fig. 14
figure 14

Adsorption energy distribution for Fe(110)/(QTB) system using adsorption locator module

The values of total energy, average total energy, Van der Waals energy, electrostatic energy and intermolecular energy for QTB/iron systems have been calculated by optimizing the whole systems and the total adsorption energy distribution is shown in Fig. 15 for the system under study.

Fig. 15
figure 15

Total energy distribution for QTB/Fe(110) surface

The MC simulation reasonably predicts the most favorable configuration of the adsorbed inhibitor on the metal surface. In this context, side and top views of stable adsorption configurations for QTB on Fe(110) are shown in Fig. 16. It is well noted that the inhibitory molecule has been adsorbed parallel (plane) on the studied surface. In addition, this molecule QTB covers a larger area of coverage towards a metal dissolution block. Whereas, the observation of Fig. 16 shows that the absolute distance between the inhibitor QTB and the surface of the Fe(110) is < 3.6 Å, this indicates that the adsorption nature is chemical type.

Fig. 16
figure 16

Side and top views of stable adsorption configurations for QTB on Fe(110)

The binding energy (Ebinding) is calculated by the following equation:

$$E_{\text{binding}} = - E_{\text{int}}$$
(21)

In other words, it can be said that a greater value of Ebinding shows that the molecule is absorbed more easily on the metal surface studied and that inhibitory performance is higher spontaneously [51]. From Table 9, the calculated interaction energy values (Eint) for QTB is − 1376.030 kcal/mol.

Table 9 Outputs and descriptors calculated by Monte Carlo simulation for adsorption of QTB on Fe(110) surface (in kcal/mol)

Figure 17 shows the minimum and maximum values of the force field for the Fe(110)/QTB interface. The iso-surface colors change to reflect the minimum and maximum values associated with the field which has been mapped on the total electronic density.

Fig. 17
figure 17

Iso-surface density field for the Fe(110)/(QTB) interface

Greater dot density means more likely adsorption sites of the inhibitor molecule QTB on the Fe(110) metal surface.

4 Conclusion

A new organic compound namely 2-(4,5-dihydro-4-((8-hydroxyquinolin-5-yl)methyl)tetrazol-1-yl) benzamide (QTB) was synthesized and characterized using 1H and 13C NMR spectroscopies. The corrosion inhibition of mild steel in 1.0 M HCl by QTB was studied using experimental and theoretical techniques. The temperature effect on the corrosion behaviour of steel in 1 M HCl in the absence and the presence of QTB is studied in the temperature range 298–328 K. Inhibition efficiency increases with increase in concentration of QTB while decreases with rise temperature. The adsorption of QTB on the steel surface obeys to the Langmuir’s adsorption isotherm. The correlation between the quantum chemical parameters and inhibition efficiencies of QTB was investigated using DFT calculations. The inhibition efficiencies of the inhibitor are closely related to the quantum chemical parameters EHOMO, ELUMO, dipole moment,… The fact that inhibition efficiency is increased with an increase in EHOMO value and with a decrease in ELUMO value has been established herein. The Monte Carlo simulation were found to be in good agreement with the experimental. The adsorption energy obtained for the molecule studied reaches − 51.0 kcal mol−1) this value is considered as the suitable adsorption energy on the metal surface of Fe(110).