Function _index

Source
pub fn _index(mol_block: &str) -> PyResult<u32>
Expand description

Computes a molecule’s assembly index using an efficient default strategy.

Python version of index.

§Python Parameters

  • mol_block: The contents of a .mol file as a str.

§Python Returns

  • The molecule’s int assembly index.

§Python Example

import assembly_theory as at

# Load a mol block from file.
with open('data/checks/anthracene.mol') as f:
    mol_block = f.read()

# Calculate the molecule's assembly index.
at.index(mol_block)  # 6