A theory is set up of spherical proteins interacting by screened electrostatics and constant adhesion, in which the effective adhesion parameter is optimized by a variational principle for the free energy. An analytical approach to the second virial coefficient is first outlined by balancing the repulsive electrostatics against part of the bare adhesion. A theory similar in spirit is developed at nonzero concentrations by assuming an appropriate Baxter model as the reference state. The first-order term in a functional expansion of the free energy is set equal to zero which determines the effective adhesion as a function of salt and protein concentrations. The resulting theory is shown to have fairly good predictive power for the ionic-strength dependence of both the second virial coefficient and the osmotic pressure or compressibility of lysozyme up to about 0.2 volume fraction.