def conect_lines
import bend-prot@0.1.0.0/pdb.bend as Pdbimport Base
65# CONECT lines anywhere in the file (they follow ENDMDL in practice).
66def conect_lines(lines: List<&2, String>) -> List<&2, String>:
67 match lines:
68 case Nil{}:
69 Nil{}
70 case h <> t:
71 match h:
72 case SCon{'C', SCon{'O', SCon{'N', SCon{'E', SCon{'C', SCon{'T', _}}}}}}:
73 h <> conect_lines(t)
74 case _:
75 conect_lines(t)