If the answer is not late, I recommend you see the paper Shape Distribution. This paper transfer comparison between shapes to comparison better distribution curves. A little math is enough for this paper. By the way, the protein cavity demo is beautiful. I see it is locally composed of triangular meshes, does every point/vertex in the meshes represent a atom in the protein? If so how did you get the meshs from atoms. I am very interested in this question. Looking forward to your reply!