  Viral capsids are structurally constrained by interactions amongst the amino
acids of the constituting proteins. Therefore, epistasis is expected to evolve
amongst sites engaged in physical interactions, and to influence their
substitution rates. In order to study the distribution of structural epistasis,
we modeled \emph{in silico} the capsid of 18 species of the \phix \, family,
including the wild type. \phix \, is amongst the simplest organisms, making it
suitable for experimental evolution and \emph{in silico} modeling. We found
nearly 40 variable amino acid sites in the main capsid protein across the 18
species. To study how epistasis evolved in this group, we reconstructed the
ancestral sequences using a Bayesian phylogenetic framework. The ancestral
states include 8 variable amino acids, for a total of 256 possible haplotypes.
The $dN/dS$ ratio is low, suggesting strong purifying selection, consistent
with the idea that the structure is constrained by some form of stabilizing
selection. For each haplotype in the ancestral node and for the extant species
we estimated \emph{in silico} the distribution of free energies and of
epistasis. We found that free energy has not significantly increased but
epistasis has. We decomposed epistasis up to fifth order and found that
high-order epistasis can sometimes compensate pairwise interactions, often
making the free energy seem additive. By synthesizing some of the ancestral
haplotypes of the capsid gene, we measured their fitness experimentally, and
found that the predicted deviations in the coat protein free energy do not
significantly affect fitness, which is consistent with the stabilizing
selection hypothesis.
