Skip to main content

Pure-Rust cheminformatics — SMILES, fingerprints, 70+ descriptors, pKa, ADMET

Project description

chematic

Pure-Rust cheminformatics library for Python — SMILES parsing, 70+ molecular descriptors, fingerprints, pKa prediction, ADMET profiling, and template-based retrosynthesis.

Installation

pip install chematic

Quick Start

import chematic

mol = chematic.from_smiles("CC(=O)Oc1ccccc1C(=O)O")  # aspirin

print(mol.mw)      # 180.16
print(mol.logp)    # 1.31
print(mol.tpsa)    # 63.6
print(mol.qed)     # 0.55

# New descriptors
print(mol.vabc)              # van der Waals volume (no 3D needed)
print(mol.schultz_mti)       # Schultz MTI
print(mol.gutman_mti)        # Gutman MTI*
print(mol.gravitational_index)  # gravitational index

# pKa prediction
print(mol.pka())   # {"most_acidic": 3.49, "most_basic": None}

# ADMET profile
print(mol.admet())
# {"bbb": False, "bbb_score": ..., "caco2": ..., "herg_risk": ..., "cyp3a4_risk": ...}

# Fingerprints (bytes, 2048-bit ECFP4)
fp = mol.ecfp4()

# Tanimoto similarity
mol2 = chematic.from_smiles("c1ccccc1")
sim = chematic.tanimoto(mol.ecfp4(), mol2.ecfp4())

# Natural-language property summary (for LLM / MCP agents)
print(mol.describe())

# Structural diff between two molecules
ibuprofen = chematic.from_smiles("CC(C)Cc1ccc(CC(C)C(=O)O)cc1")
d = mol.diff(ibuprofen)  # {"summary": "...", "delta_mw": 66.1, "delta_logp": 2.75, ...}

# SVG / PDF / EPS depiction
svg = mol.to_svg()
pdf_bytes = mol.to_pdf()   # bytes; requires pdf feature
eps_str   = mol.to_eps()   # PostScript string

# ChemicalJSON (Avogadro 2 / MolSSI)
cjson_str = mol.to_cjson(coords=[])   # coords: list of (x,y,z) tuples, optional
mol2, coords = chematic.from_cjson(cjson_str)

# Template-based retrosynthesis (60 retro-SMIRKS templates)
mol3 = chematic.from_smiles("CC(=O)Nc1ccccc1")  # acetanilide
results = mol3.retro_disconnect(max_results=5)
for r in results:
    print(r["template"], "→", r["precursors"])
# amide_secondary → ['CC(=O)O', 'Nc1ccccc1']

# Filter by reaction class
amides = mol3.retro_disconnect(reaction_class="AmideBond")

# Bulk substructure match against a pre-parsed Mol list (returns indices)
mols = [chematic.from_smiles(s) for s in ["CCO", "c1ccccc1O", "CC(=O)O"]]
hits = chematic.bulk.substructure_match("[OH]", mols)  # → [0, 1, 2]

# All descriptors as a dict (for Pandas)
import pandas as pd
smiles = ["CCO", "c1ccccc1", "CC(=O)O"]
df = pd.DataFrame([chematic.from_smiles(s).descriptors() for s in smiles])

Features

  • Zero C/C++ dependencies — pure Rust, no RDKit or OpenBabel required
  • SMILES / MOL / SDF / ChemicalJSON parsing and writing
  • 70+ descriptors: MW, LogP (±0.3 vs RDKit), TPSA (±1.0 Ų), QED, Fsp3, SA Score, HBD (100% vs RDKit, incl. S-H), vabc, schultz_mti, gutman_mti, gravitational_index
  • 14 fingerprint algorithms: ECFP2/4/6, FCFP4/6, MACCS, AtomPair, Torsion, …
  • pKa prediction (15 SMARTS rules — unique to chematic)
  • ADMET profile: BBB, Caco-2, hERG, CYP3A4
  • Template-based retrosynthesis: mol.retro_disconnect() — 60 retro-SMIRKS templates, SA Score ranked
  • SMARTS substructure searchchematic.smarts_match() and bulk.substructure_match(smarts, mols) (pre-parsed Mol list, returns indices)
  • SVG / PDF / EPS depiction: mol.to_svg(), mol.to_pdf(), mol.to_eps()
  • ChemicalJSON: mol.to_cjson(coords=[]), chematic.from_cjson(s) — Avogadro 2 / MolSSI compatible

