Ryusuke Futamura

Taku Liyama

Yuma Takasaki

Yury Gogotsi

Mark J Biggs

Mathieu Salanne

Julie Ségalini

Patrice Simon

Katsumi Kaneko

Partial breaking of the Coulombic ordering of ionic liquids confined in carbon nanopores

Keywords:

Ionie liquids are composed of equal quantities of positive and negative ions. ln the bulk, electrical neutrality occurs in these liquids due to Coulombic ordering, in which ion shells of alternating charge form around a central ion. Their structure under confinement is far less well understood. This hinders the widespread application of ionic liquids in technological applications. Here we use scattering experiments to resolve the structure of a widely used ionic liquid (EMI-TFSI) when it is confined inside nanoporous carbons. We show that Coulombic ordering reduces when the pores can accommodate only a single layer of ions. lnstead, equally charged ion pairs are formed due to the induction of an electric potential of opposite sign in the carbon pore walls. This non-Coulombic ordering is further enhanced in the presence of an applied external electric potential. This finding opens the door for the design of better materials for electrochemical applications. a Confinement of ioni c liquid in carbon nanopores 1nm 1nm Bilayer confinement . . . . . . . .

1 ons are ubiquitous in liquids surrounding us in nature and man made systems. When they are dissolved in aqueous or organic solutions, they are coordinated by a shell of solvent molecules. This solvation shell plays a key role in many physical processes, such as the diffusion [START_REF] Impey | Hydration and mobility of ions in solution[END_REF] or the adsorption of ions at interfaces 2 . However, confinement in nanoscale pores prevents this bulk structure from being formed, leading to partial desolvation of ions-that is, a decreasing number of solvent molecules in the solvation shell [START_REF] Chmiola | Anomalous increase in carbon capacitance at pore sizes Jess than 1 nanometer[END_REF][START_REF] Ohkubo | Restricted hydration of Rb and Br ions confined in slit-shaped carbon nanospace[END_REF][START_REF] Huang | Theoretical mode! for nanoporous carbon supercapacitors[END_REF][START_REF] Tanaka | Effect of a quaternary ammonium sait on propylene carbonate structures in slit-shape carbon nanospaces[END_REF][START_REF] Fukano | Vertically oriented propylene carbonate molecules and tetraethyl ammonium ions in car bon slit pores[END_REF][START_REF] Deschamps | Exploring electrolyte organization in supercapacitor electrodes with solid-state NMR[END_REF][START_REF] Boukhalfa | Small-angle neutron scattering for in situ probing of ion adsorption inside micropores[END_REF][START_REF] Forse | Nuclear magnetic resonance study of ion adsorption on microporous carbide-derived carbon[END_REF][START_REF] Levi | In situ electrochemical quartz crystal admittance methodology for tracking compositional and mechanical changes in porous carbon electrodes[END_REF][START_REF] Merlet | Highly confined ions store charge more efficiently in supercapacitors[END_REF][START_REF] Prehal | Quantification of ion confinement and desolvation in nanoporous carbon supercapacitors with modelling and in situ X-ray scattering[END_REF] . In the case ofionic liquids (ILs), the situation is even more complex [START_REF] Fedorov | Ionie liquids at electrified interfaces[END_REF] • [START_REF] Kornyshev | Double-layer in ionic liquids: paradigm change?[END_REF] . These liquid salts are made of ions only, making it impossible to view them using a simple solvation concept. Instead, each ion is surrounded by successive shells of opposite charge, a situation that is commonly described as Coulombic ordering [START_REF] Hayes | Structure and nanostructure in ionic liquids[END_REF] . The intermolecular force between nearest neighbours is very strong, and replacing a cation in the coordination shell immediately around an anion by another anion is a costly process from the energetic standpoint.

Spurred by the wide range of electrochemical applications of ILs 1 7 , many experimental 1 8-23 and theoretical [START_REF] Bazant | Double layer in ionic liquids: overscreening versus crowding[END_REF][START_REF] Merlet | On the molecular origin of supercapacitance in nanoporous carbon electrodes[END_REF][START_REF] Péan | On the d yn amics of charging in nanoporous carbon-based supercapacitors[END_REF][START_REF] Feng | Supercapacitor capacitance exhibits oscillatory behavior as a fonction of nanopore size[END_REF] studies have aimed at understanding their structure at electrified interfaces. Kondrat and Kornyshev predicted using a mean-field theory that ILs con fined in nanopores of electrically conductive materials could form a unique superionic state [START_REF] Kondrat | Superionic state in double-layer capacitors with nanoporous electrodes[END_REF] . In this state, the Coulombic ordering of the liquid is broken: ions of the same charge neighbour each other due to a screening of their electrostatic interactions by the image charges induced in the pore walls. A variety of experimental methods have been used to study the local structure and transport of ILs in carbon nanopores, including neutron and X-ray scatter ing 6 '7' 9 ' 13 • 18 , nuclear magnetic resonance (NMR) 8 [START_REF] Forse | NMR study of ion d yn amics and charge storage in ionic liquid supercapacitors[END_REF] and in situ elec trochemical techniques 11 • 1 9 • 20 • However, reaching the precision nec essary to probe the inter-ionic structure at the local scale is difficult, and, so far, these studies could neither confirm nor invalidate the possible existence of the superionic state. However, very recently, Prehal et al. used in situ small-angle X-ray scattering to show that the dehydration of inorganic ions could more easily occur in carbon nanopores by the application of an external electric field 13 • Bring ing the same level of experimental elucidation to the inter-ionic structure of highly concentrated electrolytes in carbon nanopores would fundamentally shift the capacity to develop technologies in which confined ions play an important role-such as, for example, supercapacitors [START_REF] Merlet | On the molecular origin of supercapacitance in nanoporous carbon electrodes[END_REF] • 26 • 29 -31 , water desalination [START_REF] Porada | Review on the science and technology of water desalination by capacitive deionization[END_REF] and energy generation from a salinity difference [START_REF] Brogioli | Extracting renewable energy from a salinity difference using a capacitor[END_REF] .

