Returns [num_res_types, num_atom_types] mask array.
()
| 74 | |
| 75 | |
| 76 | def _make_standard_atom_mask() -> np.ndarray: |
| 77 | """Returns [num_res_types, num_atom_types] mask array.""" |
| 78 | # +1 to account for unknown (all 0s). |
| 79 | mask = np.zeros([restype_num + 1, atom_type_num], dtype=int) |
| 80 | for restype, restype_letter in enumerate(restypes): |
| 81 | restype_name = restype_1to3[restype_letter] |
| 82 | atom_names = residue_atoms[restype_name] |
| 83 | for atom_name in atom_names: |
| 84 | atom_type = atom_order[atom_name] |
| 85 | mask[restype, atom_type] = 1 |
| 86 | return mask |
| 87 | |
| 88 | |
| 89 | STANDARD_ATOM_MASK = _make_standard_atom_mask() |