pub fn pdbreader_single(contents: &str) -> Vec<Record>Expand description
Parse PDB file contents using single-threaded processing.
This function processes PDB file contents line-by-line in a single thread to extract structured record data. It handles atom serial number assignment during the parsing process, making it more efficient than the parallel version for smaller files.
§Arguments
contents- The complete PDB file contents as a string
§Returns
A vector of Record variants representing the parsed PDB records.
Note: Currently only returns ATOM records, filtering out other record types.
§Example
use knuckles_parse::pdbreader_single;
let pdb_content = "ATOM 1 N ALA A 1 20.154 16.967 27.462 1.00 11.18 N\n\
HETATM 2 O HOH A 2 15.123 12.456 30.789 1.00 25.50 O";
let records = pdbreader_single(pdb_content);
println!("Parsed {} atom records", records.len());