pub fn index(mol: &Molecule) -> u32
Expand description
Compute a molecule’s assembly index using an efficient default strategy.
§Example
use assembly_theory::assembly::index;
use assembly_theory::loader::parse_molfile_str;
// Load a molecule from a .mol file.
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.");
// Compute the molecule's assembly index.
assert_eq!(index(&anthracene), 6);