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

where angles and define directions in space, **N** is the order of approximation, **Y _{l}^{m}** are spherical harmonics, and coefficients

**c**give representation of

_{l}^{m}**f**with respect to the spherical harmonics basis. Rotation invariant descriptors of

**f**can be obtained as:

where **f _{l}** 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 **x _{i}**,

**y**,

_{j}**z**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):

_{k}using:

where:

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

This way the property **P(x _{i},y_{j},z_{k})** given on the surface of molecules is transformed into a set of spherical functions:

given on spheres with radii **r _{i}** between 0 and

**R**.

_{max}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(x _{i},y_{j},z_{k})** is decomposed into two parts,

**P**and

^{+}(x_{i},y_{j},z_{k})**P**and described with two sets of descriptors,

^{–}(x_{i},y_{j},z_{k})**Z(P**and

^{+})**Z(P**.

^{–})