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 apdbtbx::PDB
structure representing the entire protein.cutoff
- Af64
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
HashSet
s of residue serial numbers (asisize
) that are part of the interface for that chain.
§Algorithm
- Iterates over all pairs of chains in the PDB structure.
- For each pair of chains, compares all residues between the two chains.
- For each pair of residues, checks if any pair of atoms (one from each residue) is within the cutoff distance.
- 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.