Category Theoretic Analysis of Hierarchical Protein Materials and Social Networks