GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • asad/SMSD
  • Home
  • User guide
  • Notebooks
  • Reference
  • Getting started
  • Substructure search
  • SMARTS queries
  • Maximum common substructure
  • Fingerprints and similarity
  • Screening a library
  • Packed fingerprint index
  • Clustering and diversity
  • CPU and GPU screening

This view

  • Original page
  • New address

GeezerVison is showing asad.github.io — SMSD Pro

Molecular graph matching

Substructure, MCS and similarity search¶

SMSD Pro finds substructures, maximum common substructures and similar molecules in C++, Java and Python. Each result states whether the search completed and whether its answer is proved optimal.

Get started Try the notebooks GitHub

PyPI version Conda version Maven Central version Latest release Software DOI Licence: Apache 2.0

SMSD Pro icon

3 languagesC++17 headers, Java 8 or later, Python 3.12–3.15
One APIThe same prepared searches and proof flags in C++, Java and Python
CPU or GPUOptional NVIDIA and Apple GPU screening with the same hits
Apache 2.0Open source, citable by DOI

Installation¶

pipcondaNVIDIA GPU (Linux)Apple GPU (macOS)DockerJava (Maven)
python -m pip install "smsd==8.2.1"
conda install -c bioinception -c conda-forge smsd
python -m pip install "smsd==8.2.1" "smsd-cuda==8.2.1"
python -m pip install "smsd==8.2.1" "smsd-metal==8.2.1"
# smsd-8.2.1-cpu-linux-amd64.tar.xz is on the GitHub release page
docker load --input smsd-8.2.1-cpu-linux-amd64.tar.xz
docker run --rm smsd:8.2.1-cpu-amd64 --help
<dependency>
  <groupId>com.bioinceptionlabs</groupId>
  <artifactId>smsd</artifactId>
  <version>8.2.1</version>
</dependency>
import smsd

# Is benzoic acid inside aspirin?
hit = smsd.Substructure.find("c1ccccc1C(=O)O").match("CC(=O)Oc1ccccc1C(=O)O")
print(hit.found)                               # True

# What do two molecules share, and is that proved maximal?
mcs = smsd.MCS.find("CC(=O)Oc1ccccc1C(=O)O").match("OC(=O)c1ccccc1O")
print(mcs.matches[0].atom_count, mcs.optimal)  # 10 True

# How similar are they?
a = smsd.fingerprint_from_smiles("CC(=O)Oc1ccccc1C(=O)O", radius=2, fp_size=2048)
b = smsd.fingerprint_from_smiles("OC(=O)c1ccccc1O", radius=2, fp_size=2048)
print(round(smsd.tanimoto_coefficient(a, b), 3))  # 0.185

Python wheels cover CPython 3.12–3.15 on Linux, Windows and Apple silicon Macs, and the Java library and command-line tool are on Maven Central. The installation guide covers the platforms, conda and source builds.

What's new¶

8.2.1 is a maintenance release:

  • C++ headers compile when Windows defines STRICT and IGNORE.
  • Drawings keep the stored E/Z of non-aromatic ring double bonds.
  • In C++ and Python, the directional SMARTS bonds / and \ also match aromatic bonds.
  • In C++ and Python, elemental-hydrogen SMARTS hold with large atom-map labels.

Highlights of 8.2.0:

  • GPU screening on Apple silicon with the smsd-metal package.
  • A guide to NVIDIA GPU screening on Windows through WSL2.
  • Cleaner molecule drawings.
  • Clearer error messages from the MCP tools.
  • Time limits that hold on very large molecules.
  • Seven example notebooks that open in Colab.

Search results are the same as in 8.1.0, and existing APIs are unchanged. The release notes have the details, and known issues lists current limitations with workarounds.

See it on real molecules¶

Sildenafil with its maximum common substructure highlighted
Sildenafil: the 28-atom maximum common substructure, proved optimal
Vardenafil with the same common substructure highlighted
Vardenafil: the same 28 atoms, each numbered as its sildenafil partner
Aspirin with benzoic acid highlighted
Aspirin: the benzoic acid substructure

Which tool to use¶

