MCPcopy Create free account
hub / github.com/DeepGraphLearning/S3F / _make_standard_atom_mask

Function _make_standard_atom_mask

s3f/residue_constants.py:76–86  ·  view source on GitHub ↗

Returns [num_res_types, num_atom_types] mask array.

()

Source from the content-addressed store, hash-verified

74
75
76def _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
89STANDARD_ATOM_MASK = _make_standard_atom_mask()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected