*3.2.1.4 Periodic boundary condition*

Atomistic simulations are usually carried out in a stimulation box. It can be obtained by treating a small system of about 100–10,000 particles using the periodic boundary condition approach. The corrosion inhibition systems are infinite systems where thousands of atoms and molecules are involved. The periodic boundary condition eliminates surface effects caused by the finite size of a system, and makes it more of an infinite one. In periodic boundary conditions, all atoms in the simulation box are replicated throughout space to form an infinite lattice.

#### *3.2.2 Monte Carlo (MC) simulations*

The MC method can simulate a system under thermodynamic equilibrium [146]. MC has the advantage of probabilistic investigation of the equilibrium behavior of systems as a function of temperature (Metropolis Monte Carlo) and advances the state of reactive systems through time (Kinetic Monte Carlo) [147]. The Metropolis MC, kinetic Monte Carlo (kMC), and quantum Monte Carlo are used in many physical and chemical applications based on the concept of Monte Carlo. Metropolis MC is simple and mostly used to study the interaction between inhibitor molecules and surface of metals in corrosion inhibition.

#### *3.2.2.1 Interaction and binding energies*

The interaction energy is defined as the required energy for one mole of an inhibitor molecule to be adsorbed on a metal surface [148]. For a simulated system in a vacuum, it can be determined using the following equation [149, 150]:

$$\mathbf{E}\_{\text{inter}} = \mathbf{E}\_{\text{Total}} - \left(\mathbf{E}\_{\text{Surface}} + \mathbf{E}\_{\text{inh}}\right) \tag{15}$$

In the presence of a solvent:

$$\mathbf{E}\_{\text{inter}} = \mathbf{E}\_{\text{Total}} - \left(\mathbf{E}\_{\text{Surface}+\text{solvent}} + \mathbf{E}\_{\text{inh}}\right) \tag{16}$$

where ETotal, ESurface, ESurface + solution, and Einh denote the total energy of the simulated system, surface without solution, surface with solution, and inhibitor molecule alone, respectively.

The binding energy is defined as the negative values of the interaction energy. A large binding energy implies that the inhibitor molecule can be strongly adsorbed over a metal surface [151, 152].

$$\mathbf{E}\_{\text{binding}} = -\mathbf{E}\_{\text{inter}} \tag{17}$$

A representative case where interaction and binding energies are used to discuss the adsorption behavior of corrosion inhibitors has been performed by Lgaz et al. [153].
