{'fraction_non_alphanumeric': 0.0282871003856201, 'fraction_numerical': 0.007811916905087698, 'mean_word_length': 4.8373511472553, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Water confined in self-assembled ionic surfactants nano-structures

We present a coarse-grained model for ionic surfactants in explicit aqueous solutions, and study by computer simulation both the impact of water content on the morphology of the system, and the consequent effect of the formed interfaces on the structural features of the adsorbed fluid. On increasing the hydration level at ambient conditions, the model exhibits a series of three distinct phases: lamellar, cylindrical and micellar. We characterize the different structures in terms of diffraction patterns and neutron scattering static structure factors. We demonstrate that the rate of variation of the nano-metric sizes of the self-assembled water domains shows peculiar changes in the different phases. We also analyse in depth the structure of the water/confining matrix interfaces, the implications of their tunable degree of curvature, and the properties of water molecules in the different restricted environments. Finally, we discuss our results compared to experimental data and their impact on a wide range of important scientific and technological domains, where the behavior of water at the interface with soft materials is crucial.


I. INTRODUCTION
Surfactants are molecules that contain hydrophilic and hydrophobic groups 1 . This peculiar amphiphilic character is the origin of their outstanding properties and widespread employment for many practical applications, ranging from biological systems to microelectronics industry 2 . When mixed with water, surfactants selforganize in order to minimize interfacial energies. This self-assembly process is driven by a subtle interplay of attractive and repulsive interactions, leading to the formation of a rich morphology of hydration-dependent structures 1 . At high water content surfactant micelles are formed, with hydrophilic segments facing the aqueous medium. Upon decreasing hydration, various phases can be observed, with a typical organization of elongated aggregates into cubic and hexagonal packings. Eventually, lamellar phases are stabilized at very high surfactant concentrations. The variable complexity of the observed phase diagrams has been shown to mainly depend on the nature of the hydrophobic tails and the hydrophilic heads 3 . In ionic surfactants a negative (or positive) charge is located on the hydrophilic head, the total charge of the system being neutralized by the presence of counter-ions. The features of these materials are even more complex than those of non-ionic surfactants, due to the additional long-range coulombic interactions 4 . If the solvent used is polar (as water), it acts as a dielectric medium effectively screening the coulombic interactions. The presence of charges obviously influences the molecular interactions and, therefore, surfactant aggregation, generating a range of novel macroscopic properties 2 .
Design of new architectures and consequent functionalities for advanced applications motivates in-depth studies of the structure/activity interplay in both non-ionic and ionic surfactants. This implies the use of molecularlevel investigations to unveil the morphologies of selfassembled objects, provide insight into the static and dynamical properties of the solvent, and clarify their relation with the structure of the surfactant matrix. Very advanced tools, including spectroscopy and scattering techniques 5 , and computer simulation 6 are therefore increasingly needed.
Also, surfactants provide well suited model systems for fundamental investigation of the effect of confinement in soft hydrophobic environments, which is a crucial issue in materials and environmental science and in biology. In general, transport properties of solvent molecules or solvated ions are highly influenced by confinement at the nano-scale. Size, shape and connectivity of the confining matrix, together with the nature of the charged interfaces and the interplay among hydrophobic, electrostatic and Van der Waals forces, have been shown to significantly alter the fluid properties compared to those of the bulk 7-12 . Most part of these studies has focused on confinement in hard matrices but, more recently, the interest in soft confinement, where boundaries mobility cannot be neglected, has substantially grown 13,14 . Much more complex ionomer membranes, like Nafion, have also been extensively scrutinized 15 . Yet, relatively scarce studies have been devoted to the understanding of water structure and dynamics in ionic surfactants, in different hydration conditions 16,17 .
Here we introduce and characterize a numerical model for ionic surfactants in solution, considering a molecular model for water (explicit solvent). Our goal is to fill the gap between coarse-grained approaches on one hand and fully atomistic resolution on the other. We therefore trade an acceptable degradation of spatial resolution for the surfactants molecules for a complete molecular de-scription of the fluid, keeping the possibility of following the evolution of important degrees of freedom and grasping both the details of the nano-structure of water domains (1-15Å) and the macroscopic ordering of surfactant aggregates (20-100Å). We have selected a macromolecular structure, similar to the perfluorooctanesulfonic acid (PFOSA) 18 which features a highly hydrophobic perfluorinated chain, while polarity is provided by the sulfonic acid group. The combination of a perfluorinated backbone and superacid terminal functions favours the formation of a sharp interface between hydrophobic aggregates and the aqueous phase, thus making PFOSA an ideal model system for investigating both surfactant selfassembly and solvent properties. This also enhances the possibility of studying in unprecedented details, to the best of our knowledge, the self-organization of hydrophobic/hydrophilic interfaces, and their impact on the adsorbed fluid features.

II. RESULTS
Without going into the details of the chemical structure, our ionic surfactants solution is a three-components mixture: the surfactant macro-molecules (Su), the polar solvent (water, W), and the solvated (counter-)ions (hydronium, H). The physics of the material is controlled by the interplay of: i) the energy of the interfaces formed between the amphiphilic aggregates and the fluid phase, and ii) the electrostatic interactions among the charged hydrophilic heads and the solvated cations. Developing a good model is tantamount with tuning the relative weights of these two terms, stabilizing the attended phases at different water contents.
We have chosen a united-atoms representation for the surfactant molecule ( Fig. 6 in the Methods section). This is inspired by the model of Allahyarov and Taylor 19 for the side-chain of Nafion. We represent the hydrophobic section of the molecule with a series of 7 Lennard-Jones (LJ) neutral beads, each representing an entire CF 2 group. Similarly, the head group is schematized by two charged LJ beads, one for the sulfur atom S and one for the O 3 group, with a total charge q = −e. This also allows to associate to the charged head a realistic value for the dipole 19 and imposes that all acid groups are dissociated. The mass of each bead corresponds to the sum of the atomic masses pertaining to the bead. Details about the beads are given in Table I in the Methods section,  while functional forms and parameters for the bonded  interactions are given in Table II (Methods). In order to enhance the formation of well ordered lamellar phases at low hydration, we have re-optimized the original values 19 of the parameters controlling the non-bonded interactions. Our new parametrization of the non-bonded interaction terms is given in Table III in the Methods section. The simulation box is initialized by considering a variable number of surfactants, together with the amount of hydronium complexes needed for neutralizing the total charge. The hydration level of the investigated systems is encoded in the parameter λ, i.e., the number of water molecules per surfactant. Additional details of the simulations are given in Methods section. We stress that the structures produced are the result of a very efficient unbiased self-assembly, starting from completely disordered system configurations. The initial seed of the final phase formed quite quickly, on time-scales of the order of a few nanoseconds, followed by slow relaxation, to locally optimize mechanical stress.
The discussion of the phase diagram of our model generally conforms to that of concentrated amphiphile solutions discussed in many textbooks 1 for increasing surfactant concentration (here for decreasing λ). In Fig. 1 (left top) we present typical snapshots of the system at the indicated hydration values. Starting from the highly hydrated systems (λ ≥ 16), at the lowest surfactant concentration, we find a micellar solution, with aggregates of different sizes and elongations, concentrating the hydrophobic beads at the center and exposing the sulfonate groups to water. By increasing surfactants concentration (12 < λ < 16) repulsion between aggregates becomes significant, and micelles start to show an increasingly elongated character. This can be understood by the fact that, in the present high density condition, cylinders pack in space more efficiently than spheres. This process controls the transition for 8 ≤ λ ≤ 12 to a cylindrical structure with some degree of closed-packed order (see λ = 12 in Fig. 1), although it does not express as a fully developed hexagonal phase. In the intermediate range 6 ≤ λ < 8 a new change occurs, with cylindrical aggregates merging and starting to transform in flat bilayers. Eventually, for λ ≤ 4, surfactants arrange in extremely well-ordered lamellar phases, spanning the entire simulation box, with increasingly thin ionic channels intercalating the lamellae (see discussion below). In the case λ = 0, notwithstanding the absence of water, the presence of the hydronium complexes is sufficient to drive phase separation with a local lamellar structure. The structure is however not completely ordered, with hydrophobic domains organized with different orientations and the presence of a few disconnected ionic domains. Altogether, these data demonstrate that our model is able to grasp the overall phase behavior of sulfonated ionic surfactants 16 , in a wide range of hydration conditions. In all cases a sharp phase separation is evident, with the charged sulfonic heads decorating the interface between the adsorbed fluid and the hydrophobic sections of the surfactants. Hydroniums condensate at the charged interface at the lowest values of λ, while a significant fraction is solvated by water, far from the interfaces at high hydration.
The above qualitative description of the phase diagram can be completed by characterizing the system organization via the neutron scattering static structure factors. We have calculated both the diffraction diagrams measured in experiments (color maps in Fig. 1, left bottom) and the angular average, S(k) (Fig. 1, right), where k in the wave-vector. Details about our calculations are given in the Methods section. For the almost dried system, λ = 0 ( Fig. 1, left bottom), we observe strong Bragg peaks on three preferred directions. This is consistent with the picture of local lamellar arrangements which bend and branch, as can be seen on the corresponding simulation snapshot. At λ = 4, high intensity spots, corresponding to genuine first, second and thirdorder Bragg peaks, appear at three non-zero positions. These are aligned along a preferential direction, which is characteristic of the lamellar arrangement with longrange order. By increasing hydration, the second and third order peaks fade, indicating a lower degree of order. At the highest hydration, the high-intensity region eventually arranges in a ring-like shape, indicating that no preferred orientational order is present in the system, as expected in the fully developed micellar phase.
The total static structure factors, at all hydrations, are shown in Fig. 1 (right panel). The main features of these curves are the first peak at low-k, whose position corresponds to the average distance between surfactant clusters, and the higher order peaks, at larger k, which carry information about the arrangement of surfactants and, therefore, of the phase symmetry. We observe that, as we increase the hydration, the position of the peaks shift toward smaller wave-vectors, indicating that the distance between the surfactant aggregates increases. This is the expected effect of swelling of the system when increasing water content. Also, the highest-symmetry phase is found for λ = 4, where the smectic order associated to the lamellar phase is maximum and three well-defined Bragg peaks appear. Additional information, coming from an analysis of the partial contributions S αβ (k) of chemical species α, β, is given in the Methods section.