• 1 U•
In this study, X-ray scattering data were measured for two ILs. They were then analysed using hybrid reverse Monte Carlo (HRMC) [START_REF] Tanaka | Effect of a quaternary ammonium sait on propylene carbonate structures in slit-shape carbon nanospaces[END_REF] • 7 • 34 simulation to recover the structure of ILs confined in well-characterized carbide-derived carbon (CDC) nanopores [START_REF] Palmer | Modeling the structural evolution of carbide-derived carbons using quenched molecular d yn amics[END_REF] of different average sizes. This allows us to investigate the various scenarios shown schematically in Fig. la-that is, the persistence ( or screening) of Coulombic ordering under both monolayer and bilayer confinement conditions. We show that for l-ethyl-3-methylimidazolium bis( trifluoromethylsulfonyl)imide (EMI TFSI), a widely used IL [START_REF] Tsai | Electrochemical quartz crystal microbalance (EQCM) study of ion dynamics in nanoporous carbons[END_REF] • 21 • 30 , the coordination shell of anions deviates significantly from the Coulombic ordering seen in the bulk phase, with the deviation being increased under an applied electric field. These results therefore provide direct evidence of the formation of a superionic state [START_REF] Kondrat | Superionic state in double-layer capacitors with nanoporous electrodes[END_REF] • 36 in ILs.

Anomalous co-ion pairs formation in carbon nanopores

The X-ray scattering profiles of liquid and confined EMI -TFSI in (green). They arise from the periodicities of cation-cation, anion anion and cation-anion arrangements (Supplementary Fig. la-d) 37 • For the bulk liquid (black), the peak at 9.0 nm-1 corresponding to medium-range order is sharper and more intense than the one at 14.1 nm-1 , which reflects short-range order (first neighbours). In contrast, confinement of EMI-TFSI in CDC pores yields an inversion of these peak intensities. This inversion is particularly visible for EMI-TFSI in the 0.7-nm pores (red), where the feature at 9.0 nm-1 appears only as a shoulder of the dominant peak. Furthermore, the position of the latter is shifted to higher values as confinement increases.

The reduced structure fonction (RSF) of bulk EMI-TFSI obtained from the X-ray scattering profiles [START_REF]Molecular assembly structure of CCI, in graphitic nanospaces[END_REF] Here the main difficulty is to extract the signal due to intermolecular correlations from the total RSF of the liquid. To this end, we use HRMC, which fits explicit atomic positions and interaction potentials with the experimental data. This allows us to deconvolve the total RSFs (black) into intra-ion (purple) and three different inter-ion (red, green and blue) contributions. The experimental RSF (open circle) is well matched by the HRMC simulation, irrespective of a slight difference in the s-range of 15 to 25 nm-1 explained by the use of a rigid molecular model (Supplementary Information). In a similar way as done for the bulk liquid, RSFs of the EMI-TFSI adsorbed inside the carbon pores were deconvolved into individual contributions of intra-ions, inter-ions and carbon wall-ions to gain an insight into the structural organization of the IL inside the nanopores (Supplementary Fig. le-g). Good agreement is also obtained with experimental data, despite the use of a simplified slit shape of carbon pores (see Supplementary Fig. lf,g)-the dispersity of the pore sizes should be taken into account for a complete description. The marked difference in the inter-ion contribution of the RSFs between the bulk and confined EMI-TFSI suggests strong confinement effects.

The electron radial distribution fonctions (ERDFs) for the bulk liquid and two confined systems obtained by Fourier transformation of the experimental and simulated RSFs are shown in Fig. 2a-c. The ERDF ofbulk EMI-TFSI liquid is in agreement with previously reported data 39 • The main differences between the total ERDFs for the three systems are: the peak intensity at 0.5 nm observed for confined EMI-TFSI is greater than that of the bulk EMI-TFSI liquid, and the confined EMI-TFSI does not show a clear peak at 1.5 nm, which reflects the absence oflong-range order. To interpret these differences, we now analyse the individual contributions of the ions. In particular, we focus on the anionanion ERDF (blue lines in Fig. 2a-c) because the larger number of electrons present in TFSI results in a stronger contribution to the X-ray scattering4 °. The data for anion-cation and cation-cation ERDFs are given in Supplementary Fig. 2a,b. In the 1-nm pores (Fig. 2b), the anion anion ERDF shows small deviations with respect to the bulk-that is, a broadening of the peak at 1.5 nm.

