HARMONY starts with a molecular surface computed from available programs. For example, this image shows the crambin molecular surface computed by the program MSMS by Michel Sanner.
Before computing harmonics, this surface must be topologically mapped to a sphere because the spherical harmonic functions are defined on a unit sphere. A restriction of this techniques is that the input surfaces must be topologically equivalent to a sphere. Surfaces like donuts won't work. After the spherical mapping, a unique spherical coordinate (theta, phi), can be assigned to each point of the molecular surface.
We can understand the effect of the mapping by color-coding surfaces by the X Cartesian coordinate of the original molecular surface. Note that the number of vertices, edges, and triangles for the original surface and its spherical map is the same.
The first step in computing the topological map is to project the molecular surface to a unit sphere. This produces a surface that has overlaps.
The second step is a stochastic optimization that removes back-facing triangles and evens out the triangle mesh over the sphere surface. In this step, the surface is modified by translating the vertices to remove the overhanging regions.
After these steps, there is a one-to-one mapping from the molecular surface to the unit sphere. This new surface is isomorphic to a unit sphere and each ray from the center of the sphere intersects the spherical surface in only one place.
Spherical harmonic expansion coefficients can now be computed using the coordinate data from the original molecular surface, and the parameter ((theta,phi) spherical coordinates) data from the spherical surface.
After the tmap procedure computes the spherical map, the fitsurf program evaluates the surface integrals for the X, Y, and Z Cartesian coordinates to obtain three sets of expansion coefficients, one for each Cartesian coordinate.
After coefficients are computed, the mksurf program computes spherical harmonic surfaces using the desired number of coefficients.
The following examples show results of this procedure. In each instance, the spherical harmonic approximation is on the left and the original MSMS surface is on the right.