remove_remark

Function remove_remark 

Source
pub fn remove_remark(pdb_f: &str) -> BufReader<Cursor<Vec<u8>>>
Expand description

Removes lines starting with “REMARK” from a PDB file and returns the filtered content as a BufReader.

This function reads a Protein Data Bank (PDB) file, filters out all lines that start with the keyword “REMARK”, and returns the remaining content as a BufReader over an in-memory buffer. This allows for further processing of the filtered content without needing to write it to a temporary file.

§Arguments

  • pdb_f - A string slice that holds the path to the input PDB file.

§Returns

  • BufReader<Cursor<Vec<u8>>> - A BufReader containing the filtered content.

§Panics

This function will panic if the input file cannot be opened or read.

§Examples

use pdb_handler::remove_remark;
use std::io::BufRead;
let reader = remove_remark("example-pdbs/1crn.pdb");
for line in reader.lines() {
    println!("{:?}", line.unwrap());
}