Functional classification of protein structures by local structure matching in graph representation