Theoretical Study of the Structure and Property of Ionic Liquids as Corrosion Inhibitor

Three sets of ionic liquids such as 1-alkyl-3-methylimidazole chloride [Cnmim] Cl, 1-alkyl-3-methylimidazolium acetate [Cnmim]Ac and 1-octyl-3methylimidazole salt [Omim]Y (n = 2, 4, 6, 8, and Y = Cl, BF4, HSO4, Ac and TFO) were used as corrosion inhibitor medium for corrosion protection of carbon steel. Electronic structures and reactivity of these ionic liquids, surface energy and electronic structures of the iron surface were systematically analyzed by density functional theory. By increasing the alkyl chain length of the [Cnmim]Cl and [Cnmim] Ac systems, the lowest unoccupied molecular orbital energy (ELUMO), the highest occupied molecular orbital energy (EHOMO), the softness (S) and polarizability (α) increased gradually, whereas electronegativity (χ), energy gap (ΔE), hardness (η), dipole moment (μ)and electrophilic index (ω) gradually decreased. For the [Omim] Y system, the structure parameters of ionic liquids are quite different, and only the polarizability (α) decreases gradually by increasing the length of the alkyl chain. The results show that inhibition is mainly [Cnmim] + cations of the [Cnmim]Cl system, and the order of inhibition efficiency follows as [C2mim]Cl < [C4mim]Cl < [C6mim]Cl < [C8mim]Cl. Both [Cnmim] + cations and the Ac anion have inhibition effect for the [Xmim]Ac system, and the order of inhibition efficiency is [C8mim]Ac > [C6mim]Ac > [C4mim]Ac > [C2mim]Ac. For the [Omim]Y system, [Xmim] cations and anions (BF4 , HSO4 , Ac , TfO ) have inhibition effect, and the order of inhibition efficiency is [Omim]TfO > [Omim]Ac > [Omim] HSO4 > [Omim]BF4 > [Omim]Cl.


