{'fraction_non_alphanumeric': 0.02763677382966723, 'fraction_numerical': 0.012408347433728144, 'mean_word_length': 4.943296089385475, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On the effect of surface functional groups on the structural and dynamical properties of an ionic liquid confined in zeolite templated carbons studied through molecular simulations

Porous carbons are used in a wide range of applications, including electrochemical double layer capacitors for energy storage, in which electrolyte ion properties under confinement are crucial for the performance of the systems. While many synthesis techniques lead to the presence of surface functional groups, their effect on the adsorption and diffusion of electrolyte ions is still poorly understood. In this study we investigate the effect of surface chemistry on dynamical and structural properties of adsorbed ions through molecular dynamics simulations of a neat ionic liquid in contact with several zeolite templated carbons. The steric and specific influence of functional groups is explored using three structures: a structure without any functional groups; a structure with ester, hydroxyl, anhydride acid and carboxyl functional groups; and a structure where the oxygen and hydrogen atoms are replaced by carbon atoms. We show that the functionalization has a limited impact on the structure of the confined electrolyte but affects the diffusion coefficients, and that the relative importance of the structure and chemical nature of the functional groups is not the same depending on the ion type and property considered.


Introduction
Electrochemical double layer capacitors, also known as supercapacitors, are characterized by large power densities, long cycle lifetimes and a wide range of operating temperatures. [1][2][3][4] In these systems, the charge storage is based on the voltage-driven electrosorption of ions from an electrolyte onto the electrode surfaces [5][6][7] . The electrodes commonly consist in porous carbons thanks to the large surface area, good electronic conductivity, good stability and ease of synthesis of these materials 8 . Numerous studies have been carried out to understand what parameters affect the capacitance and, as a consequence, the energy stored in these systems. Important features include the pore size and how similar it is to the ion size, and the electrode curvature [9][10][11][12][13][14][15] . While many synthesis techniques, such as activation at high temperature with an acid, 16,17 lead to surface functional groups, the effect of their presence on ion electrosorption and dynamics of the confined electrolyte have not been widely studied. The existing literature demonstrates that the surface composition (presence of oxygen, nitrogen, ...) impacts significantly the density of the confined electrolyte and its mobility. [18][19][20][21][22][23] This is not surprising as the surface chemistry influences many properties including the electronic conductivity, pore accessibility, wettability, and polarity.
A number of experimental studies on the effect of functionalization on supercapacitors performance and properties of the confined electrolyte have used idealized structures such as graphene nanoplatelets (GNPs) and carbon nano-onions (CNOs), or Carbide-Derived Carbons (CDCs) as electrodes. [19][20][21][22]24 Moussa et al. have employed CNOs to investigate the relationship between surface chemistry and defects, and the capacitance in aqueous and organic electrode. 24 They have systematically controlled the surface chemistry and amount of active sites by thermal oxidation under air and thermal reduction under hydrogen while keeping the textural properties, characterized by the specific surface area, similar. They have shown an increase of capacitance followed by a plateau when the amount of oxygen groups increases, in opposition to a linear increase with the amount of active sites in the case of defects. This demonstrates the importance of the active sites, and active surface area, for the determination of the capacitance.
Realising vacuum annealing at different temperatures, it is possible to synthesize CDCs with similar pore sizes and pore volumes but different surface chemistries and crystallinities. In particular, vacuum annealing at higher temperatures, increases ordering, reduces the number of defects, and leads to higher electronic conductivities. Using such an approach, Dyatkin et al. 19 have studied the electrochemical properties of carbon-based supercapacitors with 1-ethyl-3-methylimidazolium bis(trifluoromethylsulfonyl)imide, [EMI][TFSI], as an electrolyte. They have shown that functionalization does not necessarily affect the capacitance negatively even though functionalized carbons are usually associated with lower electronic conductivities compared to carbons vacuum annealed at high temperatures. However, graphitization indeed tends to improve the performance at high rates. In later works, Dyatkin et al. 20,21 have demonstrated using quasi-elastic neutron scattering and inelastic neutron scattering that the nature of the functional groups is very important. In particular, hydrogenated and oxygenated CDCs lead to faster ion diffusion and stronger ionelectrode interactions while aminated CDCs induce reduced performance compared to both hydrogenated/oxygenated and defunctionalized CDCs. The oxygen and hydrogen functional groups modify the ionophilicity of the surface and draw the ions closer to the carbon surface rendering the cations more mobile. In non-functionalized carbons, the ion packing is denser which reduces the ion mobility. In these works, the experimental results are completed and supported by molecular dynamics simulations (MD) of the same electrolyte in carbon slit pores. In many cases, the functional groups lead to pseudocapacitive phenomena which can also enhance the performance of supercapacitors. 2 Molecular simulations on different systems have shown that it is not only the nature of the functional groups that matters but actually the electrode-electrolyte combination.
Kerisit et al. 23  in contact with planar graphene oxide and graphene oxide nanochannels have also shown a negative impact on the ion dynamics. 25,26 More recently, Schweiser et al. 27 have used DFT calculations to study a range of surface chemistries and electrolytes, including the effect of solvation. This DFT study, combined with some electrochemical experiments suggests that interaction energies provide a good descriptor for the prediction of the capacitance. In all these theoretical studies, the electrodes are considered through very simplified geometries (slit pores, planar surfaces) and the addition of functional groups is done randomly or in a regular fashion but not in a realistic way. This limits the understanding of ion organisation and diffusion in three-dimensional porous networks.
In this work, we investigated the effect of the presence of surface functional groups on the structural and dynamical properties of a neat ionic liquid in contact with a Zeolite Templated Carbon (ZTC). ZTCs are inorganic highly ordered microporous carbons with many attractive features [28][29][30][31][32] . They are characterized by a large specific area, a high porosity, a very narrow and ordered pore size distribution, surface hydrophobicity and robustness. These materials have been tested for several applications such as electrochemical supercapacitors 33 , lithium intercalation 34 or hydrogen adsorption storage 35 . We carried out simulations on three different ZTC structures: i) an initial one without any functional groups, 31 ii) a second one derived from the first, with ester, hydroxyl, anhydride acid and carboxyl functional groups, and iii) a third one where oxygen and hydrogen atoms are replaced by carbon atoms to be able to distinguish between steric and specific effects of the functional groups. The molecular simulations allowed us to calculate a number of structural and dynamical properties to see the effect of functional groups on the confined ionic liquid.
2 Systems studied and methods

