The changes in macromolecular packing at various distances from the surface of a solid