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.21.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.21-cp313-cp313-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.12+ x86-64

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

Uploaded CPython 3.9Windows x86-64

chematic-0.4.21-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.21-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.21-cp39-cp39-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

chematic-0.4.21-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.21.tar.gz.

File metadata

  • Download URL: chematic-0.4.21.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.21.tar.gz
Algorithm Hash digest
SHA256 d8a35100e78611dc70b97c210fc6c8ecf9b9d2c3121db2148180cdca61740822
MD5 bf34e18619b547cff02596405568c1c5
BLAKE2b-256 4cefbe13c86d2641ec2b66d21870809aa490d87ecd632bfac5ab8654d3beeb2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21.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.21-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.21-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.21-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 295c60f8eed666ad6a562cf11ea1eb16c636f31d738ad3524d51f65c662e94cb
MD5 aa92467b0a2c1bc7e4449af9ce2b6f6f
BLAKE2b-256 2fa9ed6c06ba95fe3a220d74490b0ba06007f4bf098896080de5b8058025eba3

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cb03f1b4965e3011f5915fe5db2e59ef84909a1b538760ff78b324f4382248d2
MD5 81d0cbf889f1b3331dae2c275ce1d18a
BLAKE2b-256 2e59709275060d02eddb22b4abecbc4ba105b36f5e046a9b1164e29f24477639

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6e20a58b55fc79713a939bf6171bc2bfdc33cc89be8ea91f2a8b6513a62f9859
MD5 4435eadab646a56788b4eed138081283
BLAKE2b-256 925ff3f9bf97b93f3c55aa2a0b680e044ff14833db40fa82d9ff7725cc2afa09

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.21-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.21-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e3e5406fe9a37c06e9752c3dfbb6939c51962364652862eb2dc5e130e8db5b63
MD5 807f9f047f79e6497d6a59ea700c8a15
BLAKE2b-256 b0bd1754d218139259e5f43f748b76df3fb21eea32fbb65d72344139d3e15b52

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 514cc8b2b92ff2f21bb8838ecdeb99fe2a24c4fbb49158f8fdf26d9e4313474c
MD5 ef0a1e0b526b6292f5bfec4dd9cb6937
BLAKE2b-256 555a9a689c8e72f863259059303be482f4e4783ecef6bf1268920e3ea7f448db

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3a86907757ad7fbcaefc9cba97dbd6de6780d0070fea62b9ddcf952d697d2bd0
MD5 0063ecf4222731287964402a8ef398e3
BLAKE2b-256 4124e4f0e74d822a56949cc781e297e53d6feea44f2dc5b0b3dbb7b5eda3255d

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.21-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.21-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 48babf55e73c27ba9a2775371001ab2507fecc0c12ec1a54a9a75a950945a877
MD5 392271e5f47df6a4c43f4a297675bd5d
BLAKE2b-256 1ce59e56bc76a8813983e263ec4c4612a65195fe9b9b386ec96ce6e84a71943e

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b37dc08f5e16607dd4e11855cc65a611285f3f71c22b9c14c6b37921c2cbff69
MD5 d59acef9d4f5ad4dade0f8e48d3f50c5
BLAKE2b-256 ef130e708c2b0abdb1c7b477319a808196169c2ced9fba63d4e333e6c3f2e951

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 882d0536db9c38340595fa4882e6480773ea2b683cda16c3c22313bf698659ad
MD5 52372f1b5b8ecf5342b233abf70426d8
BLAKE2b-256 2a824ddeccb47caaf442e404c13927bfb1cda5a6429a253ea26a5957947dc020

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.21-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.21-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ea5cc991d206bb4716226c36279b91441289f80018113b5a139fe77f558d3ec5
MD5 9fbc2a727b99e95b2b62e812dce5beb4
BLAKE2b-256 82ae06e7df870191af99f3cbc3d40a5d390f5ce868140d268af12e2c891ac4bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ffc7961bfd6ccb1e0b3c894bf994698f0327dd2d7aef7605b41a11f5366264b7
MD5 7f0c2321d825a203f49a5cd5021decb4
BLAKE2b-256 0a04a784bd13342159fc89daae6ead856dd8a0f81e90afbca0796560a3192b95

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e8ef5d778a8521de3c95ccaea568eb1ff4bd22834d4c7da49d6aabcdd721c29d
MD5 72991f8e215df99405004b8e540bd072
BLAKE2b-256 7ba6da32e428f9a393562de293026cab9bea4f39ca85c8499877553cf202055f

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: chematic-0.4.21-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.21-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 17f74f80c1fd9f25584255264a9a5a579fa36da45867983a34f3d21b125dcbd3
MD5 40230cf737c373b4ba90f56d702fe7dc
BLAKE2b-256 555143d3eb927b5094f7c08f3a9850c4557d0b8f619c88ea28be959b6b49849d

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d2ad3aa32436de672cf3b66115844a0b3051772e559f5ae202acece5bb2ad257
MD5 13b23b1f8050a425e266a8240ad4294b
BLAKE2b-256 7b89fc83a983d6e4c31581b5d70d0a6474ee77e111f8d2899008496e22b58525

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 940bdcf9bbe35c95d2735546d35894ac129d24c775615e7b97820343b5626f09
MD5 9cbbcf061bbfefb149c98a83e388bf35
BLAKE2b-256 1bae16e8100eb28df40919dd2329bafad3444540a9adc1e0abed28d51a8d39ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 320e79f4b8187cbbb2815ecd8c94f7adfd7b684a7a43d8a847910f22a166eaa4
MD5 a71cedfdd944e23028e68a1473ce2cc2
BLAKE2b-256 c1cd6a310a55d2b949e303c3df4fa0b9470b3ba76aa45ec51fe52b6929a4219c

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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.21-cp39-cp39-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for chematic-0.4.21-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 96dd053af4ecc1ab224c59b1c53b5baaa04f0a307c1c3f6afb24613caf41e843
MD5 31123974587d62175f4180567ff7d691
BLAKE2b-256 5ac2880c3fe9b1b819e88ae696a92a14385b49c7af2d079061635836bb9ab7c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for chematic-0.4.21-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