Polymer properties follow primarily from their one-dimensional nature, with their length distinguishing them from other soft materials. This length is due to the end-to-end connection of monomer units; the precise sequence of these monomers is capable of encoding information along the backbone1, 2. However, interactions between these long chains are typically described in synthetic polymers by coarse-grained effective interactions between immediate neighboring molecules3. Polymer physics relies on the use of the these interactions, described by a parameter χ, which has its origins in average, pairwise, short-range interactions3, 4. Biological materials, however, use a richer array of polymer–polymer interactions where this sort of ‘averaging’ may obscure relevant physical properties5 and limit our ability to understand the complicated biological structure–function relationships encoded at the molecular level. The use of charge in sequence-controlled biopolymers is ubiquitous6,7,8. For example, charge sequence is shown to dictate the conformational behavior of intrinsically disordered proteins (IDPs)9, and theoretical work has similarly connected IDP sequence to charge-driven phase separation10. Sequence is correspondingly a key aspect of intracellular compartmentalization via membrane-less organelles6.

While solid-phase synthesis methods11, 12 have long been used to prepare sequence-controlled polymers, recent advances in synthetic polymer chemistry have expanded the palette of sequence-defined polymerization methods1, 2, 13,14,15. For instance, advances in chemical synthesis have enabled the evaluation of precise charge spacing effects in ionomers16, 17. However, a general understanding of the physics of sequence-defined polymer materials remains underdeveloped.

Initial efforts have begun to elucidate how monomer sequence physically influences polymer material properties. In particular, the continuum of behaviors between block and random co-polymers has been probed in terms of equilibrium properties (e.g., phase behavior18, 19, compatibilization20) using coarse-grained modeling and theory. These works consider portions of a vast sequence parameter space, using monomer sequence correlations (i.e., blockiness)18, 19, sophisticated machine learning methods20, or sequence gradients21. These situations focus on short-range dispersive interactions, where monomers interact primarily with their immediate neighbors. Charge interactions differ from short-range interactions, leading to different types of design rules; this difference can be tied to both the long-range nature of electrostatic interactions, and the complementarity between positive and negative charges suppressing like interactions and promoting partner interactions.

In this article, we demonstrate that sequence specificity of charged monomers can be used to precisely control the self-assembly and thermodynamics of a class of materials known as complex coacervates22, 23. Charge-based sequence control allows for dramatic modulation of polymer–polymer interaction strengths without changing the overall monomer composition. We experimentally and computationally demonstrate the effects of charge patterning, and establish the physical picture and design rules necessary to show why charge patterning has such a profound effect on coacervate phase behavior.


Oppositely charged polymers drive self-assembly

Oppositely charged polyelectrolytes can undergo associative phase separation in an aqueous solution, forming a polymer-dense coacervate phase and a polymer-dilute supernatant phase22, 23. This process is known as complex coacervation, which broadly describes any liquid–liquid phase separation due to oppositely charged species. Recent experimental work into the fundamental physics of polymer–polymer coacervation24,25,26,27 is motivated by efforts to use this motif to drive self-assembly28,29,30,31,32,33. Similarly, advances in coacervate theory have led to a range of field theoretic34,35,36,37 and phenomenological38,39,40,41 models of coacervation42, 43.

Figure 1a schematically illustrates a standard complex coacervate phase diagram, in the space spanned by salt concentration c S and polymer concentration c P (Methods section). At low salt and polymer concentrations, in the coexistence region (2Φ) underneath the binodal curve, the system spontaneously undergoes a phase separation into the high-c P coacervate phase and the low-c P supernatant phase. The coacervate and supernatant states are connected along a tie line, which is sloped to denote a difference in c S between the two phases. Beyond the coexistence region, the system becomes completely miscible. Previous work has demonstrated that this phase diagram is extremely sensitive to molecular-level structure44, 45. Changes in bond length and charge size can drastically expand or shrink the coexistence region, reflecting differences in local charge correlations that arise between the highly connected, oppositely charged polyelectrolytes45. However, it is difficult to experimentally demonstrate these effects in a controllable fashion. Instead, changing charge monomer sequence provides both a way to experimentally observe the interplay between electrostatics and molecular structure, and enables the sequence-driven design of coacervate-based materials.

Fig. 1
figure 1

