We establish an appropriate thermodynamic framework for determining the optimal genome length in electrostatically driven viral encapsidation. Importantly, our analysis includes the electrostatic potential due to the Donnan equilibrium, which arises from the semipermeable nature of the viral capsid, i.e., permeable to small mobile ions but impermeable to charged macromolecules. Because most macromolecules in the cellular milieu are negatively charged, the Donnan potential provides an additional driving force for genome encapsidation. In contrast to previous theoretical studies, we find that the optimal genome length is the result of combined effects from the electrostatic interactions of all charged species, the excluded volume and, to a very significant degree, the Donnan potential. In particular, the Donnan potential is essential for obtaining negatively overcharged viruses. The prevalence of overcharged viruses in nature may suggest an evolutionary preference for viruses to increase the amount of genome packaged by utilizing the Donnan potential (through increases in the capsid radius), rather than high charges on the capsid, so that structural stability of the capsid is maintained.polyelectrolyte | viral assembly T he most prevalent viruses in nature are single-stranded RNA viruses with the genetic material enclosed in icosahedral-shaped capsids made up of 60 T protein units, where the T-number is a small integer index. The protein units (capsomers) often contain highly basic peptide arms that extend into the capsid interior and, under physiological conditions, are positively charged. Electrostatic attraction provides the driving force for encapsidating the negatively charged RNA, which, in turn, helps overcome the electrostatic repulsion among the capsomers during the capsid assembly.In a series of classic experiments, Bancroft and coworkers (1, 2) demonstrated that certain viruses can encapsidate nonnative RNA and even generic polyanions. Dominance of the electrostatics as the driving force for viral assembly has led to the expectation of a simple relationship between the total capsid charge Q P and the genome charge Q R , as every nucleotide carries one unit of negative charge. Belyi and Muthukumar (3) compiled data for 19 wild type viruses from several viral families and found an apparent "universal" charge ratio of Q R ∕Q P ≈ 1.6, which they explained by combining the ground-state dominance approximation for polyelectrolyte binding to an oppositely charged polymer brush with the Manning condensation theory (4). The former predicts a 1∶1 charge ratio and the latter is used as a qualitative argument for the actual charge on the RNA being less than the nominal charge. Hu, et al. (5), however, assumed that the RNA winds around individual peptide arms and found that the viruses are most stable when the total contour length of the RNA is close to the total length of the peptide arms; this roughly gives a charge ratio of 2. In other works that ignore the peptide arms completely, there is additional disagreemen...