SMSD 7.2.2 for Python
Substructure search, maximum common substructure (MCS), fingerprints and similarity screening. Core matching does not require RDKit, CDK or Java. RDKit is optional for molecule conversion and drawing.
Install
The 7.2.2 wheels use CPython 3.14 and include CPU/OpenMP support:
| Platform | Architecture | Requirement |
|---|---|---|
| Windows | x86_64 / AMD64 | Windows 10 or later |
| Linux | x86_64 | glibc 2.28+ |
| macOS | arm64 / Apple Silicon | macOS 26+ |
Install 7.2.2 from PyPI when listed:
python -m pip install smsd==7.2.2
You can also download and install the matching wheel from the GitHub release. Intel macOS, Linux arm64 and other Python versions require a source build.
Quick start
import smsd
query = "c1ccccc1" # benzene
target = "c1ccc(O)cc1" # phenol
assert smsd.is_substructure(query, target)
mapping = smsd.find_mcs(query, target, timeout_ms=1000)
print(f"MCS: {len(mapping)} atoms") # MCS: 6 atoms
Mappings link query atom indices to target atom indices. An empty mapping means no match was found. A search timeout can leave a smaller MCS.
Fingerprints
Radius 2 gives ECFP4; use mode="fcfp" for functional-class fingerprints
(Rogers and Hahn, 2010).
similarity() is a screening upper bound. Use fingerprint metrics for fingerprint
similarity:
import smsd
query_fp = smsd.fingerprint_from_smiles("c1ccccc1", radius=2, fp_size=2048)
target_fp = smsd.fingerprint_from_smiles("c1ccc(O)cc1", radius=2, fp_size=2048)
score = smsd.tanimoto_coefficient(query_fp, target_fp)
assert 0.0 <= score <= 1.0
For count fingerprints and other metrics, see the fingerprint examples.
Batch search
Parse molecules once when reusing them. Batch results follow target order:
import smsd
query = smsd.parse_smiles("c1ccccc1")
targets = [smsd.parse_smiles(s) for s in ["c1ccc(O)cc1", "CCO"]]
assert smsd.batch_substructure(query, targets, num_threads=2) == [True, False]
assert [len(m) for m in smsd.batch_find_substructure(query, targets)] == [6, 0]
sizes = smsd.batch_mcs_size(query, targets, timeout_ms=1000)
assert sizes == [6, 2]
Use batch_mcs() for mappings and batch_mcs_size() for atom counts.
TargetCorpus supports repeated queries against one collection.
Using RDKit
Install RDKit separately to pass its molecules directly to SMSD. Returned mappings use the original RDKit atom indices:
from rdkit import Chem
import smsd
query = Chem.MolFromSmiles("c1ccccc1")
target = Chem.MolFromSmiles("c1ccc(O)cc1")
mapping = smsd.find_mcs(query, target, timeout_ms=1000)
assert len(mapping) == 6
More examples
The Python guide covers chemistry options, SMARTS, stereo, tautomer matching, fingerprints, MOL/SDF I/O, drawing and batch operations. See the examples for complete workflows.
Build from source
Run these commands at the repository root with a C++17 compiler and CMake 3.18 or later. Source metadata allows Python 3.9 or later:
python -m pip install build
python -m pip install -e ".[dev]"
python -m build
Release wheels use CPU/OpenMP. Metal and CUDA are optional source-build features
that need compatible tools and hardware. gpu_device_info() reports the active
backend; batch matching uses the CPU.
Tests and benchmarks
Version 7.2.2 passes 691 Python tests with 8 optional skips per platform; see the test report. The 7.2.0 benchmark report contains measured comparisons for its recorded versions and molecules.
Other languages
Java and
C++ are also available.
Java 7.2.2 is on GitHub; Maven Central remains at com.bioinceptionlabs:smsd:7.1.1
until 7.2.2 is published there.
Citation
If you use SMSD Pro in your research, please cite:
Rahman SA. SMSD Pro: Coverage-Driven, Tautomer-Aware Maximum Common Substructure Search. ChemRxiv, 2026. DOI: 10.26434/chemrxiv.15001534/v1
For the original SMSD toolkit, please also cite:
Rahman SA, Bashton M, Holliday GL, Schrader R, Thornton JM. Small Molecule Subgraph Detector (SMSD) toolkit. Journal of Cheminformatics, 1:12, 2009. DOI: 10.1186/1758-2946-1-12
A machine-readable CITATION.cff is available for automated citation tools.
Licence
Apache 2.0 — Copyright (c) 2018-2026 Syed Asad Rahman, BioInception PVT LTD. See LICENSE and NOTICE for licensing and attribution.
Metadata
Release files for smsd 7.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| smsd-7.2.2.tar.gz | 2.9 MB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smsd-7.2.2-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details |
| smsd-7.2.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| smsd-7.2.2-cp314-cp314-macosx_26_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 26.0+ ARM64 | Details |
Total release size: 7.4 MB
Release files / smsd-7.2.2.tar.gz
| Download URL | smsd-7.2.2.tar.gz |
|---|---|
| Size | 2.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6181d11810d31399a756d588ec04958bca3c26d293e3837aa57be076c024257
|
|
BLAKE2b-256 checksum How to use checksums |
9bca3743fd79796abdc17c3c10f254f9c7bf8fcc05a794d83ca0fab1cfee00eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 7, 2026.
Transparency logRelease files / smsd-7.2.2-cp314-cp314-win_amd64.whl
| Download URL | smsd-7.2.2-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
88cb93c54799ba46339b3b9ec653b8240dc11d3235e0bf2263adea3bf7beb14f
|
|
BLAKE2b-256 checksum How to use checksums |
7aba137433583c9f6003da0cfa2c9a4fe63bc764dfebc15794e27b529270cae5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 7, 2026.
Transparency logRelease files / smsd-7.2.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | smsd-7.2.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
72385bf8a69b59877a322fa9cb1a4ade946ff8eade31488238f646e60b7f0749
|
|
BLAKE2b-256 checksum How to use checksums |
48e9bec24f96a0e557c56909277503a6a943f630b54be956b10508ff4ee2abfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 7, 2026.
Transparency logRelease files / smsd-7.2.2-cp314-cp314-macosx_26_0_arm64.whl
| Download URL | smsd-7.2.2-cp314-cp314-macosx_26_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.14 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e961b53d1bc6be6dc34aba0772d11d59fc1fdf54cf1cc1fd59487ff7b28c049c
|
|
BLAKE2b-256 checksum How to use checksums |
7611da18cfa4b7791257ef51c5e9d97c61cab97bed7991f8932eee901447657d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 7, 2026.
Transparency log