More dramatic differences are observed in the 0.7-nm pores (Fig. 2c) compared to the larger pore and to the bulk liquid. Firstly, the positive peaks at 0.9 and 1.6 nm of the bulk IL are shifted to longer distances, by 0.25 and 0.4 nm, respectively. This indicates a two-dimensionally orientated alignment of anions along the slit pore walls, which will be characterized later. However, the most striking difference is the large decrease of the intensity of the negative peak at 0.45 nm; this evidences the intrusion of anions into the cationic coordination shell surrounding a central anion. Snapshots from the HRMC simulation are shown in Fig. 2d-f to visualize the structure adopted by the ions (green, EMI; red, TFSI). The inter-ionic structure of the bulk liquid is disordered (Fig. 2d), whereas a more evident orientation ordering of confined EMI-TFSI is observed in the 0.7 nm slit-pore (Fig. 2f); co-ion chains of cations and anions are formed and arrange alterna tel y in a O. 7 -nm pore. Note that here co-ions designate ions of the same sign as the central ion since the pore walls are not polarized. Figure 2g-i reports the corresponding proportions of each ion type in the nearest coordination shell around an anion. Coulombic ordering is preserved under confinement of IL in the 1-nm pore, since this coordination shell is almost completely occupied by the counter ions. However, in the case of the 0.7-nm pore, surprisingly, 24% of the ions in the coordination shell are of the same charge (Fig. 2i); that is, nearly a fivefold increase compared to the bulk liquid. In contrast, the anion population in the next-nearest coordination shell surrounding a central anion appeared to be less affected by confinement in the 0.7-nm pore: the anion populations in this shell were 54%, 64% and 61 % for the 0.7-nm pore, the 1-nm pore and bulk liquid, respectively. Similar results were obtained for another IL, 1-ethyl-3-methyl imidazolium tetrafluoroborate (EMI-BF 4 ) (Supplementary Fig. 3 and Supplementary Information). For the latter, 11 % of anions are present in the cationic coordination shell surrounding a central anion in 0.7-nm pores, to be compared with 5% in the bulk (Sup plementary Fig. 3h,g). This increase is not marked compared to that of EMI-TFSI, because the ion size of BF 4 ion is too small to induce an intensive screening effect, and the low electron density contrast between EMI and BF 4 ions results in a lower structural resolution. This intrusion of anions into the cationic coordination shell indicates that the Coulombic ordering, which is the main structural feature of ionic liquids, is partially broken under strong confinement. For cations in EMI-TFSI, the proportion of other co ions in the first coordination shell in 0.7-nm pores is 19%, being slightly larger than in the case of bulk IL (16%) (Supplementary Fig. 2c-e and Supplementary Information). Therefore, the confine ment effect on their local structure is not as evident as the one observed for anions. This can be attributed to the formation of nonpolar domains of aggregated alkyl chains, which is typical of imidazolium-based 1Ls 41

• Even if this effect is relatively small for EMI cations due to the short length of the two chains, it introduces a small proportion of pairing between them even in the bulk.

A detailed analysis of the HRMC-derived snapshots helps to understand further the structure ofEMI-TFSI in carbon nanopores. As intrusion of anions into the coordination shell of the co-ions suggests the creation of anion-anion pair arrangements, the anion anion and cation-cation pair numbers were evaluated (Fig. 3). The ion-pair distance is defined by the first maximum of the differential electron density of the ERDF (that is, 0.55 nm). lnside 1-nm pores, the fraction of paired co-ions is smaller than in the bulk for both anions and cations, while the confinement inside 0.7-nm pores enhances the formation of both pairs: the fractions increase from 0.053 to 0.37 for anions and from 0.18 to 0.27 for cations.

Monolayer and bilayer confinements

We now try to understand better the variation of the structure of the IL with respect to the pore size. Figure 4 shows distribution profiles of EMI (green line) and TFSI (red line) ions across the pore width (that is, z-axis) for 0.7-nm and 1-nm pores (Fig. 4a,b) obtained from averages over the HRMC snapshots, indicating the formation of monolayer and bil ay er confinement, respectively. These results agree with the pore-size-dependent adlayer structure of EMI-TFSI in carbon slit-pores predicted by MD simulation 27 • The monolayer confinement in the 0.7-nm pore is therefore likely to play an important role in the breaking of the Coulombic ordering.

W))))))))),f),i

