Skip to main content

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

assembly_theory-0.5.0.tar.gz (219.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

assembly_theory-0.5.0-cp310-abi3-manylinux_2_28_x86_64.whl (508.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

assembly_theory-0.5.0-cp310-abi3-manylinux_2_28_aarch64.whl (486.2 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

assembly_theory-0.5.0-cp310-abi3-macosx_11_0_arm64.whl (442.4 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

assembly_theory-0.5.0-cp310-abi3-macosx_10_12_x86_64.whl (460.5 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file assembly_theory-0.5.0.tar.gz.

File metadata

  • Download URL: assembly_theory-0.5.0.tar.gz
  • Upload date:
  • Size: 219.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.3

File hashes

Hashes for assembly_theory-0.5.0.tar.gz
Algorithm Hash digest
SHA256 cf5249efea4861f3cfa7047ee3668d6d79584478c700b834ad9fe03f58fe35b6
MD5 10757655858f317f930e2c7359209f04
BLAKE2b-256 912c2003d72c46bbab0272e795aaefffa986f57010088760e58738ae8379998b

See more details on using hashes here.

File details

Details for the file assembly_theory-0.5.0-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for assembly_theory-0.5.0-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7d15afa32f64be27774da330fbfc6bb4655a2f9d04ab941a55aa22ab5b7941b1
MD5 f1d9ca5032b2c5b567628d37116f938f
BLAKE2b-256 a0d8142f65f873dc6409694bf1f1461bb5c9bd734905e3b630eb388f89328573

See more details on using hashes here.

File details

Details for the file assembly_theory-0.5.0-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for assembly_theory-0.5.0-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1f8ec4d2f0f1354986387963b800f6472f053994347aee98d8aef5d64510f460
MD5 47e3d4966962e2e352618cfd091ff4a8
BLAKE2b-256 ff6308bd7bead02f7f07f7f397ecf8ac665c13874ca180067345c91443106535

See more details on using hashes here.

File details

Details for the file assembly_theory-0.5.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for assembly_theory-0.5.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38a811f68512d6026973a53e129035a7e6d470e28e5294fed7005ed6ba1e5602
MD5 2805121ef4c931b73a68fd5d4d0c99e2
BLAKE2b-256 2f743c942f7b86afd393396f60d0db399c6edc288620f0ad57abe5c31f4f8272

See more details on using hashes here.

File details

Details for the file assembly_theory-0.5.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for assembly_theory-0.5.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 eba25413f5390a91346a0bff5aeab48ee8f63e702ad915d1f7086d66d70fa24b
MD5 30f307a5652673475f5e32a3e40a3830
BLAKE2b-256 fb33606038bd37ea5b052cf926e87654b8efdb9c94be91277b04531b90ad0451

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page