III. DISCUSSION
Interestingly, the above global spatially-averaged static structure factors provide precise information about local geometrical properties of the confining matrices. More precisely, we are now in the position to discuss the variation of the typical size of the ionic domains available for transport of the absorbed fluid, as a function of the hydration level. From the position k 0 (λ) of the firstorder Bragg peak, we can extract l(λ) = 2π/k 0 (λ), which is commonly associated to the average distance between the centers of mass of the hydrophobic aggregates. From these data we can build l 1 (λ) = l(λ) − 2l s (λ), where l s is the average end-to-end distance of the surfactants. Helped by inspection of the snapshot at λ = 4 of Fig. 1, it is easy to convince oneself that l 1 (λ) is an indirect measure of the size of the ionic channels. Our data are shown in Fig. 2 and quantify the swelling behavior of the system. For λ ≤ 6, l 1 increases linearly with λ, with a slope 1. This corresponds to the expected swelling in the lamellar phase (see, for instance, Ref. 17 ), where the distance between surfactant domains increases affinely, following the volume increase of the intercalated fluid. At higher values of λ, a clear cross-over is visible, with l 1 that can be interpolated by a straight line of slope 1/2. Rationalizing this behavior is however difficult, due to the presence of interfaces of increasing curvature and sensible disorder in the distribution of the hydrophobic aggregates.
These data can be further strengthened by a direct independent measure of the width of the ionic channels, by computing the distribution of the distances of the fluid molecules (both water and hydronium) to the closest surfactant sulfonated head. From these distributions we have estimated the channels sizes, l 2 , as the distance encompassing 99% of the fluid molecules. Our results are shown in Fig. 2. For λ ≤ 6 we have l 1 l 2 , as expected for highly symmetric phases. At higher values of λ, l 2 is always higher than, although of the same order of, l 1 , providing an upper bound to the size of the ionic domains at each λ in the presence of disordered curved interfaces.
Interfaces play a crucial role in the physics of our surfactants systems. In Fig. 3 we show local configurations of the interfaces generated at λ = 1 and 16, in the (pseudo) lamellar and micellar phases, respectively. The sketched segments indicate the relative orientations of selected adjacent surfactants, parallel (left) and at a non-zero angle (right) in the two cases. Obviously these conform to the charge distribution geometry at the interfaces, planar in one case and with a finite curvature radius in the other. We can expect the coordination features of both surfactants and fluid molecules, and therefore wetting properties at the interface, to be sensibly different in the two cases. We therefore first focus on the coordination properties of surfactants heads, in the coordination sphere indicated by the circles in Fig. 3.
In Fig. 4 (top), we plot the average number of molecules of the different species comprised in the first coordination shell of the surfactant heads. This is defined as the sphere with radius R c = 4.3Å, corresponding to the first minimum in the O 3 -O W pair radial distribution functions (not shown). These data show that, for λ ≤ 5, the first coordination shell of the surfactant heads contains about 4.3 atoms pertaining to surfactant molecules. In the same hydration range, the number of fluid molecules in the first coordination shell increases from 3.1 to slightly less than 5. It is interesting to note that there is no variation of this number between λ = 4 and λ = 5. More precisely, at λ = 4 the first coordination shell is saturated and added water molecules organize far from the interfaces, as we will see more in the details below. For λ ≥ 5, we observe that the number of surfactant molecules inside the first coordination shell decreases, while it increases for fluid molecules. This is the manifestation of the lamellar-to-cylindrical phase transition. By increasing λ, the system efficiently packs more fluid molecules at the hydrophilic interface, by increasing the tilt angle between adjacent surfactant and, as a consequence, the mutual distance of the sulfonic heads. This curves the exposed interface, giving rise to increasingly well defined cylindrical structures. At λ = 16, the number of both fluid and surfactant particles in the first coordination shell reach limiting values, which show very mild variation at higher degrees of hydration. This is a direct signature of the transition to the micellar phase, where spherical aggregates are dissolved in (bulk) water, with a total surface area of the interfaces almost independent of λ.
We can push further the analysis of the interfaces by counting the per/surfactant average number of water molecules (or hydronium ions) that are in the first coordination shell of their nearest hydrophilic head, where z m is the distance of molecule m to the nearest hydrophilic head. We note that this procedure eliminates the over-counting intrinsic to the above discussion, where the same fluid molecule could be considered as belonging to the first coordination shell of multiple surfactant heads. Also, by construction 0 ≤ N H ≤ 1 and 0 ≤ N W ≤ λ. The quantities f H = N H and f W = N W /λ can therefore be interpreted as the fraction (over the total number) of hy- dronium ions and water molecules in direct contact with the interface. These data are included in Fig. 4 (bottom) and show a few interesting features.
At very low hydration (λ = 1), almost all water molecules and hydronium ions are condensed in contact with the nearest hydrophilic head, resulting in f W (H) ≈ 1. This is evidence of a phase where all fluid molecules are localized within the first coordination shell of their nearest surfactant heads, in very thin ionic layers intercalated between the surfactant planes. For 1 ≤ λ ≤ 4 we observe an almost linear decrease of f W , which however still keeps a quite high value ( 70%) at λ = 4. Indeed, in that hydration range half of the width of the fluid channel (l 1 (λ) in Fig. 2) is smaller than or comparable to the radius of the coordination shell, meaning that most part of the added water molecules will be placed at the interface. In the same range of λ, f H only decreases by a mere 10%, indicating however that, notwithstanding the strong Colombic interactions which keep hydronium ions strongly bound to the sulfonate groups, there is still the possibility for a water molecule to substitute a cation at the interface.
At λ = 5, where the lamellar order is still present, the fluid channels are no longer spanned by the coordination regions of facing surfactant heads, which are saturated, and additional fluid molecules are therefore placed outside the interfaces. For λ > 5, the sequence of phase transitions described before occurs, implying the progressive curvature of the interfaces. This effect increases the interfaces area available for fluid adsorption compared to that present in the lamellar phase and controls the reduction of f W upon hydration, explaining the clear cross-over to a less-than-linear behaviour at high λ. Eventually, at very high hydration, only about 10% of the total amount of water molecules is still in contact with the interfaces, the vast majority having a prominent bulk-like character. This is at variance with the case of the hydronium ions, which even in very high hydration conditions substantially keep their interfacial character, with 50% of the entire population still bounded at the charged interfaces.
We now clarify the effect of the above subtle interface/bulk character of water molecules in different regions of the ionic domains on the coordination properties of the absorbed fluid itself. We focus, in particular, on the water-water average coordination number and its variation at different distances from the interfaces. In Fig. 5 (top) we plot the average coordination number of water molecules, n W (λ) at all considered hydration levels. The value for bulk water 4 is shown for reference. These data have been calculated with the usual technique of integrating the pair radial distribution function, g O W −O W (r), in the range [0 : R C ], with R c = 3.16Å the position of its first minimum. At high hydration, we recover the value of bulk water n W 4 (dashed line). By decreasing λ, n W steadily decreases to n W 3 at λ = 6, at the boundary with the lamellar phases. Next, due to the increasing extent of affine confinement, the observed decrease is much steeper, and n W reaches a minimum value 1.2 at λ = 1. This is consistent with the general picture discussed above, where water molecules, hydronium ions and sulfonate groups are intercalated in the ionic channels, organizing in almost mono-planar configurations.
Our simulations allow us to access even more detailed information, e. g., the space-dependent coordination number of water molecules, in different regions of the ionic channels. In Fig. 5 (bottom), we show the average coordination number of molecules at distance z from the closest sulfonate group, n W (z, λ). Obviously, zmax 0 dz n W (z, λ) ρ(z, λ) = n W (λ), where ρ(z, λ) = i=1,N W δ(z i − z)/N W is the number density of water molecules and z i the distance of water molecule i from the closest surfactant head. These data show that, at all λ's, n w (z, λ) steadily increases from a highly suppressed value at z min 3Å in contact with the interface (z min is mainly controlled by the value of σ O 3 O W , see Table 3 in the SI) to a maximum at the λ-dependent z max , at the center of the channels (z max l 2 /2, at all hydrations). The overall variation of n W (z, λ) with the distance depends on λ, decreasing from a factor of 2.5 at λ = 1 to 1.3 for λ = 32. We conclude our discussion on this point by observing that the details of the curve corresponding to the highest hydration level allow us to highlight the presence of three different regions inside the ionic domains, determining the most prominent character of the confined water molecules: i) bulk-like at large distances, z ≥ 8Å, in the center of the ionic domains and far from any boundaries; ii) intermediate, corresponding to distances z 6Å, where the shallow spatial modulation of n W is due to the well-known layering of water molecules; and iii) interface-limited, where the extent of nano-confinement is so high to completely destroy any resemblance of the hydrated environment with the one in the bulk phase.

