Experimental, quantum chemical and molecular dynamic simulations studies on the corrosion inhibition of mild steel by some carbazole derivatives

Five selected carbazole derivatives, namely carbazole, 3,6-dibromocarbazole, 2-hydroxycarbazole, 1,2,3,4-tetrahydrocarbazole and 9-(2-ethylhexyl)carbazole-3,6-dicarboxaldehyde were investigated for their inhibitive effects on Desulfovibrio vulgaris (D. vulgaris) induced corrosion of mild steel and in 1 M HCl medium using weight loss, potentiodynamic polarization and electrochemical impedance spectroscopy (EIS) techniques. The carbazole derivatives were found to be mixed type inhibitors with predominantly cathodic inhibitive effects for mild steel in 1 M HCl. Surface morphology results showed the compounds formed adsorbed film on mild steel surface in both aqueous acid and sulphate reducing bacteria (SRB) media. Quantum chemical calculations were used to provide molecular based explanations for the inhibitive effects of the compounds. The interactions of the molecules with mild steel surface was simulated based on molecular dynamic simulations approach using Fe(110) crystal surface as representative metallic surface.

Mild steel is a widely used alloy of iron with various industrial applications. The choice of mild steel as a preferred material for construction and other usages is attributed to its relatively low cost and high mechanical strength 1 . However, mild steel readily undergoes corrosion in common environments of usage. Acid solutions especially hydrochloric acid used in many industrial practices such as acid cleaning, oil-well acidizing, acid descaling etc. are typical highly aggressive media for mild steel corrosion 1 . Corrosion can also be induced by microorganisms. Such corrosion is called microbial influenced corrosion (MIC). It has been suggested that biocorrosion (MIC) follows the same mechanism as electrochemical corrosion in aqueous media 2,3 .
Though both corrosion in aqueous environment and the MIC are destructive, the former is by far more investigated than the latter. Research in corrosion especially with respect to the use of corrosion inhibitors is often conducted in aqueous environment. A large number of these studies have been carried out on mild steel corrosion in aqueous acid solutions [4][5][6][7] . Meanwhile, a study conducted by Rajasekar et al. 8 revealed that about 20% of corrosion damages are due to MIC. Miller et al. 9 also reported that the cost of damages due to MIC stood at nearly 50% of all corrosion cost, which amounted to 140 billion USD in the US alone. In this regard, more studies that focus on MIC or more inclusive studies that encompass both acid corrosion and MIC should be promoted. Formation of biofilms, their characteristics, and influence on bacteria populations have been extensively discussed [10][11][12][13] . The effects of anaerobic bacteria on MIC and the contributions of sulphate reducing bacteria (SRB) to MIC can be found in literature 14 .
Various techniques used in the study of corrosion and corrosion inhibition in acid solution include electrochemical 4,[15][16][17][18] , quantum chemical [19][20][21][22] and surface morphology 4,21,22 . On the other hand, weight loss technique 23, 0.017% S, 0.019% P, and the remainder iron was used for both aqueous electrochemical corrosion and biocorrosion weight loss tests. Mild steel coupon was cut into 1 cm × 1 cm. The mild steel coupons for electrochemical measurement were embedded in a Teflon holder using epoxy resin, exposing a surface area of 1 cm 2 . Prior to each measurement, mild steel surface was mechanically abraded on Struers MD Piano TM 220 (size: 200 dia) mounted on Struers LaboPol-1 machine to remove traces of epoxy resin from the surface. The surface was then ground using progressively finer SiC papers of grit size 200, 300, 400 and 600 to achieve a mirror-like surface. The coupons were then cleaned in a sonicating acetone bath for 30 mins, followed by sonication in ethanol and finally wiped with clean paper towel and air-dried. The mild steel was used immediately after surface pre-treatment.
Electrochemical measurements. All electrochemical measurements were carried out using the Autolab PGSTAT 302 N obtained from Metrohm and equipped with a three-electrode glass cell system. Mild steel, platinum rod and Ag/AgCl with 3 M KCl were used as working, counter and reference electrodes respectively. The electrochemical system was maintained in an unperturbed state for a period of 30 minutes in order to allow it to reach the steady open circuit potential (OCP) before each electrochemical measurement.
Potentiodynamic polarization (PDP) measurements were carried out after 30 minutes of mild steel immersion in the aggressive solutions by sweeping the potential between −0.25 to + 0.25 V at the scan rate of 0.5 mVs −1 . The corrosion current density (i corr ), anodic and cathodic Tafel slopes (b a and b c respectively) were obtained from the polarization curves by extrapolating the linear Tafel segments to the corrosion potential (E corr ). The inhibition efficiency (%IE PDP ) was calculated from the i corr using the formula: where i°c orr and i corr are corrosion current densities in the absence and presence of inhibitors respectively. Electrochemical impedance spectroscopy (EIS) measurements were carried out at the OCP by analysing the frequency response of the electrochemical system in the range of 10 mHz to 100 kHz at 10 mV root-mean-square (rms) amplitude. The impedance spectra were fitted into appropriate equivalent circuit to obtain relevant electrochemical parameters including the charge transfer resistance (R ct ). The corrosion inhibition efficiency was evaluated from R ct values using the formula: where R ct and R 0 ct are the charge transfer resistances in the presence and absence of inhibitor respectively. All the electrochemical measurements were carried out under unstirred conditions at 303 K. The measurements were taken in triplicate and the results were adequately reproducible.

