8000 GitHub - PatrickPenner/mol-parsing
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PatrickPenner/mol-parsing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mol Parsing

Demo of Rust molecule file format parsing using a grammar-based parser generator.

Grammars are based on the following:

The main dependencies are:

  • pest, parser generator
  • serde, JSON serialization
  • flate2, GZIP decompression

See the Cargo.toml for details.

Usage

Ensure you have rustup installed. You can also get Rust over conda:

conda install -c conda-forge rust

Clone and enter this project and run the tool using cargo:

git clone https://github.com/PatrickPenner/mol-parsing
cd mol-parsing
cargo run --release  # building for release makes a significant difference when parsing larger databases

This should run the build and give you this usage at the end:

Usage: main <format: smiles | sdf | sdfgz | pdb> <path to file>

You can now run the tool with whatever input file you have, for example the ChEMBL 33 in .sdf.gz:

cargo run --release sdfgz chembl_33.sdf.gz

Grammars

The grammars can be found in src/grammar and you are encouraged to hack around in them. A very useful tool is pest's web-based tool to write grammars at pest.rs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0