Introduction
Metal corrosion is a ubiquitous phenomenon in the national economy, national defense construction, science and technology and other relative fields [1][2][3]. It has tremendous negative effects and need to be treated. Corrosion of metal and its alloys in various fields in each country has caused serious problems in different fields and caused a series of major losses. Therefore, we must adopt effective corrosion protection measures. As latest reported from the National Association of Anticorrosive Engineers, the world's annual corrosion cost can decrease by 15-35% (US $ 375-75 billion) by adopting appropriate anticorrosion technology [1][2][3].
Due to its low cost and excellent physical, chemical and mechanical properties, iron and its alloys are widely used in many fields, and most of them are in contact with corrosive environments, such as tanks, pipelines, boilers, oil and gas production units and refineries [1]. Therefore, it is necessary to take certain protective measures, and the addition of an inhibitor can significantly reduce the corrosion rate of iron and ferroalloy, and the amount of inhibitor is small, which has become an economic and effective method [2]. Traditional inhibitors, such as chromate, nitrite, silicate and molybdate, can react with metals to constitute a passive film or a dense metal salt protective film on the metal surface, preventing the corrosion of metals and alloys [3]. However, this kind of inhibitor is usually used in large amount and high cost. In addition, when the amount of inhibitor is insufficient, it will lead to serious local corrosion of metals and alloys. In addition, these inhibitors have certain toxicity and poor biodegradation ability. When they are accustomed, there are serious environmental and ecological problems and they are increasingly restricted. Therefore, it is very important to develop environment-friendly inhibitors. As an environment-friendly inhibitor, imidazolines, amides and other inhibitors have the characteristics of high efficiency, low toxicity and easy biodegradation, which are commonly used in the corrosion inhibition of iron and alloy [1][2][3].
In recent years, ionic liquids (ILs) as a new green solvent, which is formed by organic cations with various inorganic or organic anions, have attracted more and more attention [4][5][6]. Due to the heterocyclic structure, heteroatoms (such as N, O and S) and multiple bonds in ionic liquid molecules, they have become effective inhibitors and are commonly used in the field of corrosion protection [6][7][8][9]. The ionic liquid common inhibitors are imidazole ionic liquid, pyridine ionic liquid and quaternary ammonium ionic liquid. Compared with traditional corrosion inhibitors, ionic liquid corrosion inhibitors are always renewable, inexpensive, ecologically acceptable, readily available and environmentally friendly and biodegradable. Various ionic liquids such as imidazoline, pyridine, ammonium, pyridazine and benzimidazole were widely used as corrosion inhibitors for carbon steel. The experimental methods such as surface analysis techniques, electrochemical tests and electrochemical impedance spectroscopy are used extensively to study the performance of ionic liquid inhibitors [9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25].
However, experimental research on ionic liquid inhibitors mainly focuses on the evaluation of their corrosion inhibition performance. The research on the corrosion inhibition mechanism of ionic liquid inhibitors is less, which can not reveal some details of the corrosion inhibition process, such as the quantitative description of the molecular metal atom combination of inhibitors, the determination of the functional groups of inhibitors and the information on the process of ion adsorption and film formation of inhibitors [9][10][11]. It is impossible to guide the development of ionic liquid inhibitors by obtaining and diffusing the inhibitors on the metal surface. Therefore, it is necessary to study the mechanism of ionic liquid inhibitors by theoretical calculation, so as to provide theoretical guidance for the development and application of new and efficient ionic liquid inhibitors.
With the rapid improvement and advancement of computer science and technology, and the gradual improvement of related theories, quantum chemical calculation as an important theoretical calculation method has been proved to be very effective in determining the electronic structure of molecules and clarifying the reaction activity of molecules. The inhibition mechanism and performance of inhibitors are often the same as the electronic structure and reaction activity of inhibitors. Therefore, it is very important to study the electronic structure and reaction activity of ionic liquid inhibitors for the design of new ionic liquid inhibitors [26]. Murulana  As mentioned above, although some progress has been made in the study of the corrosion mechanism and properties of low carbon steel by ionic liquid corrosion inhibitors in the corrosion medium, there are still some problems. Experimental methods (weight-loss method, electrochemical experiment method and surface morphology analysis method) are used to study the ionic liquid, mainly focusing on the evaluation of the inhibition performance and efficiency of ionic liquid, but it is difficult to know the inhibition mechanism of ionic liquid on the iron surface. However, the structure parameters calculated by quantum chemistry are not systematically analyzed. For example, for the imidazole system with different cations, how do the structure parameters and property change with the increase of the cationic alkyl chain length? For the system with the same cations and different anions, how do the structure parameters change? There is no systematic analysis of the properties of different surfaces of iron, but it simply selects a surface as the adsorption surface of ionic liquid. At the same time, different surface of iron may have different electric charge and different electric charge. There are some relations between iron and HOMO and LUMO of ionic liquid molecules, but there are few related researches.
Molecular simulation is only a simple calculation of adsorption energy between the metal surface and ionic liquid inhibitors, but there are few studies on the quantitative description of the molecular metal atom combination of ionic liquid, the determination of the functional groups of ionic liquid, and the acquisition of the process information of adsorption and film formation, which cannot guide the development of ionic liquid corrosion inhibitors. In this paper, the equilibrium geometry, frontier orbit, global and local reactivity of [C n mim]Cl system, [C n mim]Ac system and [Omim]Y (n = 2, 4, 6, 8, Y = Cl, BF 4 , HSO 4 , Ac and TFO) are studied by quantum chemical calculation. The active region, inhibition efficiency of possible interaction between ionic liquid molecules and iron surface are preliminaries analyzed.

