pub fn parse_molfile_str(input: &str) -> Result<Molecule, ParserError>
Expand description
Parse the contents of a .mol
file as a Molecule
.
If the .mol
file contents are malformed, a ParserError
is thrown.
ยงExample
use assembly_theory::loader::parse_molfile_str;
let path = PathBuf::from(format!("./data/checks/anthracene.mol"));
let molfile = fs::read_to_string(path)?;
let anthracene = parse_molfile_str(&molfile).expect("Parsing failure.");