The formation of a monolayer may also lead to preferable orientations of the ions. We analysed the orientational structure of ions in HRMC simulation snapshots, by using the averaged second Legendre polynomial (P 2 (cos 0)) = (1/2(3 cos 2 0 -1)) as an orientational order parameter 42 , where 0 is the angle between the various vectors characterizing the geometry of the EMI or TFSI ions (Fig. Sb). A detailed analytical explanation and the definition of molecular planes are provided in the caption of Fig. 5. This analysis shows that the molecular planes of the cation and anion at the centre of the pore are mainly perpendicular to the pore walls with a pseudo-stacking arrangement along the 0.7-nm pore direction (in Fig. Sa,c,e,f). The detailed explanation is provided in Supplementary Information for the molecular orientations ofEMI-TFSI in the 1-nm pores (Supplementary Fig. 4).

Screening of electrostatic repulsion by image charges

Our results suggest the existence of a molecular-scale mechanism that reduces the Coulombic repulsion energy between co-ions that become doser to each other. The repulsive energy for two co-ions (that is, ions of the same charge) at 0.5 nm distance, estimated from a simple Coulombic interaction using point charges and a dielectric constant of 12.0 (ref. 43), is 12 kJ mol-1 • However, Kondrat and Kornyshev have predicted a fast exponential decay of Coulombic interactions due to the screening by the metallic walls 28 , proposing the presence of a superionic state of ions 28 • 3 6, in which nanopores are entirely occupied with only counter-ions. Although van der Waals interaction between ions could also be modified by the metallic surfaces [START_REF] Cho | Suppression and enhancement of van der Waals interactions[END_REF] , the dispersion interaction between pore walls and molecules then becomes comparable to the Coulombic interaction in the narrow pores, eventually breaking the alternating array structure of cations and anions. Thus, the creation of image charges and their interaction with the adsorbed ions has a great impact on the ion arrangement in carbon nanopores.

To confirm the importance of this screening effect, we computed the induced charge distribution on both carbon walls using an algorithm that allows us to fix the potential on the carbon atoms. The resulting charge distributions are shown in Fig. 4c,d, Carbon atoms with high positive (q > O.Ole) or negative charges (q < -0.0le) are shown in red and blue, respectively; carbon atoms with intermediate charge between -0.0le and O.Ole are shown in cyan. The blue and red domains for the 0.7-nm pore (Fig. 4c) are more extensive compared to those for the 1-nm pore, where the highly charged domains are also more dispersed (Fig. 4c). The domains of iso charge on both walls are more correlated in the case of the 0.7-nm pore, reflecting the fact that they arise from a monolayer as opposed to a bilayer in the case of the larger pore. The carbon atoms of the 0.7-nm pore carry a higher average absolute charge (O.Ollle Cnm-2 ) than those of the 1-nm pore (0.0088e Cnm-2 ). This shows that image charges on the carbon atoms increase when the pore size decreases, in agreement with previous simulations 25 • The computation also provides the total energy of the system. By differentiating this energy with and without the induced charges on the carbon, stabilization energies of 7 and 22 kJ mol-' are o btained for the 1-nm and 0.7-nm pores, respectively. Although these values likely overestimate the screening, since carbon is a non-ideal electrically conductive material [START_REF] Rochester | lnterionic interactions in conducting nanoconfinement[END_REF] , we can deduce that the formation of image charges is a strong driving force allowing the packing of co-ions in the vicinity of each other inside narrow nanopores.

Effect of electric potentials on association of co-ions

The X-ray scattering profiles of EMI-TFSI in 0.7-nm pores under electric potentials (obtained from external polarization source) using an in situ X-ray scattering electrochemical cell (Supplemen tary Fig. 9a-c) are shown in Fig. 6a. The in situ cell exhibits a typical capacitive signature ( that is, Cccll = 25 F g-1 , that is C e1 ectrode = 100 F g -1 ), giving a rectangular cyclic voltammetry (CV) curve as reported by Lin et al. [START_REF] Lin | Solvent effect on the ion adsorption from ionic liquid electrolyte into subnanometer carbon pores[END_REF] evidencing a double layer charge storage mechanism. Under polarization at + 2 V, we observe an increase of the intensity in the 20-30 nm-1 region, which arises from intramolecu lar scattering ofTFSI. This indicates an enrichment of anions inside the nanopores. The peaks at 14 and 9 nm -1 , which are respectively due to first-and second-neighbour intermolecular scattering (that is, short-range and medium-range ordering), display opposite trends. The intensity at 14 nm _, increases, suggesting a stronger ordering at short range. This supports the enrichment of anions in the nearest coordination shell around an anion. It is accompanied by a decrease of the intensity at 9 nm -1 , which implies that this enrichment occurs with a diminution of the medium-range order. Opposite trends are observed in the negatively polarized electrode.

These changes in the X-ray scattering indicate an intermolecular reorganization within the ILs under polarization. To analyse them further, the obtained RSFs were deconvolved, as given in Fig. 6b-d. The most striking change is observed for TFSI-TFSI correlation un der + 2 V, 0 V and -2 V (Fig. 6e). The formation of pairs of anions (Fig. 6f-h) is largely facilitated in positively charged pores, resulting in an explicit increase of the proportion of anions in cationic coordination shells around a central anion (Fig. 6i-k) that increases from 23% at O Vup to 34% at +2 V. On the other hand, the number of paired anions decreases in negatively charged pores (12% at -2 V). Similar trends were observed for the EMI-EMI structures by application of electric fields (Supplementary Fig. 9f-k). The pre liminary measurement of the in situ X-ray scattering of EMI-TFSI in the 1-nm pores under the electric potentials showed less marked changes of the peaks than those in the 0.7-nm pores, supporting the uniqueness of monolayer confinements of ILs. The in situ results support the superionic state formation theory irrespective of the degree of pore filling with counter-ions.