License

MIT OR Apache-2.0

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

chematic-0.4.20.tar.gz (2.2 MB view details)

Uploaded Source

Built Distributions

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

chematic-0.4.20-cp313-cp313-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.13Windows x86-64

chematic-0.4.20-cp313-cp313-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

chematic-0.4.20-cp313-cp313-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

chematic-0.4.20-cp312-cp312-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.12Windows x86-64

chematic-0.4.20-cp312-cp312-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

chematic-0.4.20-cp312-cp312-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

chematic-0.4.20-cp311-cp311-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.11Windows x86-64

chematic-0.4.20-cp311-cp311-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

chematic-0.4.20-cp311-cp311-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

chematic-0.4.20-cp310-cp310-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.10Windows x86-64

chematic-0.4.20-cp310-cp310-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

chematic-0.4.20-cp310-cp310-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

chematic-0.4.20-cp39-cp39-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.9Windows x86-64

chematic-0.4.20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

chematic-0.4.20-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

chematic-0.4.20-cp39-cp39-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

chematic-0.4.20-cp39-cp39-macosx_10_12_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.9macOS 10.12+ x86-64

File details

Details for the file chematic-0.4.20.tar.gz.

File metadata

  • Download URL: chematic-0.4.20.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chematic-0.4.20.tar.gz
