CHEESE APISearch

Substructure search

Exact positive assembled-product matching with evidence and explicit coverage.

Suggest an edit

POST /api/v2/search_substructure is a separate query engine, not a similarity scorer.

{
  "query": {"format": "smarts", "value": "C(=O)N1CCC1"},
  "database_id": "enamine-real-v5a",
  "limit": 100,
  "timeout_seconds": 30
}

The first release accepts positive smiles and the documented SMARTS subset. Results contain exact assembled-product atom and bond match indices, reaction provenance, and optional synthons. Matching uses the pinned engine's aromaticity, chirality, standardization, and sanitization policy.

motif_hits = dmc.search_substructure(
    "C(=O)N1CCC1",
    query_format="smarts",
    database="enamine-real-v5a",
)

The response reports indexed and available reactions/products plus coverage_fraction. A coverage warning means unindexed space was not searched; it is never evidence that the uncovered space has no match. timed_out=true returns bounded partial results. Pure-negative/global-count queries and unrestricted Boolean expressions are not supported.

POST /api/v2/substructure is a temporary deprecated SMILES-only alias. Migrate to the typed route; the alias returns Deprecation and a successor link.