: Functions of a protein are mainly determined by its structure. Surface cavities, also called pockets or clefts, are ordinarily regarded as potentially active sites where the protein carries out the functions. Clustering these pockets is a challenging task in structural genomics. In this paper, we introduce pocket similarity network which possesses the feature of community structure to systematically describe structural similarity among pockets, then a straightforward classification scheme is developed based on this special feature. The surface pockets are clustered into structurally similar pocket groups via a hierarchical process. We identify these small pocket groups as structural templates which represent similar functions in diverse proteins. The experimental results show that our clustering method is effective, and the identified pocket groups are biologically meaningful in terms of their functional features.