You want to Use Read
Check whether a fragment occurs in a molecule Substructure.find(query).match(target) Substructure search
Express a pattern with atom and bond rules SMARTS queries SMARTS queries
Find the largest shared part of two molecules MCS.find(a).match(b) Maximum common substructure
Compare or rank molecules by similarity Fingerprints and Tanimoto Fingerprints and similarity
Search thousands to millions of molecules TargetCorpus screening Screening a library
Hold a large library compactly for repeated searches Packed fingerprint corpora Packed fingerprint index
Find the k most similar molecules Packed top-k screening Packed fingerprint index
Cluster a library or pick a diverse subset, on CPU or GPU Butina, MaxMin, top-k pairs Clustering and diversity
Draw a match from smsd.highlight import mcs_svg, substructure_svg Draw the result
Use an NVIDIA or Apple GPU smsd-cuda, smsd-metal CPU and GPU screening
Use an NVIDIA GPU from Windows WSL2 with smsd-cuda or the GPU image GPU screening on Windows
Work from a shell or a container smsd command line, Docker Command line and containers
Build in C++ or Java Header-only C++, CDK-based Java C++ and Java
Feed results to pandas, PyTorch or scikit-learn Data adapters Machine learning and data frames
Give an AI assistant chemistry tools Local MCP server Chemistry tools for AI assistants

Guides¶

  • Getting started


    Install, parse molecules and run your first three searches.

    Begin

  • Maximum common substructure


    Objectives, chemistry rules, time limits and how to read a proved result.

    MCS guide

  • Substructure and SMARTS


    Exact matching, all embeddings, and patterns with atom and bond rules.

    Substructure guide

  • Fingerprints


    Circular, path, torsion and MACCS keys with one set of options.

    Fingerprint guide

  • Screening a library


    Prepare a corpus once, then search it by threshold, top-k or structure.

    Screening guide

  • CPU and GPU


    NVIDIA and Apple GPUs: when they help, how to request them, and why results match the CPU.

    CPU and GPU guide

  • Clustering and diversity


    Butina clusters, MaxMin picks and nearest pairs, on the CPU or an NVIDIA GPU.

    Clustering guide

  • Machine learning and data


    Fingerprints into NumPy, pandas, Arrow, Polars, scikit-learn and PyTorch.

    Machine learning guide

  • Tools for AI assistants


    Local chemistry tools for open models and hosted AI assistants, through MCP or tool calling.

    AI tools guide

Notebooks¶

Each notebook runs as written in Jupyter or Colab: its setup cell installs SMSD 8.2.1 or later into the running kernel when needed. The pages below show the output of a run with SMSD 8.2.1, drawings included.

  • Substructure and SMARTS search
  • Maximum common substructure in practice
  • Fingerprints and similarity in practice
  • Screening a library end to end
  • CPU and GPU screening in practice
  • From an MCS to a library search
  • SMSD Pro tools for AI models

Cite SMSD Pro¶

If SMSD Pro supports your work, please cite the paper and the software release you used.

Paper. Rahman, S. A. (2026). SMSD Pro: Coverage-Driven, Tautomer-Aware Maximum Common Substructure Search. ChemRxiv. doi:10.26434/chemrxiv.15001534/v1

Software. Rahman, S. A. SMSD Pro: Small Molecule Subgraph Detector [Computer software]. Zenodo. doi:10.5281/zenodo.23639199. This DOI covers all releases; Zenodo also gives each version its own DOI.

Original toolkit. Rahman, S. A., Bashton, M., Holliday, G. L., Schrader, R. & Thornton, J. M. (2009). Small Molecule Subgraph Detector (SMSD) toolkit. Journal of Cheminformatics, 1, 12. doi:10.1186/1758-2946-1-12

@article{rahman2026smsdpro,
  author  = {Rahman, Syed Asad},
  title   = {{SMSD Pro}: Coverage-Driven, Tautomer-Aware Maximum Common Substructure Search},
  journal = {ChemRxiv},
  year    = {2026},
  doi     = {10.26434/chemrxiv.15001534/v1}
}

@software{rahman_smsd_pro,
  author    = {Rahman, Syed Asad},
  title     = {{SMSD Pro}: Small Molecule Subgraph Detector},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.23639199},
  url       = {https://github.com/asad/SMSD}
}

@article{rahman2009smsd,
  author  = {Rahman, Syed Asad and Bashton, Matthew and Holliday, Gemma L. and
             Schrader, Rainer and Thornton, Janet M.},
  title   = {Small Molecule Subgraph Detector ({SMSD}) toolkit},
  journal = {Journal of Cheminformatics},
  volume  = {1},
  pages   = {12},
  year    = {2009},
  doi     = {10.1186/1758-2946-1-12}
}

GitHub's Cite this repository button reads the same details from CITATION.cff.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.