1 unstable release
0.1.0 | Feb 5, 2024 |
---|
#762 in Science
9KB
113 lines
ChemString
ChemString provides a parser that allows you to convert a string to its representation(s) using chemical symbols.
Examples
use chemstring::ChemString;
let chem_string = ChemString::parse("seal").unwrap();
assert_eq!(chem_string, vec!["Se", "Al"]);
let chem_string = ChemString::parse("bichon").unwrap();
let possible_permutation = "Bi C H O N".to_string();
assert!(chem_string.results().contains(&possible_permutation));
License
This project is licensed under the MIT license.
lib.rs
:
A library for parsing strings into chemical symbols permutations.
Example
use chemstring::ChemString;
let chem_string = ChemString::parse("seal").unwrap();
assert_eq!(chem_string.results(), vec!["Se Al"]);
let chem_string = ChemString::parse("bichon").unwrap();
let possible_permutation = "Bi C H O N".to_string();
assert!(chem_string.results().contains(&possible_permutation));
Dependencies
~260–720KB
~17K SLoC