Starting from l=2 basis functions can be written in a spherical or Cartesian form. For example "d" basis function can have five spherical components (d3z2-r2, dxz, dyz, dxy, dx2-y2) or six Cartesian components (dzz,dxx,dyy,dxz,dyz,dxy).
Six Cartesian components of "d" basis function form the space of an reducible representation of the rotation group which can be decomposed into five-dimensional d irrep and one-dimensional s-irrep.
Thus six functions dzz,dxx,dyy,dxz,dyz,dxy can be transformed to five d- spherical functions: d3z2-r2, dxz, dyz, dxy, dx2-y2 and one function with s-symmetry which is ~(dxx+dyy+dzz).
Analogically, from ten Cartesian f-basis functions one can construct seven pure f-harmonics and three p-harmonics; 15 Cartesian g-basis functions can be decomposed into 9 pure g-harmonics, 5 pure d-harmonics and 1 s-harmonic, etc.
Some basis sets are optimized and generated in Cartesian form. In this case in the quantum-chemical program output molecular orbital will be represented as a linear combination of Cartesian basis functions. Also some programs (e.g. GAMESS) always print molecular orbitals in Cartesian form even when, actually, a calculation was performed with spherical basis functions.
However, in all these cases such LCAO-MO decomposition in terms of Cartesian basis functions can be transformed to decomposition in terms of pure spherical harmonics derived from the Cartesian ones.
Chemissian can perform such transformation automatically (see MO Composition window), i.e. instead of LCAO-MO decomposition in terms of Cartesian dzz,dxx,dyy,dxz,dyz,dxy functions a given molecular orbital will be decomposed in terms of five pure d3z2-r2, dxz, dyz, dxy, dx2-y2 functions and one s(d), where s(d) denotes basis function of s-symmetry ~(dxx+dyy+dzz); LCAO-MO coefficients for 10 f-Cartesian functions will be transformed to coefficients for seven pure f (f_0, f+1,f-1,f+2,f-2) and three px(f), py(f) and pz(f) spherical functions; finally, 15 g- will be transformed to nine g(g_0,g+1,g-1,g+2,g-2,g+3,g-3,g+4,g-4), five d(d3z2-r2(g), dxz(g), dyz(g), dxy(g), dx2-y2(g)) and one s(g).