Conclusion

In conclusion, the structure of EMI-TFSI and EMI-BF 4 IL elec trolytes confined in carbon nanopores has been determined from HRMC simulation-aided X-ray scattering technique. This approach shows that these ILs adopt a monolayer or bilayer arrangement depending on the average pore size, which corresponds well to the two situations shown in Fig. la. Bilayer confinement does not compromise the Coulombic ordering as ordered adlayers can form on each carbon wall. Monolayer confinement, on the other hand, breaks Coulombic ordering and leads to the formation of anion and cation pairs. The non-Coulombic structure formation is made possible by the repulsive electrostatic interactions between co-ions being offset by image charges induced in the carbon walls. This compensation effect induces a highly dense ionic structure of co ions, which can explain the increase of the capacitance measured in small nanopores, when the ion dimensions are close to the average pore size, as reported in previous studies [START_REF] Lin | Solvent effect on the ion adsorption from ionic liquid electrolyte into subnanometer carbon pores[END_REF] • Furthermore, the in situ X-ray scattering measurements achieved under polarization confirmed the marked enhancement of the densification of co-ions • in the oppositely charged pores. This study therefore validates experimentally the existence of a superionic state theoretically pre dicted by Kondrat and Kornyshev2 [START_REF] Deschamps | Exploring electrolyte organization in supercapacitor electrodes with solid-state NMR[END_REF] The present approach provides guidelines for designing porous carbons for supercapacitors-that is, with high electrical conductivity and pore structure inducing larger image charges at the surface. The conclusions of this study should be applicable to other conducting materials forming slit pores, for example, between two-dimensional (2D) layers of tran sition metal dichalcogenides, carbides, nitrides and oxides 46 • The convincing evidence of partial breaking of Coulombic ordering of ions confined in subnanometre carbon pores may also provide key information for a wide range of new technologies, such as capac itive deionization [START_REF] Porada | Review on the science and technology of water desalination by capacitive deionization[END_REF] and energy production from a salinity differ ence [START_REF] Brogioli | Extracting renewable energy from a salinity difference using a capacitor[END_REF] since breaking of symmetry principles plays an essential role in nature.

Methods

Methods, including statements of data availability and any associated accession codes and references, are available in the online version of this paper.

Fig. 1 bFigure 11

 111 Fig. 1 b show two features below s = 20 nm -i, which are reminiscent of the reflections from the (202) and ( 400) planes of the bulk crystal

  is shown in Fig. le.

Figure 21

 21 Figure 21 Pore size-dependent anion-anion structure in unpolarized carbon nanopores. a-c, Experimental (open circles) and HRMC-simulated (black lines) electron radial distribution functions (ERDFs) from X-ray scattering of EMI-TFSI in bulk liquid (a), the 1-nm pore (b) and the 0.7-nm pore (c).The blue line shows the simulated ERDF for the TFSI-TFSI correlations. d-f, Snapshots of EMI-TFSI in bulk liquid (d), the 1-nm pore (e) and the 0.7-nm pore (f); EMI and TFSI ions are shown by green and red ellipsoids, respectively. g-i, Population in the first coordination shell around a TFSI ion in bulk liquid (g), the 1-nm pore (h) and the 0.7-nm pore (i).

Figure 3 I

 3 Figure3I Enhanced co-ion pair formation in carbon nanopores of decreasing pore size. a1,b1,c1,d1, Snapshots of co-ion pairs of anions (a1,c1) and cations (b1,d1) for EMI-TFSI bulk liquid (opposite charge ion pairs are not shown since they are the regular pattern of such ionic liquids). The co-ion pairs are extracted from bulk EMI-TFSI snapshots in 1-nm (a1,b1) and 0.7-nm slit spaces (c1,d1). a2,b2,c2,d2, Snapshots of anion pairs (a2,c2) and cation pairs (b2,d2) for EMI-TFSI in 1-nm (a2,b2) and 0.7-nm pores (c2,d2). Ris the ratio of paired anion (or cation) number to total anion (or cation) number. EMI and TFSI ions are shown as green and red ellipsoids, respectively. For narrower pores, repulsion of ions with the same charge is suppressed by electronic screening of Coulomb interactions by the conducting walls, which leads to an enhancement in the number of co-ion pairs. Note that here co-ions designate ions of the same sign as the central ion and that the pore walls have no net charges since they are not polarized.