Molecular structure and sequence affects charge-driven phase separation. a Qualitative sketch of a typical phase diagram of complex coacervate-forming polyelectrolytes. Coacervation occurs at low salt and polymer concentrations, where oppositely charged polyelectrolytes undergo a liquid-liquid phase separation into polymer dense (coacervate) and polymer-dilute (supernatant) phases. The different curves qualitatively represent how the immiscible region changes with different molecular features (charge monomer sequence, spacing, ion size, degree of polymerization, valency, etc.). b We show that charge monomer sequence is a molecular feature, which can be used to tune coacervation behavior. This simulation and experimental result is based on coacervation between a homopolyanion and a series of model, sequence-defined polycations with half of their monomers charged. These polycations are characterized by the periodic repeat of the monomer sequence, τ. c Coacervation is experimentally observed as droplets of a polymer-dense ‘coacervate’ dispersed in a polymer-dilute ‘supernatant’ phase. Simulation images correspond to conditions (salt concentration, 25 mM and τ = 2) shown in Fig. 2. Scale bar is 25 μm

Tuning molecular interactions via patterning

We use the 1D pattern of charged monomers along a polymer backbone to controllably tune the local arrangement of charges, and thus the strength of charge interactions between coacervate-forming chains. Experimentally, we consider coacervation between an anionic homopolymer of poly(glutamate) and sequence-specific cationic co-polymers of poly(glycine-co-lysine). These are prepared in aqueous solution with NaCl salt at pH 7.0. All polymers have the same degree of polymerization N = 50; because the sequence-specific polycations have a charge monomer fraction of f = 0.5, there are twice as many polycation molecules as polyanion molecules to balance the number of charges on these species.

In simulation, a restricted primitive model (RPM) representation is used for the polyelectrolytes and salt46. RPM coarse-grains atomistic features of charged systems, representing each species i as beads (salt) or connected beads (polymer) with hard core potentials of radius a i and a charge of z i . Water is a continuum solvent with dielectric constant \(\epsilon \) = 78.5\(\epsilon \) 0. There are well-established limitations to RPM, which does not account for Hofmeister effects or water structure47; however, RPM still accounts for the major trends seen in this paper. See the Supplementary Methods for a detailed description of the model. Figure 1 demonstrates our scheme for the homopolyanion and sequence-specific copolycation. The homopolyanion and copolycation both consists of chains of N = 48; similar to experiment, twice as many polycations are present per polyanion. Copolycation sequences for both simulation and experiment are defined by their periodicity τ. A copolycation with a sequence that alternates between charged and neutral monomers would have a value τ = 2, while a copolycation that has eight charged monomers followed by a block of eight neutral monomers has a periodicity τ = 16 (Fig. 1b). For all sequences, the copolycation has the same number of charged and neutral monomers.

Figure 2a shows the coacervation phase diagrams for a series of patterned copolycations interacting with unpatterned homopolyanions, calculated from simulation. These phase diagrams exhibit a drastic, monotonic increase in the size of the coexistence region. In fact, the critical salt concentration (CSC) nearly doubles from τ = 2 to τ = 24.

Fig. 2
figure 2

Coacervate phase behavior is affected by charge sequence in both simulation and experiment. a Simulations demonstrate that the size of the coexistence region 2Φ increases with τ. Simulation conditions for Figs. 46 are specified by asterisks/boxes, which denote points along the binodal curves at 25 mM NaCl. These points are considered, because the salt concentration values correspond to those used for isothermal titration calorimetry. b The experimental critical salt concentration (CSC) for sequence-defined coacervates at a variety of total charged monomer concentrations (solid 1 mM, stripes 5 mM, crosshatch 50 mM), plotted as a function their periodic block size (τ = 2 to τ = 24). Increasing τ leads to a marked increase in the CSC, qualitatively changing by as much as 50–150 mM, consistent with simulations in a. Error bars reflect the intervals between samples in these experiments. c A selection of optical micrographs corresponding to the data in a, highlighting that the region of coacervation increases with τ. Arrows indicate the presence of tiny coacervate drops. Scale bars are 25 μm

Changes in the size of the coexistance region determined from simulation are reflected experimentally by trends in CSC as a function of τ at a constant polymer concentration, (Fig. 2b, c) with qualitative agreement. While matching between the simulation and experimental results is in part dependent on the choice of simulation parameters such as bead radii, the trend observed here persists regardless of the choice of reasonable parameterization values. We note that this effect persists even when the solvent is changed, with a similar effect of τ on the CSC in a water/isopropanol solvent mixture (Supplementary Fig. 1).

Thermodynamics of sequence-defined coacervation

