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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.10macOS 10.12+ x86-64

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

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

chematic-0.4.22-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.22.tar.gz.

File metadata

  • Download URL: chematic-0.4.22.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.22.tar.gz
Algorithm Hash digest
SHA256 ce750a446f6b69429fbd608b6d8c4e6f43d3a289d8eeb418446fc93629cace4f
MD5 914332b73ffd9e4bf8e225e0052ccc3a
BLAKE2b-256 ace30fbd9540b0189d49d850476ab6e53cd86f6720a7f3c26595dcc4f3296792

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: chematic-0.4.22-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.22-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 12afea7cf7400469b28c6e3e1acdc4d2ae3551c0ec9e3ec4620083c6aac48b4f
MD5 a5cdfc2fa07a7d9199ec4a7d9781723b
BLAKE2b-256 7cbfe8462ea7c9545c25b05fcc9dad75ac5e9c1e02b22c35db6692b5ef9164b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 195b0ef1b8a76dbd7312de058b11e2f59b76ca5191e385d8178a31074bef37bc
MD5 e8518aa786ff9ee919a3ab53e324b3cc
BLAKE2b-256 ab9e2fdfd24fae8a22de0c601cc99aae3ca9bbe3ce3aa64377b094ea2c27be30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 495dff19cbaaf2426e571cf9ec97b9d4d5380801f41f3d6ac51d2f6f818b5f9b
MD5 a6f4b7eabfd45dace8dcc8af793c3802
BLAKE2b-256 01dde5056b88c237180b41a3cdbf3c517ef1261ff493fbfc8d119caeaf8fd130

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: chematic-0.4.22-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.22-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 47ce144b9cfbe0a48ff3ebd633ecca5f48b6595361553612e709568d45420a50
MD5 3bd8f8befe2d3246ca794c7fec37ed14
BLAKE2b-256 9a165b20b7276f256a1ee8a5a3601802739bff202fd8eca434e010f09a5c591d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 13d943a99c19f2355cda097b8aff28823c36152750388f269f4941fe5bc74963
MD5 8b952b936291a8d5b3a577b2a727eb6e
BLAKE2b-256 00eb84de8f62984eeccd24301fad9daa48e0abf200c760bf59d534a3afd8ccd3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 94659d7a743efa249c4eefdf11a5e6adfcbf9aed2a8c8d0c375f694f76f0141d
MD5 fb0af8029d1bc57fd3ce8aa26976fae2
BLAKE2b-256 147e61864e280fd06e83a1fb6f0dcbe2c711967e8ed21f6632ddcdbdfaf4acdc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: chematic-0.4.22-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.22-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6e31d98197a7b1c52ace7a99c80a97f142e184cae862ff2c647a941ed75a3726
MD5 d6c0943c83d7bd1cc86156453bff39d6
BLAKE2b-256 a989a3d09c2cf37d3486c81fbb24ac1c3dea54a9ddc55d265a6159360542ea09

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 40aa8ba16e2d8d9aab975784cb0cb78a51452dfd0d6478dacf18580877a24367
MD5 042e5c02d9d44e57489e00a7b4e13e6c
BLAKE2b-256 ff3e9c7bd5a4ec2c285bbd6b24ad76f706189a31306cb3252143bfcb2e30aa16

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 06433d0a9b7486db92ce0cca77d17466b04185eed9455907b9cb0db7496cfe7b
MD5 25429617c2530b90a5c7ed5d66452168
BLAKE2b-256 4d3bd61d0617c969cac943b1be56137b4d52631f2884f205ae1a41707bc814f0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: chematic-0.4.22-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.22-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 69325b5fdf40a3c81b92e93a8a70ab76462da0e46bbf99d5a40fdf26b64c680b
MD5 1fdc85b622091ebb770941b1821b3b45
BLAKE2b-256 6611f6c12b16496d1d3f988abf65fd65c88e49ad768787006aa4b5026ef98e37

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18bb27b6b41524c3ef9f163cef90e63bfef7e1ca1bf01af847f9f665700d4115
MD5 68faeae1e2d6dddde586ed3647928464
BLAKE2b-256 3ea4db2be0200fd0081a84cb8d4c1d2a9f573a2cfe0d686bfcff5a48e1ae80a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b412e3ebf8b2f0c16551237a3a6e3ff38a6576dc245a8b14ab29fe9b993f6474
MD5 302410767317e9df845f20a43ae4ec1d
BLAKE2b-256 1ede2b0c96d6da8d32c1685408e33388490db35dd64d5d6b883a7c23af14ca38

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: chematic-0.4.22-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.22-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d38fdab73da48b4798b1c4d122900eebd79a0921076e02033a73119cbdce1106
MD5 f3dab698a1cb98c2387ebe7946138e7e
BLAKE2b-256 0284f2ff417c7ea1342cc31bb376fe84fa96fd8d181f17176e7a94540cdbf321

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a21a518111bc6543b2a8e10d76438538ae1235578694eacaf0abf1a9e6e05d46
MD5 0a149b06a7008ddfaaf51f4659ad1c20
BLAKE2b-256 4a0b06e0f3dbbf2b9c4cbfb808939007c46bb081b99e91a2979ab72decfd5de6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b81cdc0a2b13b21b3ac9c2c40fb4d2ef4ae550441dd77391992953733b0e82c6
MD5 5496e4b1010686a6654175b3b90428d5
BLAKE2b-256 3cab9cb3c26dc5182ac38864d80253a047767e1c1283a322595f77094c1a1419

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 82c0167d37bde2ebf86b20266758b2f35cf205919599ccaf984469d1188853c3
MD5 489bbef850bcc0897ac641bdd5dadac5
BLAKE2b-256 ac77bd16729960050c3b36ba9429c1b21fe2e93c56114a36de20b23c507d9456

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for chematic-0.4.22-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 beaad57b299b917d24188099be350a5640156155839711a515ecb11e71667cb3
MD5 eeceef6893c95e8a890acf6e131c8c69
BLAKE2b-256 bc9b35417be1c8a2b0b57ca28a67b97a02dadf42b756758563554493189c3b7f

See more details on using hashes here.

Provenance

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