1 Introduction

Steel is the most commonly used material in many industries, like oil, gas and chemical industries, it came to be used for most purposes where wrought iron was formerly used [1, 2]. Nonetheless, the major problem associated with its use seems to reach its high susceptibility to corrosion in acidic solutions, which results in a considerable loss in its essential properties. To adopt effective preventive methods against corrosion of metals, various strategies have been applied to control this undesirable phenomenon such as materials selection, cathodic protection, coatings and the use of corrosion inhibitors. The inhibitors have been considered as the most practical and easiest method [3]. Typically, these organic compounds along with heteroatoms and lone pair have shown good inhibition performance for many metals and rapid progress in recent years has been made in the design and synthesis of a variety of compounds such as quinoles, quinoxalines, pyridinium, triazoles, and imidazolines, etc. [4]. They seem to act by adsorbing onto the surface of the metal, blocking one or more of the undesirable reactions occurring at the solution/metal interface and therefore causing high protection of metal against dissolution [5, 6].

Experimental techniques like weight-loss method, electrochemical impedance spectroscopy, potentiodynamic polarization, etc. [7, 8], have been used to understand the corrosion process and its inhibition. Though experiments mostly are time-consuming, costly, and lacking in explaining the mechanism of inhibition of the corrosion [9, 10]. In recent years, to understand some unknown properties during the interaction of inhibitors with the metal surface. Density Functional Theory based calculations have been proved to be a very powerful tool for studying the electronic and structural properties of inhibitors. The geometry of the inhibitor molecule in its ground state and the nature of their molecular orbitals (HOMO; Highest Occupied Molecular Orbital and LUMO; Lowest Unoccupied Molecular Orbital) are directly involved in the inhibitive properties of these molecules. Such calculations, though instructive, are not always adequate for providing more clarification of the experimental results. Modeling of an experiment by molecular dynamic (MD) simulations have been accepted as an effective and authentic technique. MD simulations are particularly well-poised to investigate the structure of the corrosion inhibitors and the mechanism of inhibition at an atomic level under a variety of conditions [11].

Gonzalez-Olvera et al. [12] have recently investigated corrosion inhibition effect of some triazole derivatives of pyrimidine on the steel surface in 1.0 M HCl solution employing electrochemical impedance spectroscopy method. The obtained experimental results have reflected that these inhibitors are remarkably good corrosion-resistant inhibitors in 1.0 M HCl medium. In getting a complete picture of the mechanism of inhibition action of these compounds as well as to get an explanation of their inhibition efficiency trend, quantum chemical calculation and MD simulation are carried out in this current study. Also, correlations among the observed molecular parameters and experimentally obtained inhibition efficiency outcomes have been performed.

2 Computational details

2.1 Selection of inhibitors

A set of ten Triazole Derivatives as corrosion inhibitors were selected from the literature [12] and used for this present study. The 2D structure of each inhibitor in the data set was drawn using ChemDraw ultra V12.0. The structures of the inhibitors and their experimental inhibition efficiency (%IE) are presented in Table 1.

Table 1 Triazole derivatives of pyrimidine nucleobases and their inhibition efficiency (%IE)

2.2 Molecular optimization and quantum chemical calculation

The 2D structure of each inhibitor was converted to the 3D structure using Spartan 14.0 software. The molecular mechanic force field (MM+) was used to clean and minimize the structures using of SPARTAN’14 software on Dell Intel(R)Core(TM)i7-5500U CPU), 16.00 GB RAM @ 2.400 GHz 2.400 GHz processor on Windows 8.1 Pro 64-bit Operating system, × 64-based processor, so as to remove all the strain on the structures of the inhibitor molecules. Additionally, this guarantees a fully-defined and stable conformation of the studied inhibitor molecules of this study [13, 14]. Geometry optimization was set at ground state utilizing the DFT at the B3LYP level of theory and 6-311G (d) basis set. The generated chemical parameters were Energy of highest occupied molecular orbital (E-HOMO), energy of lowest unoccupied molecular orbital (E-LUMO), dipole moment (μ) and some others were calculated such as energy bandgap (ΔE), chemical hardness (η), chemical softness (σ), global electronegativity (\(\upchi\)), number of transferred electrons (\(\Delta {\text{N}}\)) using relevant relations (Eqs. 15) as reported before in literature [15, 16].