We use isothermal titration calorimetry (ITC) as a tool to experimentally probe the thermodynamics of complex coacervation (Fig. 3a)48. A two-step model of coacervation enables analysis of ITC data and its separation into entropic and enthalpic contributions; ‘ion pairing’ between oppositely charged polymers is followed by a ‘coacervation’ step that results in phase separation (fit to raw data shown in Fig. 3a inset)48.

Fig. 3
figure 3

Isothermal titration calorimetry (ITC) shows that sequence effects in coacervation are entropically driven. a The enthalpic contribution to coacervation as a function of τ is small, positive, and does not show significant differences between sequences. Isothermal titration calorimatry captures this thermodynamic value via a fit to an established two-step coacervation model (inset) that distinguishes between enthalpic contributions from ion pairing (IP) and coacervation (Coac) steps48. b The entropic contribution to the coacervation free energy is large, negative, and attributed to counterion release. Clear differences are observed as a function of τ, with an increasing entropic driving force with increasing blockiness (larger τ)

ITC measurements show a small, positive enthalpic contribution to coacervation, consistent with the results of previous investigations (Fig. 3; Supplementary Methods)40, 48. Variations between different sequences are difficult to resolve due to the small magnitude of this term. In contrast, and as expected, entropy is the primary driving force for coacervation38, 40, 48. Calculated values for −TΔS are both negative and an order of magnitude larger than the observed enthalpies. Furthermore, the entropic driving force for coacervation increases with increasing τ, concomitant with the changes in the width of the coexistence region and the CSC observed in simulation and experiment. Furthermore, the magnitude of the entropic differences are significant, spanning ~3 kJ mol−1. This is on the order of thermal energy (~1–2k B T), which can significantly compete against the translational entropy of the polymer chains. This is conceptually consistent with the observed differences in the phase behavior of the different sequences.

Correlations and sequence alignment in coacervation

We use simulation to understand the role of charge sequence in determining molecular structure of the coacervate phase. We first consider pair correlations under conditions of constant salt concentration (25 mM) corresponding to the high polymer concentration points on the binodal curves (boxed points in Fig. 2a). These polymer concentrations are relevant for the thermodynamics of coacervation, because they are obtained when coacervation occurs within the two-phase region. The polymer concentration thus depends on the sequence due to the changes in the phase diagram with τ. We focus on the polyanion–polycation correlations g P+/P (r) shown in Fig. 4a. Peaks corresponding to chain connected structure are seen44, 45, but there is no clear trend as τ is changed. This is consistent with a calcuation of the energy of coacervation in Fig. 4b, calculated from \({U_i} = 2\pi \mathop {\sum}\nolimits_j {\rho _j}{\int}_0^\infty {\rm d}r{r^2}{v_{ij}}(r){g_{ij}}(r)\) 46. This summates the energy that a species i ‘feels’ due to contributions from all other species j, each with a number density ρ j and an interaction with i via a pair potential v ij 46. The overall change in energy ΔU = ΔU P+ + ΔU P for coacervation matches with experimental ITC measurements, demonstrating only a small, positive increase that does not depend on τ. This is consistent with the experimental observation that enthalpic effects tend to not dominate the coacervation process40, 48.

Fig. 4
figure 4

Phase separating coacervate structure and energy shows no significant sequence effect. a Polycation/polyanion pair correlation function for the coacervate phase at various τ (boxed points in Fig. 2a). Correlations do not show strong dependence on τ. b Calculation of the change in electrostatic energy for the polycation (from g(r) such as in a) show small, positive increases in energy during coacervation. This is qualitatively consistent with experimental data in Fig. 3

While the coacervate process is not strongly affected by enthalpic effects in coacervation, the structure of coacervates still exhibits non-trivial correlations associated with the monomer sequences. We use a second comparison where dense phases (denoted with an asterisk in Fig. 2a) for all values of τ are considered at the same polymer and salt concentrations. This permits a direct comparison between systems with exactly the same components—such as the number of charged/neutral monomers and salt ions—with the only change being the order in which the monomers are connected. Pair correlations g P+/P (r) are shown in Fig. 5a for all values of τ, demonstrating a distinct change in the second peak adjacent to the initial polyanion/polycation pair.

Fig. 5
figure 5

