A critical review is given of recently developed methods for determining the atomic structures and solute concentration profiles at defects in elemental solids and substitutional alloys as a function of temperature. Exact results are given for the effective force on an atom arising from the vibrational entropy in the quasiharmonic approximation and for the occupancy of a site in the pair potential approximation. An improved, approximate formula is given for the effective force arising from the vibrational entropy. The mean field approximation that is used in the alloy problem is compared with the auto-correlation approximation. It is shown that the better statistical averaging of the auto-correlation approximation leads to effective pair interactions that are temperature and concentration dependent.