IV. CONCLUSIONS
We have developed a coarse-grained model of ionic surfactants in solution, with explicit water molecules and hydronium complexes as counterions. Extensive Molecular Dynamics simulations have been performed, over a wide range of water contents ranging from the almost dried condition, where counter-ions only are present, to highly hydrated states. We have observed very efficient system self-assembly at all hydration levels, solely driven by the forces generated by the chosen interaction potential, starting from disordered initial configurations with no initial bias toward any phase symmetry. The generated phase behaviour has been demonstrated to nicely mimic that of sulfonated ionic surfactants, at ambient conditions, encompassing lamellar, cylindrical and micellar structural organization. In all cases we have observed sharp charged interfaces separating the aqueous domains from the confining soft matrix, formed by the hydrophobic segments of the surfactants. Based on a very detailed analysis, the confinement sizes associated to the ionic domains have been found to increase with hydration, in the range 5÷25Å. A transition between affine swelling and a more complex behaviour has been found at length scales of the order of 14Å.
Neutron scattering static structure factors were also calculated, similar to those determined in experiments. Neutron and X-rays scattering measurements on PFOSA molecules of size comparable to that of our model were reported recently 16,17 . A nice agreement is found between our data and the experimental results, as the boundaries of the different phases, typical average inter-aggregate correlation distances and overall swelling behaviour are similar. Our model is therefore capable of realistically reproducing the PFSOA surfactant solution behaviour. This suggests that it can be used as an in-silico partner to the experimental study of a variety of surfactants. For instance, we could easily tune the surfactant length and generate different commercially available materials, as PFHSA (6 carbons) or PFBuSA (4 carbons) 18 . The phase behaviour of these systems being quite universal, we expect limited variations compared to the present case, with the modified length of the surfactants probably controlling the hydration-level location of the different phase boundaries.
In the same context, our model could also be valuably applied to generate and investigate polymeric systems, in particular perfluorosulfonic acid polymer electrolyte membranes. More specifically, the quite ordered PFOSA surfactant phases were recently considered as a facilitated playground for clarifying microstructure and transport properties of nanoscopic phase-separated ionomers 16,17 . In particular, the PFOSA molecule is very similar to the pendant side-chain of Nafion, the most investigated of the PFSA polymer electrolyte membranes used in fuel cells and electrolysers (Ref. 20 , and references therein). Unfortunately, even the most modern scattering techniques provide averaged spatial information only 21 , which does not allow to form a comprehensive consistent picture of both the organization of these extremely complex materials at the nanoscale, and the consequent impact on transport properties. Hydrated sulfonated ionic surfactants have therefore been proposed as model systems for the local organization of ionomers, to quantify, among other issues, the effects of well-controlled confining geometries on proton mobility 17 .
Based on these facts, we can conclude that with the present model we are in the position to unify in a single bottom/up computational framework the entire vast class of perfluorinated materials. Indeed, we have demonstrated here that our re-optimized force-field correctly encodes the phase behaviour and the most important structural features of a PFOSA system. Due to the similarities of the latter with the side chain of Nafion, we can employ this structure as the fundamental building-block to upscale our description to the entire ionomer, by grafting it to a strongly hydrophobic polymer backbone with tuned mechanical properties (i.e., persistence length). This is of course in the same spirit of the original work of Ref. 19 , but with the crucial difference that we can now count on a model with physically-sound behaviour at all length scales, ranging from local lamellar-like structures to longrange organization of ionic and hydrophobic domains. 22 We also note that our approach naturally provides all ingredients for generating a virtually infinite range of composite materials, obtained by doping the ionomer with elongated charged macro-molecules, including ionic liquids 23,24 .
Our results go well beyond the particular (sulfonic) moiety considered. More generally, our model can be seen as a powerful tool for generating efficient self-assembly of soft interfaces with a controlled degree of curvature. Recent fundamental work [25][26][27] has focused on assembly driven by hydrophobic forces, even in the presence of hydrophilic units, as it is the case here. It has been shown that the properties of water molecules at the interface with extended molecular aggregates are certainly controlled by the nature of the interactions between water molecules and the aggregates, but a crucial role is played by the extent of the surface occupied by the aggregates itself. In particular, the associated curvature radius strongly affects the wetting features, or the hydrogen bonding formation. In the limiting case of purely hydrophobic aggregates of large available surface, water molecules at the interface even acquire a gas-like character, with a strongly suppressed interfacial density 26 and a number of formed hydrogen bonds significantly lower than that in the bulk 25 . In the present case, the situation is sensibly more complex, with the presence of hydrophilic interactions between surfactant heads and water molecules, and the possibility to form additional hydrogen bonds with both the hydronium complexes condensed at the interfaces and the fully dissociated sul-fonated groups. However, our data also point to nontrivial modifications of the character of water molecules, in the presence of interfaces with different degrees of curvature. In particular, the degradation of both average and space-dependent (at different distances from the interfaces) coordination properties are expected to impact structure and life-times associated to the hydrogen bonds network and, in general, transport properties of the adsorbed fluid itself. We are convinced that our work provides a well-designed general foothold to attack all these issues, which are of paramount importance in modern science, ranging from soft synthetic materials to systems of biological interest 28,29 .

