Analysis of substructural variation in families of enzymatic proteins with applications to protein function prediction