Computational method
The B3LYP method of density functional theory in Gaussian 09 software package [31] is utilized to optimize the geometric configuration and analyze the frequency of ionic liquid. The 6-311++G(d, p) basis set was used in this paper, which is same as the literature [26][27][28]. The geometry optimization and frequency analysis of the studied ionic liquid molecules were performed, and the stable geometry was obtained. There are seven interaction sites of 1-alkyl-3-methylimidazolium cations to interact with anions, as shown in Figure 1, where 1-5 represent the five positions of anions in the plane of imidazole ring, and 6 and 7 are respectively located on both sides perpendicular to the plane of imidazole ring. As confirmed by many authors, position 2 is the most active site and the anions are always located in this position, so we just discuss the anions' contact with cations at position 2. The E HOMO and E LUMO , energy gap (ΔE), electronegativity (χ), the softness (S), dipole moment (μ), polarizability (α), electrophilic index (ω), hardness (η), Fukui index and other structural and property parameters were calculated. Distribution of Fukui index was drawn by Multiwfn software [32,33].
According to the frontier molecular orbital theory, the molecules' reactivity is related to their lowest unoccupied molecular orbits (LUMO) and the highest occupied molecular orbital (HOMO). In general, the level of the E HOMO value determines the ability to deliver electrons to the outside. The level of the E LUMO value represents the ability to obtain electrons. Therefore, the higher the E HOMO value, the lower the E LUMO value can reflect the reactivity of a molecule. [34] As for the adsorption of a molecule on the carbon steel surface, a higher E HOMO value will make them have a stronger electronic supply capacity and can form an adsorption with the d orbital on the surface of iron. A lower E LUMO value will make them have a stronger electronic acceptance capacity, which becomes more easily accepted electrons from the surface of iron and form an antibond orbital to promote the adsorption. Therefore, the energy gap difference ΔE = E HOMO -E LUMO can be used to assess the bonding ability of a molecule with iron. The smaller Δ E is, the stronger bonding ability with iron is, and the easier adsorption on the iron surface [35].
In the concept density functional theory, according to Koopmans theorem [36], ionization potential I under vacuum condition can be approximated to the negative value of E HOMO I ¼ ÀE HOMO . Similarly, the electron affinity a is approximately negative for E LUMO A ¼ ÀE LUMO . The dipole moment (μ), electronegativity (μ), softness (S) and polarizability (α) of a molecule are generally referred to as the global reactivity of a molecule [37,38]. Molecular polarity is always described by dipole moment (μ), which is defined as the product of atomic distance R and atomic charge q as μ ¼ qR [39]. Generally, the higher μ will make the molecules more easily adsorbed on the surface of carbon steel [40], and the efficiency of the molecular inhibitor will increase accordingly. However, the dipole moment reflects the global polarity of molecules rather than the polarity of the bond in the molecule. According to the concept density functional theory, the electronegativity (χ) of the system with n electrons is defined as follows when the external field ν(r) is fixed [38]: Hardness (η) is defined as the second derivative of the system energy E to N [41] η ¼ 1 2 Using the finite difference approximation, the global hardness (η) and electronegativity (χ) are related to ionization energy I and affinity energy A as follows [42]: According to Koopmans theorem [36], the electronegativity (χ) and global hardness (η) can be calculated from E HOMO and E LUMO as Global softness (s) is usually defined as the reciprocal of global hardness [37].
Electronegativity (χ) is a scale of the ability of atoms in molecules to attract electrons. The larger its value is, the easier it is to attract electrons [38] reflecting a better inhibitor effect. The smaller the global hardness (η) or the larger the global softness (S) of the molecule means that the stronger the interaction between metal surface and a molecule [43], and a higher corrosion inhibition efficiency. Parr introduced the concept of electrophilic index (ω), which is defined as following [37]: : (8) According to the definition, this parameter is a measure of the capability of electron acceptors. The larger the value is, the stronger the capability of electron acceptor is. As an important parameter of global reaction activity, the molecular polarizability (α) is the average value obtained by calculation, and its relationship is as follows [44]: where, α xx , α yy and α zz are molecular polarizability in x, y and z directions, respectively. The higher the molecular polarizability (α) is, the easier adsorption on the metal surface is, and the higher corrosion inhibition performance is [44].
The local reactivity of ionic liquid inhibitors was evaluated by their Fukui index. Nucleophilic and electrophilic behavior of the molecule was studied by analyzing its Fukui index distribution. Fukui function is an important concept in density functional theory, which is commonly used to predict the active sites of a molecule [45]. In the case of certain outfield v(r), the Fukui function is defined as follows [46]: Within the finite difference approximation, the nucleophilic attack can be expressed as are the charge density of the atom in the molecule with one unit negative charge, uncharged and one unit positive charge, respectively.

