pub fn identify_unknowns(structure: &PDB) -> HashMap<String, Vec<String>>Expand description
Identifies unknown residues in each chain of the given PDB structure.
This function iterates over all chains in a PDB structure, filters out known residues (amino acids and DNA),
and collects the names of unknown residues. It returns a HashMap where the keys are chain IDs and the
values are vectors of unique unknown residue names.
§Arguments
structure- A reference to apdbtbx::PDBstructure representing the PDB file to be analyzed.
§Returns
A HashMap<String, Vec<String>> where each key is a chain ID and each value is a vector of unique
unknown residue names found in that chain.
§Example
use pdbtbx::PDB;
use pdb_handler::identify_unknowns;
let (mut pdb, _errors) = pdbtbx::open("example-pdbs/1crn.pdb").unwrap();
let unknown_residues = identify_unknowns(&pdb);
for (chain_id, residues) in unknown_residues {
println!("Chain {}: {:?}", chain_id, residues);
}§Panics
This function will panic if the residue name cannot be retrieved.