By assuming a Boltzmann distribution for the molecular equilibrium between local and bulk environments, a general model is derived for the prediction of coordination numbers and local compositions of square-well and square-shoulder fluids. The model has no empirical parameter fitted from the data of square-well and square-shoulder fluids, but is valid from the low-density limit to the high-dens...