Skip to content

Molecular graph matching

Exact chemistry search, proved

SMSD Pro finds substructures, maximum common substructures and similar molecules in C++, Java and Python. Every result states whether the search completed and whether its answer is proved optimal, so you always know what you can rely on.

Get started Try the notebooks GitHub

SMSD Pro icon

3 languagesC++17 headers, Java 8 or later, Python 3.12–3.15
One engineThe same results in every language of a release
CPU or GPUOptional NVIDIA screening with the same hits
Apache 2.0Open source, citable by DOI

Start in a minute

python -m pip install "smsd==8.1.0"
python -m pip install "smsd==8.1.0" "smsd-cuda==8.1.0"
docker load -i smsd-8.1.0-cpu-linux-amd64.tar.xz
docker run --rm smsd:8.1.0-cpu-amd64 --help
<dependency>
  <groupId>com.bioinceptionlabs</groupId>
  <artifactId>smsd</artifactId>
  <version>8.0.3</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

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, mapped one to one
Aspirin with benzoic acid highlighted
Aspirin: the benzoic acid substructure

Choose the right tool

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 fast 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
Use an NVIDIA GPU smsd-cuda CPU and GPU screening
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, every embedding, 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


    When the GPU helps, how to request it, and how results stay identical.

    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


    A local MCP server and tool definitions that give assistants exact chemistry.

    AI tools guide

Notebooks

Each notebook runs as written and opens in Google Colab with one click.

Cite SMSD Pro

Rahman, S. A. SMSD Pro: Coverage-Driven, Tautomer-Aware Maximum Common Substructure Search. ChemRxiv (2026). doi:10.26434/chemrxiv.15001534/v1. The software DOI and further references are in CITATION.cff.