Cationic polymer-in-salt electrolytes for fast metal ion conduction and solid-state battery applications

Polymer electrolytes provide a safe solution for future solid-state high-energy-density batteries. Materials that meet the simultaneous requirement of high ionic conductivity and high transference number remain a challenge, in particular for new battery chemistries beyond lithium such as Na, K and Mg. Herein, we demonstrate the versatility of a polymeric ionic liquid (PolyIL) as a polymer solvent to achieve this goal for both Na and K. Using molecular simulations, we predict and elucidate fast alkali metal ion transport in PolyILs through a structural diffusion mechanism in a polymer-in-salt environment, facilitating a high metal ion transference number simultaneously. Experimental validation of these computationally designed Na and K polymer electrolytes shows good ionic conductivities up to 1.0 × 10−3 S cm−1 at 80 °C and a Na+ transference number of ~0.57. An electrochemical cycling test on a Na∣2:1 NaFSI/PolyIL∣Na symmetric cell also demonstrates an overpotential of 100 mV at a current density of 0.5 mA cm−2 and stable long-term Na plating/stripping performance of more than 100 hours. PolyIL-based polymer-in-salt strategies for new solid-state electrolytes thus offer an alternative route to design high-performance next-generation sustainable battery chemistries. Polymer electrolytes provide a safe solution for future solid-state high-energy-density batteries, but combining high ionic conductivity and a high transference number is a challenge. A polymeric ionic liquid used as a polymer solvent is now shown to be promising for both sodium and potassium batteries.

H igh-energy-density energy storage technology requires a new generation of anode materials, for example alkali metal anodes (Li, Na or K) with high theoretical capacities. Such reactive anodes necessitate the discovery of compatible electrolyte materials to support the safe and long-term cycling of the devices. Polymer electrolytes (PEs) are now accepted as an enabler of the ultimate solid-state high-performance batteries [1][2][3][4] , thanks to their great advantages in suppressing both the explosion risk and uncontrollable dendrite formation, in addition to their high thermal and electrochemical stabilities and advantages in fabrication.
The earliest PEs based on polyethylene oxide (PEO) and its copolymers have been extensively studied [5][6][7][8][9] . The key challenges associated with those PEs are to achieve high ionic conductivity (σ) and high Li + transference number (t Li ) simultaneously, and the stable cycling of solid-state batteries 6 . Those materials normally have low conductivities or lower t Li (~0.2), which are intrinsically related to their structures (for example, strong coordination of metal ions with polar groups in polymer backbones) [10][11][12] . A variety of polymer design strategies have been proposed to improve metal ion transport and transference number. For example, the introduction of loosely coordinating repeat units (for example, polycarbonates, polyesters or poly(tetrahydrofuran)) can enhance Li + or Na + migration, with high transference numbers (>0.5) achieved [12][13][14][15][16] . Designing new anion chemistries with restricted motions also can increase the Li + transference number 17 . Using block copolymers or crosslinking polymer chains is another way to improve ionic conductivities 18 . Aside from those methods, the search for new polymer materials with higher metal ion transference numbers and conductivities is ongoing.
One approach to maximize the metal ion transference number is to use polyanionic materials, in which anions are chemically bonded to polymer backbones, and cation (for example, Li + ) conduction dominates so that the cation transference number tends to unity 19 . This situation is highly desirable in batteries to overcome problems related to anion concentration gradients. Despite progress, such single-ion conductors still typically suffer from very low ionic conductivities that hinder their application 20 .
Recently, cationic PEs named polymeric ionic liquids (PolyILs) 21 , in which the monomer is a polymerizable ionic liquid cation, have emerged as potential solid-state solvents for lithium salts and shown good performance 22,23 . This material inherits both the excellent electrochemical performance of ionic liquids and the good thermal and mechanical properties of polymers 24,25 . Interestingly, due to a unique Li-anion-polycation co-coordination structure 26 , the ionic conductivity of these materials increases with increasing salt concentrations 26 , which is very different from conventional PEs. This positive relationship is in line with the 'polymer-in-salt' electrolytes [27][28][29] proposed by C. Austen Angell decades ago. In such electrolytes, once the salt is the dominant component, the ion mobility will begin to increase again while the glass transition temperature (T g ) decreases 27 . However, the PolyIL is unique in that this positive relationship is also applicable to the low salt concentration range, and high conductivities and high t Li have been obtained simultaneously in PolyIL-in-salt (PolyIL-IS) 26 .
Recent computational research suggested a vehicular Li + diffusion mechanism in PolyIL electrolytes that, however, focused on a low to medium salt concentration range (that is, Li + /polycation unit ≤ 0.4) 30 . This mechanism is likely to be concentration dependent because the salt concentration will alter the Li + coordination environment and thus its transport as demonstrated in liquid electrolytes [31][32][33][34][35][36][37] . Given the recent promising demonstration of the PolyIL-IS system in Li metal batteries, understanding the ion transport of other, more abundant metal cations in such materials can open up the possibility for designing high-performance solid-state batteries based on the PolyIL-IS platform.
Thus, in this work, we present a computational design of PolyIL-IS electrolytes, investigating the transport of Na + and K + . We discovered a rapid diffusion of alkali metal ions through a structural diffusion mechanism. Under the premise of weak interaction between metal ions and anions, the salt-concentrated environment favours fast metal ion diffusion at 80 °C. We also investigated the diffusion of the multivalent Mg 2+ in these PolyIL-IS systems and discussed the challenges in achieving high Mg 2+ conduction. Finally, as a proof of concept, we validated the computational findings by experimental measurement. In the preliminary test of a Na-based PolyIL-IS electrolyte (with mechanical reinforcement), we showed high ionic conductivities and excellent stable cycling behaviour in a sodium symmetric cell. Thus, this solid, solvent-free PolyIL-IS opens up an avenue for developing safer high-energy-density batteries.

