Function from_file

Source
pub fn from_file(filename: impl AsRef<Path>) -> Result<(Vec<Atom>, Vec<Bond>)>
Expand description

Parses a file based on the FileType and returns a vector of Atom and a vector of Bond objects.

ยงExamples

use chelate;
let (atoms, bonds) = chelate::from_file("data/147288.cif").unwrap();

assert_eq!(atoms.len(), 206);
assert_eq!(bonds.len(), 230);