Blocky sequences exhibit strong charge correlations due to sequence alignment at the same concentration. a Polycation/polyanion pair correlations for the dense phase at a single salt/polymer concentration denoted with an asterisk in Fig. 2a. When species concentrations are kept constant, there is a clear increase in polyelectrolyte correlations. b We use a set of pair correlations that capture the extent that two nearby chains interact; we follow their contour s and check for both spatial proximity within a cutoff r C and monomer charge. C 1 determines the probability that charged monomers separated along their respective contours Δs loop. C 2 determines the probability that looped monomers are both charged. c Spatial looping correlations are measured by C 1, which demonstrates negligible differences between different values of τ. However, there is a tendency for interacting polyelectrolytes to feature runs of charged monomers, whose sequence alignment is quantified by C 2 d. We attribute pair correlations in a to this effect

The change in this peak can be interpreted through the use of a set of along-the-chain correlation functions C 1s) and C 2s), which are a function of the distance along a chain contour Δs described by the index s. We show schematics in Fig. 5b and provide rigorous definitions in Supplementary Note 1. Both functions start with a pair of polycation/polyanion charges that are within a cutoff radius r C from each other, and measure conditional probabilities for two monomers that are Δs monomers away from original pair. C 1s) is the probability that these two new monomers are within r C from each other given that they are both charged, while C 2s) is the probability that these two new monomers are both charged given they are within r C from each other. Conceptually, C 1 is a measure of the contour length over which two nearby chains of opposite charge remain aligned, which we call a looping correlation. To contrast, C 2 is a measure of how much the charged monomers on the patterned chain prefer to be along segments aligned with the opposite polyelectrolyte, which we call a ‘sequence alignment’ correlation.

C 1s) shows a decrease in looping potential with increasing distance along the chain and very little dependence on the value of τ (Fig. 5c). This indicates that neighboring chains align for approximately the same number of monomers regardless of sequence. A larger correlation effect is apparent in C 2 (Fig. 5d). Here, the abscissa (Δs) has been normalized by τ/2 in order to highlight the primary difference between values of τ, which is that the probability of finding another charged monomer after a shift of Δs initially decreases much more quickly with small values of τ. In the extreme, for τ = 2, there is by definition no chance of finding a charged monomer for Δs = 1. To contrast, the likelihood of finding an adjacent charged monomer is very high for large τ, due to the blockier monomer sequence. Beyond this primary probabilistic effect, which is captured by the normalization of Δs, larger values of τ still show a slower C 2 decay. We attribute this secondary effect to a preference for aligned chain segments to include the charged portion of the patterns. Both of these behaviors are due to the electrostatic benefit of aligning charged monomer sequences, such that opposite charges are in close proximity.

These structural changes at the molecular level do not directly influence the macroscopic thermodynamics of coacervation, as evidenced by the small and τ-independent values of ΔU. Instead, C 2 shows that opposite polyelectrolytes tend to align, which entropically confines polyelectrolyte chains in the coacervate phase. This entropic effect is best seen through the lens of counterion release, and is the main driving force for sequence-dependence in coacervation.

Tuning the entropy of counterion release

The large entropy change upon coacervation observed in ITC is consistent with traditional counterion release arguments for coacervation38, 49. In the dilute phase, counterions condense along the backbone of a highly charged polyelectrolyte to decrease the local electrostatic energy49. This counterion condensation occurs at the expense of the counterion translational entropy. During coacervation, oppositely charged polymers can condense upon each other, similarly lowering the local electrostatic energy. Meanwhile, the previously condensed counterions regain their translational entropy38, 41, 49, 50. We use a modified version of this counterion release argument to explain how τ can strongly affect coacervation phase behavior.

We use simulation to characterize counterion condensation in the dilute phase. We use a method developed by Liu and Muthukumar51, where condensed counterions are located within a cutoff radius r CC from any monomer along a dilute chain. Each condensed counterion is assigned to its nearest monomer, such that each monomer i has an average number \(\left\langle {{n_i}} \right\rangle \) of counterions condensed (Fig. 6b). The smaller, neutral monomers have a larger accessible counterion volume with this method. A number is therefore defined for each bead using the condensed counterions \(\left\langle {n_i^0} \right\rangle \) for an uncharged chain. The ratio \(\left\langle {{n_i}} \right\rangle {\rm{/}}\left\langle {n_i^0} \right\rangle \) thus gives a normalized measure of the condensed counterions. We relate this ratio to an effective energy \({\epsilon _i} = - {k_{\rm B}}T\,{\rm{ln}}\left( {\left\langle {{n_i}} \right\rangle {\rm{/}}\left\langle {n_i^0} \right\rangle } \right)\) in a one-dimensional adsorption model that is suited to the high charge densities considered in this work (see Supplementary Note 2). The quantity \({\rm{ln}}\left( {\left\langle {{n_i}} \right\rangle {\rm{/}}\left\langle {n_i^0} \right\rangle } \right)\) is plotted as a function of monomer index i for a number of different values of τ (Fig. 6a). The distribution of counterions along the backbone varies greatly, with low τ polymers showing relatively uniform condensation while high τ polymers have condensed counterions clustered near the charge blocks (Fig. 6c).

