**3. Computational method used for corrosion inhibitors**

There are various experimental methods for the evaluation of the inhibition performance of corrosion inhibitors. The synthesis of organic compounds for corrosion inhibitors using experimental methods is expensive and time-consuming. The synthesis of organic inhibitors requires multiple steps and also so many side products are generated in the synthesis of organic molecules. Recently, computational methods have been used extensively for the study of corrosion inhibition [81–95]. The corrosion inhibition can be known by knowing the mechanism of interaction between the inhibitor molecules and the metal surface. The interaction of the metal and inhibitor at the atomic and molecular levels cannot be understood by experimental study. The deeper insights into the mechanism of corrosion inhibitors on metal surfaces can be understood by molecular modeling method [96]. Molecular modeling techniques provide mechanistic processes at the atomic and molecular levels [97–118].

The behaviors of atomic and molecular interactions at microscopic and macroscopic can be analyzed by molecular modeling techniques [119, 120]. The interactions between molecules at the microscopic level can be known by molecular modeling simulations. Molecular modeling techniques are divided into three categories: ab initio electronic structure methods, semi-empirical methods, and atomistic simulation.

The ab initio method is also called first principles electronic structure method and is based on the law of quantum mechanics. The different ab initio methods are the Hartree–Fock Self-Consistent Field (HF-SCF) method, Møller–Plesset perturbation theory (MPn), coupled cluster (CC), and density functional theory (DFT). The density functional theory (DFT) has been used widely for understanding metal-inhibitor interactions at the molecular level.

#### **3.1 Density functional theory**

DFT has been used for understanding the molecular structural behavior of corrosion inhibitors [121–125]. In the DFT method, one function is determined in terms of another function, which is essentially the meaning of the word "functional". The energy of a system in the DFT method is obtained from its electron density. Commonly used DFT methods are the B3LYP, BLYP, B3P86, B3PW91, and PW91. Basis sets are sets of linear combinations of mathematical functions that are used to describe the shapes of atomic orbitals. The use of basis sets is necessary to be able to carry out ab initio calculations. Basis sets describe atomic orbitals by assigning a group of basis functions to each atom within a molecule. There exist broad lists basis sets that are used to perform ab initio calculations. The DFT/ B3LYP method using the 6-31G and 6-311G basis sets is the most widely used in corrosion inhibition studies.

The mechanism of corrosion inhibition can be understood by using DFT simulations. DFT simulation helps in finding the interactions of inhibitor with metal surface. For understanding the interactions of inhibitor with metal surface, the computational methods provide information about highest occupied (HO) and lowest unoccupied (LU) molecular orbitals (MO), frontier orbital energies, energy band gap, hardness, electronegativity, Mulliken and Fukui population analyses, electron-donating power, electron-accepting power, chemical potential, hardness, softness, dipole moment, and number of electrons transferred.

#### *3.1.1 HOMO and LUMO*

The adsorption ability and corrosion inhibition effectiveness of a compound can be linked to energy of frontier molecular orbital (FMOs; EHOMO and ELUMO), hardness (Z), electronegativity (w), dipole moment (m), softness (s), and fraction of electron transfer (DN). The chemical relativities of molecules in a corrosion inhibitor molecule are related to HOMO and LUMO electron densities. The highest occupied molecular orbital (HOMO) donates electrons to the free d orbital of a metal. The lowest unoccupied molecular orbital (LUMO) accepts electrons from the metal. Lower values indicate higher tendency of accepting electrons. The positive values are connected with chemisorptions, whereas negative values are with physisorption. The higher electron-donating capability is associated with a higher HOMO in the heteroatom molecules heteroatom.

HOMO and LUMO were associated with electron-donating and electron-accepting abilities of molecules, respectively, according to FMOs theory. Inhibitor molecules having high energy of HOMO will be effective to transfer the electrons to a metallic

surface and low LUMO energy value shows that the molecule is a good electron acceptor. Koopmans theorem [126] is a bridge between DFT and MO theory and it can be used in the prediction of ionization potential (IP) and electron affinity (EA) values of molecules. According to this theorem, IP and EA can be expressed via the following equations:

$$\text{IP} = -\mathbf{E}\_{\text{HOMO}} \tag{9}$$

$$\mathbf{E} \mathbf{A} \to -\mathbf{E}\_{\text{LUMO}} \tag{10}$$

Further, the energy difference between LUMO and HOMO called an energy gap (ΔE) is also an essential parameter toward the description of reactivity of a molecule.

$$
\Delta \mathbf{E} = \mathbf{E}\_{\text{LUMO}} - \mathbf{E}\_{\text{HOMO}} \tag{11}
$$

ΔE having a large value show low reactivity of molecules with metal surface while a molecule with a low value of ΔE strongly adsorbed on a metal surface.

### *3.1.2 Electronegativity (ɳ), chemical potential (μ), hardness (η), and softness (σ) indices*

The ɳ, μ, η, and σ parameters are related to the total electronic energy (E) with respect to the number of electrons (N) at a constant external potential. The ɳ is defined as the negative value of μ. Within the framework of finite differences approaches, these parameters can be expressed in the form of ground-state IP and ground-state EA values of a chemical compound. The theoretical formulas can be expressed as [127]:

$$
\mu = -\frac{\text{IP} + \text{EA}}{2} \tag{12}
$$

$$\eta = -\frac{\text{IP} - \text{EA}}{2} \tag{13}$$

$$
\sigma = -\frac{1}{\eta} \tag{14}
$$

The electron-donating power and electron-accepting power of the molecule to accept and donate electrons are related to IP and EA. The inhibition abilities of the molecule based on their ability to accept and receive electrons provide information.

#### *3.1.3 The fraction of electrons transferred (ΔN)*

The tendency of an inhibitor molecule to transfer its electron to a metal surface, the hardness, and electronegativity predict ΔN. The interaction between the metal surface and inhibitor molecule on the basis of the fraction of electrons transferred. An inhibitor can transfer its electron if ΔN > 0 and vice versa if ΔN [128–130].

#### *3.1.4 Fukui indices (FIs)*

The local reactivity and selectivity of molecule can be understood by Fukui functions. The nucleophilic and electrophilic regions of attack of inhibitor molecules are

provided by Fukui function. The Fukui Indices (FIs) pinpoint the reactive sites in which the electrophilic or nucleophilic attacks are large or small. HSAB theory gave the prediction and interpretation of many CQ parameters and Fukui functions is also an early attempt in this direction Fukui Indices f(r) is the first derivative of *ρ*(r) with respect to the number of electrons (N) at a constant external potential v(r). FIs were identified with respect to hard or soft reagents by involving the HSAB principle. A simple approximation can be used with the aid of finite difference approximation and Mulliken's population analysis in which FIs were determined [131].

### **3.2 Atomistic simulations**

Atomistic simulations also called force field methods or molecular mechanics are based on the principles of classical physics. The atomistic simulations are the investigation and simulation of physical phenomena on a molecular level. The two wellknown atomistic simulation methods are the molecular dynamics (MD) [132–135] and Monte Carlo (MC) [136, 137] simulation techniques.

#### *3.2.1 Molecular dynamics (MD) simulations*

MD simulations provide the actual trajectory of a system by simulating the time evolution of the system. The concept of MD simulation is based on solving Newton's equations of motion for the atoms in the simulation system using numerical integration [138, 139].