$$\Delta E = E_{LUMO} - E_{HOMO}$$
(1)
$$\eta = - \frac{1}{2}\left( {E_{HOMO} - E_{LUMO} } \right)$$
(2)
$$\sigma = \frac{1}{\eta } = - \left( {\frac{2}{{E_{HOMO} - E_{LUMO} }}} \right)$$
(3)
$$\chi = \frac{{ - \left( {E - HOMO + E - LUMO} \right)}}{2}$$
(4)
$$\Delta N = \frac{{\chi_{Fe} - \chi_{inh} }}{{2\left( {\eta_{Fe} + \eta_{inh} } \right)}}$$
(5)

where \(\chi_{Fe} = 7eV\), \(\eta_{Fe} = 0\) [17].

2.3 Molecular dynamics (MD) simulation

The simulation (MD) was applied to portray the adsorption mechanism between the studied inhibitors and the steel surface using Materials studio version 8.0 material simulation program from Biovia. The inhibitors were optimized and modeled employing COMPASS force field. The system (simulation) was carried out at 298 K using Andersen thermostat with NVE microcanonical ensemble at a time step of 1.0 fs and the simulation time was set as 5 ps. The simulation was conducted in a box (simulation-box) of (24.82 Å × 24.82 Å × 45.27 Å) under periodic boundaries conditions. The simulation box contains a Fe (110) slab, solvent (acid) molecules (H2O + H3O+ + Cl) and an inhibitor. Fe (110) surface was chosen as the studied Fe surface because Fe (110) was the most density packed Fe surface and stable [18, 19]. The Fe crystal has ten (10) layers out of which seven (7) down layers were frozen. The adsorption and binding energies values were calculated using Eqs. 6 and 7 respectively [16].

$$E_{adsorption} = E_{Total} - \left( {E_{{Surface + H_{2} O + H_{3} O^{ + } + Cl^{ - } }} + E_{Inhibitor} } \right)$$
(6)
$$E_{binding} = - E_{adsorption}$$
(7)

where \(E_{Total}\) is \(E_{{Surface + H_{2} O + H_{3} O^{ + } + Cl^{ - } + Inhibitor}}\) (the total energy of the corrosion system) \(E_{{Surface + H_{2} O + H_{3} O^{ + } + Cl^{ - } }}\) is the energy of the Fe surface together with H2O + H3O+ + Cl molecules and \(E_{Inhibitor}\) is the energy of the inhibitor.

3 Results and discussion

3.1 Quantum chemical studies of the neutral form of the inhibitors

To examine the inhibitive performance of the inhibitors concerning the molecular structures, some DFT (quantum) parameters were generated to explain their mode of adsorption. The geometry optimized molecular structure, the distributions of HOMO and LUMO of the first inhibitor are depicted in Fig. 1. Table 4 present the results of DFT parameters of the studied inhibitors like the E-HOMO, E-LUMO, dipole moment (μ), energy band gap (ΔE), chemical hardness (η), chemical softness (σ), global electronegativity (\({{\upchi }}\)) and number of transferred electrons (\(\Delta {\text{N}}\)) computed using Spartan 14 software at B3LYP level of theory, 6-31G (d,p) basis set and some relevant equations.

Fig. 1
figure 1

a Optimized structure, b HOMO distribution and c LUMO distribution for I-1 (Inh.1)

The HOMOs of the studied inhibitors are mainly dominated on the pi-bond and then delocalized over the whole aromatic Pyrimidine ring in each molecule as seen in Fig. 1. The Halogen substituents in each of the inhibitors from I-2 to I-10 are also involved in the HOMO. Pyrimidine ring of inhibitor 1 in Fig. 1 shows a significant contribution of the two nitrogen atoms, pi-bond and the two oxygen atoms of the -dione to the distributions of HOMO and LUMO. The HOMO electron density distribution of the studied inhibitors indicate favorable interactions of the inhibitors with an electron lacking metallic orbitals. The distribution of the LUMO electron densities of all the studied inhibitors was also spread all over on the Pyrimidine rings. The electronic surfaces of HOMO and LUMO revealed the Pyrimidine ring has the potential to donate and accept electrons under favorable conditions. This typical behavior is suitable for donor–acceptor interactions which may be responsible for the adsorption of inhibitors on the steel surface.

Based on the frontier orbital (molecular) approximation, the donor/acceptor relation occurs in between HOMOs and LUMOs (frontiers (molecular) orbitals) of reacting molecules [20, 21]. The adsorption mechanism of an inhibitor on a metallic surface usually increases with the increase of the HOMO energy and decreases with the decrease of LUMO energy. Therefore, the inhibitor molecule can donate their lone pair of electrons from the HOMO orbital to the d-orbital of the metallic molecule and also the inhibitor molecule will receive the electrons coming from the metallic d-orbital through the LUMO orbital for in-electron-donation and electron-back-donation method. Therefore, E-HOMO has always related with electron donation of an inhibitor; a high value of E-HOMO shows the high tendency of an inhibitor molecule to donate lone pair of electrons to the d-orbital of the acceptor metal.

