Open, reproducible calculation of assembly indices
Project description
assembly-theory
assembly-theory is an open-source, high-performance library for computing assembly indices of molecular structures (see, e.g., Sharma et al., 2023; Walker et al., 2024).
This Python package wraps the functionality of the assembly-theory Rust crate for easier interoperability with existing cheminformatic libraries (e.g., RDKit) and computational pipelines.
If you're looking for the Rust crate or standalone executable versions of assembly-theory, or if you're trying to build this Python package from source, see our GitHub repository.
Installation
Install assembly-theory using a Python virtual environment manager of your choosing:
pip install assembly-theory # Using pip.
pipx install assembly-theory # Using pipx.
uv add assembly-theory # Using uv.
Usage
assembly-theory exposes several functions, all of which expecta "mol block" (i.e., the contents of a .mol file as a string) as input.
For example:
import assembly_theory as at # Note the '_' instead of '-'!
# Load a mol block from file.
with open('anthracene.mol') as f:
mol_block = f.read()
# Calculate the molecule's assembly index.
at.index(mol_block) # 6
Combine assembly-theory with RDKit (installed separately) if you need to manipulate molecular representations or incorporate assembly index calculations in a broader cheminformatics pipeline.
import assembly_theory as at
from rdkit import Chem
# Get a mol block from a molecule's SMILES representation.
anthracene = Chem.MolFromSmiles("c1ccc2cc3ccccc3cc2c1")
anthracene = Chem.MolToMolBlock(anthracene)
# Calculate the molecule's assembly index.
at.index(anthracene) # 6
See the assembly_theory::python documentation for a complete list of functions exposed to this package along with usage examples.
Citation
If you use this package in your own scientific work, please consider citing us:
Coming soon!
License
assembly-theory is licensed under the Apache License, Version 2.0 or the MIT License, at your option.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file assembly_theory-0.5.1.tar.gz.
File metadata
- Download URL: assembly_theory-0.5.1.tar.gz
- Upload date:
- Size: 219.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe1ae39e32d6837ae9529cc8db9f2c21c46e8d57524d688f0569de96f3c42233
|
|
| MD5 |
a22eb2c4552222e9ee27cf7cb8ab5ce3
|
|
| BLAKE2b-256 |
6b983ef3e954bb7e4d71d75720e8e618f9d62bc2181d809e4e05160cca9072d2
|
File details
Details for the file assembly_theory-0.5.1-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: assembly_theory-0.5.1-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 510.0 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6587316026695a6925312eafbe4eec78ef276f4db9ee0c065047fc6f878cd995
|
|
| MD5 |
8391b13eb1f41b2eddc90a7721558132
|
|
| BLAKE2b-256 |
1719376e7dbcb7dec243ac9f89f4e4233e595e86a1791c61eb40116747a668bf
|
File details
Details for the file assembly_theory-0.5.1-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: assembly_theory-0.5.1-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 489.1 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcb9b91d73ae948d05a18acc7dffc08dac1d1ca8d5c6fd03381740bf665d86cf
|
|
| MD5 |
b4df68afff93d08d0fe32cc40633dc6d
|
|
| BLAKE2b-256 |
ee5c2daca1da0e7938bdee9a57c3770ff96efe1936f17d9a28705f7832652d7e
|
File details
Details for the file assembly_theory-0.5.1-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: assembly_theory-0.5.1-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 440.9 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d13c60f10c82be949e61003d1232a31e1ea3df14328aab395300af9b5ac0e0c4
|
|
| MD5 |
22eaeff1d22e1c23372020ed281cc197
|
|
| BLAKE2b-256 |
10ecd8f5014be02a0617c192f213acd0aa45918c33ad79e32f07b972f916f370
|
File details
Details for the file assembly_theory-0.5.1-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: assembly_theory-0.5.1-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 457.5 kB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fadedf7e1708d47cbe64c6abd2e4bdc53b58ce0d07b099bb8c9a91443bb67e7
|
|
| MD5 |
11542292f833cbb5a144ed2c02397a5b
|
|
| BLAKE2b-256 |
075ba38b602b6c4e2971044b38a7b47a3f99fe52c1ad9e73f393e80e39b604ea
|