graph#

Graph utilities for the PrxteinMPNN model.

prxteinmpnn.utils.graph

prxteinmpnn.utils.graph.compute_neighbor_offsets(residue_indices, neighbor_indices)[source]#

Compute offsets between residues for neighbor indices.

Parameters:
  • residue_indices (Int[Array, 'num_residues num_atoms']) – Residue indices for each atom.

  • neighbor_indices (Int[Array, 'num_atoms num_neighbors']) – Indices of neighboring atoms.

Return type:

Array

Returns:

A 2D array of offsets where each row corresponds to a residue and each column corresponds to a neighbor. The values represent the difference in residue indices.