Computational design of optimal Polyil-is systems
The PolyIL studied in this work is poly(diallyldimethylammonium) bis(fluorosulfonyl)imide (PDADMA FSI; Supplementary Fig. 1e). Our previous work has studied this polymer with the LiFSI salt 26 . Careful experimental measurements of various polycation/Li ratios from 2:1 to 1:6 have determined the ratio to achieve the optimum conductivity, which is 1:1.5. However, such an approach to electrolyte design is both time consuming and costly, and here we sought a more efficient computational approach to design the Na, K and Mg systems. Based on our earlier molecular dynamics (MD) simulations of Li systems, the optimal 1:1.5 ratio allows the most Li + to be homogeneously distributed around PDADMA backbones by co-coordinating with anions. At higher Li + ratios, molten salt-like aggregates form, which are shown in silico to enhance Li + diffusion. However, in experiments, these aggregates eventually transform into the less conductive crystalline phases, which are slow to form, and thus, this final stable state is far from attainable within the MD simulation timescale. Nevertheless, based on these understandings, we hypothesize here that a close-to-optimal salt concentration could at least be identified from a PolyIL-IS composition that gives the 'saturated' metal ion distribution around polymer chains. This can be determined via quantifying three anion coordination states ( Fig. 1a): (1) polycation-anion coordination (P + -A -) as seen in neat PolyIL or with low salt concentrations; (2) metal ion-anion coordination (Me + -A -) as seen in the molten salt-like regime; and (3) polycation-anion-metal ion co-coordination (P + -A --Me + ). The coordination of two ions is determined by measuring their distance, which should be less than the first prominent valley distance in their radial distribution function (RDF; explained in Supplementary  Fig. 2 For the Na system, two cation ratios of 1:2 and 1:4 were first simulated at 353 K (termed Na12 and Na14). The 1:2 was chosen as it is close to the optimal ratio of the Li system and Na + also coordinates with a slightly higher number of FSIthan Li + . The higher salt ratio of 1:4 was also examined. The snapshots in Fig. 1b show the selected structures of the two equilibrated Na systems, which present the FSIonly in P + -FSI -(purple) and Na + -FSI -(green) states. The percentage of FSIin both single coordination states in Na12 is very low, resulting in the highest co-coordinated FSIof 97%, exceeding the 92% co-coordination percentage in 1:1.5 PolyIL/LiFSI. Therefore, the 1:2 ratio could be an optimal ratio for Na salt. For the Na14 case, with the added salt doubled, the percentage of FSIin the Na + -FSIcoordination state increases markedly to 19.7%, indicating the growth of the Na + -FSI --rich domains, and this change is consistent with the LiFSI study 26 .
The 1:2 cation ratio was then examined for both K and Mg systems. As shown in Fig. 1c and the snapshots in Supplementary Fig. 1, the percentage of FSIin the FSI --Me + coordination state is 8% and 23.1% for K12 and Mg12, respectively, suggesting the existence of the excessive K and Mg salts; lower salt concentrations should be examined next to increase the co-coordination state. As expected, at a 1:1 ratio, the co-coordination state in K11 and Mg11 increases from 91% and 73.9% to 94% and 85.4%, respectively.
The cation ratios to give the maximum co-coordination anion state are 1:1.5, 1:2 and 1:1 for Li + , Na + and K + , respectively. Interestingly, this order does not follow the order of the three alkali elements in the periodic table, but may be related to the different cation-anion coordination abilities. For example, when comparing the coordination numbers (CNs; Supplementary Table 1) between Na12 and K12, the CN of P + -FSIis near 9 in Na12, which is greater than the 8.1 in K12. An opposite situation occurs for the CN of Me + -FSI -, which is greater in K12 (6.4) than in Na12 (5.6). Therefore, the co-coordinated K + concentration around the polycationic backbone bridged by FSIshould be less than the Na + concentration. The CN also helps us to understand the extensive Mg-FSI-enriched domains in the Mg12 system, which are explained in Supplementary Note 1, with the detailed coordination analysis of the RDF results.

the impact of the chemical environment on ion diffusion
The diffusion of ions is investigated through the mean square displacement ( Supplementary Fig. 3) to evaluate the ionic conductivity in sodium, potassium and magnesium electrolytes. K12, Na12 and Mg11 that have the same anion concentration are selected and compared. In general, ion diffusion in the alkali metal ion systems is one to two orders of magnitude higher than that in the magnesium system. At 353 K, the diffusion of metal ions and anions in the K12 system is faster than that in the Na12 system. Similar results were also reported in an ionic liquid electrolyte, N-methyl-N-propylpyrrolidinium bis(fluorosulfonyl)imide (C3mpyrFSI) 38,39 ; when mixed with the same amount of KFSI or NaFSI salt, the ionic liquid system with the KFSI salt has higher ionic conductivity. This may be due to the lower Lewis acidity of potassium, making its interaction with anions weaker than that of sodium, which is confirmed by the density functional theory calculation of the binding energy (E b ) between metal ions and anions. Figure 2a plots the E b and the diffusivity (D) of the metal ions and FSI -. The methods of calculating E b and D are described in Supplementary Note 2. For comparison, the diffusivity of Li + from the previously simulated 1:1.5 LiFSI system 26 was also calculated. The diffusion of metal ions and anions follows KFSI > NaFSI > LiFSI > MgFSI, which is in contrast with the order of E b . Interestingly, the plotted E b versus log(D) profile of alkali metal cations at a given temperature of 353 K shows a near-linear relationship, that is log(D) = AE b + B (A and B are constants). If we consider that diffusion processes follow an Arrhenius or Vogel-Tammann-Fulcher relationship such that the logarithm of diffusion and the activation energy E a at a given temperature T also follow the same type of equation, this leads to the inference of a positive correlation between the binding energy of Me + -FSIand the activation energy of Me + diffusion, at this given temperature and salt concentration.
All alkali metal ions are more diffusive than anions, which contrasts with traditional PEO-based PEs. Considering that the polycations are immobilized, higher alkali cation transference numbers can be obtained. The opposite result is observed for the Mg 2+ system; in addition to having the lowest ion diffusivities, Mg 2+ is also less diffusive than FSI -.
Next, we compared ions having distinct fast and slow diffusion (defined according to their mean square displacement values in Supplementary Fig. 4) in both Na12 and Mg11 and studied how the coordination environment affects the fast ion diffusion. Figure 2c,d calculates the RDFs of fast versus fast, fast versus slow and slow versus slow FSIand Na + , first considering the correlation between their diffusion. Both fast (or both slow) FSIand Na + tend to coordinate with each other, according to their more prominent RDF peaks and higher CN values, compared to those of the fast and slow coordination. This could suggest that the movement of Na + and FSIhas a strong correlation. Then, Fig. 2e,f investigates the coordination of the fast or slow FSIand Na + to polycations. Both show that fast species coordinate less with polycations, while slow species tend to coordinate more with polycations. Finally, Fig. 2g,h investigates the number of Na + and FSIions surrounding the selected fast and slow Na + . Interestingly, there are always more Na + and FSIions surrounding the fast Na + ; that is, the environment rich in Na + and FSIfavours fast metal cation dynamics, as demonstrated by a snapshot in Fig. 2b. The fast Na + (red) has the molten Na-FSI salt-like chemical environment, which is commonly seen in superconcentrated ionic liquid electrolytes 31,35,40 . By contrast, the environment of the slow Na + (blue) contains fewer FSIand Na + within the same distance range. This suggests that the molten salt regions formed in this PolyIL can promote metal ion diffusion at 353 K, thus providing a possible theoretical guideline for future PE design, that is, by enhancing the molten salt-like domains in a PolyIL matrix. We will show some experimental evidence to validate this idea in the next section.
In the case of the Mg11 system ( Supplementary Fig. 5a,b), we observe some contrasting behaviour. The fast FSIpreferentially coordinates with the polycationic backbone. The environment of the fast Mg 2+ is also found near the polycation rather than the domain rich in Mg 2+ and FSI − ( Supplementary Fig 5d-f). This opposite situation can be understood by considering the binding strength between the metal ions and FSI - (Fig. 2b). The interaction of Mg 2+ with FSI − is too strong to enhance the diffusion of both. Therefore, the ionic conductivity enhancement in PolyIL-IS requires the metal ion-anion interaction to be weak enough to allow fast exchange in the coordination environment, which we discuss in more detail below. For the development of PolyIL capable of conducting multivalent ions (for example, Mg 2+ , Zn 2+ and so on), one key is to reduce the metal ion-anion binding strength to a similar magnitude as that of the alkali metal ion-anion.

Metal ion diffusion mechanisms
In this section, we show that the alkali metal ions in the PolyIL-IS system diffuse mainly through a structural diffusion mechanism, as opposed to the vehicular diffusion mechanism suggested for the low salt concentration PolyIL 30 . Briefly speaking, 'vehicular diffusion' refers to the transport of metal ions together with their ligands, and 'hopping' refers to complete and direct ligand exchange, whereas 'structural diffusion' refers to the transport of metal ions through the partial exchange of ligands. However, the diffusion mechanism of metal ions here is also distinguished from 'the directly coupled ionic mobility' in traditional PEs, such as PEO, where the ligands (that is, polar groups in the backbone) are also partly exchanged during the metal ion diffusion process (Supplementary Fig. 6a). The metal ions in PolyIL can not coordinate directly with the cationic polymer backbones; instead, bridging coordination through anions occurs. Therefore, metal cations still diffuse through anion exchange. The impact of structure/segmental relaxation of polymer chains on metal ion dynamics is indirect and could be substantially affected   by salt concentration. At low salt concentrations, all anions coordinate with polycations and polymer segmental movement can affect anion movement and thus affects the motion of the co-coordinated metal ions (Fig. 1a) 30 . However, at high salt concentrations, such as Na14 and K12 (Fig. 1c), anions either weakly co-coordinate with polycations (binding energy calculation in Supplementary Fig. 6b) or coordinate only with metal ions in a molten salt region; the metal ion diffusion may become more decoupled from polymer segmental motion in this case. Therefore, the diffusion mechanism of metal ions in PolyIL-IS is very similar to that in the salt-concentrated ionic liquids where there are metal ion-anion aggregates, and a structural diffusion mechanism takes place. The structural diffusion mechanism can be studied by tracing the coordinated anions (or ligands) of a given metal cation during its diffusion. If we consider a coordination shell as a 'cage' , we can quantitatively determine the cage restructure and its connection to the metal ion diffusion processes. We define 'a cage-restructure period' (Fig. 3a) as the period between the formation of an initial cage A and the formation of a new cage B. In terms of 'vehicular mechanism' , this period will be sufficiently long so that the metal ions mainly diffuse with the cage. By contrast, this period for a 'structural mechanism' should be much shorter, with the result that the diffusion of ions occurs through the cage restructuring. For the 'hopping mechanism' , the anion exchange occurs instantaneously and causes ion migration via a hop from one cage to another.
In Fig. 3b, the metal ion cage restructuring is analysed for Na12 and K12 through a self-defined cage-restructure correlation function C(t) based on a cage-state function h(t) illustrated in Fig. 3a (the definition of C(t) is described in Supplementary Note 2; t, time). The decay in this function reflects the restructure of the cage, that is, the original anions being partially or completely replaced. This function decays to zero when all metal ions have a new cage. C(t) decays to 0.9 almost immediately for both K12 and Na12. It takes 3.5 ns to decrease to 0.01 in K12, which is much faster than in Na12, which requires the 12.7 ns. Figure 3c,e analyses the distance the Na or K travels during a cage-restructure period. For all cage-restructure periods using the same time, their frequency of occurrence is counted, and the the surrounding FSI -(bold sticks) and Na + (green balls) are highlighted. c,d, RDF and CN of fast/slow FSIwith fast/slow Na + . e,f, RDF and CN of fast/slow FSIor Na + with polycations; g,h, RDF and CN calculated between fast/slow/all Na + with Na + or FSI -. RDF and CN are plotted with solid and dotted lines, respectively, and share the same y-axis scale.
distance the metal ions move is accumulated. The distributions of accumulative distances and frequencies present similar patterns, indicating a positive correlation between the two quantities. The average distance is calculated in Fig. 3d by dividing the accumulative distance by the frequency. No linear dependence between average travel distance and cage-restructure time is seen. Therefore accelerating the frequency of the cage restructure is more important for promoting metal ion diffusion, which should be a key to achieving high conductivity through the structural diffusion mechanism. Finally, the frequency of an instant hopping event was identified to evaluate the hopping diffusion mechanism. This is when the cage restructuring is completed between two consecutive frames in the MD trajectory. Only seven events were detected in more than two million inspections, indicating that this mechanism would only rarely contribute to diffusion, and thereby ionic conductivity, in these electrolytes.

experimental validation of in silico predictions
Based on simulation results, we conducted experimental validations on Na11, Na12, Na13, Na14, K11 and K12 to verify the composition dependence and high ion conductivities in PolyIL-IS. The electrolytes were prepared according to Supplementary Note 3. Figure 4a compares the T g values of the Na, K and previously investigated Li systems 26 . T g is normally used as an indicator of ion dynamics of PEs whose ion dynamics are highly correlated with the relaxation process of the polymer backbones. For PolyIL systems, T g decreases with increasing salt concentration; for example, Na11 > Na12 > Na14 ( Fig. 4a and Supplementary Fig. 7b-d). This is due to the increase in metal ion-anion-polycation co-coordination, which reduces not only the ionic crosslinking of polymer chains but also the polycation-anion interaction (from −293.47 to −62.6 (−50.5) kJ mol −1 when a Na + (Li + ) is attached to FSI − , according to the density functional theory binding energy calculations in Supplementary Fig 6b), thereby increasing the local dynamics that control T g . In the case of Na, the decrease of T g is most pronounced from Na11 to Na12, and the change is no longer obvious with the increase of salt concentration after Na12 obtains the highest anion co-coordination state. The T g values of the lithium systems are overall the lowest, which may be due to the strong Li-anion binding energy, resulting in the weakest polycation-anion interaction. However, the highest T g values of the Na systems suggest that the metal ion-anion binding strength is not the sole decisive factor.
The conductivities of the K systems are greatly affected by the heat treatment history. They have overall lower conductivities during the first heating cycle than the Na systems. K11 also has higher conductivities than K12, which does not correspond to its lower T g . This should be due to the presence of a second crystalline phase as indicated by differential scanning calorimetry measurements ( Supplementary Fig. 7a), as we previously noted in the Li systems when the polycation/Li ratio is higher than 1:1.5 (ref. 26 ). Encouragingly, the disappearance of the crystalline phase during the second heating cycle remarkably increases the conductivity of K12, which exceeds all other systems from 80 °C, and this supports the MD predictions. Note that only the amorphous phase was obtained within the MD simulation time limit, and this also suggests that maintaining a single, amorphous polymer phase is essential to ensure high ionic conductivity in these superconcentrated systems. The conductivity results at low temperatures also suggest that the ion dynamics are not conclusively predicted by the binding energy of Me + -FSI. Interestingly, neither does it completely correlate with the T g , as observed in Fig. 4a,b, where the sodium systems have the overall highest T g and conductivities. Li12, on the other hand, has the lowest T g and an ionic conductivity around 0.7 × 10 −4 S cm −1 at 80 °C, which is lower than that of Na12 (1.02 × 10 −3 S cm −1 ) or K12 (1.2 × 10 −3 S cm −1 at second heating).
The Arrhenius plots of conductivities in Supplementary Fig. 8a show positive curves, indicating that the metal ion conduction mechanism is not through hopping, as confirmed by MD analysis. The Vogel-Tammann-Fulcher plots of conductivities in Supplementary Fig. 8b (and Supplementary Table 2 with discussion) show a good linear fit for Na11 and Na12, indicating that the mobile ions are somewhat coupled with the polymer. However, we note the conductivity of Na12 measured at 0 °C, just above T g (−2.7 °C), when polymer motion is highly restricted, is 2.27 × 10 −8 S cm −1 (Supplementary Fig. 8c). The decoupling index (R τ ) (the ratio of the structural relaxation time to the conductivity relaxation time) can be calculated in terms of conductivity σ at T g based on the empirical relation log (R τ ) ≈ 14.3 + log (σ(T g )) proposed by Angell 42 . The log (R τ ) is as high as around 6.3, suggesting a very weak coupling between the mobile ions and the polymer matrix, as this value is close to zero for a fully coupled system 43,44 .
Na12 was chosen for further electrochemical characterization. The chronoamperometry profile of the Na12 symmetric cell (Fig. 4c) and the Nyquist plots before and after d.c. polarization (inset) show that the current was maintained at a high level of 0.044 mA after a fast decay from the initial 0.054 mA in the first hour, indicating a relatively high Na + current. Further analysis via the Bruce-Vincent method confirms a Na + transference number (t Na ) of 0.57 at 80 °C, which is much higher than the 0.16 obtained for the PEO-NaFSI system 45 . Such a high t Na is supported by MD simulations, which obtain t Na ≈ 0.65 at 353 K calculated from diffusivities of ions (Supplementary Table 5 and Supplementary Note 3). Figure 4d shows the Na12 plating/stripping behaviours by a symmetric Na cell cycling test, and long-term, stable Na plating and stripping is sustained under a high current density of 0.5 mA cm −2 , with the areal capacity of 0.5 mAh cm −2 . For solvent-free PEs, the current density applied in this case is much higher than that of state-of-the-art electrolyte systems, such as the 0.1 mA cm −2 that is used for PEO-NaFSI (ref. 46 ). More surprisingly, the polarization voltage for the Na12 electrolyte is relatively low, around 100 mV (inset in Fig. 4d), even at such a high current density. We ascribe this superior and stable plating/stripping performance to high ionic conductivity and a high Na + transference number of Na12. A good oxidation stability around 4.4 V was shown by linear sweep voltammetry, suggesting the possibility of Na12 to be paired with commercial cathode materials such as NaFePO 4 or Na 3 V 2 (PO 4 ) 3 , which requires further experimental verification (Supplementary Fig. 9 and limitations of the method was discussed in the Electrochemical stability window (ESW) section in Supplementary Note 3). A good mechanical property was also demonstrated for the Na12 composite ( Supplementary  Fig. 11 and Supplementary Table 6). The extra tests on Na14, which has more molten salt domains, also show promising results, including a higher steady-state Na + current at 0.064 mA (initial current, 0.084 mA); a higher Na transference number of 0.63 at 80 °C; and the potential of cycling at high current densities ( Supplementary Fig. 10). However, the molten salt regime is metastable and transforms through crystallization after a few days, and thus future work will focus on stabilizing such systems. Some strategies proposed in previous studies on polymer-in-salt systems can be considered as future directions, including the use of mixed salts 47,48 or of the low-melting-temperature, weak-coordination salts 28 that we and others are currently studying.
In summary, we demonstrate that PolyIL-IS systems have the versatility for the design of solid PEs for multiple battery chemistries, including Li, Na and K, and can achieve high metal ion transport and transference number. The optimal compositions can be studied more efficiently by computationally searching for the salt concentration that can achieve the maximum anionic co-coordination state. Specifically, a structural diffusion mechanism is proposed for metal ions in the PolyIL-IS system, and rapid restructuring of the metal ion coordination cage is critical to achieving high metal ion diffusivity. The evolution of a molten salt-like region within the PolyIL facilitates rapid metal ion diffusion, provided that the binding energy of the salt is not excessive. Finally, the computational predictions are verified experimentally, and the Na12 system achieves an excellent performance, thus demonstrating the broad potential of this polymer system for the development of future all-solid-state high-energy-density batteries. This work also opens up a cost-effective computational approach to the composition design of PolyILs.

Online content
Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at https://doi.org/10.1038/ s41563-022-01319-w.

Molecular simulations.
The classic MD simulations were conducted using DL_Poly Classic software 49 . The PDADMA FSI consists of 12 PDADMA chains with each having 12 repeat cationic units and 144 FSI anions. The amount of the salt (NaFSI, KFSI or (MgFSI) 2 ) is decided according to different polycation/metal ion ratios of 1:1, 1:2 or 1:4 (given in Supplementary Table 3). All polymers and ions are randomly placed in a cubic box using Packmol 50 . The initial structures are equilibrated at 600 K and then cooled to 393 K and then 353 K. At each temperature, the system is equilibrated for 2 ns in an isothermal-isobaric NPT ensemble using a Berendsen thermostat and barostat with a relaxation constant of 1.0 ps each. The system is equilibrated again for 1 ns at 353 K using a Nóse-Hoover thermostat and a Hoover barostat with relaxation constants of 0.5 and 5.0 ps, respectively, and another 1 ns production run follows, for structure analysis. The velocity Verlet algorithm is adopted for integration. The time step is 1 fs and the pressure is 1 atm. The cut-offs for van der Waals force and the real space of Ewald are 12 Å. The Ewald summation method with a precision of 1 × 10 −6 is used to treat the Coulomb interaction in a periodic system. All C-H bonds are constrained. A subsequent production run for dynamics analysis is conducted in a microcanonical NVE ensemble for 30 ns using a time step of 2.0 fs at 353 K. The equilibrium state is checked through either total energy and volume for NPT calculation or total temperature and pressure for NVE calculation, which should not increase or decrease throughout the production run. The OPLS_AA force field is used for MD simulation. The force field parameters of the FSIand sodium ion are taken from the CL&P force field (2018 version) 51 . Those for the PDADMA are generated using the online OPLS_AA force field generator 52 and validated in our previous work 26 . The Lennard-Jones parameters for potassium and magnesium ions are also taken from the OPLS_AA force field. A uniform scale factor of 0.7 is adopted to scale down the atomic charge in a non-polarizable force field during the MD simulation. The force field parameters, the other MD trajectory analyses and the binding energy calculation are described in Supplementary Note 2 (computational methods) and Supplementary Table 4. The limitations of classic MD simulations in materials design have been mentioned in the main text, such as being unable to simulate the new crystalline phase formation and providing only qualitative accuracy in performance predictions. Regardless, our work demonstrates that traditional MD simulations are still an important tool for materials design, providing in-depth fundamental understanding and insight into material structure and mechanisms.
Experiments. The materials and electrolyte preparation are described in Supplementary Note 3 (materials preparation and characterisations). The characterization methods of differential scanning calorimetry, ionic conductivity, dynamic mechanical analysis, transference number, electrochemical stability window and plating/stripping measurements are all given in the same section in the Supplementary Information.

Data availability
The data that support the findings of this study are available from the corresponding authors upon reasonable request. Source data are provided with this paper.