Any spherical function f can be decomposed into spherical harmonics as:

where angles and define directions in space, N is the order of approximation, Ylm are spherical harmonics, and coefficients clm give representation of f with respect to the spherical harmonics basis. Rotation invariant descriptors of f can be obtained as:

where fl are the frequency components of f,

This representation has the property of being independent of the orientation of a spherical function.

Rotation invariant representations of scalar data

Each physicochemical property of a molecule (P) given on a cubic grid,

where indices i, j, k enumerate grid points, and P is assigned zero if point xi, yj, zk does not belong to the surface of the molecule, is transformed to spherical coordinates (system of spherical coordinates is centered on the geometric center of the molecule):

using:

where:

where B defines the dimensions of the equiangular grid 2B x 2B.

This way the property P(xi,yj,zk) given on the surface of molecules is transformed into a set of spherical functions:

given on spheres with radii ri between 0 and Rmax.

Rotation invariant descriptors of the property P are constructed as matrices:

If the property P changes the sign (as for example in case of electrostatic potentials), decomposition is made separately for its positive and negative values, i.e. the property P(xi,yj,zk) is decomposed into two parts, P+(xi,yj,zk) and P(xi,yj,zk) and described with two sets of descriptors, Z(P+) and Z(P).