Systems studied
In this study we carried out molecular dynamics simulations of a neat ionic liquid, 1-butyl- where r ij is the distance between sites i and j, σ ij and ij are the Lennard-Jones parameters defining respectively the position of the repulsive wall and the depth of the energy well, q i is the charge of site i, and ε 0 is the permittivity of free space. The ions have a charge of ±0.78e. Reducing the charge from ±1.0e to ±0.78e allows for a remarkable agreement between simulation and experiment, or simulation with an all-atom model, 37 for a variety of static and dynamic properties of the ionic liquid in the bulk, 36,38 at the interface with a planar electrode 39 and confined in a porous carbon. 40 Figure 1: Snapshot of one of the simulated systems consisting in a pure ionic liquid in contact with a porous carbon. Anions are represented in green, cations in red and carbon atoms in light blue. This snapshot was generated using the VMD software. 41 We conducted simulations with three model carbon structures: -the first structure, designated as ZTC, contains only carbon atoms and no functional groups; 31 -the second structure, derived from the first and designated as ZTC-OH, contains carbon atoms and, oxygen and hydrogen functional groups; 1 -the third structure, designated as ZTC-C, is the same as ZTC-OH but the oxygen and hydrogen atoms have been replaced by carbon atoms.
The ZTC structure, generated by Roussel et al. 31 using Grand Canonical Monte Carlo simulations, is a fully carbonaceous perfect negative of the templating zeolite (NaY -sodium ex-changed Faujasite). It is characterized by a narrow unimodal pore size distribution as shown in Figure 2. Therefore, it differs from the synthesized ZTC by absence of both physical and chemical defects. The ZTC-OH model was conceived in order to reproduce physico-chemical and chemical properties of the zeolite replica through a two stage process, introducing (1) physical defects and (2)  As a consequence of the carbon modification procedure, the pore size distribution of ZTC-OH is quite different from the one of ZTC. It is largely due to the added functional groups, 128 oxygen and 32 hydrogen atoms, occupying the main pores and therefore generating smaller pores. The force field parameters for carbon, oxygen and hydrogen atoms are provided in Table 1. 43,44 The carbon atoms of the ZTC and ZTC-C structures are always neutral, while for ZTC-OH, the charges on carbon, oxygen and hydrogen atoms correspond to the charges obtained by DFT calculations with very small modifications to obtain a neutral material.
The atomic charges of the ZTC-OH structure are available in the relevant input files in the Zenodo repository with identifier 10.5281/zenodo.4446690.
We note that, in this work, the carbon structure is considered as a rigid entity while in reality the structure is flexible to some extent. [45][46][47] Some rare theoretical studies on watercarbon systems show that the flexibility has a limited impact on properties of water [48][49][50] .
For systems similar to the ones of interest here, we have shown in a previous study that a flexibility leading to relative height changes of 1% and 2% does not affect dynamical and structural properties significantly. 40   All simulations reported here have been conducted using LAMMPS 52 and the initial configurations were generated using the fftool software. 3 The rigidity of the cation is maintained using the SHAKE algorithm. 53 The timestep is set to 2 fs. The simulations contain 1200 ion pairs and the simulated systems have dimensions close to 49Å × 49Å × 225Å depending on the carbon structure considered. The systems were first equilibrated in the NPT ensemble for 2 ns before collecting data for 10 ns in the NVT ensemble. The pressure of the NPT simulations is set to 1 atm and all simulations are done at 400 K. The barostat and thermostat time constants are 0.5 ps and 0.1 ps respectively. A cut-off of 12Å was used for the Lennard-Jones interactions while coulombic interactions were evaluated using a particle-particle particle-mesh Ewald solver.