From Table 2, the values of E-HOMO for the studied inhibitors increases in the order I-4 > I-3 > I-5 > I-2 > I-1 > I-9 > I-10 > I-8 > I-7 > I-6 respectively. The trend in the increase of the HOMO energies show some level of consistency with the increase of the efficiencies (inhibition), Thus, I-4 with a high efficiency (96.1%) has a larger HOMO energy and I-6 with the lowest efficiency (90.2%) has a lower HOMO energy as seen in Table 2. Conversely, a low value of E-LUMO of an inhibitor molecule demonstrates the high tendency of the inhibitor molecule to receive electrons coming from the metallic d-orbital during the back-donation process. From Table 2, the E-LUMO value in the ascending order are: I-6 > I-7 > I-8 > I-9 > I-1 > I-2 > I-5 > I-4 > I-10 > I-3. This indicates that I-3 has a stronger chance of accepting electrons from the orbital of the metal as they interact with the Fe surface. Therefore, I-3 may strongly adsorb on the surface of the metallic and achieve better inhibition effectiveness though the second highest in terms of %IE. I-6 strongly agrees with EIS findings as it has the lowest %IE having the highest LUMO energy.

Table 2 Quantum chemical parameters of the neutral form of the studied inhibitors

Energy band gap, ΔE is another crucial property as most efficient inhibitors were characterized by a small value of ΔE [22]. In Table 2, the trend at which the energy gap decreases is not consistent with the increase in the experimental %IEs of the studied inhibitors. However, the reverse is the case i.e. the ΔE increases when the %IEs decreases. The dipole moment (μ) is another parameter which is commonly used for the prediction of the direction of the inhibition process. It shows a distribution of the electrons on the molecule, and also measure the polarity in any given bond [23]. The molecules with higher μ values tend to form a strong interaction (dipole–dipole) with the metallic steel surface, resulting to the strong adsorption of the inhibitor on the metallic surface and hence resulting in the better IE% of an inhibitor [4]. Nevertheless, there is no established correlation between the μ and IE% reported [19]. The results shown in Table 2 indicate that I-3 has the largest μ value and I-9 has the lowest μ value. Among all the ten (10) studied inhibitors, increasing the μ leads to an increment of their IE% due to the increase in the intermolecular forces.

Inhibitor with the large hardness (η) value is expected to be weaker compared to other inhibitors with lower values [24]. Thus, as shown in Table 2, the hardness value increases as the %IE increases. I-4 has the highest η value hence the best inhibitor and this agrees with the experimental observation reported in Table 1. The larger σ value indicates that the inhibitor has a softer nature and will have higher chances of donating electrons to the metallic molecule [25]. The arrangement across the inhibitors in the σ values as presented in Table 2 decreases in the order, I-2 > I-3 > I-4 > I-5 > I-1 > I-7 > I-7 > I-8 > I-9 > I-6 > I-10. This suggests that I-2 has the highest and therefore the most reactive inhibitor molecule.

The electronegativity (χ) describes the electron attracting the power of an inhibitor molecule. The High value of χ shows the strong attracting capability of an inhibitor molecule to accept the electrons from the metallic (Fe) surface [9]. Afterward, the inhibitors that have larger electronegativities would have better interaction with Fe surface and then will have better IE%. From Table 2, it can be observed that the χ values of the ten inhibitors obey the order I-3 > I-4 > I-5 > I-2 > I-1 > I-10 > I-9 > I-8 > I-7 > I-6, hence, it is confirmed that I-3 followed by I-4 has the higher tendency of accepting electrons and I-6 has the least among the studied inhibitors and these findings are in good agreement with the experimental findings. The values of ΔN demonstrate the fraction of electrons that transfer from the inhibitor to the metallic surface. If ΔN > 0, then electrons were transferred from the inhibitor molecule to the Fe-surface while if ΔN < 0, then electrons were transferred from Fe-surface to inhibitor molecule through electron back donation process [16]. From Table 2, it can be observed that the values of ΔN of the studied inhibitors are all greater than 0 (ΔN > 0), this indicates that all the studied inhibitors may donate electrons on to the Fe surface through the formation of a coordinate covalent bond. Examination of the results in Table 2 indicates that the values of ΔN of the inhibitors have a very little difference. This further confirms the electron-donating ability of the studied inhibitors as observed from their experimental findings.

