Skip to main content

SMSD Pro

SMSD Pro™ for Python

PyPI Licence

SMSD Pro provides substructure search, maximum common substructure (MCS) search, fingerprints and similarity screening for chemical graphs. Core matching needs no RDKit, CDK or Java; RDKit is optional, for RDKit molecules and the RDKit image helpers.

Installation

python -m pip install "smsd==8.0.0"

To include RDKit, install the rdkit extra:

python -m pip install "smsd[rdkit]==8.0.0"

Wheels are published on PyPI and with each GitHub release. They target CPython 3.14 and use CPU/OpenMP:

Platform Architecture Minimum version
Windows x86_64 (AMD64) Windows 10
Linux x86_64 (AMD64) glibc 2.28
macOS arm64 (Apple silicon) macOS 26

Other Python versions, the free-threaded CPython build, Intel macOS and Linux arm64 need a source build, as described below.

Quick start

import smsd

query = "c1ccccc1"       # benzene
target = "c1ccc(O)cc1"   # phenol

assert smsd.Substructure.find(query).match(target).found
result = smsd.MCS.find(query).with_timeout(1000).match(target)
print(f"MCS: {result.best.atom_count} atoms")  # MCS: 6 atoms

Substructure and MCS prepare a query once and provide match, match_all and match_many. Each match maps query to target atom indices and records the selected bonds and fragments. A search that stops early can return a valid but unproved answer, so check result.optimal, result.complete and result.status; an empty incomplete result does not prove absence.

MCS defaults to a connected maximum common induced subgraph (MCIS), ranked by atoms and then bonds. MCS.Objective.MCES selects the maximum common edge subgraph (MCES), which maximises common bonds, then their atoms, and adds no isolated atoms. with_fragments() allows disconnected common graphs.

Parse molecules once when you reuse them. Results follow the target order, and each target has its own search budget:

import smsd

query = smsd.parse_smiles("c1ccccc1")
targets = [smsd.parse_smiles(s) for s in ["c1ccc(O)cc1", "CCO"]]
results = smsd.Substructure.find(query).match_many(targets, num_threads=2)
assert [result.found for result in results] == [True, False]
assert [result.best.atom_count if result.found else 0 for result in results] == [6, 0]
results = smsd.MCS.find(query).with_timeout(1000).match_many(targets)
assert [result.best.atom_count for result in results] == [6, 2]

match_all returns up to 1,000 matches by default, symmetry-related mappings included; check complete before treating an enumeration as exhaustive. TargetCorpus holds targets for repeated queries. Batch calls use OpenMP, or run sequentially without it.

Fingerprints

Radius 2 gives ECFP4; mode="fcfp" gives functional-class fingerprints (Rogers and Hahn, 2010). similarity() is a screening bound, not a fingerprint metric; use the coefficients below 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

The Python examples cover count fingerprints and the other coefficients.

RDKit molecules

With RDKit installed, pass its molecules directly. Mappings use the original RDKit atom indices:

from rdkit import Chem
import smsd

query = Chem.MolFromSmiles("c1ccccc1")
target = Chem.MolFromSmiles("c1ccc(O)cc1")
result = smsd.MCS.find(query).with_timeout(1000).match(target)
assert result.best.atom_count == 6

Conversion passes through SMILES, so coordinates, data fields and query predicates are not transferred. from_openbabel and to_openbabel do the same for Open Babel, without its atom numbering. See input atom numbering.

Documentation

Build from source

From the repository root, with Python 3.9 or later, a C++17 compiler and CMake 3.18 or later:

python -m pip install build
python -m pip install -e ".[dev]"
python -m build

Metal and CUDA backends are optional in source builds and need a compatible toolchain and hardware. gpu_device_info() reports the backend available at run time, not the one a particular call used.

Other languages

SMSD Pro is also available for Java, with CDK integration, and as a header-only C++17 library.

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 provided for citation software.

Licence

Apache License 2.0. Copyright (c) 2018-2026 BioInception PVT LTD. Algorithm Copyright (c) 2009-2026 Syed Asad Rahman. See LICENSE and NOTICE.

Metadata

Release files for smsd 8.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smsd 8.0.0
File Size Uploaded Provenance
smsd-8.0.0.tar.gz 1.1 MB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for smsd 8.0.0
File Interpreter ABI Platform
smsd-8.0.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
smsd-8.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
smsd-8.0.0-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details

Total release size: 6.6 MB

Release files / smsd-8.0.0.tar.gz

Download URL smsd-8.0.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
22e00cc706caf2a24267167081a080152607ac2eb5801886542f1d0e6f9f88b1
BLAKE2b-256 checksum
How to use checksums
2a056a5d1f98e2440bab531a1180275588ad13fc46896f4a2e3244266d98caf6
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 21, 2026.

Transparency log

Release files / smsd-8.0.0-cp314-cp314-win_amd64.whl

Download URL smsd-8.0.0-cp314-cp314-win_amd64.whl
Size 1.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
22f84409ecbb61c005e46b8c719f56fe03360538fcfa125809db8b11eb44494a
BLAKE2b-256 checksum
How to use checksums
d5acd143640d23147f5e41db180cbe12b76427c25113ab3516c0bfc0f28a4de8
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 21, 2026.

Transparency log

Release files / smsd-8.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL smsd-8.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.9 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
51c3857511d6d325f979b52960f194305fa4c5ee14166de844e794dfa7e0087d
BLAKE2b-256 checksum
How to use checksums
173f5e79613c4f6d5affb2b2e2002574ef1ce43a9181f9316a46cf5b61702076
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 21, 2026.

Transparency log

Release files / smsd-8.0.0-cp314-cp314-macosx_26_0_arm64.whl

Download URL smsd-8.0.0-cp314-cp314-macosx_26_0_arm64.whl
Size 1.8 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
c4a5c613e269573604cf4bc13043032fd94ccfe624671212dced9feddd708dcb
BLAKE2b-256 checksum
How to use checksums
4a44d54729da911440508dd091001e95e0f638fbbb85faf48a7fbb08638c46d1
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 21, 2026.

Transparency log

Security for smsd 8.0.0

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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for smsd-8.0.0.tar.gz

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 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page