Fig. 6
figure 6

Charge sequence effects in coacervation can be explained by 1D counterion confinement entropy. a The number of counterions n i condensed as a function of chain index i, relative to the counterions present near an uncharged chain, n i,0. Salt concentration is 25 mM, at boxed supernatant points in Fig. 2a. The value ln(n i /n i,0) is related to an effective binding energy used in a 1D adsorption model. Colors same as Fig. 2a and d, black curve for homopolyanion. b The criterion for a condensed counterion is one that is within r CC of a polyelectrolyte charge; it is ‘condensed’ along the nearest polymer bead of index i. c Conceptual schematic demonstrating the origin of the charge sequence effect on coacervation. Condensed counterions are uniformly distributed along polyelectrolyte chains with low τ, however at high τ these condensed counterions are confined along-the-chain contour near the charged blocks. This additional confinement increases the entropic driving force for counterion release. d This 1D confinement is reflected in the entropic contribution to the free energy, −TΔS, as calculated from the 1D adsorption model and in near-quantitative matching with ITC data (Fig. 3b)

To evaluate the effect of this distribution of condensed counterions on the counterion release entropy, we use an expression for the entropy calculated from the same one-dimensional adsorption model (energies normalized by k B T denoted with a tilde):

$$\frac{S}{{{k_{\rm{B}}}}} = \mathop {\sum}\limits_i \left[ {{\rm{ln}}\left( {1 + {{\rm e}^{ - \left( {{{\tilde \epsilon }_i} - \tilde \mu } \right)}}} \right) + {{\tilde \epsilon }_i}\left( {\frac{{{{\rm e}^{ - \left( {{{\tilde \epsilon }_i} - \tilde \mu } \right)}}}}{{1 + {{\rm e}^{ - \left( {{{\tilde \epsilon }_i} - \tilde \mu } \right)}}}}} \right)} \right].$$

In this model, simulation data serves as the primary input of \({\tilde \epsilon _i}\), while the external chemical potential \(\tilde \mu \) is set at a constant value for all τ and i for a given salt concentration.

Using a single value of \(\tilde \mu \), we obtain values for the entropic contribution to coacervation in near-quantitative agreement with ITC data (Fig. 6d). Thus, accounting for the distribution of counterions condensed onto individual polyelectrolytes in the supernatant phase yields a prediction for the sequence-dependence of coacervation. This is a one-dimensional confinement effect. Low-τ systems show an even distribution of condensed counterions along the length of the polyelectrolyte chain (Fig. 6c; τ = 4). However, as τ is increased, the counterions are increasingly confined near the charged blocks (Fig. 6c; τ = 16). Counterions that are more confined consequently gain more entropy upon release, leading to the increasingly negative values of −TΔS with increasing τ observed in Figs. 3b and 6d.


We used a combination of experiment, theory, and simulation to demonstrate the profound effect of polyelectrolyte monomer sequence on charge-driven materials structure and thermodynamics. Sequence-defined polypeptides were used to evaluate this monomer sequence effect, demonstrating qualitative matching with simulation. This sequence effect is due to differences in entropic confinement of condensed counterions along the polymer, which changes drastically with the blockiness of the sequence. Experimental thermodynamic measurements are consistent with this picture, showing that entropy dominates coacervation while enthalpic contributions are negligible.

We emphasize that this charge patterning effect does not rely on subtle chemical or solvent-specific effects, and trends can be captured using coarse-grained electrostatic models. However, we note that such effects would be important to obtain quantitative predictions. Implications for these charge patterning effects extend from biological polymers to materials design. Sequences featuring runs of similarly charged macromolecules may provide a way to tune biophysical interactions, with long, charge-dense sequences exhibiting stronger charge interactions than patterns with less-blocky runs of the same charge.

For materials design, charge patterning represents a way to deliberately tune charge interactions in coacervate-driven assembly. This is one way that sequence information may be included into the backbone of a polymer chain that is distinct from, i.e., random copolymerization or block copolymerization. This mechanism is not an averaging of dispersive effects, but rather a precise tuning of the local arrangements of charge. Indeed, by combining with the aforementioned sequence effects we envision a number of sequence-scales that can be used to tune charge-driven assembly. We foresee this as one way to utilize the development of sequence-specific synthesis to reach ever-more complex assemblies.