Figure 41

 41 Figure 41 The distributions of IL molecules and induced charges on carbon pore walls in monolayer and bilayer confinement. Density profiles of EMI (green) and TFSI (red) ions in 0.7-nm (a) and 1-nm pores (b). Molecular centres of EMI and TFSI are their electron distribution centres. z represents the coordinate perpendicular to carbon walls (z= 0 at pore centre). lnduced charge distributions on top and bottom pore walls of 0.7-nm (c) and 1-nm pores (d) by the adsorption of EMI-TFSI ionic liquid. Carbon atoms in blue and those in red have high negative (q < -0.0le) and positive (q > O.Ole) charges, respectively; cyan atoms have intermediate charges between blue and red atoms.

  nm 0.61 nm 0.61 nm 0.64 nm

-0. 4 -Figure 5 I

 45 Figure 5 I Pore size-sensitive oriented structures of EMI cations and TFSI anions in carbon nanopores of 0.7 nm. b, Definition of molecular vectors L, S and T. For the EMI cation, L passes through bath N atoms in the imidazolium ring and Sis normal to Lin the imidazolium ring. For the TFSI anion, L passes through bath 5 atoms in 5-N-5 bonding and Sis normal to the 5-N-5 plane. d, Examples of molecular orientation for the L vector of cations to z-axis as(P2( cos!:!))= -0.5 (perpendicular), 0 (random) and 1 (parallel). a,e, Density profiles of EMI (a) and TFSI (e) ions across the slit width. a, 83% of EMI cations located in the grey region (i) with double peaks due to the cation's T vector being well-aligned to the pore walls in two configurations, as shown in the inset. Cations adjacent to the pore walls contribute only 9% of the total density in the orange region (ii). Their long and small molecular axes (vector L and S) are oriented parallel to the pore walls. The residual cations between the grey and orange regions have a vector L parallel to the pore walls, e, 78% of TFSI anions locate in the grey region (i). ln that region, anions have a vector T parallel to the pore walls, whereas vectors Land S have no preferred orientation, as shown in the inset Anions adjacent to the pore walls (4% of the total density) in the orange region (iii) have vectors Land S oriented parallel to the pore walls. The residual anions in the light green region (ii) have vectors Land T parallel to the pore walls. c,f, Orcier parameter (P2( cos0)) changes of L, Sand T vectors against z-axis. The coloured regions are the same as in a ore.

Figure 6 I

 6 Figure6I The effect of electrode potential on the structural ordering of ionic liquid inside ultra-narrow pores. a, Change in in situ X-ray scattering profile of EMI-TFSI in the monolayer confinement of 0.7 nm carbon nanopores under constant potentials of O V (black) and ±2 V(+, red and-, blue). Here, we express application of the electric potentials of 2 V for positive and negative electrodes as +2 V and -2 V, respectively. b-d, Experimental X-ray reduced structure functions (RSFs) of EMI-TFSI in the 0.7-nm pores under +2 V (b), 0 V (c) and -2 V (d) with open circles. The HRMC-simulated RSFs are plotted with black solid lines. The simulated RSFs for the TFSI-TFSI correlation (red), EMI-EMI correlation (green) and TFSI-EMI correlation (blue) are given as solid lines. e, Single plots of RSFs of TFSI-TFSI correlation in the 0.7-nm pores under +2 V (red), 0 V (black) and -2 V (blue). f-h, Snapshots of co-ion pairs of anions of EMI-TFSI in the 0.7-nm pores under +2 V (f), 0 V (g) and -2 V (h). Ris the ratio of paired anion number to total anion number. TFSI anions are shown as red ellipsoids. i-k, Population in the first coordination shell around a TFSI anion in the 0.7-nm pores under +2 V (i), 0 V (j) and -2 V (k).

Acknowledgements R.F. is supported by TAKAGI Co., Ltd. This research was supported by Grant-in-Aid for Young Scientists (B) (No. 26870240), Young Scientists (A) (No. 17H04953), Scientific Research (A) (No. 24241038), Scientific Research (B) (No. 17H03039), CREST (JPMJCR1324) and Center oflnnovation Program from Japan Science and Technology Agency. The s yn chrotron radiation experiments were performed at the BL02B2 of SPring-8 with the approval of the Japan S yn chrotron Radiation Research Institute (JASRI) (Proposai No. 2012B1438, No. 2013B1243, No.2014All67 and No. 2014B1196) and at the BL5S2 of Aichi S yn chrotron Radiation Center, Aichi Science & Technology Foundation, Aichi, Japan (Approval No. 2016D4005 and No. 201606124). P.S. acknowledges support from the European Research Council under the European Union's Seventh Framework

Although we did not include the image-charge-associated interaction in the HRMC simulation, we evaluated their effect by calculating them explicitly for the equilibrated structures extracted from the HRMC simulation. This was made by assigning fixed partial (point) charges to the IL a toms ( the charges of the Canongia Lopes-Padua force field were used 50

), and Gaussian charge distributions for the carbon atoms. The values of the latter were then determined by imposing a constant electric potential condition" within the carbon structure.

Data availability. The data that support the findings of this study are available from the corresponding author upon reasonable request.

Author contributions

