Virial theorem for inelastic molecular collisions. Atom–rigid rotor scattering