get_residues

Function get_residues 

Source
pub fn get_residues(pdb: &PDB, target: Vec<isize>) -> Vec<&Residue>
Expand description

Retrieves specific residues from a PDB structure based on their serial numbers.

§Arguments

  • pdb - A reference to a pdbtbx::PDB structure representing the entire protein.
  • target - A vector of isize values representing the serial numbers of the residues to retrieve.

§Returns

A Vec<&Residue> containing references to the residues whose serial numbers match those in the target vector.

§Notes

  • This function performs a linear search through all residues in the PDB structure.
  • The order of residues in the result vector matches the order they appear in the PDB structure, not necessarily the order of serial numbers in the target vector.
  • If a serial number in target doesn’t match any residue in the PDB, it is simply ignored.