Biocorrosion incubations.
The surface pre-treated mild steel coupons were used as the substratum for biofilm growth in 30 ml cylindrical airtight containers. The mild steel was subjected to D. vulgaris activity in the airtight containers. The steel sample used for surface morphology study was exposed at only one side, while the other sides were coated with Teflon. An anaerobic chamber with a constant nitrogen supply was used to provide an anaerobic environment for inoculation. After distributing 10 ml of the SRB medium into each airtight containers and adding an appropriate amount of biocide, it was inoculated with SRB culture. Bacteria suspensions of 1.5 × 10 8 CFU/mL were used during the experiments. Prior to inoculation of the samples, the chamber and containers were flushed with steady supply of nitrogen gas to ensure oxygen-free environment. Each container had five metal coupons carefully placed to avoid contact with each other. The containers were sealed, put in an airtight vessel, placed in an incubator maintained at 37 ° C for a period of 9 days.
Weight loss analysis. Corrosion rates due to the activities of D. vulgaris were determined by weight loss analysis using ASTM method G01-03 [33][34][35] . Prior to immersion of mild steel, the mirror like coupons was cleaned in a sonicating acetone bath for 30 mins, followed by sonication in ethanol. Mild steel coupons were further sterilized by soaking in ethanol for 48 hrs and later dried in vacuo. The weight of the mild steel was then recorded before exposure to D. vulgaris. The sterilized mild steel coupons were exposed to D. vulgaris for a period of 9 days, after which they were retrieved, rinsed in distilled water, wire brushed, and immersed in Clark's reagent (1000 mL, 12.1 M HCl, 20 g antimony trioxide, and 50 g tin chloride) for 30 seconds to remove surface oxides, biofilm and other corrosion product. Clarke's solution has been reported to be effective in removing base metal that accumulates on the surface of metallic coupon 28 . The coupons were further rinsed with distilled water, air dried and weighed. Washing (in Clark's solution and distilled water), drying and weighing were repeated until a stable weight was recorded, indicating complete removal of biofilms and corrosion products. The weight loss experiment was carried out in triplicates and average weight loss was recorded in each case to ensure reproducibility.
Corrosion rate was calculated using the equation: where CR is the corrosion rate (g.cm −2 .d −1 ); ΔW is the average weight loss (g) of mild steel coupons; A is the surface area (cm 2 ) and T is the duration of immersion in days. From the calculated CR values, inhibition efficiency (%IE WL ) was derived using the relationship 36 : where CR 1 and CR 2 are the corrosion rate values in the absence and presence different concentrations of CZs, respectively.
Surface analysis. For corrosion tests in acidic medium, mild steel specimens with freshly pre-treated surface as described above were immersed in 1 M HCl in the absence and presence of 100 ppm of the studied CZs. Thereafter, the specimens were removed, washed with distilled water, dried and utilized for surface electron microscopy (SEM) and energy dispersive x-ray (EDX) analyses. For biocorrosion study, the steel specimens immersed in the D. vulgaris incubator for 9 days were used. The retrieved coupon whose surface is covered with biofilm was immersed in 2.5 wt% glutaraldehyde for 8 h and subsequently washed with a graded series (30%, 50%, 70%, 100% v/v) of ethanol for dehydration 34,37 , and finally stored in a desiccator and later used for SEM and EDX analyses. The SEM images with simultaneous elemental characterization using EDX were obtained using FEI Quanta FEG 250 Environmental Scanning electron microscope (ESEM) under an acceleration voltage of 15 kV in high vacuum.
Quantum chemical calculations. Quantum chemical calculations were carried out using the density functional theory (DFT) method comprising the Becke three-parameter hybrid functional together with the correlation functional, which includes both local and non-local terms (B3LYP), and the split-valence double-zeta polarized basis set (6-31 G + (d, p)) 25 . Full geometry optimizations were carried out on neutral molecules both in vacuo and in water phases. Calculations were not performed for protonated species because it has been reported that protonation of carbazoles in acidic medium might require rigorous conditions, such as highly concentrated acid 38 . Polarizable continuum model was used to investigate the effect of water on the geometry and electronic parameters of the molecules. Quantum chemical parameters computed include the energy of the highest occupied molecular orbital (E HOMO ), the energy of the lowest unoccupied molecular orbital (E LUMO ), energy band gap (ΔE = E LUMO − E HOMO ), global electronic chemical potential (µ), chemical softness (σ), chemical hardness (η) and electrophilicity index (ω). The quantum chemical reactivity indices were derived from the frontier molecular orbital energies (E HOMO and E LUMO ) using appropriate relations (Equations 5-9) as previously reported in literature 39 .
HOMO LUMO HOMO LUMO Scientific RepoRts | 7: 2436 | DOI:10.1038/s41598-017-02446-0 The quantum chemical studies were carried out with the aid of Gaussian 09 software 40 . In order to identify the prospective local (atomic) sites of the inhibitor molecules that are susceptible to electrophilic attacks by the metallic atoms, the electron density surfaces of the electrophilic Fukui function (f − ) of the studied CZs were visualized using the Multiwfn software 41, 42 . Molecular dynamics simulation. Molecular dynamic simulation was carried out to describe the interaction between the inhibitor molecules and metallic surface. The adsorption locator module implemented in the Materials studio 6.0 software from Accelrys was used for the simulation. The inhibitor molecules were modelled and optimized using the Condensed-phase Optimized Molecular Potentials for Atomistic Simulation Studies (COMPASS) force field. COMPASS is a robust and well-developed force field that was derived based on fitting against a wide range of experimental data for organic and inorganic compounds 43 . This informs its suitability for treating metal and non-metal containing systems. Fe (110) crystal surface was used as the representative metallic surface. The Fe (110) crystal surface was obtained by cleaving the crystal structure of Fe into 110 planes and optimizes the surface to minimum energy using the COMPASS force field. A 10 × 10 supercell of Fe (110) was built from the optimized crystal surface and a vacuum slab of 7 nm was built above the plane.
The optimized inhibitor molecule was used as the adsorbate and made to interact with the surface atoms of the Fe (110) using the adsorption locator module. A maximum distance of 10 Å was maintained between the adsorbate and the selected atoms of Fe(110) surface. Ultra-fine convergence criteria was used for all optimization and simulation jobs, while the temperature was ramped down from 1 × 10 5 K to 100 K as the simulations went through 10 cycles at 100,000 steps per cycle.

Results and Discussions
Electrochemical measurements. Potentiodynamic polarization (PDP) studies. Potentiodynamic polarization studies were carried out to gain insights into the mechanism of the mild steel dissolution at the anode and evolution of hydrogen at the cathode in the absence and presence of different concentrations of CZs. The current-potential curves for mild steel corrosion in 1 M HCl without and with different concentrations of the CZs are shown in Fig. 1.
The polarization curves in Fig. 1 clearly reveal that the addition of the inhibitors affects both the anodic and cathodic processes as the curves are shifted towards lower corrosion current density region compared to the blank. The reduction in anodic and cathodic current densities increases as inhibitor concentration increases. This implies that the corrosion rate decreases with increasing concentration of the inhibitors and the inhibitors retard the rate of both anodic and cathodic corrosion reactions 44 . The shifts in corrosion current densities appear to be more apparent for the cathodic curves than the anodic. This suggests that the inhibitors might have more pronounced effects on the cathodic reaction than the anodic one. More so, cathodic Tafel lines exhibit near parallel displacements with increasing concentration of the inhibitors, which suggests that the hydrogen gas evolution is activation-controlled and addition of inhibitors did not affect the mechanism of this process 45,46 . The similar behaviour of the polarization curves both in the absence and presence of inhibitors hints that addition of the inhibitors did not alter the corrosion mechanism.
Relevant electrochemical parameters such as corrosion current density (i corr ) and anodic and cathodic Tafel slopes (b a and b c respectively) were obtained by extrapolating the linear Tafel regions of the polarization curves to the E corr . The results of the electrochemical parameters together with the inhibition efficiencies are presented in Table 2. The E corr values for the inhibited systems are more cathodic compared to the blank, except for 100 ppm DBCZ, which is slightly more anodic. This observation further supports the suggestion that the inhibitive effects of the studied compounds are more profound on the cathodic reaction.
The maximum shift in E corr with respect to the E corr of the blank is 53 mV (observed for CZ at 200 ppm and THCZ at 500 ppm). A shift in E corr less than 85 mV is generally attributed to mixed-type inhibitive effect of a corrosion inhibitor 36 . Therefore, it can be inferred that the studied CZs are mixed-type inhibitors with predominant effects on cathodic reaction. That is, the inhibitors retard both the anodic mild steel dissolution and the cathodic hydrogen evolution reactions with the latter being more affected. The change in cathodic Tafel slopes, b c with change in inhibitors concentration is an indication of the effects of the inhibitors on the kinetics of the cathodic process. The change in anodic Tafel slopes, b a on the other hand is attributable to the adsorption of species such as chloride ion or inhibitor molecules or metal-inhibitor complexes emerging from redox processes, on the active sites on the metal 45,47 . The inhibition efficiency was found to increase with concentration for the five CZs studied, with the highest %IE recorded at 500 ppm for each compound.
Electrochemical impedance spectroscopy (EIS) measurements. Electrochemical impedance spectroscopy (EIS) was employed to further elucidate the adsorption of the studied inhibitor molecules on mild steel surface during the electrochemical corrosion reactions occurring at the metal/electrolyte interface 21   The Nyquist plots show single depressed semicircles with large capacitive loop at low frequency, while the Bode plots show one time constant. This implies that the corrosion of mild steel in the studied media is controlled by single charge transfer process. The depression in Nyquist semicircles is a common feature of solid electrodes which is often referred to as frequency dispersion as a result of the inhomogeneity or roughness of the electrode surface 4,21 .
Addition of the inhibitors increases the diameter of the capacitive loop of the Nyquist plots without affecting their characteristic features. This means that the inhibitive action of the studied CZs is due to the adsorption of their molecules on the steel surface without affecting the corrosion mechanism 48 . The gradual broadening of phase angle maxima at intermediate frequency in the presence of the studied CZs also suggests the formation of a protective film of the inhibitor molecules on the steel surface 15 .   Figure 4 represents the equivalent circuit employed for the fitting of impedance spectra. The constant phase element (CPE), is introduced in the circuit in order to ensure a more accurate description of the process occurring at the electrode/electrolyte interface 48 . The impedance of the CPE (Z CPE ) is expressed as: where, Y 0 is the CPE constant; ω is the angular frequency; j is the imaginary number and n is the phase shift (exponent). Electrochemical parameters obtained from the fitting of the impedance spectra are listed in Table 3.
The electrochemical behaviour of the CPE is related to the value of n, which in turn is related to the surface inhomogeneity 36 . R ct represents the charge-transfer resistance whose value is a measure of electron transfer across electrode/electrolyte interface and it is inversely proportional to corrosion rate 48 . The R ct values in Table 3 increase with increase in concentration of the inhibitors. This implies that the impedance of the mild steel electrode   surface to flow of charges across metal-electrolyte interface increases with increasing concentration of the inhibitors. The increased R ct with increase in inhibitor concentration may be as a result of increase in the number of inhibitor molecules that adsorb on mild steel surface, and consequently decrease in the exposed surface area of the mild steel to the aggressive solution. The increased R ct with increase in inhibitor concentration also translates to increase in inhibition efficiency (IE%). The variations of impedance modulus and phase angles with frequency are visualized in Fig. 3. The impedance at high frequency limit corresponds to the ohmic resistances of the protective film and the solution entrapped between the working electrode and the reference electrode. At high frequencies, log|Z| tends to approach zero and the phase angle (α) falls rapidly to 0°1 5 . This response is attributed to resistive behaviour of the electrode/ electrolyte interface and the impedance magnitude corresponds to the solution resistance. A linear plot of log|Z| vs log f with a slope (S) of −1 and a phase angle (α) of −90° at intermediate frequencies is characteristic of pure capacitive behaviour of electrode/electrolyte interface 15,36 . The values of S and α as listed in Table 4 shows that the electrochemical systems of mild steel in 1 M HCl in the absence and presence of CZs exhibit pseudo-capacitive behaviour. The values of S and α for the inhibitor-containing systems are generally closer to the threshold values for a pure capacitor. This suggests the inhibitor molecules form (pseudo-capacitive) adsorbed film on mild steel surface and thereby protect the steel surface from direct attack by aggressive acidic ions in solution.
Adsorption isotherm. Understanding the nature of interactions between the corroding surface of the metal and inhibitor molecules during corrosion inhibition can be expanded in terms of the adsorption characteristics of the inhibitor molecule 49 . In the present study, the results obtained for the degree of surface coverage at 303 K (using the data obtained from polarization studies and listed in Table 2) were fitted into various adsorption isotherm models but only Langmuir and Freundlich adsorption isotherms gave satisfactory fittings with near unity values of the correlation coefficients (R 2 ). The general equations for the adsorption models are: ads inh inh ads inh where, θ is the degree of surface coverage; K ads is the equilibrium constant of the adsorption/desorption process and C inh is the concentration of the inhibitor. The value of K ads is an indicator of the degree of adsorption, i.e., the higher the value of K ads the stronger the adsorption of the inhibitor molecules on the metal surface 4, 49 . Both the Freundlich and Langmuir adsorption isotherm plots of the forms in Equations 11 and 12 respectively are shown in Fig. 5 for all the studied compounds. The plots exhibit essential linearity with R 2 values ranging   should be unity. The values of slopes and intercepts listed in Table 5 do not conform to these conditions for the two models. The deviation of the slope of a Langmuir adsorption plot from unity has been attributed to possible interactions between the adsorbed inhibitor molecules 49 , which the actual Langmuir adsorption model does not take into consideration. A modified Langmuir adsorption isotherm of the form, C inh /θ = 1/K ads + mC inh has been used in some recent studies. In this modified model, m is the slope of the plot and can be assumed to an inherent factor in the surface coverage values. Therefore, the intercept of the plots can be equated to (1 /m)K ads , from which K ads can be calculated. This approach was adopted to calculate the values of K ads listed in Table 5. Hence, the values of K ads were calculated using the Langmuir adsorption isotherm parameters because there is no similar simple modification for the Freundlich adsorption isotherm.
The change in Gibb's free energy of adsorption (ΔG ads ) was calculated by using the equation: where ΔG ads is the standard free energy of adsorption; R is the gas constant and T is the absolute temperature. The value of 55.5 is the concentration of water in solution in molL −1 .
The calculated values of K ads and ΔG ads are listed in Table 5. Inspection of the results in Table 5 reveals the ΔG ads values are negative as expected for an adsorption process, which implies spontaneity of the adsorption process and stability of the adsorbed film on the mild steel surface 4,21 . The ΔG ads values obtained in this work are more negative than −20 kJmol −1 (for physisorption) and less negative than −40 kJmol −1 (for chemisorption). This suggests that the studied CZ molecules adsorb on mild steel surface in 1 M HCl via competitive physical and chemical adsorption mechanisms 21 . Biocorrosion study (weight-loss measurements). SRB induced anaerobic corrosion of mild steel was quantified by weight-loss measurements and the degree of weight loss in the absence and presence of the studied inhibitors (CZs) are presented as column plots in Fig. 6. The trend of weight-loss (WL) values for MS exposed to pure and mixed SRB culture is such that SRB > HCZ > THCZ > DBCZ ≈EHCZDCA > CZ. The significant WL observed in pure SRB strain is consistent with the pit image caused by the uninhibited corrosive environment 25 . Corrosion rate (CR) due to MIC was also calculated using Equation 3 whilst inhibition efficiency from weight loss analysis (%IE WL ) was calculated using Equation 4 and the results are listed in Table 6. All the studied compounds showed excellent corrosion mitigation efficiencies for mild steel in the SRB culture. The corrosion inhibitive effect of the studied CZs in the SRB media may be as a result of biocidal effect of CZs on the bacteria that are responsible for corrosion in the SRB media. This however does not completely preclude the protection of the steel surface by adsorbed molecules of the tested CZs.

Surface morphology studies. Scanning electron microscopy (SEM) study. Figures 7 and 8 respectively
show the SEM images of mild steel coupons exposed to the uninhibited and inhibited acid media (for 3 h) and uninhibited and inhibited D. vulgaris inoculated media (for 9 days). The coupon surfaces was analysed without removing the biological and/or chemical species formed on the coupon surfaces. All the mild steel coupons analysed showed distinctive surfaces after exposure to the respective media. Figure 7a reveals the SEM micrograph of mild steel surface in 1 M HCl in the absence of the inhibitors, which clearly shows a hugely corroded and damaged surface. In the presence of 100 ppm of the studied CZs, the surface morphologies (Fig. 7b-f) are characterised by strongly localised protective film, which suggests that the studied CZs adsorbed on mild steel surface and prevent it from direct contact with the corrosive acidic ions. Figure 8a shows the presence of passive film as well as conditioning layers on the mild steel coupons retrieved from the SRB medium (without the inhibitors). In the presence of the studied CZ molecules, the coupon surfaces become more homogeneous than that of SRB medium (Fig. 8b-f). A comparison of the steel surfaces revealed that the mild steel coupons retrieved from the D. vulgaris inoculated media that contain the inhibitor molecules  are covered with protective film of inhibitor molecules, while the one retrieved from the blank D. vulgaris inoculated medium does not have such film. Yuan et al. 26 reported that the absence of protective surface film tends to facilitate localised attack by sulphide ions, which most SRBs are known to produce. This consequently initiates pitting or crevice corrosion, which is more pronounced for the steel surface immersed in the uninhibited SRB medium as revealed from the large pit depth in Fig. 8a 50 . Furthermore, the surfaces of MS coupons exposed to SRB cultures after 9 days incubation with or without 100 ppm CZs are characterized by two distinctive layers (with the exception of Fig. 8a and d) that display both morphological and chemical characteristics of the biofilm (formed) on the MS surface. The dark layer composed of minimal amounts of sulphides and high amounts of carbon-based materials and iron oxides. The light layer on the other hand consists of large amounts of sulphides, carbon-based materials and iron oxides. These findings corroborate with data obtained in the EDX elemental analysis.
Energy dispersive X-ray (EDX) study. Elemental analysis using EDX technique was carried out at different points on the corrosion crust for all the mild steel coupons and the results of the analyses are listed in Table 7. It was found that the crystalline particles obtained from coupons immersed in 1 M HCl with or without 100 ppm of CZs consist of iron, chlorine, carbon, oxygen and trace of sulphur.
MS surfaces in SRB media were characterized by iron, sulphur, phosphorous, aluminium, oxygen and carbon. The detection of sulphur in all the samples further confirms the presence of SRB. The low level of oxygen on the steel surface retrieved from SRB blank (medium) compared to the presence of the tested CZ molecules may be due to the reducing activities of SRB. SRBs are known for their ability to reduce sulphate and other oxidized (oxygen containing) species in the environment. High oxygen contents observed for the steel in the presence of the inhibitors (in SRB media) might be attributed to the biocidal actions of the CZs on the bacteria, which undermine the reducing activity of SRB.
Quantum chemical calculations. In a bid to gain further insights into the donor-acceptor interactions between the studied CZs and mild steel, and to relate the inhibition potentials of the CZs to molecular structures and different substituents on the carbazole moiety, quantum chemical calculations 40 , were performed on the CZs. According to the Fukui's frontier orbital approximation, donor-acceptor interactions do occur between frontier molecular orbitals (HOMO and LUMO) of interacting/reacting species 32,51 . A metal has a high tendency of accepting electrons from an electron donor (e.g. an inhibitor molecule) into its lowest unoccupied orbital 51 . Conversely, a metal can donate its HOMO electron into appropriate vacant (LUMO) orbital of the inhibitor molecule 6, 7, 51-54 for back-bonding. This donor-acceptor relationship between inhibitor molecules and metallic Figure 6. Weight loss measurements for mild steel exposed to SRB cultures after 9 days incubation with or without 100 ppm carbazoles at 310 K.  Table 6. The weight loss parameters obtained for mild steel exposed to SRB cultures after 9 days incubation with or without 100 ppm CZs. orbitals has been the major molecular and electronic explanation behind the adsorption of inhibitor molecules on metallic surface. The optimized molecular structures, HOMO and LUMO electronic density distributions and electron density distributions for the electrophilic Fukui function (f − ) are shown in the graphical images in Fig. 9. The HOMOs of all the molecules are mainly dominated by π bonding orbitals and delocalized over the entire aromatic carbazole rings in each molecule. The Br substituents (Br7 and Br15) in DBCZ are also involved in the HOMO.
The HOMO of EHCZDCA is also extended to the ethylhexyl alkyl chain attached to the N1 atom of carbazole ring. The widely distributed HOMO electron density of the studied CZs is an indication of favourable interactions of the molecules with electron deficient metallic orbitals. The LUMO electron densities of all the molecules are distributed over the carbazole rings. The HOMO and LUMO electronic surfaces revealed that the carbazole ring has potential to donate and accept electrons under favourable conditions. This characteristic is favourable to donor-acceptor interactions and might be responsible for the adsorption of the molecules on mild steel surface.  Fukui functions f + and f − are local reactivity indices that are usually employed to analyse the relative susceptibility of the active atomic sites of an inhibitor molecule to electrophilic and nucleophilic attacks, respectively 4 . The preferred site for electrophilic attack is the region/atom in the molecule where the value of f − is the highest 21 . The isosurface density of the Fukui function for electrophilic attack (f − ) is also shown in Fig. 9. The electron density distributions of the f − revealed that the N-atom of the carbazole ring and the C=C π-electrons centres of the fused aromatic rings are the most susceptible sites for electrophilic attacks in the molecules. The substituent Br atoms in DBCZ, the O-atom of the OH group in HCZ and the C=O functional groups in EHCZDCA respectively are also susceptible to electrophilic attacks.  Table 7. EDX elemental constituents (in weight%) of mild steel surface retrieved from the acidic and SRB corrosive media without and with 100 ppm of the inhibitors. Some quantum chemical parameters of the studied compounds both in the gas and aqueous phases are listed in Table 8. The energy of the HOMO orbital (E HOMO ) is a measure of relative tendency of a molecule to donate electrons to an electron accepting specie 6,7,[51][52][53][54] . The results in Table 8 show that THCZ has the highest value of HOMO energy (E HOMO ) in the gas phase, which implies highest tendency to donate electrons to an electron deficient site. This suggests that THCZ has the highest tendency to adsorb onto mild steel surface and the observation is in agreement with its highest inhibition efficiency observed from the experiments. The LUMO energy (E LUMO ) is a measure of the tendency of a molecule to accept electron(s) from electron rich specie.
Molecules with low E LUMO values tend to accept electrons easily 6, 7, 51-54 . Though, EHCZDCA has a relatively low E HOMO , its very low E LUMO offers it a better chance of accepting charges in a favourable retro-donation/ back-bonding formation during donor-acceptor interactions with the metal. The very low value of E LUMO of EHCZDCA might be responsible for its relatively higher inhibition efficiency compared to CZ, DBCZ and HCZ.
The frontier molecular orbitals energy gap, ΔE (ΔE = E LUMO = E HOMO ) is often used to characterize the chemical reactivity and kinetic stability of molecules 6, 55 . Murulana et al. 6 posited that molecules with large value of ΔE are highly stable (i.e., they have low reactivity to chemical species) whilst molecules with small value of ΔE have a high reactivity. The results reported in Table 8 show EHCZDCA has the smallest ΔE value and therefore corresponds to the most reactive compound. This is supportive of the high inhibition efficiency of EHCZDCA especially at 500 ppm compared to CZ, DBCZ and THCZ.
Dipole moment is a descriptor of the polarity of molecules 6, 32 . Abdallah et al. 32 alluded that dipole moment is an indicator of the electronic distribution in a molecule and is one of the properties used to rationalize molecular structure.
There is however, lack of general consensus on the correlation between the dipole moment and corrosion inhibition efficiency 56,57 . There is an opinion that high dipole moment favours high inhibition efficiency 58 , while a dissenting opinion infers conversely 59 . There is no general trend of relationship between the dipole moments of the studied CZs and experimental inhibition efficiencies. Although, CZ with the least dipole moment has the least inhibition efficiency, while EHCZDCA with considerably high inhibition efficiency was found to have very high dipole moment. This observation is somewhat in agreement with the assumption that high moment enhances dipole-dipole interactions between the inhibitor molecules and charged metal surface and hence favours inhibition efficiency 58,59 .
Molecular volume (MV) is a measure of the contact surface between the corrosion inhibitor molecule and metal surface 6 . The corrosion inhibition efficiency is usually proportional to the fraction of the surface covered by the adsorbed inhibitor molecule. Murulana et al. 6 , however, suggested that this is not always the case, considering the fact that corrosion inhibition is often influenced by multiple factors that are interdependent. The highest value of MV for EHCZDCA in the present study supports its high inhibition efficiency compared to DBCZ, HCZ and CZ.
Global (chemical) hardness (η) and softness (σ) have all been used as molecular descriptors of reactivity and selectivity 6,60,61 . The relationship between these quantum chemical descriptors and corrosion inhibition is often interpreted based on the Lewis theory of acid and bases and Pearson's concept of hard and soft acids and bases 6,32 . In this concept, a hard molecule is said to have a large ΔE value, while a soft molecule has a small ΔE value. Adsorption usually occurs at the region of the molecule where σ has the highest value 6 . The order across structures in the σ values as reported in Table 8, is such that EHCZDCA > DBCZ > [CZ] ≈ HCZ > THCZ, which also suggests that EHCZDCA is the most reactive compound.
Global electronic chemical potential (µ) is often reported as electronegativity (χ) in most previous studies 62, 63 . According to Wang et al. 62 and Udhayakala et al. 63 , electronegativity is often described as the negative of global electronic chemical potential. The values of µ reported in Table 8 show that the order of the µ values is THCZ > HCZ > CZ > DBCZ > EHCZDCA.
Electrophilicity index (ω) is another global reactivity index that is often used for the prediction of the direction of a corrosion inhibition process 60,61 . A high electrophilicity value describes a good electrophile while a small electrophilicity value describes a good nucleophile. The order across structures in the ω values as reported in  Table 8. Selected quantum chemical parameters for the studied carbazoles. Table 8, is such that EHCZDCA > DBCZ > CZ > HCZ > THCZ, which is in partial agreement with the experimental inhibition efficiencies.

Molecular dynamics simulation.
The adsorption of the studied inhibitor molecules on mild steel surface was simulated by modelling the interactions between the inhibitor molecules and Fe(110) crystal surface. The equilibrium configurations of the simulated systems are shown in Fig. 10, while the relevant energy parameters of the systems are listed in Table 9.   Table 9. Energy parameters (kcal/mol) associated with the adsorption of the inhibitor molecules on Fe(110).
The results (Fig. 10) showed that the moieties containing the aromatic rings and heteroatoms in the inhibitor molecules adsorbed on Fe(110) surface in a near flat orientation, which ensure optimum interactions of the inhibitor molecules with the metallic surface. The highest magnitudes of adsorption and deformation energies were obtained for the Fe(110)/EHCZDCA (Table 9), which suggests that EHCZDCA has the strongest interaction with Fe(110) surface.

Conclusions
The inhibitive effects of five carbazole derivatives (CZs) on mild steel corrosion and bio-corrosion in 1 M HCl and microbial environments were investigated using electrochemical techniques, weight loss measurements, scanning electron microscopy (SEM) and energy dispersive x-ray (EDX) techniques. Theoretical quantum chemical calculations and molecular dynamic simulation studies were used to corroborate experimental findings. The following conclusions can be drawn from the results: 1. Potentiodynamic polarization measurements revealed that the studied CZs are mixed-type corrosion inhibitors with predominantly cathodic inhibitive effects. 2. Both electrochemical and weight loss results showed that all the compounds inhibit both the acid (1 M HCl) induced corrosion and microbial corrosion and their inhibition efficiencies increase with increase in concentration. 3. The highest inhibition efficiencies were recorded for THCZ and EHCZDCZ in 1 M HCl, while CZ showed the highest protection efficiency against MIC. 4. The studied inhibitor molecules inhibit mild steel corrosion in 1 M HCl by adsorbing on the steel surface and form protective film. Their adsorption obeys Langmuir isotherm and occur mainly via physisorption. 5. SEM images and EDX analyses also revealed that the studied compounds adsorbed on mild steel surface and form protective film that shield the surface from direct effect of corrosion in acidic and SRB media. 6. Molecular quantum chemical calculations showed that the reactive sites in the inhibitor molecules are mainly the N-atom of the carbazole ring, the pi-electron centres, and the other substituent heteroatoms (Br in DBCZ, O-H in HCZ, and C = O in EHCZDCA). 7. Molecular dynamic simulations revealed that the studied molecules have strong interactions with Fe surface.