Supplementary materials 1. Materials and Experimental techniques 1.1. Surface tension measurements Surface tension was measured with a Du Nouy Tensiometer (Kruss Type 6) for different concentrations of the synthesized cationic surfactants. Doubly distilled water from an allglass apparatus with a surface tension of 72 mN cm-1 at 25 oC was used to prepare all solutions. The readings were taken in triplicate for each solution to check repeatability and the surface tension values were within ±1 mN m-1. Concentration ranges of the synthesized surfactants varied from 1×10-6 to 1×10-3 M. 1.2. Electrochemical measurements The electrochemical experiments were carried out in a conventional three-electrode cell with a platinum counter electrode (CE) and a saturated calomel electrode (SCE) as a reference electrode. A working electrode (WE) was a carbon steel rod with the same composition which illustrated earlier which embedded in PVC holder using epoxy resin so that the flat surface was the only exposed surface in the electrode [1]. The exposure surface area of the working electrode was 0.7 cm2. This area was abraded with emery paper (grade 320, 400, 600, 800, 1000, 1200) on the test face, rinsed with distilled water, degreased with acetone, and dried. Before measurement, the electrode was immersed in a test solution at open circuit potential (OCP) for 30 min until a steady state was reached. All electrochemical measurements were recorded by a Voltalab 40 Potentiostat PGZ 301. Each experiment was repeated three times to check the reproducibility. Electrochemical impedance spectroscopy (EIS) measurements were carried out as described before. A small alternating voltage perturbation (10 mV) was imposed on the cell over the frequency range of 100 kHz to 30 mHz at open circuit potential at 20 oC. Potentiodynamic 1 polarization experiments were carried out in the potential range (from -0.8 to -0.3 V vs. Ag/AgCl) with scan rate of 0.2 mV s-1. 1.3. Weight loss measurements Weight loss measurements were performed (in triplicate) on the carbon steel sheets with a rectangular form of dimensions 7 cm × 3 cm × 0.5 cm in 1 M HCl solution with and without addition of different concentrations of the tested cationic surfactants IV(4N), II(4N) and I(4N) (5×10-3, 1×10-3, 5×10-4, 1×10-4 and 5×10-5 M). The average weight loss of three parallel carbon steel sheets was obtained. Immersion time was 24 h at all studied temperatures. 2. Mathematical treatments 2.1. Surface tension measurements The maximum surface excess surfactant ions concentration, (Γmax), at the interface was calculated from the following equation [2]: ๐คmax = 1 d๏ง ( ) ๐๐ ๐ dln C (1) where R is the gas constant, T is the absolute temperature, C is the surfactant concentration, γ is surface tension at given concentration and n is the species ions number in solution. Also, the minimum surface area per adsorbed molecule, Amin is defined as the area occupied by each molecule in nm2 at the liquid/air interface. Amin was calculated from the following equation: ๐ดmin = 1014 NA ๐คmax (2) where NA is the Avogadro’s number. 2 The effect of the surfactant ions on the interface is better described by surface pressure or effectiveness of the surfactant (πcmc) and can be calculated by using the following equation [3]: ๐CMC = ๐พo − ๐พ (3) where γo is the surface tension of distilled water and (γ) is the surface tension of surfactant solution at the critical micelle concentration CMC. 2.2. Electrochemical measurements 2.2.1. The inhibition efficiency (ηI) The corrosion inhibition efficiency (ηI) was calculated from the values of Rct using the following equation [4]: Rct -Roct ηI = ( ) ×100 Rct (4) where Rct and Roct are the charge transfer resistance values in 1 M HCl in the presence and absence of the inhibitor, respectively. 2.2.2. The double layer capacitance (Cdl) The double layer capacitance, Cdl, for a circuit including a CPE was calculated from the following equation: Cdl = ๐o (ωmax )n-1 (5) where ωmax = 2πfmax and fmax is the frequency at which the imaginary component of the impedance is maximal. Also, the impedance, ZCPE, for a circuit including a CPE was calculated from the following equation: ZCPE = 1 ๐o (Jω)n (6) 3 where ๐โ is a proportional factor, J2 = -1, ω = 2πf and n is the phase shift. For n = 0, ZCPE represents a resistance with R = Yโ-1, for n = 1 a capacitance with C = Yโ, for n = 0.5 a Warburg impedance with W= Yโ and for n = -1 an inductive with L = Yโ-1. 2.2.3. The Helmholtz model equation: δorg = εεo A Cdl (7) where ε is the dielectric constant of the medium, εo is the vacuum permittivity, A is the electrode surface area and δorg is the thickness of the protective layer. Potentiodynamic polarization measurements were obtained by changing the electrode potential automatically from -1000 to -200 mV vs. SCE with scan rate 2 mV s-1 at 20 oC. 2.2.4. The inhibition efficiency (ηp) The corrosion inhibition efficiency (ηp) was calculated using the following equation [5]: iocorr - icorr ηp = ( o ) × 100 icorr (8) where iocorr and icorr are the corrosion current density values without and with various concentrations of inhibitors, respectively, which determined by extrapolation of the cathodic and anodic Tafel lines to the respective corrosion potential. 2.3. Weight loss measurements Weight loss measurements were performed (in triplicate) on the carbon steel sheets with a rectangular form with a dimensions of: 7 cm × 3 cm × 0.5 cm in 1 M HCl solution with and without addition of different concentrations of IV(4N), II(4N) and I(4N) compounds (5×10-3, 1×10-3, 5×10-4, 1×10-4 and 5×10-5 M). 2.3.1. The corrosion rate (k) The corrosion rate value (k) was calculated from the following equation [6]: k = โW (9) St 4 where ΔW is the weight loss average of three parallel carbon steel sheets, S is the total area of the specimen, and t is the immersion time. 2.3.2. The corrosion inhibition efficiency (ηw) The corrosion inhibition efficiency (ηw) of carbon steel was calculated as follows: ηw = ( ๐o - W ) ×100 ๐o (10) where Wo and W are the weight loss values without and with the addition of the inhibitor, respectively. 2.4. Langmuir isotherm The simplest isotherm equation is Langmuir [7]: ๐ถ 1 = +๐ถ ๐ ๐พads (11) where C is the inhibitor concentration in the bulk phase of the solution, θ is the surface coverage and Kads is the binding constant of the adsorption reaction. 2.5. The degree of surface coverage (θ) The surface coverage degree (θ) for different concentrations of inhibitor molecules in 1 M HCl was calculated from weight loss measurements using the following equation [7]: ๐๐ − ๐ ๐=( ) ๐๐ (12) where Wo and W are the weight loss values without and with the addition of the inhibitor, respectively. 2.6. The standard free energy (ΔGoads) The standard free energy (ΔGoads) was obtained according to the following equation [8]: โGoads = − RT ln (55.5Kads ) (13) where 55.5 value is the molar concentration of water. 2.7. The standard enthalpy (ΔHoads) The standard enthalpy, ΔHoads, was calculated according to the Van’t Hoff equation [8]: 5 โHoads ln Kads = − ( ) + constant RT (14) where โHoads and Kads are the standard enthalpy and adsorptive equilibrium constant, respectively. 2.8. The standard entropy (ΔSoads) According to the thermodynamic basic equation, the standard entropy, ΔSoads, was calculated from the following equation [8]: โGoads = โHoads − TโSoads (15) 3. Results and discussion 3.1. Chemical structure confirmation 100 90 Relative intensity (%) 80 70 60 50 40 30 20 10 0 50 65 80 95 110 125 140 155 170 185 200 215 230 245 260 275 290 305 320 m/z Fig. 1: Mass spectrum of the Schiff base (S). 6 3.1.2. Chemical structure confirmation of the synthesized cationic surfactants Fig.2: FTIR spectrum of inhibitor IV(4N). Fig. 3: 1HNMR spectrum of inhibitor IV(4N). 7 600 HCl 0.00001M 0.00005M 0.0001M 0.0005M 0.001M II (4N) -Zi (Ω cm2) 500 400 300 200 100 0 0 100 200 300 Zr (Ω 400 500 600 cm2) 400 HCl 0.00001M 0.00005M 0.0001M 0.0005M 0.001M I (4N) -Zi (Ω cm2) 300 200 100 0 0 100 200 Zr (Ω 300 400 cm2) Fig. 4. Nyquist plots of carbon steel in 1 M HCl solutions without and with different concentrations of inhibitors II(4N) and I(4N). 8 0.001M.txt Model : R(QR) Wgt : Modulus 260 Z , Msd. Z , Calc. 240 220 200 180 Iter #: 4 Chsq: 9.10E-03 160 - Z '' (ohm) 4 140 7.94 7.14 14 100 35.7 50 3.57 2.5 2 3.16 1.25 1.58 893m 1.12 794m 20 63.3 20 125 158m 400 0 714m 446m 562m 281m 357m 200m 250m 28.1 40 40 # of pars with rel. std. errors >10%: 0/4 >100%: 0 / 4 1.79 2.23 15.8 25 60 5 11.2 17.9 80 4.46 5.62 10 120 79.4m 56.2k 141m 112m 71.4m 50m -20 0 50 100 150 200 250 300 350 400 Z ' (ohm) 0.001M.txt Model : R(QR) Wgt : Modulus 1,000 65 60 55 |Z|, Msd. |Z|, Calc. Angle, Msd. Angle, Calc. 50 45 40 100 35 |Z| (ohm) 25 20 15 10 Iter #: 4 Chsq: 9.10E-03 Angle (deg) 30 # of pars with rel. std. errors >10%: 0/4 >100%: 0 / 4 10 5 0 -5 -10 -15 1 0.01 0.1 1 10 100 1,000 10,000 100,000 Frequency (Hz) Fig. 5a: Simulation of Nyquist and Bode diagrams with suggested model (Fig. 3a and Fig. 3b) of 4,4'-((1Z,11E)-5,8-didodecyl-2,5,8,11-tetraazadodeca-1,11-diene-5,8-diium-1,12diyl)bis(1-dodecylpyridin-1-ium) bromide (IV(4N)). 9 0.00001M.txt Model : R(QR) Wgt : Modulus Z , Msd. Z , Calc. 75 70 65 60 55 50 44.6 56.2 - Z '' (ohm) 45 71.4 40 35.7 40 28.1 22.3 31.6 25 15.8 12.5 20 50 14 11.2 89.3 35 79.4 112 30 250 15 7.14 5.62 3.57 223 2.5 357 10 633m 1.12k 0 15.8k 71.4k -5 2.81 2.23 1.58 1.4 562 5 # of pars with rel. std. errors >10%: 0/4 >100%: 0 / 4 4 5 125 158 179 20 7.94 100 140 25 Iter #: 4 Chsq: 7.53E-03 8.93 893m 500m 200m -10 0 20 40 60 80 100 120 140 160 Z ' (ohm) 0.00001M.txt Model : R(QR) Wgt : Modulus 1,000 60 55 50 |Z|, Msd. |Z|, Calc. Angle, Msd. Angle, Calc. 45 40 100 35 |Z| (ohm) 25 20 15 10 10 5 Angle (deg) 30 Iter #: 4 Chsq: 7.53E-03 # of pars with rel. std. errors >10%: 0/4 >100%: 0 / 4 0 -5 -10 -15 1 0.1 1 10 100 1,000 10,000 100,000 Frequency (Hz) Fig. 5b: Simulation of Nyquist and Bode diagrams with suggested model (Fig. 3a and Fig. 3b) of N1,N2-didodecyl-N1-(2-((E)-(pyridin-4-ylmethylene)amino)ethyl)-N2-(2-((Z)(pyridin-4-yl methylene)amino)ethyl)ethane-1,2-diaminium bromide (II(4N)). 10 IV (4N) 0.00001 M.txt Model : R(QR) Wgt : Modulus Z , Msd. Z , Calc. 90 80 70 - Z '' (ohm) 60 31.6 50 25 17.9 44.6 28.1 63.3 40 50 89.3 30 12.5 10 7.94 11.2 4.46 5 2.5 4 1.4 714m 141m 500 200m 2.81k 71.4k 0 # of pars with rel. std. errors >10%: 0/4 >100%: 0 / 4 1.79 1 2.23 158 250 10 Iter #: 4 Chsq: 7.77E-03 5.62 7.14 40 71.4 100 140 200 20 20 15.8 40m -10 0 20 40 60 80 100 120 140 160 180 200 Z ' (ohm) IV (4N) 0.00001 M.txt Model : R(QR) Wgt : Modulus 1,000 55 50 45 |Z| (ohm) 100 10 5 0 -5 -10 -15 10 1 0.01 0.1 1 10 100 1,000 10,000 Angle (deg) 40 35 30 25 20 15 |Z|, Msd. |Z|, Calc. Angle, Msd. Angle, Calc. Iter #: 4 Chsq: 7.77E-03 # of pars with rel. std. errors >10%: 0/4 >100%: 0 / 4 100,000 Frequency (Hz) Fig. 5c: Simulation of Nyquist and Bode diagrams with suggested model (Fig. 3a and Fig. 3b) of N-(2-((E)-(pyridin-4-ylmethylene)amino)ethyl)-N-(2-((2-((Z)-(pyridin-4- ylmethylene)amino)ethyl)amino) ethyl)dodecan-1aminium bromide (I(4N)). 11 -1.0 II (4N) log i (A cm-2) -2.0 -3.0 -4.0 1 M HCl 0.00001 M 0.00005 M 0.0001 M 0.0005 M 0.001 M -5.0 -6.0 -0.82 -0.72 -0.62 -0.52 -0.42 -0.32 -0.22 E vs Ag/AgCl (mV) -1.0 I (4N) log i (A cm-2) -2.0 -3.0 -4.0 1 M HCl 0.00001 M 0.00005 M -5.0 0.0001 M 0.0005 M 0.001 M -6.0 -0.82 -0.72 -0.62 -0.52 -0.42 -0.32 -0.22 E vs Ag/AgCl (mV) Fig. 6. Anodic and cathodic polarization curves obtained at 25 oC in 1 M HCl in different concentrations of inhibitors II(4N) and I(4N). 12 3.3. Langmuir isotherm 0.0012 IV(4N) C/θ (M) 0.0010 0.0008 0.0006 0.0004 0.0002 25 °C 40 °C 55 °C 70 °C 0.0000 0 0.0002 0.0004 0.0006 0.0008 0.001 C (M) Fig. 7: Langmuir’s adsorption plots for carbon steel in 1 M HCl containing different concentrations of inhibitor IV(4N) at various temperatures. References [1] Hegazy MA, Abdallah M, Awad MK, Rezk M (2014) Three novel di-quaternary ammonium salts as corrosion inhibitors for API X65 steel pipeline in acidic solution. Part I: Experimental results. Corros. Sci. 81: 54–64. [2] Khamis A, Saleh MM, Awad MI, El-Anadouti BE (2013) Enhancing the inhibition action of cationic surfactant with sodium halides for mild steel in 0.5 M H2SO4. [3] Raja PB, Qureshi AK, Rahim AA, Osman H, Awang K (2013) Neolamarckia cadamba alkaloids as eco-friendly corrosion inhibitors for mild steel in 1 M HCl media. Corros. Sci. 69: 292–301. [4] Luna JM, Rufino RD, Sarubbo LA, Takaki GMC (2013), Characterisation, surface properties and biological activity of a biosurfactant produced from industrial waste by 13 Candida sphaerica UCP0995 for application in the petroleum industry, Colloids and Surfaces B: Biointerfaces, 102: 202– 209 [5] Ahamad I, Prasad R, Quraishi MA (2010) Adsorption and inhibitive properties of some new Mannich bases of Isatin derivatives on corrosion of mild steel in acidic media. Corros. Sci. 52: 1472–1481. [6] Mata J, Varade D, Bahadur P (2005) Aggregation behavior of quaternary salt based cationic surfactants. Thermochim. Acta 428: 147-155. [7] Samakande A, Chaghi R, Derrien G, Charnay C, Hartmann PC (2008) Aqueous behaviour of cationic surfactants containing a cleavable group. J. Colloid Interface Sci. 320: 315–320. [8] Badawi AM, Hegazy MA, El-Sawy AA, Ahmed HM, Kamel WM (2010), Novel quaternary ammonium hydroxide cationic surfactants as corrosion inhibitors for carbon steel and as biocides for sulfate reducing bacteria (SRB), Mate. Chem. and Phys. 124: 458–465. 14