V. METHODS
State of the art. Molecular dynamics simulations at the mesoscale are the most indicated tool to address the issues discussed in the main text. It is interesting to note that only limited surfactants phase diagram regions have been generally considered in the literature, focusing particularly on micellar phases [30][31][32][33] , in high hydration conditions. These works mostly report phase diagrams and basic structural details, in the form of pair distribution functions and typical sizes of surfactant clusters. Very limited attention is normally devoted to the features of the adsorbed fluid. Furthermore, most part of the existing numerical investigations are somehow exceedingly focused on the chemical details of the materials or, in contrast, they miss important details in the description of the solvent 34-37 , relying on heavily coarse-grained models. Obviously, increasing spatial resolution to the atomic level for the surfactant molecules would necessitate unreasonably extended computing resources.On the other hand, neglecting some details of the water molecule has an important influence on the dynamics of the simulated systems, and hampers the possibility of following the evolution of important degrees of freedom.
The model. As mentioned in the main text, in the attempt to find the optimum balance between the level of detail and the possibility to run simulation trajectories for a large number of molecules on very long periods of time, we have chosen a united-atoms representation for the surfactant molecule, as shown in Fig. 6. This is in- 6. Sketches of the geometry used for the molecules considered in this study: ionic surfactant (left), water (center), hydronium (right). The geometry of the surfactant molecule is the one introduced in Ref. 19 . Similarly, the head group is schematized by two charged LJ beads, one for the sulfur atom S and one for the O 3 group, with a total charge q = −e. This also allows to associate to the charged head a realistic value for the dipole 19 and imposes that all acid groups are dissociated. This is a realistic assumption. Indeed, the super-acidity of the sulfonic head groups insures a full ionization of the PFOSA molecule, i.e., hydronium ions are formed at very low water content. This has been proved to be the typical situation for materials containing sulfur trioxide groups. For instance, recent infra-red kinetics work on the perfluorinated sulfonic acid membrane Nafion 38 , has shown total ionisation already when only one water molecule per sulfonic acid group is present. The mass of each bead corresponds to the sum of the atomic masses pertaining to the bead. Details about the beads are given in Table I. The topology of the flexible molecules is enforced by harmonic potentials which constrain the distance, the bending angle and the dihedral angle between two, three, and four successive atoms, respectively. The values of the intra-molecular energy parameters used are given in Table II 19 . Beads pertaining to different molecules, or located in the same molecule and separated by more than three bonds, interact with the sum of Lennard Jones (LJ) and Coulombic interactions. Numerical values of all re-optimized parameters are given in Table III. Coulombic interactions are truncated and screened according to a modified version of the damped shifted force model 39 which, for a damping parameter α = 0, simplifies to: Here r c is the cut-off, o = 1 the vacuum dielectric constant, and θ is the Heavyside function. This potential has been shown to reasonably reproduce the most important features of liquid silica 40 and water 41 and is by now considered as an acceptable alternative to methods based on the Ewald summations, both in the bulk and confinement, with an evident gain on the complexity of the calculations. We have set the values of the cutoff to 12Å and 11Å for LJ and Colombic interactions, respectively. Finally, we have considered the three-points rigid SPC/E model for water molecules 42 , slightly modified to use Eq. (1) for the cut-off implementation. We have verified for bulk water that structure, as characterized by total and partial pair distribution functions, and value of the self-diffusion coefficient are in agreement with those generated by the original model. Charge neutrality of the total system is imposed by adding one hydronium ion per acid group, represented by the (four-points) model introduced by Kusaka et al. 43 , also modified to use Eq. (1). We used the SHAKE algorithm 44 to keep water and hydronium molecules rigid.
Simulation details. We have considered simulation boxes containing N S surfactants and N H = N S hydronium complexes. The number of water molecules N W was chosen in order to match the needed hydration level. This is quantified by the hydration parameter λ = N W /N S , which counts the number of water molecules per sulfonic acid groups. We considered several values of λ in the range 0 ÷ 32. λ = 0 is the case where hydronium complexes only are present, and therefore does not correspond to the completely dried system. We also considered the case of pure bulk water, as a reference. N S at each λ has been chosen in order to generate a cubic box edge length of about 100Å at ambient pressure and temperature conditions. The total number of interacting units is, therefore, N = N S (13 + 3λ), and varies in the range 80 ÷ 90 × 10 3 for the considered range of λ.
We initialized the different systems by placing all molecules in the simulation box, with random positions of the centers of mass and orientations. This allows to avoid introducing any initial preferred order, subsequently letting the system self-organize in the most stable configuration, just based on the interplay among the interaction forces. Initial overlaps were removed by shortly integrating the equations of motion in the N V E ensemble, with the constraint that the displacement of each atom at each time step could not exceed 1Å. Next, we coupled the box to a P = 1 atm Berendsen barostat 44 and thermostat, slowly cooling the system from an initial temperature of 350 K to the target temperature T = 300 K. The time step used for the numerical integration of the equation of motions, in this final part of thermalization and for production runs, was δt = 1 fs. Extremely extended thermalisation runs followed, generated according to the N P T ensemble via Nosé-Hoover schemes 44 , to allow selfassembly in completely relaxed stable structures. 45 Following the thermalization step, we performed the production runs, dumping complete system configurations (snapshots) at regular time intervals for subsequent analysis. The MD trajectories were integrated by using the high-performance simulation package LAMMPS 46 , modified to include the potential in Eq. (1). Static structure factor. By using the system configurations extracted from our trajectories, we can calculate the neutron scattering structure factor directly at the microscopic level by where b α is the coherent neutron scattering length for species α (see Table I). In the case of united-atoms beads, α is the sum of the scattering lengths of its components. is the spherical average over wave vectors of modulus k. The partial static structure factors involving species α and β are defined as ρ α ( k) = Nα l=1 exp i k · r l , and r l is the instantaneous vector position of bead l. In experiments space-averaged information only is accessible, in the form of diffraction diagrams, as those shown in Fig.1 of the main text. These represent as color maps the total scattering intensity, projected on the (k x , k y )−plane of the detector. Angular integration of these data, at constant k = k 2 x + k 2 y , directly provides S(k) of Eq. (2). Information adding to the analysis performed in the main text comes from the partial structure factors, S αβ (k), shown in Fig. 7 for λ =4 (left) and 32 (right). We show as color-maps all the independent indicated S αβ (k), with α ≤ β and α, β = CF 2 , S, O 3 , O W , H W , O H , H H . There are 28 terms in total and we are obviously not interested in scrutinizing all these data in details. We stress a few features, by visual inspection. First, for λ = 4, non-zero signal is concentrated at k * 0.23Å −1 in regions related to correlations of beads pertaining to surfactant or absorbed fluid domains, separately. There are no significant hydrophobic/aqueous domains correlations contributing constructively to the total signal, and regions of highest intensity correspond to CF 2 − CF 2 , O W − O W , O W − H H and H W − H W correlations. In contrast, a certain degree of anti-correlation, producing negative values for S αβ (k) at the same k * , is associated to interactions of the CF 2 beads with absorbed water atoms. The intensity of the diffraction peak therefore mainly comes from independent contributions due to the confining matrix and the absorbed fluids, with a (mild) destructive interference associated to the interfaces. The fact that the anti-correlated negative signal is also local-ized at k * is not surprising, if we note that the associated length scale l * = 2π/k * 27Å is related to the repetition period of like-domains. This implies that starting from the surfactant (ionic) phase and moving of a distance l * , a system's unit will never reach the ionic (surfactant) phase. In the case of λ = 32 (right) the situation is in general qualitatively similar, with the maximum intensity region shifted to lower values of k, and the total constructive signal being spread on a larger k−range, due to disorder. However, the signal associated to both hydronium/hydronium and hydronium/water correlations and due to the ionic condensation at the interface at very low hydration is completely suppressed, following significant solvation of ions, as we show in the main text.