Algorithm Hash digest
SHA256 2418e028f8c37dd179f7a51649586e5686512b5300da7fcea4185002977cd2a3
MD5 628021074b5e9f840c8c41d8169b587d
BLAKE2b-256 ad87b207110a2848779485df22dadeac876d30af06c22819e609926b348df68a

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20.tar.gz:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.20-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chematic-0.4.20-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 49d966e2c44866fdb9cae0859e515965e1166ad91907f56987af2081e9d6674b
MD5 0f2def58ab148d7a666b0ad63fe56359
BLAKE2b-256 8a6f69e0fa05635be7cdc170900515062e998798ba908f1cff940ddeb938504c

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp313-cp313-win_amd64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 62fbd179be465b3507e774a00b9c2271a661d345ce07aed27a23f41dc8148f75
MD5 c8c2375f432c309e2bf787ca0ec046a6
BLAKE2b-256 596c7bc14ac6e3e32628da25ac410e0a25fb9392b5aef9df5a7ccbe489dde3e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b389de9e359472a014bf6b8fab511500065840bb366602fdb00af536c55fbbfa
MD5 b4d10fde16fcef6515f4fb937af87475
BLAKE2b-256 2d10e9ed73871ddd8cf603b153c5dd06b8e54c2735c5bd927295df4fd87162d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp313-cp313-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.20-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chematic-0.4.20-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ecdbd1fb7004ec3b3c476f7b4802798da671f7de5ae8a18848c2e4a297622c0c
MD5 84add5deb0224d4823aefc44d7b4d532
BLAKE2b-256 e2b6ebdc51bf99d426f5f8ef8adcc5a46b8d7c0a0ce7d8e19516fab4b1cdc638

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp312-cp312-win_amd64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a65cd0b25e3bc5a047258248ab706dc09f01bdb338ddc69bc1f6d2c032d69a82
MD5 d13bb1927b3f88e1c333a3ff2e2f70f8
BLAKE2b-256 436b8e3d856e33d74c2fb3ffb46523dfb1e8288fb7590970e30f3619c5b2a0ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4f43362c501f7e879ac85377ac36ae8894df730556b38651ff34e6054b1b78c6
MD5 97b0e981419b1e1000293a5f9c588b61
BLAKE2b-256 2900c0cb5edf4b51774d7fbffc061867a9e6c7e93b3ca58d139a68d15f9c64b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.20-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chematic-0.4.20-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c439d9e02321f330a4143c2ffd2c0e80e63bfee9bedfdb1be233008e31c2f859
MD5 259b775387c5e63465f2c8913517a12e
BLAKE2b-256 c98d401d480df25b2f1815113a37cec9c411edc0bd3c22074fac92d38bddfe00

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp311-cp311-win_amd64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2de4f8c046e40366fa02a789db3c734e64c9809927610484618d941b68963473
MD5 351023b74f6aed98a084e6277b772e8e
BLAKE2b-256 9626239b27d897179944bbdcbb860d9053ab50975ae91aaae1ffc9eba1a230a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9a744e720d2058fb654335a2176de41af6417ab992eeda67b0831163ca1c9895
MD5 d70857a14cf093a0cfc88d5f99faae92
BLAKE2b-256 25f1acc79b049f62d2696314ae57093e6fa45abf2b9cea95dc9c6e2ca75edb19

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.20-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chematic-0.4.20-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d7410c121515a4b613bdd268af446a10c8df1ae827e683493e0c69c22e576dc1
MD5 7e10492a7b5d82f92c73a242266f7fc0
BLAKE2b-256 5d58b1a617adc011f09501db1f0c567dad699c0f6b14f7d42f54aa63a0356ff6

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp310-cp310-win_amd64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c450e86c249d4f6d648f6a374c35ab41e941422c01fc5bdd7225a14f60a18133
MD5 519b65c5cda62b13229116851135f4ba
BLAKE2b-256 797f7959bb6623b644241b92e3fecf5eeae00abac1e24d96ef2c94660696d49d

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 58004fef00a90710644c9169f9abec59a06aabbec6c907b47b97a907f57d0b77
MD5 f8c358c2885fbfd112caf595bed90a91
BLAKE2b-256 1a50da6e7d931684d653b378a9f7c0b1bcbeffa0df7b5b3c181498cf4716d5a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.20-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for chematic-0.4.20-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 81e33813bb1f60cebab80d9cfa8040114bd9ccb20cc2f33a3a9c876cb8ab39d6
MD5 68628096dd946ad844ad7a93d4f58414
BLAKE2b-256 8449fce18baf6c0dc8cbe989082ceda64ad530cb3ed76a7f2a148230e796c40e

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp39-cp39-win_amd64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f9daab52ce0deb307dc2b844a6583889b8b4e1da33dcf2d691025543f0978cd
MD5 e9fcd0d5191064d72b49012b56bc45fa
BLAKE2b-256 20cc81593353d7dc8ffe01c3c2c682b647fcbce9975e539b06a209ef14e894fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a908d17446f9bb062e2bb807295d452db31a500b14e7071c7b801ce5cee3c313
MD5 8fdf92170ace835debe090cb68f4549b
BLAKE2b-256 d88043e5e267ff19b078e0dc517f4557b11ac394fecf7a6fb3db3b2fb90ccbc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6db076c9186af9e6da1f39c147dce34a5a0cc6033b3b8fc399522fc8ac7daca
MD5 213ec3cbdb680048295e4dddfb2dc6ae
BLAKE2b-256 6b2ac8698929ea73f330f42fc8d563be2330c2b35f1df5463ff27e4e95494afe

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chematic-0.4.20-cp39-cp39-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.20-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f2adf9ce7206d4d31b4b4024b12ba0aefa33d2f424f1db30b831f5248bf6cde8
MD5 1f39354ccd62e73423686a3745274e99
BLAKE2b-256 56d1d79d042ea730469299129131d5f09b1d78b091a0fcd32225bf4fbd7c2ed0

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.20-cp39-cp39-macosx_10_12_x86_64.whl:

Publisher: publish-pypi.yml on kent-tokyo/chematic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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