Pair distribution functions
The local structure of a system of particles (atoms, molecules, colloids) can be determined from the calculation of pair distribution functions (or radial distribution functions), denoted by g(r). These functions correspond to the probability of finding a pair of particles at a distance r, with respect to the estimated probability for a completely random distribution at the same density. In other words, they describe the variation in density as a function of the distance from a reference particle. A possible expression for these pair distribution functions is: where ρ (1) α and ρ (2) αβ are respectively the one-body and two-body particle densities for ions of species α (and β). The pair distribution functions allow for the comparison of environments around an ion in different electrolytes and also to characterize the structural changes associated with confinement.

Diffusion coefficients
Diffusion coefficients are very often calculated to characterize the dynamic behavior of a fluid. For a uniform fluid, where the density is the same at any point in space, the diffusion is homogeneous and equal along the three axes x, y and z. The determination of the selfdiffusion coefficients is done using Einstein's relation which relates this property to the mean-square displacement of the molecules: where d is the dimensionality of the system and ∆r i (t) is the displacement of a typical ion of the considered species in time t.
The presence of the porous carbon breaks the symmetry of the system, as shown in Figure 1, and two regions corresponding to the "free electrolyte" and the "confined electrolyte" can be defined. The determination of diffusion coefficients in such a system has been described in the literature 40,54,55 . An analysis in which fictitious boundaries are introduced is used. D xx and D yy are determined from the mean square displacements < ∆x 2 (t) > and < ∆y 2 (t) > of particles remaining in a given region. P i (t) is the survival probability for a particle in that given region : P i (t) is the probability for a particle i to remain in a region of interest and can be calculated numerically from the simulation. Let N (t, t + τ ) be the total number of i particles in the region of interest during the time interval between t and t+τ , and N (t) designate the number of particles in the layer at time t. Then P (τ ) can be calculated as: where T is the total number of time steps averaged over.
The diffusion coefficient along the z axis, D zz , is determined from the autocorrelation of an eigenfunction based on the z limit condition : where ψ i n (t) is given by: In these equations, z i min and z i max are the coordinates that define the width of a given region

