  Average atom (AA) models allow one to efficiently compute electronic and
optical properties of materials over a wide range of conditions and are often
employed to interpret experimental data. However, at high pressure, predictions
from AA models have been shown to disagree with results from ab initio computer
simulations. Here we reconcile these deviations by developing an innovative
type of AA model, AVION, that computes the electronic eigenstates with novel
boundary conditions within the ion sphere. Bound and free states are derived
consistently. We drop the common AA image that the free-particle spectrum
starts at the potential threshold, which we found to be incompatible with ab
initio calculations. We perform ab initio simulations of crystalline and liquid
carbon and aluminum over a wide range of densities and show that the computed
band structure is in very good agreement with predictions from AVION.
