3 FIG. 2: Flowchart of the construction of CLESUM. (A) Collect all pairwise structures with the same first three family indices (DALI Z-Score ≥ 8) in the representative set from FSSP. (B) For each pair, extract the alignment. (C) For each alignment, extract the ungapped aligned fragment. Each fragment contains both AAs and CLs. (D) Count the occurrence number of CL duad. For example, Nab means the total number of CL A and B occurred in the alignment. (E) Calculate CLESUM from the occurrence matrix. FIG. 3: Flowchart of entropic clustering on the joint space of both AAs and CLs. (A) For each fragment in FSSP, count the pairwise number of joint occurrence. For example, Ndaac means the total pairwise number of ’da’ with ’ac’, in each duad the former is CL and the latter is AA. (B) Use Monte Carlo to randomly group 20 AAs into two categories. (C) Given an AA category, assign each AA to its group. (D) Calculate the reduced occurrence matrix, here Nd0a1 means the total pairwise number of ’d0’ with ’a1’, in each duad the former is CL and the latter is AA’s tag. (E) Calculate the mutual information of the reduced matrix. (F) If the categories which maximize I have been found, break the Monte Carlo recursion. (G) Calculate the HP-CLESUM. The difference between values of I after and before clus- If we cluster a$_{i}$ and a$_{j}$ into a$_{i}$$_{&}$$_{j}$ leads to distribution ( A and B ) is defined as, tering is given by I = a ∈ A,b ∈ B ∑ a,b p ( a, b ) log p ( a, b ) p ( a ) p ( b ) . (1) p ( a$_{i}$$_{&}$$_{j}$ ) = p ( a$_{i}$ ) + p ( a$_{j}$ ) , p ( a$_{i}$$_{&}$$_{j}$, b ) = p ( a$_{i}$, b ) + p ( a$_{j}$, b ) . (2) [ p ( a$_{i}$, b ) + p ( a$_{j}$, b )] log p ( a$_{i}$, b ) + p ( a$_{j}$, b ) [ p ( a$_{i}$ ) + p ( a$_{j}$ )] p ( b ) − p ( a$_{i}$, b ) log p ( a$_{i}$, b ) p ( a$_{i}$ ) p ( b ) − p ( a$_{j}$, b ) log p ( a$_{j}$, b ) p ( a$_{j}$ ) p ( b ) (3) K V $ H D $ > $ $ @ ( 7 5 3 1 + 7 , < , 1 1 / 1 ( . , . . ' > K V $ @ / 7 9 . . , ) 9 * * , . ( ' 7 > H D $ @ > & / @ & 3 0 & ( $ / ( ( ( ( 1 * & 3 - * & & , > K V $ @ % % ( % * ( ' ( ( 1 0 ) 1 0 / > H D $ @ I R OG W U H H U H S UH V H Q WD WL YH H N $ G G $ G Q % K V $ H D $ T V G $ …… … H N $G G $ H N $G Q % G G $G Q % … K V $H D $ … Fragments in FSSP > $ $ @ 5 3 1 + 7 , < , 1 1 / 1 ( . , > & / @ 0 & ( $ / ( ( ( ( 1 * & 3 - * _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > & / @ % % ( % * ( ' ( ( 1 0 ) 1 0 / > $ $ @ / 7 9 . . , ) 9 * * , . ( ' 7 P R O P R O $ % & The i-th fragment CLESUM ' ( CL Occurrence Matrix (17 * 17) A B E … & / V A B E … & / V … … … … … C D C  D 1 D D 1 D E 1 D F 1 D G 1 D H … 1 E D 1 E E 1 E F 1 E G 1 E H … 1 F D 1 F E 1 F F 1 F G 1 F H … 1 G D 1 G E 1 G F 1 G G 1 G H … 1 H D 1 H E 1 H F 1 H G 1 H H … ( , ) 20 log , ij i j N N CLESUM i j N N ! Z H U H 17 17 1 1 , j i i ij i N N N N ! ! ! ! " " Fragments in FSSP > W D J @ … … > $ $ @ … $ 9 ' / 9 / , 0 6 … > & / @ … . / % / ' ( ( ( 3 … _ _ _ _ _ _ _ _ _ > & / @ … 2 * 3 / ( ( ) ' $ … > $ $ @ … * < ( 9 9 * / ' : … > W D J @ … … mol1 mol2 Fragments in FSSP > $ $ @ … $ 9 ' / 9 / , 0 6 … > & / @ … . / % / ' ( ( ( 3 … _ _ _ _ _ _ _ _ _ > & / @ … 2 * 3 / ( ( ) ' $ … > $ $ @ … * < ( 9 9 * / ' : … mol1 mol2 The i-th fragment Monte Carlo to group  20 AAs into 2 categories $ 9 & ' ( ) * + , : . / 0 1 < 3 4 5 6 7 W D J $ $ V find maximal I or not? 1 R $ % &  ' ( ) Final categories * HP-CLESUM The i-th fragment Joint Occurrence Matrix … $ 5 … … ) 0 … … & … + … … ( … * … A B … & / V $ $ V ' 3 … & / V $ $ V 1 G D D F 1 G D D K 1 G D E H 1 G D E J … 1 G U D F 1 G U D K 1 G U E H 1 G U E J … … … … … … 1 S I D F 1 S I D K 1 S I E H 1 S I E J … 1 S P D F 1 S P D K 1 S P E H 1 S P E J … … … … … … … (17 20) (17 20) Reduced Occurrence Matrix A & / V W D J D P… & / V W D J … … … … … … B… 1 G D 1 G D 1 G E 1 G E … 1 G D 1 G D 1 G E 1 G E … 1 S D 1 S D 1 S E 1 S E … 1 S D 1 S D 1 S E 1 S E … (17 2) (17 2) 17 2 17 2 log ikjl ikjl i k j l ik jl N N N N N N I ! """" 17 2 1 1 ik i k N N ! ! ! "" 17 2 1 1 , ikjl ik j l N N ! ! ! "" Z K H U H g 20 lo ikjl ik jl N N N N + 3  & / ( 6 8 0  L  M  N O 