3.2 Quantum chemical studies of the neutral form of the inhibitors

Presence of heteroatoms in the structures of the inhibitor molecules suggests a high tendency towards of protonation in the acidic medium. Thus, the reactivity of the inhibitor molecules in their protonated forms should be considered. Geometry optimization of the protonated form of the inhibitors are carried out and it is observed that from Table 3, E-HOMO values for both the inhibitors are shifted towards the more negative value in comparison to the E-HOMO values of neutral form. It signifies that in the protonated form, electron donation capability of the inhibitor molecules is decreased and it is also expected as after protonation inhibitor molecules are not capable enough to donate their electrons to the metallic surfaces. This fact is further confirmed by the fraction of electron transferred from the inhibitors to the metallic surface (ΔN). Inspection of Table 3 shows that all the values of ΔN for Fe (110) surface are lower than in the neutral form of the inhibitors.

Table 3 Quantum chemical parameters of the protonated form of the studied inhibitors

On the other hand, if we look at the E-LUMO values it can be seen that E-LUMO values are also shifted towards the more negative values than its neutral form, it pointing out electron acceptance capability in protonated form is increased. It is further counter supported by the electronegativity values of the inhibitors. Comparison of electronegativity values of the two forms of inhibitors molecules reflects that electronegativity values in the protonated form of inhibitor molecules are much higher than that of the neutral form. It reflects electron attraction capability from the metal surface is increased by the protonated form of inhibitor molecules. Therefore, after a complete analysis of both the form of inhibitors molecules it can be concluded that the neutral form of inhibitors molecule has higher tendency to donates their electrons and protonated form of inhibitors molecules have superior tendency to accept electrons. Now, it is clear from the above mention discussion that a more complete analysis of reactivity is obtained from both the form of inhibitor molecules.

3.3 Molecular dynamic simulation studies

Electronic parameters alone are not enough to determine the trend of the inhibitive performances of these studied inhibitors despite its success in explaining the mechanism of action of the inhibitors. Thus, it is essential to conduct thorough modeling of the direct interactions of the studied inhibitors with the Fe surface. It is a belief that the major mechanism of the inhibition of corrosion is through adsorption. Therefore, adsorption of these inhibitors on the steel (Fe) surface was simulated to predict the nature of interactions between the studied inhibitors and Fe (110) crystal surface in 1.0 M HCl. The first step of this simulation process was the geometry optimization of the studied inhibitors, solvent (acid) molecules (H2O, H3O+, and Cl) and Fe (110) crystal. The geometry optimization of the corrosion system was conducted until the total energy of the system reached a local minimum on the potential energy surface. During the optimization process, the atomic coordinates were adjusted using COMPASS force-field which continues unless the total energies of the individual structures reached to the minimum energy, after which, a box was created for the simulation process by importing the Fe (110) crystal, solvent molecules (H2O, H3O+ and Cl) and the inhibitor molecule. Then the MD process was conducted and the system attained equilibrium when both the energy and temperature of the system were balanced. All the other inhibitors were studied similarly. The equilibrium configurations of the simulated system for the first inhibitor are depicted in Fig. 2. It could be observed that in Fig. 3a, b in the middle of the MD simulation process the system moves towards the equilibrium. After the system attained an equilibrium, the adsorption and the binding energy values of the inhibitors adsorbed on the Fe surface was calculated according to Eqs. (6) and (7) respectively and are presented in Table 4.

Fig. 2
figure 2

Equilibrium interaction configurations of the first inhibitor on Fe (110) surface

Fig. 3
figure 3

a Fluctuation curves of energies obtained from MD simulation for the first inhibitor, b equilibrium temperature curve recorded from MD simulation for the first inhibitor

Table 4 Molecular dynamic simulations results of the studied inhibitors