R.F. carried out the experiments, being in main charge of this research. R.F., P.S. and K.K. prepared the manuscript. T.l. developed the HRMC simulation program and supported the structure analysis. M.J.B. supported development of the HRMC program. M.S. computed image charge distributions. R.F. and Y.T. performed HRMC calculations. P.S. and Y.G. provided the CDC samples. J.S. contributed development of in situ X-ray diffraction measurements. R.F., M.S., T.1., P.S., Y.G., M.J.B. and K.K. discussed the results and edited the paper.

Additional information

Supplementary information is available in the online version of the paper. Reprints and permissions information is available online at www.nature.com/reprints. Publisher's note: Springer Nature remains neutral with regard ta jurisdictional daims in published maps and institutional affiliations. Correspondence and requests for materials should be addressed ta P.S. or K.K.

Competing financial interests

The authors dedare no competing financial interests.

Methods

We used two types of TiC-CDCs with average pore sizes of O. 7 and 1 nm, which were evaluated by nitrogen adsorption isotherms at 77 K (Supplementary Fig. 5 and Supplementary Information) using a volumetric equipment (Autosorb-iQ, Quantachrome Instruments). EMI-TFSI (99 wt%, Iolitec) and EMI-BF 4 (>97.0%, Tokyo Chemical Industry) were used without further purification. The EMI-TFSI was introduced in the CDC pores in an acetonitrile (99.5 wt%, Kishida Chem.) solution of about 9 wt% EMI-TFSI. The removal of acetonitrile was then conducted by heating the samples at 343 K overnight and at 393 Kin vacuo ( <0.1 Pa) over two days to measure only the X-ray scattering ofEMI-TFSI inside pores. The EMI-BF 4 adsorbed in CDCs (average pore width: 0.7 nm) was also obtained with similar treatrnents. Further N 2 adsorption experiments on CDCs at 77 K, after the filling procedure with EMI-TFSI (Supplementary Fig. 6b,d), indicate that the pores are occupied by IL molecules. The weight loss measured by Thermal Gravimetric Mass Spectrometry (TGMS, Rigaku) under He atrnosphere at 800 K (Supplementary Fig. 7) provides the amount of EMI-TFSI inside the nanopores; the actual fractional filling of the nanopores with EMI-TFSI are 0.88 and 0.97 for the 0.7-nm pores and 1-nm pores, respectively. The removal ofEMI-TFSI on the external surfaces of the CDC sample was confirmed by the intensity decrease of X-ray scattering in the small-angle region (Supplementary Fig. 6a ,c).

The EMI-TFSI adsorbed CDC samples and CDC powders were placed in a glass capillary of 0.7 mm in diameter (0.01 mm wall thickness) and then the capillary was sealed after heat treatment at 393 K under vacuum for 1 h to avoid adsorption of water vapour by humidity. X-ray scattering profiles of IL-adsorbed CDC samples, CDC samples and EMI-TFSI bulk liquid were measured in the synchrotron radiation facility of SPring-8 with an imaging plate (IP); the wavelength (À= 0.09989 and 0.07997 nm) monochromated with Si(l 11) plane was determined with CeO 2 powder ( the crystal system is cubic and the lattice parameter is 0.54111 nm). The X-ray scattering profile of a glass capillary without samples was also measured for a background correction.