1-Alkyl-3-methylimidazole chloride [C n mim]Cl
In this section, we will analyze the equilibrium geometry, frontier orbital distribution, global and local reactivity, the change rule of the reactive sites and structure parameters of ionic liquids with the increase of the cationic alkyl chain length for the [C n mim]Cl system. The comparison of the corrosion inhibition performance was achieved for the ionic liquids formed with the same anion and different cations. Figure 2 shows the equilibrium geometry, HOMO and LUMO distribution of [C n mim]Cl (n = 2, 4, 6, 8) system obtained by B3LYP/6-311++G(d, p) method. It can be seen from Figure 2 that the equilibrium geometry HOMO and LUMO profiles of these four ionic liquids are very similar. The anions are all at the C2 atom of the imidazole ring. HOMO is distributed on anions, but not on cations, which indicates that Cl À is easy to form a coordination bond with d-orbital on an iron surface, while imidazole ring is not easy to provide electrons and interact with the iron surface. LUMO is mainly distributed on the imidazole ring, and other C atoms and anions of cation also have little distribution, which indicates that the imidazole ring of cation is easy to accept electrons from the iron surface and form a feedback bond. According to the distribution of HOMO and LUMO, when the [Xmim]Cl ionic liquid adsorbs on the surface of carbon steel, the imidazole ring of the ionic liquid will interact with the surface of carbon steel and lay parallel to the surface.

Equilibrium geometry structures, HOMO and LUMO
The E HOMO , the E LUMO and the energy gap difference (ΔE) of four ionic liquid molecules in [C n mim]Cl system are shown in Table 1. It can be seen from Table 1 that by increasing the length of the alkyl chain, the E HOMO becomes larger and larger, indicating the increased capability of electron donor of the molecule. By increasing the length of the alkyl chain, E LUMO also has an increasing trend, which shows that the capability of electron acceptor will weaken. However, the smaller (ΔE) is, the better the activity of the molecule is, the easier absorption between the carbon steel surface and molecules, and the higher the inhibition efficiency is. The sequence of inhibition efficiency of these four ionic liquids should be [C 2 mim]Cl < [C 4 mim]Cl < [C 6 mim]Cl < [C 8 mim]Cl. The [C 8 mim]Cl has the highest inhibition efficiency and the best inhibition performance, which agrees well with the experimental measurement [29]. Table 2 shows the global activity parameters of [C n mim]Cl system obtained by B3LYP/6-311++G(d, p) method. It can be seen from Table 2 that by increasing the length of the alkyl chain, the dipole moment (μ) decreases gradually, indicating that the increase in alkyl chain length will reduce the polarity of the whole molecule. Increasing the length of alkyl chain, the electronegativity (χ) is also gradually  reduced, which indicates that the ability of molecules to attract electrons is weaker and weaker, which is not conducive to accepting the electrons on the iron surface. The global hardness (η) of the molecules decreases, while the global softness (S) increases by increasing the chain length, which indicates that the interaction between the surface of carbon steel with the molecules becomes stronger and stronger, and the molecules tend to adsorb on the surface. The electrophilic index (ω) decreases by increasing the length of the alkyl chain. With the lowest unoccupied molecular orbital energy (E LUMO ), the ability of the molecule to accept electrons becomes weaker and weaker. Molecular polarizability (α) is an important quantum chemical parameter in the field of corrosion protection. From Cl is most easily adsorbed on the surface of iron and its corrosion inhibition efficiency is the highest. According to the analysis results in Section 3.1.1, with the increase of the alkyl chain length, the global activity parameters of [C n mim]Cl system, such as global hardness (η), global softness (S) and polarizability (α), increases; therefore, the corrosion inhibition efficiency increases [29]. Figure 3 shows the Fukui index f À distribution of four ionic liquid molecules in [C n mim]Cl system, with the electrophilic attack index distribution on the left and the nucleophilic attack index f + distribution on the right. It can be seen from Figure 3 that the electrophilic attack index of these four ionic liquid molecules is mainly distributed on the Cl atom with the HOMO.

