Skip to main content

Module utilities

Module utilities 

Source

Enums§

AAAtom
Typed atom37 slots; discriminants match ATOM37_NAMES indices.
Residue

Constants§

ALPHABET
One-letter code alphabet for the 20 standard amino acids plus UNK.

Functions§

aa1to_int
Convert a 1-letter amino acid code to an integer index (0–20, UNK→20).
aa3to1
Convert a 3-letter amino acid code to a 1-letter code.
calculate_cb
Get Pseudo CB
cat_neighbors_nodes
compute_nearest_neighbors
Retrieve the nearest Neighbor of a set of coordinates. Usually used for CA carbon distance.
create_backbone_mask_37
Input coords. Output 1 <batch x 1 > Tensor representing whether each residue has all 4 backbone atoms. note that the internal ordering is different between backbone only [N/CA/C/O] and all-atom [N/CA/C/CB/O]….
cross_product
Custom Cross-Product Fn.
gather_edges
Gather_edges Features [B,N,N,C] at Neighbor indices [B,N,K] => Neighbor features [B,N,K,C]
gather_nodes
Gather Nodes
gather_nodes_t
get_nearest_neighbours
Per-residue ligand atom context: the number_of_ligand_atoms ligand atoms nearest each residue’s Cβ.
int_to_aa1
Convert an integer index (0–20) to a 1-letter amino acid code.
linear_last_dim
Apply a [Linear] across the last dimension of a tensor of any rank.
linspace
linspace_f32
topk_last_dim