pub fn parse_molfile_str(input: &str) -> Result<Molecule, ParserError>
Expand description
Parse a string containing the contents of a .mol
molecule data file and return a
crate::molecule::Molecule
object.
If the file string is malformed, a self::ParserError
is thrown.
ยงExample
// Read a molecule data file as a string of lines
let molfile = fs::read_to_string(path)?;
let molecule = loader::parse_molfile_str(&molfile).expect("Cannot parse molfile.");