pycchem
Python bindings for cchem - a high-performance cheminformatics library.
Features
- Fast SMILES canonicalization - 2-3x faster than RDKit
- 1600+ molecular descriptors - Comprehensive descriptor set
- Molecular sanitization - Salt removal, neutralization, aromatization
- Pure C backend - No heavy dependencies
Installation
pip install pycchem
From Source
git clone https://github.com/Vitruves/cchem.git
cd cchem/pycchem
pip install .
Quick Start
Canonicalization
import pycchem
# Canonicalize a SMILES
canon = pycchem.canonicalize("C(C)O")
print(canon) # CCO
# Check if two SMILES are equivalent
pycchem.are_equivalent("CCO", "OCC") # True
# Validate SMILES
pycchem.validate("CCO") # True
pycchem.validate("invalid") # False
Sanitization
import pycchem
# Remove salts and neutralize
clean = pycchem.sanitize("[Na+].CC(=O)[O-]")
print(clean) # CC(=O)O
# Specific operations
pycchem.sanitize("C1=CC=CC=C1", operations=["aromatize"]) # c1ccccc1
Molecular Descriptors
import pycchem
# Create a molecule
mol = pycchem.Molecule("CCO")
# Compute all descriptors (1600+)
descriptors = mol.descriptors()
print(descriptors["MolecularWeight"]) # 46.069
print(descriptors["CarbonCount"]) # 2
# Compute specific descriptors
selected = mol.descriptors(["MolecularWeight", "WCLogP", "TPSA"])
# List available descriptors
names = pycchem.list_descriptors()
print(len(names)) # ~1600
Batch Processing
import pycchem
smiles_list = ["CCO", "c1ccccc1", "CC(=O)O"]
results = pycchem.canonicalize_batch(smiles_list)
Command-Line Interface
After installation, the cchem command is available:
# Canonicalize SMILES
cchem canonicalize -S "C(C)O"
# Output: CCO
# Validate SMILES
cchem validate -S "CCO"
# Output: CCO: valid
# Compute descriptors
cchem compute -S "CCO" -d MolecularWeight
# Output: MolecularWeight: 46.069000
# Compute all descriptors
cchem compute -S "CCO" --all -o descriptors.csv
# List available descriptors
cchem compute --list
# Sanitize SMILES
cchem sanitize -S "[Na+].CC(=O)[O-]"
# Output: CC(=O)O
# Compare two SMILES
cchem compare "CCO" "OCC"
# Output: equivalent
# Show version
cchem --version
CLI Commands
| Command | Description |
|---|---|
canonicalize |
Canonicalize SMILES strings |
validate |
Validate SMILES syntax |
compute |
Compute molecular descriptors |
sanitize |
Sanitize SMILES (remove salts, neutralize, etc.) |
compare |
Check if two SMILES are equivalent |
API Reference
Functions
| Function | Description |
|---|---|
canonicalize(smiles) |
Canonicalize SMILES string |
canonicalize_batch(list) |
Batch canonicalization |
sanitize(smiles, operations) |
Sanitize molecule |
validate(smiles) |
Check SMILES validity |
are_equivalent(s1, s2) |
Check if SMILES are equivalent |
compute_descriptor(smiles, name) |
Compute single descriptor |
compute_descriptors(smiles, names) |
Compute multiple descriptors |
list_descriptors() |
List all descriptor names |
version() |
Get library version |
Molecule Class
mol = pycchem.Molecule(smiles)
mol.canonical_smiles # Canonical form
mol.descriptors() # All descriptors
mol.descriptor(name) # Single descriptor
Sanitization Operations
| Operation | Description |
|---|---|
complete |
Full sanitization (default) |
unsalt |
Remove salts/counter-ions |
aromatize |
Perceive aromaticity |
kekulize |
Convert to Kekule form |
neutralize |
Neutralize charges |
normalize |
Normalize functional groups |
remove_stereo |
Remove stereochemistry |
remove_isotopes |
Remove isotope labels |
remove_h |
Remove explicit hydrogens |
Performance
Benchmarks on MacBook Air M3 (8-core, 16GB RAM):
| Library | Throughput | vs RDKit |
|---|---|---|
| pycchem | 28,311/s | 2.52x |
| RDKit | 11,229/s | 1.00x |
Requirements
- Python 3.9+
- cffi >= 1.15.0
License
Apache License 2.0
Metadata
Release files for pycchem 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pycchem-1.1.0.tar.gz | 668.8 kB | Details |
Built distributions (wheels)
Total release size: 18.1 MB
Release files / pycchem-1.1.0.tar.gz
| Download URL | pycchem-1.1.0.tar.gz |
|---|---|
| Size | 668.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f684ff876df7c37c7e065d6bf166c3e0df6e0835f627ccc54846f1dc924a3950
|
|
BLAKE2b-256 checksum How to use checksums |
df91301df35fb266e8f34c2acdb238f7bed5dca469cdb110be535e9f0347018d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp312-cp312-win_amd64.whl
| Download URL | pycchem-1.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
57f1eb04d04fbcdcaf8350ca29fcc510b247a54782426c583761d58cc85e8077
|
|
BLAKE2b-256 checksum How to use checksums |
9a47c1857e2e54baf782603634164adb9a99010a192d5c85adf256afa522d466
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pycchem-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
4b47f9fb89da7fc5be3d94ff2e5d3e74c72aa7c1636e2677791d293da7ed1503
|
|
BLAKE2b-256 checksum How to use checksums |
e513de057f383d7e990ae12f85305363c99cde54ae3469d3256c0bcae4a589b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pycchem-1.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 665.6 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
32a9aeca146a60d225c32d2cacc21be6317684aae159431b5cb71f95ba8f7884
|
|
BLAKE2b-256 checksum How to use checksums |
b5f1378c9b65a7d4f7ff9d96f2c4e2e2e3e249c703b520679397ba0f827a3e14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp312-cp312-macosx_10_9_x86_64.whl
| Download URL | pycchem-1.1.0-cp312-cp312-macosx_10_9_x86_64.whl |
|---|---|
| Size | 725.1 kB |
| Tags | CPython 3.12 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
d9d8f2fde0984980545acd5f34ab6f59c0d684d9eaa2a92d69050d6233d2a9fd
|
|
BLAKE2b-256 checksum How to use checksums |
9af9d81fd2f691ea25fd4a4ded1a7b9db0b50f252ec4be58dd131ed6438a1395
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp311-cp311-win_amd64.whl
| Download URL | pycchem-1.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b22be20f66f77a4234d9c609f63dcba91f41fd25e32a3910fdba5d331afa35a6
|
|
BLAKE2b-256 checksum How to use checksums |
b04474449f1ab82ee3bb35501c99b7cb809f173670f71479ac3a1e9403ac213f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pycchem-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
5034aefb35dcc0be32bd1d0345450a258e3b9b98a7a2e47c825ce1dd60386a5c
|
|
BLAKE2b-256 checksum How to use checksums |
f8e4c888d27358c2fff69d0fa24aac21901de7ab95ce295cc45362c290fa3639
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | pycchem-1.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 665.6 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
38d575a6aa0cc19db7e137fa44b7eaffa391d911bb3ea80210a6367e905645e1
|
|
BLAKE2b-256 checksum How to use checksums |
6c2ed6db96f8e248aa6fb9cdc2bbb50f6d9dd1e7237fdee47f5938ddd30fa5b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | pycchem-1.1.0-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 725.0 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
23e3af6fc4c6d8b8bca98a30dcef3d21277fb62d8cd96fdb8065c48db7a715a6
|
|
BLAKE2b-256 checksum How to use checksums |
4ffefb13efdf785a85971969cc263122b1618a4680749c47ae790f5330f92e23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp310-cp310-win_amd64.whl
| Download URL | pycchem-1.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fdef092c87f21601d4a7d14aac169dfbea2e7bcd540a2cae1b58b0bcc5b1713b
|
|
BLAKE2b-256 checksum How to use checksums |
eeb012da368f87d06a13df089dbfb5702cb0743d79b1b668cdd6e0b6ffb491ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pycchem-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
043b4d6a72d16eda4b5a024dd7ce7c7cdcd2bce465c0c1119fb7210f1cb37996
|
|
BLAKE2b-256 checksum How to use checksums |
76b2efb2c357e4ac041527f004402e870904f24561126161ef883fed55419238
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | pycchem-1.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 665.6 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a944eb5b648f5a6d5b6819f03661d2bc9eac9658c841641ff7d0b9b78348772e
|
|
BLAKE2b-256 checksum How to use checksums |
a486de7f337232612709c0ab00d7559e0b979cf10fdcdab1452ab7b34ac3e82c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | pycchem-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 725.0 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f5c18ed7f90669b32674864ec4e2bbecd7730ed74f2411d8861bae25b62a6fa5
|
|
BLAKE2b-256 checksum How to use checksums |
24b678137ecfad0979124585962aae7f49dfa66bf209c4ec1ac9e75fc7f056e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp39-cp39-win_amd64.whl
| Download URL | pycchem-1.1.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
678123428bf45644edaddc6e41acdf53779f9c17db6dfa7b3fe4a29f84a4f59f
|
|
BLAKE2b-256 checksum How to use checksums |
b39db785d5956a0a41431cf0adc907bdfcef13a7002b4cd802ddb868695bbfdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pycchem-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
cc05ec3d0438dff91bd046717eb0e7d68ae86402e5e1b265184799fb7d0f65b8
|
|
BLAKE2b-256 checksum How to use checksums |
d9403edde914b8043555549d03dbb842d36f702ef21173657c00afc5492f5988
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | pycchem-1.1.0-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 665.6 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
edc94ba52423a86b1eb114c1043a113f09a11d90e3697e2429076a2b82b0680c
|
|
BLAKE2b-256 checksum How to use checksums |
8d5ebe5d6c7f2d2ebc8a162727c42be8f843ac507f960f64cbc4ebc769c92786
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency logRelease files / pycchem-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | pycchem-1.1.0-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 725.0 kB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
a3757bf09ea394c35c955ad981b4ab60d8b144d1fcda47debbe7062f5f56875d
|
|
BLAKE2b-256 checksum How to use checksums |
3a8c731fdd2bd7f94736fb32aafab3f2b5d8d35791e3b1625ff90a2584e9954a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 28, 2026.
Transparency log