templates.bend

bend-prot@0.1.0.0 · 441 lines · 88 definitions

1# Generated by scripts/gen_templates.py from the PDB Chemical
2# Component Dictionary (https://files.rcsb.org/ligands/).
3# DO NOT EDIT: regenerate with the script. Flat String lists
4# (Data, reusable): atoms alternate name/element-symbol, bonds
5# alternate the two names. CCD charges are formal, not partial.
6# Leaving atoms (OXT, terminal H) stay listed; Bend filters by
7# presence, so OXT bonds fire only where OXT exists.
8import Base
9
10# --- ALA: 13 atoms, 12 bonds. ---
11def tpl_ALA_atoms() -> List<&2, String>:
12  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB1", "H", "HB2", "H", "HB3", "H", "HXT", "H"]
13def tpl_ALA_bonds() -> List<&2, String>:
14  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "HB1", "CB", "HB2", "CB", "HB3", "OXT", "HXT"]
15# --- ARG: 27 atoms, 26 bonds. ---
16def tpl_ARG_atoms() -> List<&2, String>:
17  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "CD", "C", "NE", "N", "CZ", "C", "NH1", "N", "NH2", "N", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HG2", "H", "HG3", "H", "HD2", "H", "HD3", "H", "HE", "H", "HH11", "H", "HH12", "H", "HH21", "H", "HH22", "H", "HXT", "H"]
18def tpl_ARG_bonds() -> List<&2, String>:
19  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "CD", "CG", "HG2", "CG", "HG3", "CD", "NE", "CD", "HD2", "CD", "HD3", "NE", "CZ", "NE", "HE", "CZ", "NH1", "CZ", "NH2", "NH1", "HH11", "NH1", "HH12", "NH2", "HH21", "NH2", "HH22", "OXT", "HXT"]
20# --- ASN: 17 atoms, 16 bonds. ---
21def tpl_ASN_atoms() -> List<&2, String>:
22  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "OD1", "O", "ND2", "N", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HD21", "H", "HD22", "H", "HXT", "H"]
23def tpl_ASN_bonds() -> List<&2, String>:
24  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "OD1", "CG", "ND2", "ND2", "HD21", "ND2", "HD22", "OXT", "HXT"]
25# --- ASP: 16 atoms, 15 bonds. ---
26def tpl_ASP_atoms() -> List<&2, String>:
27  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "OD1", "O", "OD2", "O", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HD2", "H", "HXT", "H"]
28def tpl_ASP_bonds() -> List<&2, String>:
29  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "OD1", "CG", "OD2", "OD2", "HD2", "OXT", "HXT"]
30# --- CYS: 14 atoms, 13 bonds. ---
31def tpl_CYS_atoms() -> List<&2, String>:
32  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "SG", "S", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HG", "H", "HXT", "H"]
33def tpl_CYS_bonds() -> List<&2, String>:
34  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "SG", "CB", "HB2", "CB", "HB3", "SG", "HG", "OXT", "HXT"]
35# --- GLN: 20 atoms, 19 bonds. ---
36def tpl_GLN_atoms() -> List<&2, String>:
37  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "CD", "C", "OE1", "O", "NE2", "N", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HG2", "H", "HG3", "H", "HE21", "H", "HE22", "H", "HXT", "H"]
38def tpl_GLN_bonds() -> List<&2, String>:
39  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "CD", "CG", "HG2", "CG", "HG3", "CD", "OE1", "CD", "NE2", "NE2", "HE21", "NE2", "HE22", "OXT", "HXT"]
40# --- GLU: 19 atoms, 18 bonds. ---
41def tpl_GLU_atoms() -> List<&2, String>:
42  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "CD", "C", "OE1", "O", "OE2", "O", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HG2", "H", "HG3", "H", "HE2", "H", "HXT", "H"]
43def tpl_GLU_bonds() -> List<&2, String>:
44  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "CD", "CG", "HG2", "CG", "HG3", "CD", "OE1", "CD", "OE2", "OE2", "HE2", "OXT", "HXT"]
45# --- GLY: 10 atoms, 9 bonds. ---
46def tpl_GLY_atoms() -> List<&2, String>:
47  ["N", "N", "CA", "C", "C", "C", "O", "O", "OXT", "O", "H", "H", "H2", "H", "HA2", "H", "HA3", "H", "HXT", "H"]
48def tpl_GLY_bonds() -> List<&2, String>:
49  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "HA2", "CA", "HA3", "C", "O", "C", "OXT", "OXT", "HXT"]
50# --- HIS: 21 atoms, 21 bonds. ---
51def tpl_HIS_atoms() -> List<&2, String>:
52  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "ND1", "N", "CD2", "C", "CE1", "C", "NE2", "N", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HD1", "H", "HD2", "H", "HE1", "H", "HE2", "H", "HXT", "H"]
53def tpl_HIS_bonds() -> List<&2, String>:
54  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "ND1", "CG", "CD2", "ND1", "CE1", "ND1", "HD1", "CD2", "NE2", "CD2", "HD2", "CE1", "NE2", "CE1", "HE1", "NE2", "HE2", "OXT", "HXT"]
55# --- ILE: 22 atoms, 21 bonds. ---
56def tpl_ILE_atoms() -> List<&2, String>:
57  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG1", "C", "CG2", "C", "CD1", "C", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB", "H", "HG12", "H", "HG13", "H", "HG21", "H", "HG22", "H", "HG23", "H", "HD11", "H", "HD12", "H", "HD13", "H", "HXT", "H"]
58def tpl_ILE_bonds() -> List<&2, String>:
59  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG1", "CB", "CG2", "CB", "HB", "CG1", "CD1", "CG1", "HG12", "CG1", "HG13", "CG2", "HG21", "CG2", "HG22", "CG2", "HG23", "CD1", "HD11", "CD1", "HD12", "CD1", "HD13", "OXT", "HXT"]
60# --- LEU: 22 atoms, 21 bonds. ---
61def tpl_LEU_atoms() -> List<&2, String>:
62  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "CD1", "C", "CD2", "C", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HG", "H", "HD11", "H", "HD12", "H", "HD13", "H", "HD21", "H", "HD22", "H", "HD23", "H", "HXT", "H"]
63def tpl_LEU_bonds() -> List<&2, String>:
64  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "CD1", "CG", "CD2", "CG", "HG", "CD1", "HD11", "CD1", "HD12", "CD1", "HD13", "CD2", "HD21", "CD2", "HD22", "CD2", "HD23", "OXT", "HXT"]
65# --- LYS: 25 atoms, 24 bonds. ---
66def tpl_LYS_atoms() -> List<&2, String>:
67  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "CD", "C", "CE", "C", "NZ", "N", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HG2", "H", "HG3", "H", "HD2", "H", "HD3", "H", "HE2", "H", "HE3", "H", "HZ1", "H", "HZ2", "H", "HZ3", "H", "HXT", "H"]
68def tpl_LYS_bonds() -> List<&2, String>:
69  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "CD", "CG", "HG2", "CG", "HG3", "CD", "CE", "CD", "HD2", "CD", "HD3", "CE", "NZ", "CE", "HE2", "CE", "HE3", "NZ", "HZ1", "NZ", "HZ2", "NZ", "HZ3", "OXT", "HXT"]
70# --- MET: 20 atoms, 19 bonds. ---
71def tpl_MET_atoms() -> List<&2, String>:
72  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "SD", "S", "CE", "C", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HG2", "H", "HG3", "H", "HE1", "H", "HE2", "H", "HE3", "H", "HXT", "H"]
73def tpl_MET_bonds() -> List<&2, String>:
74  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "SD", "CG", "HG2", "CG", "HG3", "SD", "CE", "CE", "HE1", "CE", "HE2", "CE", "HE3", "OXT", "HXT"]
75# --- PHE: 23 atoms, 23 bonds. ---
76def tpl_PHE_atoms() -> List<&2, String>:
77  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "CD1", "C", "CD2", "C", "CE1", "C", "CE2", "C", "CZ", "C", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HD1", "H", "HD2", "H", "HE1", "H", "HE2", "H", "HZ", "H", "HXT", "H"]
78def tpl_PHE_bonds() -> List<&2, String>:
79  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "CD1", "CG", "CD2", "CD1", "CE1", "CD1", "HD1", "CD2", "CE2", "CD2", "HD2", "CE1", "CZ", "CE1", "HE1", "CE2", "CZ", "CE2", "HE2", "CZ", "HZ", "OXT", "HXT"]
80# --- PRO: 17 atoms, 17 bonds. ---
81def tpl_PRO_atoms() -> List<&2, String>:
82  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "CD", "C", "OXT", "O", "H", "H", "HA", "H", "HB2", "H", "HB3", "H", "HG2", "H", "HG3", "H", "HD2", "H", "HD3", "H", "HXT", "H"]
83def tpl_PRO_bonds() -> List<&2, String>:
84  ["N", "CA", "N", "CD", "N", "H", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "CD", "CG", "HG2", "CG", "HG3", "CD", "HD2", "CD", "HD3", "OXT", "HXT"]
85# --- SER: 14 atoms, 13 bonds. ---
86def tpl_SER_atoms() -> List<&2, String>:
87  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "OG", "O", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HG", "H", "HXT", "H"]
88def tpl_SER_bonds() -> List<&2, String>:
89  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "OG", "CB", "HB2", "CB", "HB3", "OG", "HG", "OXT", "HXT"]
90# --- THR: 17 atoms, 16 bonds. ---
91def tpl_THR_atoms() -> List<&2, String>:
92  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "OG1", "O", "CG2", "C", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB", "H", "HG1", "H", "HG21", "H", "HG22", "H", "HG23", "H", "HXT", "H"]
93def tpl_THR_bonds() -> List<&2, String>:
94  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "OG1", "CB", "CG2", "CB", "HB", "OG1", "HG1", "CG2", "HG21", "CG2", "HG22", "CG2", "HG23", "OXT", "HXT"]
95# --- TRP: 27 atoms, 28 bonds. ---
96def tpl_TRP_atoms() -> List<&2, String>:
97  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "CD1", "C", "CD2", "C", "NE1", "N", "CE2", "C", "CE3", "C", "CZ2", "C", "CZ3", "C", "CH2", "C", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HD1", "H", "HE1", "H", "HE3", "H", "HZ2", "H", "HZ3", "H", "HH2", "H", "HXT", "H"]
98def tpl_TRP_bonds() -> List<&2, String>:
99  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "CD1", "CG", "CD2", "CD1", "NE1", "CD1", "HD1", "CD2", "CE2", "CD2", "CE3", "NE1", "CE2", "NE1", "HE1", "CE2", "CZ2", "CE3", "CZ3", "CE3", "HE3", "CZ2", "CH2", "CZ2", "HZ2", "CZ3", "CH2", "CZ3", "HZ3", "CH2", "HH2", "OXT", "HXT"]
100# --- TYR: 24 atoms, 24 bonds. ---
101def tpl_TYR_atoms() -> List<&2, String>:
102  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG", "C", "CD1", "C", "CD2", "C", "CE1", "C", "CE2", "C", "CZ", "C", "OH", "O", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB2", "H", "HB3", "H", "HD1", "H", "HD2", "H", "HE1", "H", "HE2", "H", "HH", "H", "HXT", "H"]
103def tpl_TYR_bonds() -> List<&2, String>:
104  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG", "CB", "HB2", "CB", "HB3", "CG", "CD1", "CG", "CD2", "CD1", "CE1", "CD1", "HD1", "CD2", "CE2", "CD2", "HD2", "CE1", "CZ", "CE1", "HE1", "CE2", "CZ", "CE2", "HE2", "CZ", "OH", "OH", "HH", "OXT", "HXT"]
105# --- VAL: 19 atoms, 18 bonds. ---
106def tpl_VAL_atoms() -> List<&2, String>:
107  ["N", "N", "CA", "C", "C", "C", "O", "O", "CB", "C", "CG1", "C", "CG2", "C", "OXT", "O", "H", "H", "H2", "H", "HA", "H", "HB", "H", "HG11", "H", "HG12", "H", "HG13", "H", "HG21", "H", "HG22", "H", "HG23", "H", "HXT", "H"]
108def tpl_VAL_bonds() -> List<&2, String>:
109  ["N", "CA", "N", "H", "N", "H2", "CA", "C", "CA", "CB", "CA", "HA", "C", "O", "C", "OXT", "CB", "CG1", "CB", "CG2", "CB", "HB", "CG1", "HG11", "CG1", "HG12", "CG1", "HG13", "CG2", "HG21", "CG2", "HG22", "CG2", "HG23", "OXT", "HXT"]
110
111# Template atoms by residue name (unknown -> empty).
112
113def tpl_atoms_HIP(hit: Bool, +res: String) -> List<&2, String>:
114  match hit:
115    case True{}:
116      tpl_HIS_atoms()
117    case False{}:
118      Nil{}
119
120def tpl_atoms_HID(hit: Bool, +res: String) -> List<&2, String>:
121  match hit:
122    case True{}:
123      tpl_HIS_atoms()
124    case False{}:
125      tpl_atoms_HIP(String.eq(res, "HIP"), res)
126
127def tpl_atoms_HIE(hit: Bool, +res: String) -> List<&2, String>:
128  match hit:
129    case True{}:
130      tpl_HIS_atoms()
131    case False{}:
132      tpl_atoms_HID(String.eq(res, "HID"), res)
133
134def tpl_atoms_VAL(hit: Bool, +res: String) -> List<&2, String>:
135  match hit:
136    case True{}:
137      tpl_VAL_atoms()
138    case False{}:
139      tpl_atoms_HIE(String.eq(res, "HIE"), res)
140
141def tpl_atoms_TYR(hit: Bool, +res: String) -> List<&2, String>:
142  match hit:
143    case True{}:
144      tpl_TYR_atoms()
145    case False{}:
146      tpl_atoms_VAL(String.eq(res, "VAL"), res)
147
148def tpl_atoms_TRP(hit: Bool, +res: String) -> List<&2, String>:
149  match hit:
150    case True{}:
151      tpl_TRP_atoms()
152    case False{}:
153      tpl_atoms_TYR(String.eq(res, "TYR"), res)
154
155def tpl_atoms_THR(hit: Bool, +res: String) -> List<&2, String>:
156  match hit:
157    case True{}:
158      tpl_THR_atoms()
159    case False{}:
160      tpl_atoms_TRP(String.eq(res, "TRP"), res)
161
162def tpl_atoms_SER(hit: Bool, +res: String) -> List<&2, String>:
163  match hit:
164    case True{}:
165      tpl_SER_atoms()
166    case False{}:
167      tpl_atoms_THR(String.eq(res, "THR"), res)
168
169def tpl_atoms_PRO(hit: Bool, +res: String) -> List<&2, String>:
170  match hit:
171    case True{}:
172      tpl_PRO_atoms()
173    case False{}:
174      tpl_atoms_SER(String.eq(res, "SER"), res)
175
176def tpl_atoms_PHE(hit: Bool, +res: String) -> List<&2, String>:
177  match hit:
178    case True{}:
179      tpl_PHE_atoms()
180    case False{}:
181      tpl_atoms_PRO(String.eq(res, "PRO"), res)
182
183def tpl_atoms_MET(hit: Bool, +res: String) -> List<&2, String>:
184  match hit:
185    case True{}:
186      tpl_MET_atoms()
187    case False{}:
188      tpl_atoms_PHE(String.eq(res, "PHE"), res)
189
190def tpl_atoms_LYS(hit: Bool, +res: String) -> List<&2, String>:
191  match hit:
192    case True{}:
193      tpl_LYS_atoms()
194    case False{}:
195      tpl_atoms_MET(String.eq(res, "MET"), res)
196
197def tpl_atoms_LEU(hit: Bool, +res: String) -> List<&2, String>:
198  match hit:
199    case True{}:
200      tpl_LEU_atoms()
201    case False{}:
202      tpl_atoms_LYS(String.eq(res, "LYS"), res)
203
204def tpl_atoms_ILE(hit: Bool, +res: String) -> List<&2, String>:
205  match hit:
206    case True{}:
207      tpl_ILE_atoms()
208    case False{}:
209      tpl_atoms_LEU(String.eq(res, "LEU"), res)
210
211def tpl_atoms_HIS(hit: Bool, +res: String) -> List<&2, String>:
212  match hit:
213    case True{}:
214      tpl_HIS_atoms()
215    case False{}:
216      tpl_atoms_ILE(String.eq(res, "ILE"), res)
217
218def tpl_atoms_GLY(hit: Bool, +res: String) -> List<&2, String>:
219  match hit:
220    case True{}:
221      tpl_GLY_atoms()
222    case False{}:
223      tpl_atoms_HIS(String.eq(res, "HIS"), res)
224
225def tpl_atoms_GLU(hit: Bool, +res: String) -> List<&2, String>:
226  match hit:
227    case True{}:
228      tpl_GLU_atoms()
229    case False{}:
230      tpl_atoms_GLY(String.eq(res, "GLY"), res)
231
232def tpl_atoms_GLN(hit: Bool, +res: String) -> List<&2, String>:
233  match hit:
234    case True{}:
235      tpl_GLN_atoms()
236    case False{}:
237      tpl_atoms_GLU(String.eq(res, "GLU"), res)
238
239def tpl_atoms_CYS(hit: Bool, +res: String) -> List<&2, String>:
240  match hit:
241    case True{}:
242      tpl_CYS_atoms()
243    case False{}:
244      tpl_atoms_GLN(String.eq(res, "GLN"), res)
245
246def tpl_atoms_ASP(hit: Bool, +res: String) -> List<&2, String>:
247  match hit:
248    case True{}:
249      tpl_ASP_atoms()
250    case False{}:
251      tpl_atoms_CYS(String.eq(res, "CYS"), res)
252
253def tpl_atoms_ASN(hit: Bool, +res: String) -> List<&2, String>:
254  match hit:
255    case True{}:
256      tpl_ASN_atoms()
257    case False{}:
258      tpl_atoms_ASP(String.eq(res, "ASP"), res)
259
260def tpl_atoms_ARG(hit: Bool, +res: String) -> List<&2, String>:
261  match hit:
262    case True{}:
263      tpl_ARG_atoms()
264    case False{}:
265      tpl_atoms_ASN(String.eq(res, "ASN"), res)
266
267def tpl_atoms_ALA(hit: Bool, +res: String) -> List<&2, String>:
268  match hit:
269    case True{}:
270      tpl_ALA_atoms()
271    case False{}:
272      tpl_atoms_ARG(String.eq(res, "ARG"), res)
273
274def tpl_atoms_for(+res: String) -> List<&2, String>:
275  tpl_atoms_ALA(String.eq(res, "ALA"), res)
276
277# Template bonds by residue name (unknown -> empty).
278
279def tpl_bonds_HIP(hit: Bool, +res: String) -> List<&2, String>:
280  match hit:
281    case True{}:
282      tpl_HIS_bonds()
283    case False{}:
284      Nil{}
285
286def tpl_bonds_HID(hit: Bool, +res: String) -> List<&2, String>:
287  match hit:
288    case True{}:
289      tpl_HIS_bonds()
290    case False{}:
291      tpl_bonds_HIP(String.eq(res, "HIP"), res)
292
293def tpl_bonds_HIE(hit: Bool, +res: String) -> List<&2, String>:
294  match hit:
295    case True{}:
296      tpl_HIS_bonds()
297    case False{}:
298      tpl_bonds_HID(String.eq(res, "HID"), res)
299
300def tpl_bonds_VAL(hit: Bool, +res: String) -> List<&2, String>:
301  match hit:
302    case True{}:
303      tpl_VAL_bonds()
304    case False{}:
305      tpl_bonds_HIE(String.eq(res, "HIE"), res)
306
307def tpl_bonds_TYR(hit: Bool, +res: String) -> List<&2, String>:
308  match hit:
309    case True{}:
310      tpl_TYR_bonds()
311    case False{}:
312      tpl_bonds_VAL(String.eq(res, "VAL"), res)
313
314def tpl_bonds_TRP(hit: Bool, +res: String) -> List<&2, String>:
315  match hit:
316    case True{}:
317      tpl_TRP_bonds()
318    case False{}:
319      tpl_bonds_TYR(String.eq(res, "TYR"), res)
320
321def tpl_bonds_THR(hit: Bool, +res: String) -> List<&2, String>:
322  match hit:
323    case True{}:
324      tpl_THR_bonds()
325    case False{}:
326      tpl_bonds_TRP(String.eq(res, "TRP"), res)
327
328def tpl_bonds_SER(hit: Bool, +res: String) -> List<&2, String>:
329  match hit:
330    case True{}:
331      tpl_SER_bonds()
332    case False{}:
333      tpl_bonds_THR(String.eq(res, "THR"), res)
334
335def tpl_bonds_PRO(hit: Bool, +res: String) -> List<&2, String>:
336  match hit:
337    case True{}:
338      tpl_PRO_bonds()
339    case False{}:
340      tpl_bonds_SER(String.eq(res, "SER"), res)
341
342def tpl_bonds_PHE(hit: Bool, +res: String) -> List<&2, String>:
343  match hit:
344    case True{}:
345      tpl_PHE_bonds()
346    case False{}:
347      tpl_bonds_PRO(String.eq(res, "PRO"), res)
348
349def tpl_bonds_MET(hit: Bool, +res: String) -> List<&2, String>:
350  match hit:
351    case True{}:
352      tpl_MET_bonds()
353    case False{}:
354      tpl_bonds_PHE(String.eq(res, "PHE"), res)
355
356def tpl_bonds_LYS(hit: Bool, +res: String) -> List<&2, String>:
357  match hit:
358    case True{}:
359      tpl_LYS_bonds()
360    case False{}:
361      tpl_bonds_MET(String.eq(res, "MET"), res)
362
363def tpl_bonds_LEU(hit: Bool, +res: String) -> List<&2, String>:
364  match hit:
365    case True{}:
366      tpl_LEU_bonds()
367    case False{}:
368      tpl_bonds_LYS(String.eq(res, "LYS"), res)
369
370def tpl_bonds_ILE(hit: Bool, +res: String) -> List<&2, String>:
371  match hit:
372    case True{}:
373      tpl_ILE_bonds()
374    case False{}:
375      tpl_bonds_LEU(String.eq(res, "LEU"), res)
376
377def tpl_bonds_HIS(hit: Bool, +res: String) -> List<&2, String>:
378  match hit:
379    case True{}:
380      tpl_HIS_bonds()
381    case False{}:
382      tpl_bonds_ILE(String.eq(res, "ILE"), res)
383
384def tpl_bonds_GLY(hit: Bool, +res: String) -> List<&2, String>:
385  match hit:
386    case True{}:
387      tpl_GLY_bonds()
388    case False{}:
389      tpl_bonds_HIS(String.eq(res, "HIS"), res)
390
391def tpl_bonds_GLU(hit: Bool, +res: String) -> List<&2, String>:
392  match hit:
393    case True{}:
394      tpl_GLU_bonds()
395    case False{}:
396      tpl_bonds_GLY(String.eq(res, "GLY"), res)
397
398def tpl_bonds_GLN(hit: Bool, +res: String) -> List<&2, String>:
399  match hit:
400    case True{}:
401      tpl_GLN_bonds()
402    case False{}:
403      tpl_bonds_GLU(String.eq(res, "GLU"), res)
404
405def tpl_bonds_CYS(hit: Bool, +res: String) -> List<&2, String>:
406  match hit:
407    case True{}:
408      tpl_CYS_bonds()
409    case False{}:
410      tpl_bonds_GLN(String.eq(res, "GLN"), res)
411
412def tpl_bonds_ASP(hit: Bool, +res: String) -> List<&2, String>:
413  match hit:
414    case True{}:
415      tpl_ASP_bonds()
416    case False{}:
417      tpl_bonds_CYS(String.eq(res, "CYS"), res)
418
419def tpl_bonds_ASN(hit: Bool, +res: String) -> List<&2, String>:
420  match hit:
421    case True{}:
422      tpl_ASN_bonds()
423    case False{}:
424      tpl_bonds_ASP(String.eq(res, "ASP"), res)
425
426def tpl_bonds_ARG(hit: Bool, +res: String) -> List<&2, String>:
427  match hit:
428    case True{}:
429      tpl_ARG_bonds()
430    case False{}:
431      tpl_bonds_ASN(String.eq(res, "ASN"), res)
432
433def tpl_bonds_ALA(hit: Bool, +res: String) -> List<&2, String>:
434  match hit:
435    case True{}:
436      tpl_ALA_bonds()
437    case False{}:
438      tpl_bonds_ARG(String.eq(res, "ARG"), res)
439
440def tpl_bonds_for(+res: String) -> List<&2, String>:
441  tpl_bonds_ALA(String.eq(res, "ALA"), res)