  Theory of long-range interactions between an atom in its ground S state and a
linear molecule in a degenerate state with a non-zero projection of the
electronic orbital angular momentum is presented. It is shown how the
long-range coefficients can be related to the first and second-order molecular
properties. The expressions for the long-range coefficients are written in
terms of all components of the static and dynamic multipole polarizability
tensor, including the nonadiagonal terms connecting states with the opposite
projection of the electronic orbital angular momentum. It is also shown that
for the interactions of molecules in excited states that are connected to the
ground state by multipolar transition moments additional terms in the
long-range induction energy appear. All these theoretical developments are
illustrated with the numerical results for systems of interest for the
sympathetic cooling experiments: interactions of the ground state Rb($^2$S)
atom with CO($^3\Pi$), OH($^2\Pi$), NH($^1\Delta$), and CH($^2\Pi$) and of the
ground state Li($^2$S) atom with CH($^2\Pi$).