Coacervation of sequence-controlled peptides

Polypeptides were prepared via solid-phase synthesis using microwave-enhanced, automated synthesis (Liberty Blue, CEM Corp.) using standard methods11. Poly(glutamate) and the poly(glycine-co-lysine) polymer for τ = 16 were synthesized using amino acids of alternating (d and l) chirality to mitigate inter-peptide hydrogen bond formation52,53,54. All other peptides were composed of only l amino acids. See synthesis details in the Supplementary Methods.

Complexation was performed using stoichiometric quantities of positive and negatively charged polypeptides at a total charged residue concentration of 5 mM at pH 7.0 unless otherwise specified. Samples were prepared by first mixing a concentrated solution of NaCl with MilliQ water in a microcentrifuge tube (1.5 mL, Eppendorf), followed by the polyanion. The resulting mixture was then vortexed for 5 s before addition of the polycation to a final volume of 120 μL. The final mixture was vortexed for at least 15 s immediately after the addition of polycation to ensure fast mixing. The effect of salt was examined over the range of 0–520 mM NaCl. All samples were prepared immediately before analysis and studied at room temperature (25 °C). Optical microscopy was used to identify the CSC.

ITC experiments were performed at 25 °C on a MicroCal Auto-iTC200 system (Malvern Instruments, Ltd.) All experiments were performed by injecting a 5 mM solution of the charge-patterned polycation (with respect to the number of lysines) into the sample cell containing 0.625 mM polyanion. Both solutions were prepared at a salt concentration of 25 mM NaCl and pH = 7.0 so as to minimize interference associated with heats of dilution. An initial injection of 0.5 μL was performed, followed by 24 injections of 1 μL each. An injection duration of 2 s followed by a 180 s equilibration time was used. Constant stirring speed was applied at a rate of 1000 rpm. All experiments were performed in triplicate. Analysis of ITC data was performed using the method reported previously48. Additional details are available in the Supplementary Methods.

Monte Carlo informed phase diagram calculations

The excess free energy, f EXC, was determined as a function of polymer and salt concentration from NVT Monte Carlo (MC) simulations55. MC simulations were calculated using the system energy:

$$U = \frac{1}{2}\mathop {\sum}\limits_{i,j \ne i}^{{N_{{\rm{tot}}}}} \left[ {{U_{{\rm{HS}}}}\left( {{r_{ij}}} \right) + {U_{{\rm{ES}}}}\left( {{r_{ij}}} \right)} \right] + \mathop {\sum}\limits_i^n \mathop {\sum}\limits_j \left[ {{U_B}\left( {{r_{j,j + 1}}} \right) + {U_\theta }\left( {{\theta _j}} \right)} \right],$$

where N tot = N(n P+ + n P) + n + + n , the total number of beads, N is the degree of polymerization of the chains, n P+ is the number of polycation chains, n P is the number of polyanion chains, r ij is the separation between beads i and j, n + is the number of cations, n is the number of anions, and n = n P+ + n P is the total number of polymer chains. Hard-sphere interactions U HS(r ij ), electrostatic interactions U ES(r ij ), a bonding potential U B(r j, j+1), and an angle potential, U θ (θ j ), contribute to the overall energy of the system. Excess chemical potentials, μ EXC,i , for each species, i, were calculated using Widom insertion. These values were thermodynamically integrated to obtain the excess free energy, f EXC 56. See simulation details in the Supplementary Methods and Supplementary Fig. 7. A Flory–Huggins-like theory was used to calculate binodal curves. The average polymer and salt volume fraction \(\left( {\left\langle {{\phi _P}} \right\rangle ,\left\langle {{\phi _S}} \right\rangle } \right)\) determine the system’s free energy ΔF = F 0 + F EXC − F HOM, where F 0 is the mixing entropy of all species in each phase, and F EXC is the non-ideal contributions determined from MC simulations. F HOM is the free energy of a reference homogeneous phase. ΔF was minimized to determine ϕ P and ϕ S in both the coacervate and supernatant phases. The resulting phase diagrams include the electrostatic interactions with full correlations via the MC simulations, however the polymer is itself treated at the mean-field level. This limits the accuracy of the model very close to the critical point in the phase diagram, where polymer fluctuations become important, however this will not affect the conclusions of this work. More details about the explicit forms of the various free energies can be found in the Supplementary Methods.

Data availability

All data is available from the authors upon reasonable request.