Adopted strategy
As mentioned earlier, the addition of heteroatoms corresponding to functional groups (128 oxygens and 32 hydrogens) in the ZTC structure changes the pore size distribution significantly. The functionalization will therefore have two effects at the same time: a chemical       To test the hypothesis of a disorganization of the ionic liquid by the presence of functional groups / defects, we calculated pair distribution functions between the centers of mass of the ions. Figure 5 shows the pair distribution functions for the three simulated systems.
The presence of functional groups / defects has a limited impact on the local structure of the electrolyte. There is possibly a small reorientation of the cations visible with the slight increase in the shoulder at 6.0Å in the anion-cation distribution, and in the slight increase (+ 3.4%) in the most probable cation-cation distance, when going from ZTC to the ZTC-OH and ZTC-C. The second and third peaks of the pair distribution functions (at around 12.0Å and 18.4Å in the anion-cation distribution) also seem to be flattened for ZTC-OH and ZTC-C compared to the initial ZTC. Overall, it seems that the presence of functional groups / defects induces a small disorganization of the confined ionic liquid.
To test the hypothesis of a larger distance between the ions and the carbon surface, we calculated local densities following the methodology described by Merlet et al.. 12 which uses an argon probe with a diameter of 5.5Å to define the accessible surface and determines the local density as a function of the distance to the local surface. Figure 5d shows the results of such analysis. For the anions, while there is a clear decrease in the intensity of the peak when going from ZTC to ZTC-OH and ZTC-C, directly related to the decrease in TPP observed Following the results obtained through pair distribution functions and local ionic densities, it seems that the generation of small pores as seen in Figure 2, probably not accessible to the ions, is the main reason for the reduced TPP in ZTC-OH and ZTC-C compared to the intial ZTC. To understand these observations, we calculated the degrees of confinement of the ions in the three porous structures. Indeed, a previous study has shown that there is a correlation between confinement and diffusion. 40 . The degree of confinement (DoC), as defined by

Diffusion coefficient and confinement
Merlet et al. 14 , is the percentage of the solid angle around the ion which is occupied by the carbon atoms, normalized by the maximal value taken by this quantity. The DoC depends both on the number of carbons surrounding an ion and on each ion-carbon distance. Figure 7 gives the distributions of anions and cations in different degrees of confinement. This figure shows that, in most cases, the ions become less confined when surface functional groups / defects are present which is consistent with an increase in diffusion coefficients. The DoCs of the anions in ZTC-OH and ZTC-C structures are similar and shifted to lower confinement (peak maximum at ∼19%) compared to ZTC (peak maximum at ∼23%). It is interesting to note that since local densities in Figure 5d show that the anion-carbon distance does not change, this indicates that anions are occupying environments where they are surrounded by less carbon atoms. For the cations, the DoC curves for ZTC and ZTC-C have a similar main peak but i) the peak at ∼10% in ZTC is not present in ZTC-C, a shoulder at 14% is present instead, and ii) a shoulder at ∼ 36% is seen for ZTC-C. The curve corresponding to ZTC-OH shows a more dramatic variation of the position of the main peak from ∼27-28% to ∼19% (as for the anions). In this case, the average cation-carbon distance was shown to vary with the functionalization. Anions are spherical with a single charge while cations consist in three sites carrying different partial charges. The cations are therefore subject to reorientation, which is not possible with anions. In ZTC-C, the smaller cation-carbon distance compared to ZTC (see Figure 5) could be associated with the increase of DoC (from ∼10% to ∼14% and from ∼27-28% to ∼36%). In ZTC-OH, the surface functional groups have partial charges which will induce electrostatic interactions with the ions and probably affect the orientation of the cations. In this case, the environment of the cations is more largely affected, maybe with less carbon atoms in their first coordination shell, and the smaller cation-carbon distance is not associated with an increase in DoC. This can explain the different behaviour observed for ZTC-OH compared to ZTC and ZTC-C. Overall, for the anions, the modification of the structure seems to play a more important role than the chemical nature of the groups while it is the reverse behavior for the cations.

Conclusions
In this work, we have investigated the influence of the presence of surface functional groups (-O and -H) on the properties of a confined ionic liquid. We carried out simulations with "Zeolite Templated Carbons" having an ordered structure, with and without functional groups. In addition to the initial ZTC structure, without any defects or functional groups, and the ZTC-OH structure, functionalized using DFT simulations of the oxidation, we have studied a structure where the oxygens and hydrogens are replaced by carbon atoms in order to dissociate steric effects and more specific effects. The molecular simulations show that the functionalization affects both the quantities of adsorbed ions and diffusion coefficients without large variations in the local structure of the ionic liquid. In particular, ions are faster for functionalized carbons, in agreement with experimental results, an effect which could be rationalised by characterizing the confinement of the ions. For the systems studied here, the quantities of adsorbed ions seem to be more affected by steric interactions but for other properties, like diffusion coefficients and degrees of confinement, the relative importance of steric and specific interactions depends on the ion type. In the future, it would be interesting to explore the influence of representing the ionic liquid with an all-atom model and the impact of allowing a certain flexibility for the carbon structure.

Data availability
The data corresponding to the plots reported in this paper, as well as example input files for LAMMPS, are available in the Zenodo repository with identifier 10.5281/zenodo.4446690.