It can be observed from the molecular structures of the examined inhibitors that these molecules contain various electrons (lone pair) on the N and O atoms and also π-bonds of the aromatic systems. Therefore, these electrons (lone pair) on the heteroatoms will be donated to an empty d orbital of Fe Metal. It could be observed in Fig. 2, that the inhibitor adsorbs almost flatly in orientation with the Fe surface and the interaction is more through the pyrimidine ring. This flat orientation of the inhibitor molecule on the Fe surface can be as a result of a chemical bond formation between the inhibitor and Fe surface. This observation was supported by the HOMOs and LUMOs distributions of these inhibitors as the region (pyrimidine ring) was found to be the most active center of adsorption (see Fig. 1). Additionally, it could be seen from the results presented in Table 4 that the values of the adsorption energy of the simulation systems at 298 K were large and negative. These high negative values of adsorption energies may be attributed to the strong interaction which occurs between these inhibitors and Fe surfaces. Thus, the calculated adsorption energy values reveal that inhibitor 4 adsorbs on the Fe surface more spontaneously than any other inhibitor among the series. However, the adsorption capability of an inhibitor molecule on the Fe surface may also be determined from the values of the binding energy. The larger the binding energy is, the better will be the adsorption. Therefore, it is further confirmed from the results presented in Table 4, that all the adsorption of the inhibitors on the Fe surfaces occurred through chemical adsorption process since the magnitude of the binding energies is actually within the range of chemisorption (> 100 kcal mol−1) [26].

Generally, a bond distance measured within 3.5 Å describes a strong chemical bond formation between the atoms and the bond distance greater than 3.5 Å signifies interaction between the atoms are of Van der Waals type [27, 28]. Figure 3b indicates the bond distance (shortest) between the N-atom of the pyrimidine ring of the first inhibitor and Fe surface. The measured bond distances for all the studied inhibitors and Fe-surface were shown in Table 4. From the mentioned values in Table 4, it can be seen that all the measured bond distances are in the range (3.5 Å), this indicates that chemical bond was formed between these inhibitors and the Fe surface. Thus, chemical adsorption occurred on Fe surfaces. These findings are consistent with the experimental results obtained from EIS measurement [12] as well as from quantum chemical studies. This could be explained from the molecular structures of the studied inhibitors and the distribution of the HOMOs and LUMOs. Inhibitors having halogen atoms in their molecular structures are more and easily adsorbed on metallic surfaces and shows better efficiency (inhibition). It was clear from the structures given in Table 1 that inhibitor 1–5 has the similar pattern with the introduction of halogen atoms which increases the inhibition efficiency in the order Br > Cl ˃ F while the iodine atom slightly decreased the %IE. For that reason, inhibitor-4 with bromine atom as the substituent was the best corrosion inhibitor among the studied inhibitors. Similarly, inhibitor 6–10 had a similar pattern with F, Cl and Br and methyl group as substituent have the same effect in increasing the inhibition efficiency while the increase with iodine as the substituent is also slightly lower. In this regard the inhibitors with Br, F or Cl are regarded to be the most potential corrosion inhibitors for steel.

Furthermore, to check the affection of the solvent (acidic) solution on the adsorption process of the system, the adsorption behavior of the first inhibitor in vacuum was simulated via MD simulation. The adsorption energy obtained in acidic solution is much less than those obtained in the vacuum. This could be due to the less influential effect in vacuum and the complex nature of the corrosion process in solution, like adsorption of the solvent (acid) molecules, the affection of the acid solution, most especially the anions, that have been proved to have a high influence on adsorption of the inhibitor [29]. It was found that the adsorption energy of this inhibitor (− 1811.528 kcal mol−1) changed significantly compared with the one simulated in acidic solution (− 419.28 kcal mol−1). So also, the adsorption behavior is not consistent with those in the acid solution. Therefore, considering a solvent in the molecular dynamics simulation process is very necessary.

4 Conclusion

The Computational approach employed in this study was successful in explaining the inhibition performance of the studied inhibitors on the steel surface and has offered an atomic level understanding of the experimental findings. Quantum chemical calculation shows that the reactive sites in the structure of the inhibitors are majorly the N-atom of the pyrimidine ring, π-electron centers, and halogen substituent. Electron-donation and electron-acceptance capability of these inhibitors were consistent with the results obtained from the experimental results. The interaction energies (Eads. and Ebind.) between the inhibitors and Fe (110) metal surface via MD-simulation were large indicating chemical bond formation and that the inhibitors can more tightly adsorb on the iron surface. Inhibitor 4 showed high adsorption energy (− 333.783 kcal mol−1) among other co-inhibitors as observed from the experiment. The shortest bond distances between the heteroatoms of the inhibitors and Fe atoms in MD-simulation are lying within a range of 3.5 Å which indicates that these inhibitors have a very strong interaction with steel (Fe) surface. In conclusion, the DFT and MD simulation results are in good agreement with the experimental results. Thus, DFT along with MD simulation may be a very powerful tool for the designing of potent corrosion inhibitors and in the prediction of their inhibition performance before the synthesis.