Local activity parameters
It is easy to provide electrons when attacked by the dielectric since Cl atom has high electronegativity and high electron density around them. As the same of distribution of LUMO, the nucleophilic attack index of these four kinds of ionic liquid molecules is mainly distributed on the imidazole ring, especially 2C, 4C, 5C and 1N atoms (see Figure 1 for the number of specific atom). The imidazole ring is positively charged, and it is easier to accept electrons when attacked by the nucleophilic medium. Therefore, local reactive sites of [C n mim]Cl are Cl, 2C, 4C, 5C and 1N atoms (see Figure 1 for the number of specific atom), which are easy to interact with iron surface and adsorb on iron surface.

1-Alkyl-3-methylimidazolium acetate [C n mim]Ac system
In this part, we will discuss how the change of chain length affects the change of structure and property of [C n mim]Ac (n = 2, 4, 6, 8) system with the same anion and different cations through the density functional theory. The equilibrium geometry, frontier orbital distribution, global reactivity and local reactivity, the change rule of reactive sites and structure parameters of ionic liquids by increasing the length of cationic alkyl chain and the comparison of corrosion inhibition performance are obtained and analyzed. In addition, the influence of different anions Cl À , Ac À on the reaction activity of ionic liquids was analyzed by comparing [C n mim]Ac (n = 2, 4, 6, 8) system with [C n mim]Cl system. Figure 4 shows the equilibrium geometry, HOMO and LUMO frontier molecular orbital distribution of [C n mim]Ac (n = 2, 4, 6, 8) system obtained by B3LYP/ 6-311++G(d,p) method. It can be seen from Figure 4 that the equilibrium geometry HOMO and LUMO distribution for these four ionic liquids is very similar. The anion Ac À is located under the cation, and the optimized CdO bond is a double bond. HOMO is mainly distributed on the anion Ac À , especially O atom, while C atom on the cation also has a small contribution, which shows that the unpaired O atom on the anion easily forms a coordination bond with the empty d-orbital on the iron surface and adsorbs on the iron surface. LUMO is mainly distributed on the imidazole ring, and there is a small amount of C of other cations and anions, which shows that the imidazole ring of cations easily accepts electrons from the iron surface, forming a feedback bond, which makes the imidazole ring easy to be adsorbed on the iron surface.

Equilibrium geometry and frontier orbital distribution
The E HOMO , E LUMO and the energy gap ΔE of four [C n mim]Ac (n = 2, 4, 6, 8) ionic liquid are shown in Table 3. It is shown in Table 3 that E HOMO and E LUMO increase as that of [C n mim]Cl (n = 2, 4, 6, 8) in Table 2, by increasing the length of alkyl chain, indicating that the capability of electron donator enhances and the capability of electron acceptor weakens. However, the smaller ΔE is, the better the activity of the molecule is, the easier it is to be adsorbed on the surface of iron and the better the inhibition effect is. The sequence of inhibition efficiency of the four ionic liquids should be [C 8 mim]Ac > [C 6 mim]Ac > [C 4 mim]Ac > [C 2 mim]Ac, and the inhibition efficiency of [C 8 mim]Ac is the highest. The order obtained is the same as that of system analysis. Table 4 shows the global active parameters of [C n mim]Ac system obtained by B3LYP/6-311++G(d,p) method. It can be seen from Table 4 that by increasing the length of the alkyl chain, the dipole moment (μ) decreases gradually. Increasing the alkyl chain length will reduce the polarity of the whole molecule. The electronegativity (χ) also decreases gradually, which indicates that the capability of attracting electrons is weaker and weaker, and is not conducive to receiving electrons on the iron surface. This results are the same as those of [C n mim]Cl system. As the alkyl chain length increases, the global hardness (η) and the global softness (S) of the molecule decrease, which indicates a stronger interaction between the carbon surface with the molecule and the molecule is more stably adsorbed on the iron surface. The electrophilic index (ω) decreases by increasing the alkyl chain length. With the increase of E LUMO , the capability of electron acceptor of a molecule is weaker and weaker.

