Patoz

Protein Data Bank (pdb) file parser

Build Status License

⚠️ WIP This is a work in progress. Expect breaking changes frequently. Right now use at your own risk

📦 Cargo.toml

patoz = {git = "https//github.com/orhanbalci/patoz"}

🔧 Examples

```rust

use std::{ fs::File, io::{BufReader, Read}, path::PathBuf, };

use patoz::parse;

fn main() { let mut currentfilepath = PathBuf::from(file!()); currentfilepath.pop(); currentfilepath.pop(); currentfilepath.push("1BYI.pdb"); let content = readfile(&currentfilepath); if let Ok((, mut res)) = parse(&content) { println!( "Classification : {:?}", res.header().header().unwrap().classification ); println!("Id Code : {:?}", res.header().header().unwrap().id_code); println!("Keywords : {:?}", res.header().keywds().unwrap().keywords); } }

fn readfile(path: &PathBuf) -> String { let file = File::open(path).unwrap(); let mut bufreader = BufReader::new(file); let mut contents = String::new(); if let Ok(readres) = bufreader.readtostring(&mut contents) { contents } else { "".toowned() } } ```

📊 Status

Record Parser Status

Title Section