Continuous anisotropic representation of coarse-grained potentials for proteins by spherical harmonics synthesis.