We also measured the in situ X-ray scattering ofEMI-TFSI in the charged state of CDC electrodes. The 0.7-nm CDC electrodes (CDC: carbon black: PTFE = 8:1:1 in weight percent'°) were inserted into two capillaries with Pt wires ( diameter = 0.1 mm) and then the capillaries were filled with EMI-TFSI and connected within 0.2 mm distances with glass microfibre !liter as a separator (Supplementary Fig. 9a-c). Cyclic voltammetry of the in situ X-ray scattering cell was conducted using IVIUMSTAT (lvium Technologies B. V.) with 0.5 mV s -1 scanning rate (Supplementary Fig. 9e) to assess the quality of the microcell. The in situ X-ray scattering measurements were conducted in the synchrotron radiation facility of Aichi SR with four sets of 2D detectors of PILATUS; the wavelength (,l = 0.079966 nm) monochromated with Si(ll l) plane. The CDC electrode of the left-hand side of the in situ X-ray scattering cell (Supplementary Fig. 9a-c) was selectively irradiated with X-rays for 10 min after charging and discharging at constant voltage of -2, 0 and + 2 V for 1.5 h with a potentiostat of HA200 (Hokuto Denko). The chronoamperometry plots under these experimental conditions (Supplementary Fig. 9d) show a stable leakage current after 1.5 h polarization, which enables the measurement of in situ-X-ray scattering at the steady state.

The obtained X-ray scattering profile includes the self-scattering of adsorbed EMI-TFSI molecules and of the CDC carbon frames, as well as the cross terms between them. The corresponding partial RSFs were extracted with the appropriate correction procedures" given in the Supplementary Information. We have then determined the real-space structure of the samples by performing hybrid reverse Monte Carlo (HRMC) simulations 5 • 6 • 34 • ln this method, we determine an energetically favourable configuration of ionic molecules within a mode! slit-shaped pore of infinite extent that shows a structure compatible with the RSF extracted from X-ray scattering. This is achieved by minimizing the following function

The first term in this equation measures the difference between the structure factors of the mode! (S,1m) and experiment (S exp )

F, = L (ss1m ( s, )-S e,q, (s,))

where both are defined in terms of n discrete points along the absolute scattering vector, s. The second term in equation (1) is the total energy of the system, which is given by the expression

where E u is the sum of the interaction energies between the ions within the pore, which are modelled using Coulomb's Law with the Ewald summation method [START_REF] Allen | Computer Simulation of Liquids[END_REF] and the Lennard-Jones mode! with Lorentz-Berthelot mixing rules 47 , and E, P is the sum of the interaction energies between the ions and the pore walls as determined by the 10-4-3 Steele mode!". We used a slit-shaped mode! of carbon pores, because high-resolution transmission microscopie images show the presence of such pores 4 9• Although the slit-pore is an approximate mode! for such carbons in the long range, as shown by Palmer et al. 35, it remains correct for studying the arrangements of the ions at the ranges which interest us here, which is below 2-3 nm. However, slight deviations from this approximation are likely to appear, as discussed below.

The terms in equation ( 1) are scaled by suitable weights. In the case of the energy-related term, the weight is the inverse of the thermal energy, W E = fJ = 1/k B T, where k B is the Boltzmarm Constant, and T the temperature (298.15 K). The weight for the structure-factor-related term is selected to ensure that the entire term is comparable in scale to the energy-related term. For the bulk and 1-nm pore simulations, W, = 1.33 x 10 5 • For the O. 7 -nm pore simulation W, = 1.33 x 10 6 • The HRMC simulation starts from an initial charge-neutral configuration. The density is fixed, and periodic boundary conditions are used in ail Cartesian directions for the bulk IL or along the x and y axis only for the mode! slit-pores. The dimensions of the box were (6nm x 6nm x wnm), where w is 6nm for the bulk and the effective pore size for the carbon nanopores. The numbers of ion pairs inside the box were fixed to 508 in the bulk liquid, and to 80 and 58 for slit-pores of 1 nm and 0.7 nm, respectively, which corresponds to a fractional filling of 0.95. For HRMC simulation in charged pores, we assumed these charges on carbon pore walls are induced by the imbalance of anion and cation numbers to keep the electroneutrality. So the number of charges ( that is, number difference of anions and cations) are calculated from the results of chronoamperometry at 2 V after keeping 0 V for 3 h for the in situ X-ray scattering cell. The evaluated charges for + 2 V and -2 V simulation on carbon pore walls were + 20e and -20e, respectively. 25 sites of +0.4e and -0.4e are located at even intervals on both side of car bon pore walls in -2 V and + 2 V simulation boxes, respectively. To keep total molecular number density, 10 molecules of cations and anions increase and decrease, respectively, from 0 V simulation condition to + 2 V simulation.

The -2 V simulation was done oppositely. The positions of charges on carbon pore walls were fixed in the simulation.

The ions were placed randomly in the initial structure. Their arrangement then evolved towards a plausible structure by repeatedly applying 'moves' to ions selected at random. Two different types of moves are applied with equal probability. The first is a random displacement, which can be expressed as ôx. = ôx.,mu (ç. -0.5)

where ôx., mu is the maximum possible displacement allowed in the a-coordinate direction, and ç. are corresponding random numbers independently selected in a uniform way from the range [0,l].

The second move is a random rotation of the ion around its centre of mass, which can be expressed as M. = ô0 •, mu (ç. -0.5)

where ô0 •, mu is the maximum possible rotation allowed around the a-coordinate direction. Each attempt of move is accepted, provided a random number selected uniformly in the [0,l] range is Jess than the probability

where �F measures the variation of F due to the move. This equation ensures that the move is always accepted if �F :S: O. The values of the maximum linear and rotational displacement are adapted throughout the simulation so as to yield a move acceptance ratio (the ratio of accepted moves to total attempted moves) of 40%.

The simulation results which we discussed in this paper were obtained as follows: first, 1 x 10 7 steps of simple MC simulations were conducted, then HRMC simulations were conducted for 2 x 10 7 steps with equilibrated structure by MC simulations as the starting configurations. The value of the function expressed in equation (1) converges after 1 x 10 7 steps of HRMC simulations, so the configurational information is averaged over the final 1 x 10 7 steps of these simulations to compute ail the structural properties.

The molecular structure, Lennard-Jones parameters and Coulombic parameters of ions" are listed in Supplementary Fig. 8. In our simulations, a rigid mode! was employed for molecular structure for nonplanar staggered EMI and Cl conformer of TFSI". The Coulombic interaction between EMI-TFSI ions and their image charges in the pore wall was not taken into account in this HRMC simulation procedure. lt is worth noting that the image charges of the carbon surfaces are not explicitly included in the HRMC interaction potential. However, it is present in the experiments, so that the formation of ion pairs of the same sign is clearly enforced by the structure-factor-related term during the procedure. The slight disagreement between the experimental and simulated RSFs in Supplementary Fig. lf,g mostly arises from the assumption of a simplified slit shape for the pores. The dispersity of the pore sizes should also be taken into account for a complete description.