Expand description
Expose public assembly_theory
functionality to a Python package using
pyo3
.
The package is available on PyPI; see that README for installation and usage instructions. To build the Python package directly from this crate’s source code, see the instructions in the GitHub README.
Note that all Rust functions in this module have the form _fn_name
, which
correspond to the actual Rust function fn_name
elsewhere in the crate and
are exposed to the Python package as fn_name
.
§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
Functions§
- _depth
- Compute assembly depth; see Pagel et al. (2024).
- _index
- Computes a molecule’s assembly index using an efficient default strategy.
- _index_
search - Computes a molecule’s assembly index and related information using a top-down recursive search, parameterized by the specified options.
- _mol_
info - Get a pretty-printable string of this molecule’s graph representation.