Global active parameters
It can be seen from Table 4 that the order of α is [C 8 mim]Ac > [C 6 mim] Ac > [C 4 mim]Ac > [C 2 mim]Ac, indicating that [C 8 mim]Ac is most easily adsorbed on the iron surface. So, [C 8 mim]Ac should have the best inhibition effect and the highest inhibition efficiency. Similar to the [C n mim]Cl system, by increasing the length of alkyl chain, the values of dipole moment (μ), electronegativity (χ), global hardness (η) and electrophilic index (ω) decrease, while the global activity parameters global hardness (η), global softness (S) and polarizability (α) increase. The order of polarization (α) is in agreement with that of corrosion inhibition efficiency. Figure 5 shows the Fukui index distribution of four ionic liquid [C n mim]Ac systems. It can be seen from Figure 5 that the electrophilic attack index of these four ionic liquid molecules is mainly distributed on the anion Ac À , especially O atom, and the cation also has a small amount of distribution, indicating that the anion containing oxygen group is easy to provide the d-orbital combination of electron and iron surface space, and can stably be adsorbed on the iron surface. The nucleophilic attack index is mainly distributed in 2C, 4C and 5C atoms in imidazole ring (the number of atoms is shown in Figure 1) and O atom of anion, indicating that both cations and anions of [C n mim]Ac system will interact with the surface of iron, making the adsorption of molecules on the surface of iron more stable. So the local reactive sites of [C n mim]Ac are placed in O, 2C, 4C, 5C and 1N atoms. Local reactive sites are almost the same for [C n mim]Ac and [C n mim]Cl, except for Cl in [C n mim]Cl.

1-Octyl-3-methylimidazole [Omim]Y system
In this section, we will discuss the structure and property of [Omim]Y (Y = Cl, BF 4 , HSO 4 , Ac, TFO) ionic liquids formed with the same cation and different anions. The equilibrium geometry, frontier orbital distribution, global reactivity and local reactivity, the change of reactive sites, structure parameters and corrosion inhibition performance of ionic liquids with different anions are obtained and discussed. Figure 6 shows the equilibrium geometry, HOMO and LUMO distribution of [Omim]Y system obtained by B3LYP/6-311++G(d, p) method. It can be seen from Figure 6 that the equilibrium geometry of the four ionic liquids is very similar, and the anions are all under the cations. LUMO is mainly distributed on the imidazole ring in the same way as [C n mim]Cl system and [C n mim]Ac system, which indicates that the imidazole ring of cation can easily accept electrons from the iron surface  Table 5. It is shown in Table 5   Cl, indicating that [Omim]TFO is the most easily adsorbed on the iron surface, with the best corrosion inhibition effect and the highest corrosion inhibition efficiency. Cl is mainly distributed on the Cl atom, and 2C (the number of atoms is shown in Figure 1) also has a small amount of the distribution.
The active region of [C n mim]Cl system is the imidazole ring and anion Cl À , while the [C n mim]Ac system is located in the imidazole ring and the O atoms of anion. The active region of [Omim]Y system is located in the imidazole ring and an oxygen-containing group. The reaction is the active region of ionic liquid molecules will help interact with the iron surface and stably adsorb on the iron surface.
For [C n mim]Cl system, the order of inhibition efficiency predicted is [C 8 mim] Cl > [C 6