Function get_true_interface

Source
pub fn get_true_interface(
    pdb: &PDB,
    cutoff: f64,
) -> HashMap<String, HashSet<isize>>
Expand description

Identifies the true interface residues between chains in a PDB structure.

This function determines interface residues by finding pairs of residues from different chains that have atoms within a specified cutoff distance of each other.

§Arguments

  • pdb - A reference to a pdbtbx::PDB structure representing the entire protein.
  • cutoff - A f64 value specifying the maximum distance (in Angstroms) between atoms for residues to be considered part of the interface.

§Returns

A HashMap<String, HashSet<isize>> where:

  • The keys are chain identifiers (as strings).
  • The values are HashSets of residue serial numbers (as isize) that are part of the interface for that chain.

§Algorithm

  1. Iterates over all pairs of chains in the PDB structure.
  2. For each pair of chains, compares all residues between the two chains.
  3. For each pair of residues, checks if any pair of atoms (one from each residue) is within the cutoff distance.
  4. If atoms are within the cutoff, both residues are added to the interface set for their respective chains.

§Notes

  • This function performs an exhaustive search, which may be computationally expensive for large structures.
  • The cutoff is applied to atom-atom distances, not residue-residue distances.
  • A residue is considered part of the interface if any of its atoms are within the cutoff of any atom in a residue from another chain.
  • The function does not distinguish between different types of atoms or residues.