It is the force of repulison and not the force of attraction which is responsible in the interatomic or intermolecular potential for the formation of a solid. If we study the motion of large number of hard spheres, it will be observed that two such hard spheres do not attract each other, but rebound immediately on collision. This means they do not come closer then their diameter d. This interaction potential V with distance r for a pair of hard sphaers is shown in
This show that there is inifinite repulsion for the seperation, r = d and no potential for r gt d.