Deep MedChem handbook · 2026-12

Get started on-prem · Choose a database · Hosted API quickstart

For installation commands specific to your delivery, open the README shipped with your kit.

Contents

Deprecations

Migration replacements, response headers, and support windows.

DeprecatedReplacementStatus
POST /api/v2/substructurePOST /api/v2/search_substructureTemporary alias; emits Deprecation and successor Link
Mixed scorer on /api/v2/search/search for ECFP4; /search_cheese for shape/ESPMigrate before v2 stability
Python NavigatorClientDMCClient / AsyncDMCClientCompatibility facade through the 0.3 minor line
Legacy MkDocs/API pagesMapped canonical pages on this siteRedirects retained for at least 12 months after support window

No legacy route is retired without a migration guide, changelog entry, replacement link, and published support/sunset date. The legacy 39-route API remains a separately labeled product and is not reproduced in API v2.

Contents

Changelog

API, Python client, CLI, and documentation changes.

2026-09-01 — Sparse scheduling and full-scale verification

  • Replaced scheduler and reconciliation table scans with a sparse availability index and execute underfilled fair turns immediately. One-item and 64 + 64 development checks returned first results within two seconds.
  • Repeated the mixed 1,000 + 1,000 development gate. Both tenants completed exactly 1,000 unique successful results with zero failures, 0.998 throughput parity, four-item maximum skew, and service gaps within the harness's polling-aware bound.
  • Kept production promotion held: full-scale first-result timing was 3.655/2.015 seconds, and typed SMARTS returned 91 transient 503 responses among 240 saturation observations. The Fargate capacity request and the previously documented cross-library and per-library Morgan gates also remain open.

2026-08-31 — Fair scheduling and capacity isolation

  • Verified seeded sampling replay on all seven development chemical spaces. Twenty 100-product observations per space passed the 500 ms p95 gate, and a controlled 5,000-draw test matched the declared combinatorial route/product-tuple weighting.
  • Verified the 25 ms router-overhead gate across all seven spaces; per-space p95 was 8.33–11.30 ms and the maximum across 140 warmed requests was 13.75 ms.
  • Added fail-closed measurement for the accepted-run two-second first-result guardrail. Current development evidence is mixed (0.71–10.49 seconds), so this remains a production blocker.
  • Normalized durable virtual finish across tenants, bounded development turns to four items, and made compatible engine batch size independently configurable.
  • Split default Morgan, slow singular CHEESE/substructure/sample, and durable work into operation-assigned capacity pools; callers cannot select a priority lane.
  • Preserved canonical property, structure, scaffold, and evidence fields through routed selection execution and added a private service-authenticated worker route.
  • Bound native substructure threads and isolated CPU CHEESE encoders in a worker child process so slow scorers cannot expand into the Morgan CPU pool.
  • Made successful four-item result batches atomic across item state, run progress, and ordered events; metadata-sequence races retry atomically before the conditional per-item fallback.
  • Added two development durable lanes on the Morgan worker. A 2,000-result mixed run completed with zero failures, 0.996 throughput parity, and four-item maximum skew while all interactive requests succeeded.
  • Verified development Morgan fairness and cancellation. Mixed-load default, shape, and substructure requests all met their operation-specific latency gates, but exact service-gap maxima remained 6.01/6.51 seconds in the full run and 5.16 seconds after conflict retries. An 8-vCPU development capacity probe hit the account Fargate quota and was rolled back; production promotion remains held.

2026-08-31 — Durable admission and restart recovery

  • Made 1,000-item run admission bounded and durable without eagerly materializing every item.
  • Preserved idempotency, atomic tenant quota admission, the durable queued event, and idempotent cancellation behavior.
  • Verified development admission/status SLOs and a complete 1,000-item run across a forced API service restart; production performance and saturation claims remain gated.

2026-08-30 — API v2 developer preview

  • Made /search fixed ECFP4/Tanimoto and added distinct CHEESE and typed substructure routes.
  • Added seeded sampling, molecule-selection/1 validation/estimation/execution, and typed run/1.
  • Added consistent errors, request IDs, API-key OpenAPI security, conventional docs/OpenAPI routing, deterministic schema export, and release/capability discovery.
  • Added dmc-navigator 0.3 typed sync/async clients, selection/run builders, and durable CLI flows.
  • Made this site the canonical v2 documentation source with pinned generated reference and agent surfaces.

Compatibility: client 0.3 targets API v2 developer-preview contracts. API v2 stability is declared only after the documented persistence, scheduler, performance, and production-canary gates pass.

Contents

Authentication

Create, store, scope, rotate, and revoke CHEESE API keys safely.

Send a CHEESE API key in the x-api-key header. The OpenAPI document represents this as an API-key security scheme, so generated tools and the interactive reference can authenticate correctly.

x-api-key: YOUR_API_KEY

Keys may be scoped independently for search, sampling, selections, and durable runs. A missing or invalid key returns 401; a valid key without the required entitlement returns 403.

Use DEEPMEDCHEM_API_KEY for Python automation or deepmedchem login for the OS credential store. Named default and dev profiles keep credentials isolated; navigator auth login remains a compatibility alias using the shared store. Rotate a key by creating its replacement, updating clients, verifying use, and then revoking the old key. Never send a key in a query string or to documentation analytics, feedback, or AI tools.

The interactive reference keeps a visitor-provided key in browser memory/session storage only. It calls the API directly over the explicit docs CORS origin and does not proxy credentials through the documentation server.

Contents

Chemical spaces and capabilities

Discover releases, supported operations, limits, registries, and sampling semantics.

Call GET /api/v2/catalog at runtime. Each library reports its immutable release, product/synthon/ reaction counts, search scorers, substructure coverage, sampling method, property/preset/pattern registries, predicted-property endpoints and acquisition operations, price availability, exact or approximate fidelity, synchronous limits, and durable-run budgets.

curl 'https://api.deepmedchem.com/api/v2/catalog' \
  --header "x-api-key: $DMC_API_KEY"

Capabilities are release-specific and are derived from the signed assets loaded by the worker. Never assume every database supports substructure, constrained sampling, a predictive model, or the same distribution. An unsupported combination fails validation instead of being ignored. Store database_id plus returned release_id for reproducibility. Predicted-property entries include their model version, units, and experimental-acquisition-only qualification; currently advertised operations support only ranked similarity shortlist acquisition.

Enamine filtered population

Production and development use enamine-real-v5a@2026-09-06.2 by default. In the Python SDK, database="enamine" selects this release. It replaces the larger 336.72B normalized population with the historical approximately 95B source population.

The updated estimate is 93.41B source reagent combinations, with a 95% Monte Carlo interval of 93.19–93.63B, based on 18.7 million draws. These are not unique molecular graphs. The catalog's population object records the definition, limits, estimate, and confidence interval; SDK 0.3.0b4 marks estimated counts with ~.

Every operation selects the first assemblable source topology and then enforces MW ≤500, logP ≤5, HBA ≤10, HBD ≤5, rotatable bonds ≤10, and TPSA ≤140 Ų on the assembled product. Sampling, similarity, substructure, selections, and runs use the same population without a client-side preset. Sampling is not uniform over unique molecular graphs. Price estimates remain available.

Enamine advertises capabilities.search_substructure=true; all 326 route partitions have native indexes, and final products are checked against the original query. This reconstruction is not identical to BioSolveIT's official REAL95B collection.

Prices

When available, every result includes price as a positive whole number of US dollars. The default context is delivery to the United States. A missing or unsupported price is null, never zero. The catalog advertises support through pricing.available.

The database comparison lists typical lead times, reported synthesis success, and vendor quote contacts. Request a quote for the quantity you plan to order.

Contents

Core concepts

Chemical spaces, facades, selections, constraints, objectives, portfolios, and runs.

Chemical space

A chemical space is a versioned searchable collection. Requests use database_id for compatibility; responses pin the immutable database_release that was actually searched.

Simple operations and canonical selections

The simple routes are ergonomic facades over molecule-selection/1:

RouteCanonical meaning
/searchOne reference, ranked by ECFP4/Tanimoto
/search_cheeseOne reference, ranked by CHEESE shape or electrostatic score
/search_substructureA positive exact structure constraint
/sampleAn unconstrained sample from the advertised distribution

Use a facade to get started. Use /selections when you need composable scientific intent or want a portable document shared by HTTP, Python, CLI, UI, and agents.

Strategy, constraints, objectives, and portfolio

  • strategy says how eligible space is explored: ranked or sampled.
  • constraints are hard eligibility gates. Returned assembled products satisfy exact hard gates.
  • objectives rank eligible products and never masquerade as hard filters.
  • portfolio controls the returned set, such as its limit or per-scaffold cap.

Approximate synthon-level descriptors can accelerate acquisition, but a hard constraint is verified on every returned assembled product. Predictive properties identify model version, applicability, uncertainty, and missing-value behavior. Coverage below 100% is a warning, not proof of absence.

Synchronous work and runs

Singular bounded work may execute synchronously. Every multi-query workload and every selection that exceeds its synchronous estimate uses run/1. Runs pin releases, survive client disconnects, expose per-item progress and partial results, and isolate one invalid molecule from valid siblings.

Contents

Errors

One stable error envelope, status mapping, retry guidance, and correlation IDs.

{
  "error": {
    "code": "invalid_smiles",
    "message": "Query is not a valid molecule.",
    "field": "query_smiles",
    "request_id": "c9d4dfcb-3dc7-4d25-8c31-67d494f3332d",
    "retryable": false
  }
}
StatusMeaning
400Semantic request error
401Missing or invalid key
403Valid key without entitlement
404Unknown resource or chemical space
409Idempotency/resource conflict
413Body, synchronous work, or declared run budget exceeded
422Structural schema validation
429Caller quota/admission limit; honor Retry-After
503Temporary dependency/capacity failure
504synchronous_timeout after 10 seconds (use /api/v2/runs) or a 60-second run-item timeout

Retry only when retryable=true, with bounded exponential backoff and jitter. Preserve Idempotency-Key for run creation and x-request-id when contacting support. Invalid structures, unsupported capabilities, contradictions, and empty exact results are not transient.

Tenant run admission failures use tenant_run_quota_exceeded. The error details.quota identifies the exceeded dimension when it can be determined; honor Retry-After and retry with the same Idempotency-Key after existing runs reach a terminal state.

Contents

Performance and SLOs

What is measured, provisional release gates, and how to interpret latency.

Published SLOs use warmed production-equivalent workers, a frozen representative panel, no required response-cache hits, and include serialization. Server and public end-to-end time are measured separately.

OperationWorkloadServer p95 release target
/search20 hits, no property filters≤300 ms
/search100 hits, default shortlist≤750 ms
/sample100 products≤500 ms
POST /runsAdmit 1,000 items≤1 s
GET /runs/{id}Status without results≤100 ms
accepted warm runFirst committed result≤2 s guardrail
/search_cheese100 hits≤2.5 s guardrail

These are release gates, not claims until the public dashboard and production-sized saturation suite pass. The key concurrency scenario holds singular traffic within its SLO while two tenants each run 1,000-item workloads, with continuous comparable progress, bounded service gaps, monotonic partial results, no duplicate commits, and no worker restart/OOM.

Developer-preview evidence

On 2026-08-31, a warmed development sample of 20 fresh 1,000-item admissions measured server p95 of 697 ms for POST /runs and 9.47 ms for GET /runs/{id}. A separate 1,000-item Morgan run survived a forced API service restart and completed with 1,000 successful results in 151 seconds.

The same development release passed the sampling gate on every one of the seven chemical spaces that advertises sampling. Twenty 100-product requests per space measured public wall-time p95s from 161.46 to 275.23 ms against the 500 ms target. Repeated requests with the same seed, database release, and sampling version returned the same ordered response, and every measured response contained 100 distinct product IDs. A controlled 5,000-draw test of the combinatorial sampler also matched its declared route/product-tuple weighting (Pearson chi-square 0.3083 with one degree of freedom, below the p=0.001 rejection threshold). These results cover the currently advertised combinatorial database type; they do not establish behavior for a future eligible_row database.

Router overhead was measured as the application Server-Timing duration minus the worker engine's reported total on twenty warmed 20-hit Morgan requests per chemical space. All seven spaces passed the 25 ms hard target: per-space p95 ranged from 8.33 to 11.30 ms, and the maximum of all 140 observations was 13.75 ms. This partition excludes public network time and includes platform admission, worker transport, serialization, and response handling.

The sparse scheduler-index release removed the long idle-table scan and executes an underfilled fair quantum immediately. Two one-item D2B runs produced their first committed results in 0.504 and 0.505 seconds, and a 64 + 64 shakedown measured 0.849 and 0.764 seconds. The production-sized 1,000 + 1,000 repeat did not close the guardrail: its first results arrived in 3.655 and 2.015 seconds. The maintained saturation harness measures from the accepted 202 response, allows one 0.5-second polling interval, and still failed this gate because the first tenant exceeded that tolerance. Cancellation alone does not count as result evidence.

Two equal-cost 1,000-item Morgan runs then completed with 1,000 unique successful results each, zero failed items, a 0.997 throughput ratio, and a maximum observed progress difference of eight items. During that run, 2,050/2,050 default searches succeeded with 59.09 ms engine p95. In a separate cancellation run, one tenant reached terminal cancellation in 0.669 seconds at 128 successful and 872 cancelled items; the other tenant completed all 1,000 items, with no duplicate results.

The latest mixed-capacity development run exercises D2B default Morgan and CHEESE shape traffic together with typed Enamine SMARTS traffic. Its two 1,000-item lanes produced 2,000 unique successful durable results with zero failures, a 0.998 throughput ratio, maximum progress skew of four items, and terminal times of 393.87 and 394.81 seconds. Maximum observed service gaps were 4.932 and 5.360 seconds; both passed the harness's five-second gate with its single 0.5-second polling allowance, although the second raw observation remains above the nominal target. All 1,214 default searches succeeded at 123.56 ms engine p95, and all 240 shape searches succeeded at 165.32 ms engine p95. Typed SMARTS did not pass capacity isolation: 149 of 240 requests succeeded at 1,859.13 ms engine p95, while 91 returned transient 503 responses during the early saturation interval. An 8-vCPU development worker experiment could not be placed because the account's concurrent Fargate vCPU quota was exhausted, and the service was restored to its prior 4-vCPU size.

These results establish development run control, sampling, exact-once completion for the measured runs, Morgan fairness, cancellation, and default/shape capacity-isolation evidence. They are not a production SLO claim. Production promotion remains blocked on the full-scale first-result and typed SMARTS availability gates, the raw service-gap outlier, additional production-equivalent capacity, cross-library saturation, and every per-library Morgan gate; for example, the warmed Enamine development baseline measured 460.78 ms engine p95 against the 300 ms 20-hit release target.

Contents

API quickstart

Authenticate and run the recommended SynthonOR search in under five minutes.

The recommended CHEESE API operation finds structural neighbors with ECFP4/Tanimoto scoring. It needs only a query molecule, chemical-space ID, and result count.

1. Set your API key

Create or copy a key in CHEESE account settings, then keep it in an environment variable. Never put keys in source code, notebooks committed to Git, or URLs.

export DMC_API_KEY='your-key'

The API base URL is https://api.deepmedchem.com. The interactive OpenAPI explorer for every v2 operation is served by the API itself at /api/v2/docs.

curl
curl --request POST 'https://api.deepmedchem.com/api/v2/search' \
  --header "x-api-key: $DMC_API_KEY" \
  --header 'content-type: application/json' \
  --data '{
    "query_smiles": "CC(=O)Nc1ccc(O)cc1",
    "database_id": "enamine-real-v5a",
    "limit": 20
  }'
Python
from dmc_navigator import DMCClient

with DMCClient(api_key="...") as dmc:
    result = dmc.search(
        "CC(=O)Nc1ccc(O)cc1",
        database="enamine-real-v5a",
        limit=20,
    )
    print(result.results[0]["smiles"])
CLI
navigator auth login
navigator search --smiles 'CC(=O)Nc1ccc(O)cc1' --database enamine-real-v5a --limit 20

Response

Truncated to the first hit. Result fields that stay null unless you opt into them (synthons, properties, ADMET and constraint evidence) are omitted here; see the endpoint reference for the complete schema.

{
  "request_id": "b30f5ad2-6ef0-4848-ad54-b24a572ca956",
  "query_smiles": "CC(=O)Nc1ccc(O)cc1",
  "database_id": "enamine-real-v5a",
  "database_release": "2026-08-29.1",
  "model_version": "rdkit-ecfp4-r2-n2048",
  "engine_version": "0.2.0",
  "scorer": "morgan",
  "metric": "ECFP4 Tanimoto",
  "shortlist_multiplier": 10,
  "effective_shortlist": 200,
  "results": [
    {
      "rank": 1,
      "smiles": "CC(=O)Nc1ccc(-c2ccc(O)cc2)cc1",
      "score": 0.8695652173913043,
      "metric": "ECFP4 Tanimoto",
      "proposal_score": 0.800000011920929,
      "product_id": "e0bf2c7e96e522ae7ad32e92",
      "reaction_id": "s_271570"
    }
  ],
  "counts": {
    "proposed": 200,
    "assembled": 200,
    "invalid": 0,
    "duplicate_tuples": 0,
    "duplicate_products": 33,
    "returned": 20
  },
  "timing_ms": {
    "query": 0.48,
    "proposal": 410.14,
    "assembly_and_scoring": 50.99,
    "total": 461.61
  },
  "warnings": []
}

score is exact assembled-product ECFP4 Tanimoto. proposal_score is an acquisition signal and is not interchangeable with the final score. Save database_release, engine/model versions, and the request body when reproducibility matters.

counts.returned can be lower than limit: proposals that assemble to the same canonical product are deduplicated (duplicate_products above), and small query molecules deduplicate heavily. Raise shortlist_multiplier if you need a full page.

Choose the next operation

CHEESE shape/electrostatic

Use a CHEESE model instead of ECFP4 final scoring.

Substructure

Find exact positive structural matches.

Random sample

Draw a bounded, optionally seeded sample.

Selections

Compose exact constraints, objectives, and portfolio rules.

Durable runs

Execute every multi-query or over-budget workload.

Do not loop over queries

More than one independent query belongs in one typed durable run. The Python client and CLI expose that lifecycle directly so progress, partial results, cancellation, and per-item errors remain visible.

Contents

Rate limits and admission

Request, work-unit, concurrency, run, model, and result budgets.

CHEESE Credits are account-wide, not per key. Every successful synchronous search, sample, or selection execution costs one credit, and every successful durable-run item costs one credit. The same daily balance is shared by all API keys, browser traffic, the legacy API at api.cheese.deepmedchem.com, and API v2 at api.deepmedchem.com. Catalog, validation, estimation, run polling, and result retrieval are free. Failed or timed-out execution is refunded.

During the September 2026 promotion, registered and paid tiers receive 10× their normal daily allowance through October 1 at 00:00 UTC. The multiplier applies to the shared account balance, so creating another key or switching API surfaces does not create another allowance.

Synchronous computation has a hard 10-second limit. A 504 synchronous_timeout means computation was terminated; submit the same selection to /api/v2/runs. Each basic durable-run item has a 60-second execution limit. Durable runs also bound active runs, queued items, body bytes, work units, result cells/bytes, and model calls; the catalog advertises effective capacity limits.

A 429 means no work was admitted and includes Retry-After. A 413 durable_required from /selections means the scientific request is valid but belongs in /runs; reuse the returned run payload. Do not split or parallelize requests to evade admission controls.

Contents

Fairness, limits, and retention

Interactive isolation, tenant fairness, bounded quanta, quotas, and data expiry.

Durable work is decomposed into bounded quanta and scheduled using estimated cost across tenants, then active runs. A five-second aging threshold prevents an admitted run from losing every scheduling decision; users cannot self-assign priority.

Current request limits bound a run to 1–1,000 items, a 5 MiB body, and 100,000 declared result cells. Interactive overload returns 429 with Retry-After. An admitted run continues independently of its creating client.

Each chemical-space worker has separate capacity pools for low-latency default Morgan search, slower singular work such as CHEESE, native substructure, and sampling, and durable run execution. The operation and scorer choose the pool; callers cannot assign themselves a higher-priority lane. This keeps slow singular work and admitted durable runs from consuming the default Morgan slot. Default and slow pools currently have one slot per worker. Durable execution capacity is a deployment control, not caller-selectable priority. Each basic run item has a hard 60-second execution limit.

Run admission atomically reserves the following in-flight budget for the authenticated tenant:

BudgetCurrent limitReservation basis
Active runs4One per admitted non-terminal run
Queued items4,000Resolved input items
Work units100,000Estimated scorer and constraint cost
Result bytes10 GiBDeclared result cells × 2,048 bytes
Model calls10,000,000CHEESE objectives × shortlist size

These are concurrency safeguards, not billing counters. The complete reservation is released when the run becomes terminal, including after cancellation. A request that would exceed any current tenant budget returns retryable 429 tenant_run_quota_exceeded with Retry-After: 5; another tenant's reservation does not consume your budget. GET /api/v2/catalog is the authoritative machine-readable source in case limits change.

Compatible items may be coalesced only after fair selection and privacy review. Selection quantum and engine batch size are separate deployment controls. Successful four-item batches commit item results, run progress, and ordered events atomically; metadata-sequence races retry the atomic batch before falling back to conditional, idempotent per-item commits. Coalescing is an execution optimization, never a cross-tenant chemistry result cache. Production may tune the quantum and batch controls independently without changing the public contract.

The retention policy is 30 days, reported as expires_at. Run metadata, inputs, results, items, idempotency markers, and events carry the same expiry. DynamoDB expiry is asynchronous, so records may remain physically present for a short period after that timestamp but are no longer an active run contract. All reads remain tenant-authorized. Raw structures and hit tables do not enter general logs, metrics, events, analytics, or docs tools.

Contents

Lifecycle and progress

Run and item states, ETags, resumable events, partial visibility, and cancellation.

queued -> running -> completed
                  -> completed_with_errors
                  -> failed
queued/running -> cancelling -> cancelled

Items are pending, running, succeeded, failed, or cancelled. Progress counts are monotonic, but a percentage is never the completion signal: only the top-level terminal state is authoritative.

Poll GET /runs/{id} with If-None-Match; unchanged state returns 304. Persisted events have a run-local increasing sequence (run.queued, run.started, item.started, item.succeeded, item.failed, cancellation and terminal events). Resume with after; events contain correlation and progress metadata but never raw structures or complete hit tables.

Run state, undispatched inputs, progress, and committed results are durable. After a transient API outage or service restart, keep polling the same run and resume events from the last persisted sequence. If the create response itself was interrupted, repeat it with the same Idempotency-Key to recover the admitted run without creating duplicate work.

for event in dmc.runs.watch(run.id, after=run.last_event_sequence):
    print(event.type, event.progress)

terminal = dmc.runs.wait(run.id)

Cancellation is idempotent. It stops undispatched work at safe quantum boundaries and preserves committed results. Non-preemptible chemistry may finish its current bounded quantum before the run becomes cancelled.

Contents

Multi-query runs

Apply one selection template independently to caller-identified query molecules.

{
  "schema_version": "run/1",
  "kind": "selection_batch",
  "selection_template": {
    "schema_version": "molecule-selection/1",
    "database": {"database_id": "enamine-real-v5a", "release_id": "2026-08-29.1"},
    "strategy": {"type": "ranked"},
    "constraints": {"presets": [{"preset_id": "lipinski-ro5", "version": "1"}]},
    "objectives": [{
      "type": "similarity",
      "reference_id": "query",
      "metric_id": "rdkit.ecfp4_tanimoto",
      "direction": "maximize"
    }],
    "portfolio": {"limit": 10},
    "execution": {"quality": "fast"}
  },
  "items": [
    {"id": "lead-001", "references": [{"id": "query", "structure": {"format": "smiles", "value": "CCO"}}]},
    {"id": "lead-002", "references": [{"id": "query", "structure": {"format": "smiles", "value": "CCN"}}]}
  ],
  "failure_policy": "continue",
  "metadata": {"campaign": "lead-expansion-2026-08"}
}

Item IDs are unique 1–128 character values from [A-Za-z0-9._-]. Initial advertised bounds are 1,000 items, 5 MiB request bodies, and 100,000 items × portfolio.limit result cells; always read the deployment/entitlement limits from the catalog.

template = (
    Selection.from_database("enamine-real-v5a", release="2026-08-29.1")
    .ranked()
    .maximize_similarity("rdkit.ecfp4_tanimoto", reference="query")
    .limit(10)
)
spec = Run.selection_batch(
    template=template,
    items={"lead-001": {"query": "CCO"}, "lead-002": {"query": "CCN"}},
)
run = dmc.runs.create(spec, idempotency_key="lead-set-2026-08-v1")

A chemically invalid item becomes its own terminal error after admission. Invalid envelopes, duplicate IDs, missing bindings, unsupported capabilities, or over-budget requests fail before a run is created.

Contents

Results, errors, and retries

Consume partial results safely without losing failed items or duplicating commits.

Results become readable as items commit. order=completion is safe for resumable partial consumption while a run is active. Each entry retains input_index. order=input is available after the run is terminal and provides stable original order.

for item in dmc.runs.iter_results(run.id):
    if item.ok:
        print(item.id, item.result["results"])
    else:
        print(item.id, item.error["code"])

An item error includes code, message, field, retryable, attempt_count, and run/item/request correlation IDs. completed_with_errors is a successful lifecycle terminal state with one or more failed/cancelled items—including when every item fails deterministically. It is not transformed into an exception that hides successful siblings.

Workers use leases and visibility timeouts. A crash can redeliver uncommitted work, but commits are idempotent by run/item/canonical hash and cannot duplicate results or counts. Only transient worker, dependency, and explicitly retryable timeout failures receive bounded exponential retry. Invalid structures, unsupported capabilities, and exact empty results are not retried.

The first release uses cursor-paginated JSON rather than filesystem paths or downloadable artifacts.

Contents

Durable runs

Typed, observable execution for every multi-query or over-budget selection.

run/1 is the only durable execution resource. It accepts two explicit kinds:

  • selection: one normalized selection that exceeds the synchronous budget;
  • selection_batch: one shared selection template with 1–1,000 independent reference bindings.

It never accepts an endpoint name, URL, executable expression, container, command, filesystem path, or opaque job payload.

IntentRoute
Validate/estimatePOST /api/v2/runs:estimate
CreatePOST /api/v2/runs
List/retrieveGET /api/v2/runs, GET /api/v2/runs/{run_id}
Items/results/eventsGET /api/v2/runs/{run_id}/items, /results, or /events
CancelPOST /api/v2/runs/{run_id}:cancel

Creation returns 202 Accepted only after the run is durably admitted, with tenant ownership, pinned releases, initial progress, expiry, and links. An accepted run survives client disconnects and API service restarts. Use a stable Idempotency-Key; the supported SDK requires one. Reusing a key with identical canonical content recovers the original run, while reuse with different content returns 409.

No synchronous batch

There is no /search/batch and no scorer-specific batch route. This prevents an unobservable job from masquerading as a synchronous request and ensures partial errors never discard valid work.

Contents

Random sampling

Draw a bounded, optionally seeded sample with explicit distribution semantics.

POST /api/v2/sample draws 1–1,000 assembled molecules from one chemical space.

{
  "database_id": "enamine-real-v5a",
  "count": 100,
  "seed": 12345,
  "include_synthons": false
}

For a combinatorial space, route_product_tuple means reactions are weighted by valid tuple counts and a tuple is drawn uniformly from the chosen route. Deduplication means this is not necessarily uniform over unique canonical molecules. Enumerated spaces may advertise eligible_row instead. Always read sampling_method, sampling_version, database_release, and warnings.

The response reports requested, returned, and deduplicated — the number of draws removed because they assembled to a product already in the sample, so returned can be below count.

A seed is reproducible only with the same database release and sampling algorithm version. Omitting it lets the server choose and return a seed. Constrained sampling uses a sample strategy in /selections; it is never implemented by fetching a random shortlist and filtering on the client.

molecules = dmc.sample(
    database="enamine-real-v5a",
    count=100,
    seed=12345,
)
Contents

CHEESE similarity search

Shape or electrostatic exact product reranking with explicit model provenance.

POST /api/v2/search_cheese uses the same constructible-product acquisition family as default search, then exactly reranks assembled products with a CHEESE model. Use it when 3D shape or electrostatic similarity is the scientific objective; it has different interpretation and latency from ECFP4 search.

curl --request POST 'https://api.deepmedchem.com/api/v2/search_cheese' \
  --header "x-api-key: $DMC_API_KEY" \
  --header 'content-type: application/json' \
  --data '{
    "query_smiles": "CCO",
    "database_id": "enamine-real-v5a",
    "scorer": "shape",
    "limit": 20
  }'

scorer is required and is either shape or esp (electrostatic). The response identifies the model version, exact metric name, proposal score, final score, and timing. Model/conformer/charge assumptions are part of that pinned model release; do not compare numbers from different model versions as if they were calibrated identically.

Set shortlist_multiplier to 0 to disable candidate over-fetch. The endpoint then proposes exactly limit products and still scores those assembled products with the requested CHEESE model. It cannot disable CHEESE scoring itself without ceasing to be a CHEESE search.

shape_hits = dmc.search_cheese(
    "CCO",
    database="enamine-real-v5a",
    scorer="shape",
    limit=20,
)

CHEESE work has a slower guardrail than default Morgan search and separate capacity. A timeout does not imply no neighbors exist. More than one query always uses a selection_batch run.

Contents

Default structural search

Recommended SynthonOR proposal with exact ECFP4/Tanimoto product reranking.

POST /api/v2/search is the recommended starting point. It uses Morgan-OR over synthons to propose constructible products, assembles them, then ranks exact product ECFP4 fingerprints by Tanimoto. There is no scorer field: this route has one stable scientific meaning.

{
  "query_smiles": "CCO",
  "database_id": "enamine-real-v5a",
  "limit": 20
}
FieldMeaning
query_smilesRequired structure, at most 2,048 characters
database_idRequired chemical-space ID from the catalog
limitFinal products, default 20, range 1–200
shortlist_multiplierAdvanced proposal/recall budget, default 10, range 0–200; 0 disables candidate over-fetch
include_synthonsOpt-in route/synthon expansion; increases response size

Increasing shortlist_multiplier asks the engine to assemble and exactly rerank more proposals. It can improve recall at a proportional latency/cost increase; it does not change the final metric.

Set shortlist_multiplier to 0 for explicit no-over-fetch mode. The engine proposes exactly limit products and still applies exact assembled-product ECFP4/Tanimoto scoring. This is not a proposal-only mode and does not weaken the endpoint's stated metric.

The request is safe to retry against the same pinned release. A 429 is transient and includes Retry-After; validation and invalid-SMILES errors are not retryable. See the quickstart for curl, Python, CLI, and a representative response.

Contents

Substructure search

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

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

Enamine substructure search is enabled in production on release 2026-09-06.2, over the filtered approximately 93.41B source population. All 326 route partitions are indexed. Native candidates are assembled, checked for population membership, and verified against the original query, including bond order, recursive SMARTS, and chirality.

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

The endpoint 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.

import deepmedchem as dmc

motif_hits = dmc.substructure(
    "[N;R0][N;R0]C(=O)",
    format="smarts",
    database="enamine",
    limit=10,
    timeout_seconds=45,
    timeout=60,
)

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.

Demanding motifs can take tens of seconds. timeout_seconds controls the server search budget, separately from the ordinary synchronous execution limit. Set the SDK HTTP timeout above that budget to allow for serialization and transport. Exact returned matches and full index coverage do not guarantee exhaustive enumeration before the deadline.

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

Contents

Constraints

Exact properties, presets, structures, relationships, fidelity, units, and coverage.

Constraints determine eligibility. Registry IDs and typed operators replace ambiguous display names and free-form expressions.

{
  "type": "property",
  "property_id": "rdkit.mol_wt",
  "operator": "gt",
  "value": 250,
  "units": "Da",
  "required_fidelity": "exact_product",
  "missing": "reject"
}

Scalar operators are gt, gte, lt, lte, and range; range endpoints explicitly record inclusivity. Units are validated against registry metadata and normalized before planning.

lipinski-ro5/v1 expands to MW ≤ 500 Da, Crippen cLogP ≤ 5, HBD ≤ 5, and HBA ≤ 10. It includes no unannounced polarity, flexibility, alert, or “lead-like” rule. Explicit constraints intersect with preset constraints; an empty intersection is a validation error.

Structure conditions use shallow all, thresholded any, and none groups with inline typed queries or reviewed pattern_id values. Relationship constraints state reference-relative meaning, such as a different Bemis–Murcko scaffold. Validation reports each condition as exact pushdown, conservative approximate pushdown plus exact final verification, post-assembly only, or unsupported.

Approximation may broaden or accelerate candidate acquisition. Every normal hard constraint remains authoritative on the assembled product, with missing: reject; there is no public switch that turns off exact final verification.

Contents

Objectives

Rank eligible products with explicit metrics, models, directions, and references.

Objectives rank products that already satisfy constraints. A similarity objective names its reference, metric, and direction:

{
  "type": "similarity",
  "reference_id": "aspirin",
  "metric_id": "rdkit.ecfp4_tanimoto",
  "direction": "maximize"
}

Initial similarity IDs are rdkit.ecfp4_tanimoto, cheese.shape, and cheese.electrostatic. CHEESE objectives pin their model release and retain raw component scores. Scientifically material choices are never inferred: shape versus electrostatic, logP versus logD, scaffold method, or an ADMET model must be explicit.

Several references that jointly define one objective remain one selection. Independent result sets for several inputs are a selection_batch run.

Predicted-property shortlist acquisition

A ranked similarity selection can optionally reduce its shortlist using one advertised predicted-property endpoint:

{
  "execution": {
    "quality": "balanced",
    "acquisition": {
      "type": "predicted_property_rank_quantile",
      "endpoint_id": "openadmet-herg-pchembl",
      "direction": "minimize",
      "keep_fraction": 0.25
    }
  }
}

This operation preserves the similarity-led candidate generation and keeps the requested rank quantile in the selected direction. It is intentionally not an objective or hard eligibility constraint: CP16 values are predicted, experimental-acquisition-only signals and do not establish that an assembled molecule meets an ADMET threshold. The API returns per-hit predicted values and applicability plus response-level model and candidate-count provenance.

Only ranked_similarity is supported. Sampled selections, ranked selections without a similarity objective, missing endpoints, and databases whose loaded release lacks the signed CP16 assets fail validation before a credit is reserved.

Contents

Portfolio rules

Control result limits, diversity, deduplication, and returned evidence.

portfolio.limit bounds the final returned set. Optional rules such as max_per_scaffold operate after eligibility and objective evaluation; they do not change a hard constraint into a ranking preference.

{
  "portfolio": {
    "limit": 100,
    "max_per_scaffold": 5
  }
}

The response records deduplication behavior and immutable product/reaction provenance. Large expansions—synthons, exact constraint evidence, objective components, or execution plans—are opt-in through include and participate in response/run budgets.

Select a diverse subset from scored hits

A scaffold cap is one way to limit redundancy. To explore how score and diversity trade off across a fixed-size experimental batch, the OPDiv preprint works through the optimization problem and its implementation. OPDiv paper · OPDiv repository

Contents

Validation and estimation

Normalize intent, resolve releases, inspect execution fidelity, and choose sync or durable work.

Call POST /api/v2/selections:validate before expensive work. It returns the deterministic normalized document and hash, expanded presets, resolved aliases, contradictions, unsupported conditions, warnings, and per-constraint execution status.

Then call POST /api/v2/selections:estimate. It adds coverage, work/result budgets, viable execution information, and execution_tier.

validation = dmc.selections.validate(selection)
estimate = dmc.selections.estimate(validation.normalized_selection)
if estimate.execution_tier == "synchronous":
    result = dmc.selections.create(estimate.normalized_selection)
else:
    run = dmc.runs.create(
        Run.selection(estimate.normalized_selection),
        idempotency_key="campaign-selection-v1",
    )

execution_tier="durable" is a successful estimate and contains a directly reusable run/1 request. Sending that document to synchronous /selections returns 413 durable_required with the same normalized intent; it does not start a hidden run or silently relax a condition.

Contents

Molecule selections

One replayable contract for ranked and no-reference constrained molecule selection.

molecule-selection/1 separates exploration strategy, hard eligibility, ranking, and portfolio construction. The document can be produced by HTTP, Python, CLI, UI, or an agent without semantic loss.

No-reference constrained sample

{
  "schema_version": "molecule-selection/1",
  "database": {"database_id": "enamine-real-v5a"},
  "references": [],
  "strategy": {"type": "sample", "distribution": "route_product_tuple"},
  "constraints": {
    "presets": [{"preset_id": "lipinski-ro5", "version": "1"}]
  },
  "objectives": [],
  "portfolio": {"limit": 1000},
  "execution": {"quality": "balanced", "seed": 42},
  "include": ["properties", "constraint_evidence", "execution_plan"]
}

This means “condition the advertised route/product-tuple distribution on exact Lipinski eligibility, then return up to 1,000 products.” It does not mean “sample 1,000 arbitrary products and drop failures.” Validation expands the preset into ordinary registry conditions.

Ranked selection

The complete aspirin scaffold-different, alpha-amino-acid, MW-over-250 example is available in the Python builder guide. Its meaning is explicit: maximize ECFP4 similarity subject to exact product constraints and a different Bemis–Murcko scaffold. A shape-led scaffold hop instead needs a CHEESE shape objective and an explicit 2D-similarity cap.

An optional execution.acquisition can use an advertised predicted-property endpoint to retain a rank quantile from a similarity shortlist. This is an experimental acquisition signal, not an exact ADMET filter; see Objectives.

Use POST /api/v2/selections:validate, then :estimate, then either bounded /selections or the exact reusable /runs payload returned by the estimate. The service never silently weakens intent or starts hidden durable work.

Contents

Conformer Alignment

Superimpose 3D conformers of a retrieved molecule onto the query to visualise how well their shapes and pharmacophoric features overlap.

Superimpose 3D conformers of a retrieved molecule onto the query molecule to visualise how well their shapes and pharmacophoric features overlap.

How it works

  • A set of low-energy 3D conformers is generated for both the query and the probe (retrieved) molecule.
  • Each probe conformer is aligned onto each query conformer using the selected alignment method.
  • The best-scoring pairs are returned with their RMSD, energy, and alignment score.
  • You can interactively switch between conformer pairs in the 3D viewer to inspect the overlap.

Alignment methods

MCS (Maximum Common Substructure)

Identifies the largest shared substructure between the query and probe molecules, then aligns conformers by superimposing the matched atoms.

  • Finds the maximum common substructure (MCS) between two molecules using RDKit's FMCS algorithm
  • Generates 3D conformer ensembles for both the query and probe molecules
  • Aligns each probe conformer onto each query conformer using the MCS atom mapping
  • Reports RMSD computed over the matched atom pairs
  • Best suited when molecules share a clear common scaffold

MCS Constrained

Uses the MCS core as a rigid constraint during conformer generation, then aligns on the constrained atoms. This produces tighter overlaps on the shared scaffold.

  • Identifies the MCS core the same way as the standard MCS method
  • Generates probe conformers with the core atoms constrained to match the reference geometry (ConstrainedEmbed)
  • Non-core atoms are energy-minimised while the core stays fixed
  • Yields lower RMSD on the core but may differ more in peripheral regions
  • Useful when preserving the binding-pose geometry of the shared scaffold is critical

Open3DAlign

An unsupervised 3D alignment method that optimises the overlap of molecular volumes and force-field atom types without requiring a predefined atom mapping.

  • Uses the Open3DAlign algorithm implemented in RDKit (GetO3A)
  • Automatically determines the optimal atom-atom mapping based on MMFF94 atom types
  • Maximises a score that combines steric (shape) and electrostatic overlap
  • Does not require a common substructure — works for structurally diverse molecule pairs
  • Returns an alignment score and RMSD for each conformer pair

When to use which method?

MethodBest for
MCSQuery and probe share a clear common scaffold — fast, interpretable alignment based on matched atoms.
MCS ConstrainedTightest possible overlap on the shared core, e.g. comparing binding poses or evaluating R-group changes around a fixed scaffold.
Open3DAlignStructurally diverse molecules that may not share a large common substructure — finds the best 3D overlay purely based on shape and atom-type overlap.

Sources

  • RDKit Molecular Alignment Module — rdkit.Chem.rdMolAlign Docs
  • Landrum, G. 3D MCS-based alignment with RDKit. RDKit Blog, 2022. Link
  • Tethered minimization of small molecules with RDKit. Discngine Blog, 2019. Link
Contents

Partial Charges

CHEESE uses Geometric Transformers to predict partial atomic charges, replacing expensive DFT calculations.

CHEESE uses Geometric Transformers to predict partial atomic charges, replacing expensive DFT (Density Functional Theory) calculations. It predicts two AI-derived charge types and computes two classical baselines.

Charge types

Charge typeMethod
ESP (AI)AI-predicted monopole charges fitted to the Connolly surface
RESP (AI)AI-predicted restrained ESP (penalized for conformational stability)
GasteigerClassical electronegativity equalization (RDKit)
MMFFMerck Molecular Force Field charges (RDKit)

Training

  • 70,000 DFT calculations on diverse drug-like chemotypes
  • QM level: ωB97X-D/def2-svp (dispersion-corrected DFT with split-valence basis)
  • Validated on an out-of-distribution scaffold-split test set (Morgan Tanimoto < 0.3)

Model architecture

Two parallel Geometric Transformers (one for ESP, one for RESP), each consisting of:

  • transformer.pt (~41 MB) — a geometry-aware transformer that takes atomic features + 3D coordinates and outputs learned representations
  • projection.pt (~2.7 KB) — a final linear layer mapping features to one charge value per atom

Built on the en-transformer package (equivariant/geometric transformer).

Input features

  • Atomic numbers (integer per atom)
  • 3D Cartesian coordinates (from MMFF-optimized conformer)
  • Bond matrix (symmetric adjacency matrix with integer-encoded bond types, 13 states)

Inference pipeline

SMILES string
Parse + add H
Generate 50 conformers
MMFF optimization
Extract features → PyTorch tensors
ESP & RESP Transformers, plus Gasteiger & MMFF (RDKit)
4 charge sets

Constraints

Max 200 atoms; supported elements: C, N, S, O, F, Cl, Br, H only.

Key references

  • Bayly, C. I.; Cieplak, P.; Cornell, W.; Kollman, P. A. A well-behaved electrostatic potential based method using charge restraints for deriving atomic charges: the RESP model. J. Phys. Chem. 1993. Link
  • Alenaizan, A.; Burns, L. A.; Sherrill, C. D. Python implementation of the restrained electrostatic potential charge model. Int. J. Quantum Chem. 2020. Link
  • Gasteiger, J.; Marsili, M. Iterative partial equalization of orbital electronegativity — a rapid access to atomic charges. Tetrahedron Lett. 1978. Link
  • Tosco, P.; Stiefl, N.; Landrum, G. Bringing the MMFF force field to the RDKit: implementation and validation. J. Cheminform. 2014, 6, 37. Link
Contents

On-Premise Endpoints

Embeddings, centroids, pairwise/matrix similarity, and visualization endpoints available exclusively with an on-premise CHEESE installation.

The following endpoints are available exclusively with an on-premise CHEESE installation. Replace YOUR_ONPREM_URL with your deployment's base URL.

GET /embeddings — Compute Embeddings

Compute CHEESE embeddings (256-dimensional vectors) for molecules.

Python
params = {
    "search_input": ["Fc1ccccc1", "Clc1ccccc1"],
    "save_embs": False,
}

response = requests.get(MY_URL + "/embeddings",
    params=params, headers=headers)
# Returns 256-dim vectors per molecule per search type
cURL
curl -X GET 'http://YOUR_ONPREM_URL/embeddings?search_input=Fc1ccccc1&search_input=Clc1ccccc1&save_embs=false' \
  -H 'Accept: application/json'

GET /centroid_embeddings — Centroid Embeddings

Retrieve cluster centroid embeddings for databases. Optionally include representative molecules for each cluster.

Python
params = {
    "db_name": "ZINC15",
    "search_type": "espsim_shape",
    "centroid_mols": False,
}

response = requests.get(MY_URL + "/centroid_embeddings",
    params=params, headers=headers)
cURL
curl -X GET 'http://YOUR_ONPREM_URL/centroid_embeddings?db_name=ZINC15&search_type=espsim_shape&centroid_mols=false' \
  -H 'Accept: application/json'

GET /similarity — Pairwise Similarity

Compute pairwise similarity between two molecules using euclidean or cosine distance across all similarity metrics.

Python
params = {
    "smiles1": "Fc1ccccc1",
    "smiles2": "Clc1ccccc1",
    "similarity_metric": "all",
    "distance_type": "cosine",
}

response = requests.get(MY_URL + "/similarity",
    params=params, headers=headers)
cURL
curl -X GET 'http://YOUR_ONPREM_URL/similarity?smiles1=Fc1ccccc1&smiles2=Clc1ccccc1&similarity_metric=all&distance_type=cosine' \
  -H 'Accept: application/json'

GET /similarity_matrix — Similarity Matrix

Compute a full pairwise similarity matrix for a list of molecules. Useful for clustering and network analysis.

Python
params = {
    "smiles": ["SMILES1", "SMILES2", "SMILES3"],
    "similarity_metric": "espsim_shape",
    "distance_type": "cosine",
}

response = requests.get(MY_URL + "/similarity_matrix",
    params=params, headers=headers)
cURL
curl -X GET 'http://YOUR_ONPREM_URL/similarity_matrix?smiles=SMILES1&smiles=SMILES2&smiles=SMILES3&similarity_metric=espsim_shape&distance_type=cosine' \
  -H 'Accept: application/json'

GET /visualise — Visualization

Generate 2D coordinates for visualization using UMAP or PCA dimensionality reduction. Supports saving coordinates to disk.

Python
params = {
    "search_input": ["Fc1ccccc1", "Clc1ccccc1", "Brc1ccccc1"],
    "search_type": "espsim_electrostatic",
    "visualisation_method": "umap",
}

response = requests.get(MY_URL + "/visualise",
    params=params, headers=headers)
cURL
curl -X GET 'http://YOUR_ONPREM_URL/visualise?search_input=Fc1ccccc1&search_input=Clc1ccccc1&search_input=Brc1ccccc1&search_type=espsim_electrostatic&visualisation_method=umap' \
  -H 'Accept: application/json'
Contents

Legacy public endpoints

Existing-customer reference for the legacy CHEESE API; use API v2 for new integrations.

All examples assume the setup from the overview (MY_URL, API_KEY, headers). Every request must include the X-API-Key: your_api_key_here header.

GET /test — Health Check

Verify the API is running and accessible.

Python
response = requests.get(MY_URL + "/test", headers=headers)
# {"message": "Health check successful !!"}
cURL
curl -X GET 'https://api.cheese.deepmedchem.com/test' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY'

GET /available_dbs — List Available Databases

Returns the list of searchable molecular databases.

Python
response = requests.get(MY_URL + "/available_dbs", headers=headers)
cURL
curl -X GET 'https://api.cheese.deepmedchem.com/available_dbs' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY'

Available databases: ZINC15, ENAMINE-REAL, MCULE-FULL, MCULE-IN-STOCK, SYNPLE, ENAMINE-CARBOXYLIC, EXPLORE-ENUMERATED, EXPLORE-DIVERSE, CHEMRIYA.

GET /random_molecule — Random Molecules

Returns random molecules in SMILES format from available databases.

Python
params = {"n_mols": 5}
response = requests.get(MY_URL + "/random_molecule",
    headers=headers, params=params)
cURL
curl -X GET 'https://api.cheese.deepmedchem.com/random_molecule?n_mols=5' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY'

Basic molecular similarity search. Returns a list of SMILES strings and database IDs of similar molecules.

Python
params = {
    "search_input": "CC(=O)Oc1ccccc1C(=O)O",
    "search_type": "espsim_shape",
    "n_neighbors": 5,
    "search_quality": "fast",
    "db_names": ["ENAMINE-REAL"],
}

response = requests.get(MY_URL + "/molsearch_simple",
    params=params, headers=headers)
cURL
curl -X GET 'https://api.cheese.deepmedchem.com/molsearch_simple?search_input=CC(%3DO)Oc1ccccc1C(%3DO)O&search_type=espsim_shape&n_neighbors=5&search_quality=fast&db_names=ENAMINE-REAL' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY'

GET /molsearch_array — Search Multiple Molecules

Search for multiple query molecules at once. Returns results keyed by input SMILES.

Python
params = {
    "search_input": ["CC1=CN(C)N=C1", "CNC1=CC=CC=C1"],
    "search_type": "espsim_shape",
    "n_neighbors": 5,
    "search_quality": "fast",
    "db_names": "ZINC15",
}

response = requests.get(MY_URL + "/molsearch_array",
    params=params, headers=headers)
cURL
curl -X GET 'https://api.cheese.deepmedchem.com/molsearch_array?search_input=CC1%3DCN(C)N%3DC1&search_input=CNC1%3DCC%3DCC%3DC1&search_type=espsim_shape&n_neighbors=5&search_quality=fast&db_names=ZINC15' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY'

Search multiple molecules in batch or centroid mode for consensus results.

Python
params = {
    "search_input": ["SMILES1", "SMILES2", "SMILES3"],
    "search_type": "espsim_shape",
    "n_neighbors": 10,
    "search_mode": "batch",  # or "centroid"
}

response = requests.get(MY_URL + "/batch_search",
    params=params, headers=headers)
cURL
curl -X GET 'https://api.cheese.deepmedchem.com/batch_search?search_input=SMILES1&search_input=SMILES2&search_input=SMILES3&search_type=espsim_shape&n_neighbors=10&search_mode=batch' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY'

GET /molsearch — Advanced Search (Main Endpoint)

Full-featured molecular search with descriptors, predicted properties, and Morgan Tanimoto similarities.

Parameters

ParameterTypeDescription
search_inputstrSMILES string of the query molecule
db_namesList[str]Databases to search (e.g. ["ZINC15", "ENAMINE-REAL"])
search_typestrmorgan, espsim_electrostatic, espsim_shape, active_pairs
search_qualitystrfast, accurate, very_accurate
n_neighborsintNumber of neighbors to retrieve
descriptorsboolWhether to include molecular descriptors
propertiesboolWhether to include predicted ADMET properties
filter_moleculesboolApply molecular filters (e.g. 'No solvents')
order_moleculesboolWhether to order results
filteringList[str]Filters: 'PAINS', 'Murcko scaffold hop' (optional)
orderingList[str]Ordering: 'Morgan Tanimoto' (optional)
Python
params = {
    "search_input": "CC(=O)Oc1ccccc1C(=O)O",
    "search_type": "espsim_shape",
    "n_neighbors": 5,
    "search_quality": "fast",
    "db_names": ["ZINC15"],
    "descriptors": True,
    "properties": True,
    "filter_molecules": False,
    "order_molecules": False,
}

response = requests.get(MY_URL + "/molsearch",
    params=params, headers=headers)
cURL
curl -X GET 'https://api.cheese.deepmedchem.com/molsearch?search_input=CC(%3DO)Oc1ccccc1C(%3DO)O&search_type=espsim_shape&n_neighbors=5&search_quality=fast&db_names=ZINC15&descriptors=true&properties=true&filter_molecules=false&order_molecules=false' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY'

Response structure

The response JSON contains:

  • neighbors — List of similar molecules with SMILES, database IDs, embedding distances, properties
  • query_properties — Descriptors and predicted properties of the query molecule
  • search_info — Timing details (embedding, search, filter, sorting, total time)

Predicted properties

CategoryProperties
Absorptioncaco2_wang, lipophilicity, solubility, bioavailability, HIA, Pgp, cLogP
DistributionPPBR, VDss, BBB penetration
MetabolismCYP2C9, CYP2D6, CYP3A4 inhibition
ExcretionHepatocyte clearance, microsome clearance, half-life
ToxicityLD50, AMES mutagenicity, DILI, hERG liability
BasicsMW, formal charge, heavy atoms, HBA, HBD, rotatable bonds, rings, TPSA

GET /molsearch — With Filtering & Ordering

Filter out PAINS, enforce scaffold hops, and sort results by Morgan Tanimoto similarity.

Python
params = {
    "search_input": "CC(=O)Oc1ccccc1C(=O)O",
    "search_type": "espsim_shape",
    "n_neighbors": 10,
    "search_quality": "fast",
    "db_names": ["ZINC15"],
    "descriptors": True, "properties": True,
    "filter_molecules": True,
    "order_molecules": True,
    "filtering": ["PAINS", "Murcko scaffold hop"],
    "ordering": ["Morgan Tanimoto"],
}

response = requests.get(MY_URL + "/molsearch",
    params=params, headers=headers)
cURL
curl -X GET 'https://api.cheese.deepmedchem.com/molsearch?search_input=CC(%3DO)Oc1ccccc1C(%3DO)O&search_type=espsim_shape&n_neighbors=10&search_quality=fast&db_names=ZINC15&descriptors=true&properties=true&filter_molecules=true&order_molecules=true&filtering=PAINS&filtering=Murcko+scaffold+hop&ordering=Morgan+Tanimoto' \
  -H 'Accept: application/json' \
  -H 'X-API-Key: YOUR_API_KEY'

Filtering may reduce the number of results. Increase n_neighbors to compensate.

Contents

Legacy CHEESE API

Migration-only documentation for the legacy hosted API.

Legacy API

This section documents the legacy 39-route service. New integrations should use the CHEESE API v2 quickstart. Do not copy legacy GET query strings, job helpers, or UI-shaped response contracts into a new client.

These pages remain available during the migration/support window for existing integrations.

API Base URL

Legacy host: https://api.cheese.deepmedchem.com/. Current v2 host: https://api.deepmedchem.com/api/v2.

Two API surfaces

Endpoint reference

All 39 legacy routes generated from the pinned legacy OpenAPI contract — requests, responses, and schemas. Replaces the former web /api Scalar page.

Public API

For registered users of CHEESE Search. Includes molecular search and ADMET property prediction.

On-Premise API

Advanced features: embedding computation, similarity matrices, visualization, and custom database indexing.

Authentication

API calls require an API key. To obtain one:

  1. Go to cheese.deepmedchem.com and sign in
  2. Click "Generate API Key" in the top right corner
  3. Copy the API key and include it in request headers
X-API-Key: your_api_key_here

Getting started (Python)

Prerequisites: pip install requests numpy rdkit

import requests
import json

MY_URL = "https://api.cheese.deepmedchem.com"
API_KEY = "your_api_key_here"
headers = {"X-API-Key": API_KEY, "accept": "application/json"}

Search types reference

CodeNameDescription
morgan2D Morgan FingerprintStructural fingerprints (Morgan/ECFP) with Tanimoto similarity. Fast and reliable for structural analogs.
espsim_shape3D Shape SimilarityBased on 3D surface overlap of the best aligned pair of randomly generated conformers.
espsim_electrostatic3D Electrostatic SimilarityBest overlap of electrostatic potential (ESP) between aligned conformer pairs. Preserves protein-ligand binding properties.
active_pairsActivity-Based SimilaritySimilarity learned from known active compound pairs.

Available databases

ZINC15, ENAMINE-REAL, MCULE-FULL, MCULE-IN-STOCK, SYNPLE, ENAMINE-CARBOXYLIC, EXPLORE-ENUMERATED, EXPLORE-DIVERSE, CHEMRIYA

Public endpoints

Health check, database listing, random molecules, and the molecular search endpoints.

On-premise endpoints

Embeddings, centroids, pairwise/matrix similarity, and visualization.

Contents

Overview

Choose a search method and interpret molecular similarity results.

CHEESE Search finds neighbours of a query molecule in the chemical libraries available at your site. Choose Morgan for fingerprint similarity, shape to compare molecular geometry, or electrostatic to compare charge distributions. The available methods depend on the library.

Choose a library and interpret your hits

Use the database comparison to choose between in-stock and make-on-demand compounds. For an example of interpreting 3D results, follow the neurosteroid case study. The team used CHEESE embeddings to rank six new compounds before synthesis, then compared the predictions with measurements. Study methods and figures

What you can do

Partial Charges

AI-predicted ESP/RESP partial atomic charges that replace expensive DFT calculations.

Conformer Alignment

Superimpose 3D conformers to visualise shape and pharmacophore overlap (MCS, MCS-constrained, Open3DAlign).

Benchmarks

ADMET property prediction results on the TDC benchmarks and evaluation against SOTA search.

Case Study

Finding new EGFR inhibitors with CHEESE similarity search.

Deploy CHEESE Search

Install the service and verify your first search at your site.

CHEESE API v2

Programmatic molecular search and property prediction over HTTP.

Maintaining an integration with the original endpoints? See the legacy Search API migration reference.

Contents

CLI guide

Search, sample, validate selections, and operate durable runs from the navigator command.

navigator auth login
navigator catalog
navigator search --smiles 'CCO'
navigator search-cheese --smiles 'CCO' --scorer shape
navigator search-substructure --query 'C(=O)N1CCC1' --query-format smarts
navigator sample --count 100 --seed 12345

Every multi-query file creates one durable run:

navigator search --input leads.smi --limit 10 --json
navigator run status run_01K...
navigator run watch run_01K...
navigator run results run_01K...
navigator run cancel run_01K...

Selection and run JSON/YAML are portable:

navigator selection validate selection.yaml
navigator selection estimate selection.yaml
navigator selection execute selection.yaml
navigator selection export selection.yaml --format json
navigator run estimate run.yaml
navigator run create run.yaml --idempotency-key campaign-v1

run results emits JSON Lines and exits 2 when any item failed while preserving successful output. Credentials never appear as command arguments except secure stdin for headless login.

Contents

Choose a database

Compare chemical spaces by supplier, size, lead time, reported synthesis success, and pricing.

If you need material from stock, look for a library marked in_stock in your installation’s catalogue. If you can wait for synthesis, compare the make-on-demand spaces below by chemistry, lead time, and budget.

Compare make-on-demand spaces

How to read the table. B means billion and T means trillion. Reported synthesis success is a supplier-level estimate for a collection. The result for an individual molecule depends on its chemistry. Lead times and prices can vary by destination, quantity, and order size. A price estimate is usually per compound at 1 mg before discounts. For example, the VAST H2 2026 estimate assumes 50 compounds at 1 mg each. Use the quote link to confirm the amount, price, and delivery date before ordering.

Supplier figures from the SDK catalogue, dated September 11, 2026. Use the short IDs with the Python SDK or CLI.

SupplierDatabase IDCollection sizeLead timeReported synthesis successPrice estimate
Enamineenamine~93.41B source combinations3–4 weeks>80%Available · Ask vendor
Chemspacefreedom296.4B5–6 weeks>80%Available · Ask vendor
eMoleculesexplore9.5T3–4 weeks>85%Available · Ask vendor
eMoleculessynple7.6T3–4 weeks>85%Available · Ask vendor
Otavacheminfinita794.2B5–8 weeks55–85%Ask vendor
Molecule.onespacem11.5B2–6 weeks>85%Ask vendor
XtalPivast6.8B2–4 weeks85%+Available · Ask vendor

Onepot CORE 2.0 Lite

Onepot AI

Use database="onepot" (canonical ID onepot-core-2-lite) for Onepot searches. Availability and supported capabilities come from the connected API catalog. The supplier quotes $250 for two-component products and $375 for three or more components, per 1 mg. Shipping cost is unspecified. Reported synthesis success is 60–70%, synthesis takes 5–7 business days, and US delivery is overnight. These are supplier estimates; request a final quote from orders@onepot.ai.

Onepot supplier details in the SDK

Enumerated libraries and in-stock catalogues

The SDK v0.3.0b5 catalogue records these library sizes on September 24, 2026. Use this snapshot to compare collections. Check your site catalogue for the installed IDs, sizes, and availability. For example, the on-prem demo reported enamine-aa as in stock on December 3, 2026.

SupplierCatalogue ID in snapshotSizeOrdering categoryLead timeReported synthesis success
Enamineenamine-real9.56BMake-on-demand3–4 weeks>80%
Chemspacechemspace-5b-ro55.0BMake-on-demand5–6 weeks>80%
Chemspacechemspace-5b-beyond-ro55.0BMake-on-demand5–6 weeks>80%
Chemspacechemspace-5b-freedom5.0BMake-on-demand5–6 weeks>80%
XtalPixtalpi4.7BMake-on-demand2–4 weeks85%+
eMoleculessynple-4b3.9BMake-on-demand3–4 weeks>85%
Otavachemriya1.4BMake-on-demandAsk vendorN/A
Molecule.onemolecule-one68.0MMake-on-demand2–6 weeks>85%
eMoleculesexplore-enumerated54.8MMake-on-demand3–4 weeks>85%
eMoleculesexplore-diverse11.4MMake-on-demand3–4 weeks>85%
Enamineenamine-aa373.8KMake-on-demand3–4 weeks>80%
Mculemcule-in-stock7.2MIn stockConfirm stock and shipping—
Mculemcule-full140.4MPurchasable catalogueConfirm with supplier—
MolPortmolport5.9MIn stockConfirm stock and shipping—
Chemspacechemspace-screening7.5MIn stockConfirm stock and shipping—
ZINC15zinc15697.1MResearchUnspecified—

In-stock entries need no synthesis. Mcule Full covers its broader purchasable catalogue, so check the stock status of each compound with the supplier.

Pricing by interface. The September SDK table marked Mcule, MolPort, and Chemspace stock collections as having supplier pricing. Its CHEESE Search interface returned no per-compound estimates for enumerated libraries. On a current site, inspect each library’s pricing.available in GET /api/v2/catalog. Where an estimate is unavailable, contact the supplier for a quote.

Find databases on your installation

Open the database picker or request GET /api/v2/catalog at your CHEESE site. For each matching library, record its database_id, release_id, and supported operations. Where a search result has a price, check the amount and destination assumptions before comparing it with another offer. Catalogue API and price fields · On-prem API guide

For example, the on-prem demo includes enumerated in-stock collections from Mcule, MolPort, and Chemspace. A stock entry means no synthesis wait. Ask the supplier to confirm inventory and shipping. Your site operator chooses which libraries to install.

Explore the chemical space

See how the building blocks and reactions define a collection in the SynthonMap viewer. The cartography paper and SynthonMap repository explain the method and how to build a map.

Contents

ChatGPT

Connect the DeepMedChem plugin to ChatGPT and enable it in a conversation.

Connect DeepMedChem as a ChatGPT plugin, then enable it in a new conversation.

Connect the plugin

Video guide:

Step-by-step guide:

  1. Open ChatGPT.
  2. Click on Plugins on the left side-bar.
  3. Type Deep MedChem plugin in the search bar.
  4. Select Deep MedChem.
  5. Click Install plugin and verify via Connect DeepMedChem.
  6. Try our first prompt.

Cannot find Create Plugin?

Developer mode is under Settings → Security and login. Workspace policy may restrict it. Ask a workspace administrator to enable it if needed.

Enable it in a conversation

Enable the DeepMedChem plugin in a new conversation. Plugins that were already active in an older conversation may not pick up new tools.

After a server update

If the plugin's tools change, refresh the connection metadata in ChatGPT and start a new conversation before you test again.

Contents

Claude

Add the DeepMedChem custom connector in Claude and enable it in a conversation.

Claude connects to DeepMedChem through a custom web connector.

Add the connector

Video guide:

Step-by-step guide:

  1. Open Claude.

  2. Go to Settings.

  3. Select Customize.

  4. Click Connectors → Add → Add custom connector.

  5. In the Name field, type Deep MedChem.

  6. Enter the endpoint and click Connect:

    https://mcp.deepmedchem.com/mcp
  7. Select Add, then Connect.

  8. Type /deepmedchem and try the first prompt.

Enable it in a conversation

Enable the DeepMedChem connector in the conversation where you want to use it.

Team and Enterprise workspaces

An organization owner must first add the connector under organization settings. A connector that shows Not added is not connected, even if it appears in your list.

Verify it works

Ask:

Use DeepMedChem to list the available databases.

The assistant will return the live database names and sizes.

Contents

In-house LLMs

Use the CHEESE LLM plugin from your organization's own in-house LLM.

Use the CHEESE LLM plugin from your organization's in-house LLM, if it can connect to an MCP server over streamable HTTP.

Server: https://mcp.deepmedchem.com/mcp, no authentication.

Contents

Limits

Guest capacity, result limits and what the LLM plugin does not yet support.

The hosted plugin uses shared guest capacity so that everyone can try it without an account.

Search limits

LimitValue
Hits per search1 to 20
Databases per search1
SMILES length2048 characters
Search wall-clock timeout20 seconds
Searches per hour120, shared across all guests
Searches per day1000, shared across all guests

When capacity is used up or a search times out, the assistant reports the failure. It should not retry in a loop. Wait and try again later, or use the Python SDK or CHEESE API for authenticated access.

Repeated identical searches may be answered from a short cache. Cached answers do not use search capacity.

Not yet supported

  • LogP, molecular-weight and price constraints
  • Batch searches over many molecules
  • Selections, durable runs and exports
  • Images, UMAP plots and procurement contacts

When a request needs one of these, the assistant should say so before it searches, and should not substitute an unconstrained search.

Scope of results

Each search returns the requested limit, the number of hits returned and how much of the database the shortlist covers. The total number of matches is not reported for similarity search. Substructure search reports which returned molecules actually contain the pattern.

Contents

Tools

Parameters, return values and limits of each DeepMedChem plugin tool.

The plugin exposes the tools below. Assistants choose them automatically from your request. You can also name a tool in your prompt.

catalog

Returns the live public databases: IDs, names, sizes, pricing and the guest policy. Call it first to get current database IDs.

resolve_name

resolve_name(name)

Resolves one chemical or IUPAC name to a SMILES string using a public service. It does not use DeepMedChem search capacity.

Name resolution

Works best for systematic names. Ambiguous, INN or trade names can fail. Check the returned SMILES before using it for a search.

similarity_search(smiles, database="enamine", method="morgan", limit=20)
ParameterDescription
smilesOne query molecule, up to 2048 characters.
databaseOne database ID from catalog. Default enamine.
methodmorgan (fingerprint Tanimoto), shape (3D shape cosine) or esp (electrostatic cosine).
limit1 to 20 hits.

Returns SMILES, product IDs, similarity scores, the metric used and any available prices.

substructure_search(smarts, database="enamine", limit=20)
ParameterDescription
smartsOne SMARTS pattern.
databaseOne database ID from catalog.
limit1 to 20 hits.

Returns molecules that contain the pattern, with SMILES, product IDs and prices. Results are in database order, not ranked by similarity.

Local property tools

calculate_properties(smiles) and check_substructure_match(smiles, smarts) run RDKit calculations. They are disabled on the hosted guest server by default, so they may not appear in your client.

Contents

LLM Plugin

LLM plugin enables to work with CHEESE platform via prompts directly from the environment of ChatGPT, Claude or customers in-house LLM.

LLM plugin enables to work with CHEESE platform via prompts directly from the environment of ChatGPT, Claude or customers in-house LLM.

The DeepMedChem LLM plugin connects ChatGPT and Claude to public DeepMedChem chemical spaces. Ask a question in plain language, and the assistant runs search, returns molecules with product IDs, SMILES, scores and any listed prices, and explains what the results mean.

No account needed

The plugin is hosted and accountless. There is nothing to install, no API key to create, and no deepmedchem login step. Guest capacity is shared, so searches are bounded (see Limits).

Supported clients

ChatGPT

Add DeepMedChem as a plugin with no authentication, then enable it in a new conversation.

Claude

Add DeepMedChem as a custom web connector under Customize → Connectors.

In-house LLMs

Use the CHEESE plugin with your organization's own LLM.

Server endpoint

All clients use the same Streamable HTTP endpoint:

https://mcp.deepmedchem.com/mcp

Set authentication to None. Do not paste API keys into the chat.

What the plugin can do

  • List the public databases, with live sizes, pricing and guest policy.
  • Run similarity search for one molecule in one database, using Morgan fingerprints, 3D shape or electrostatics.
  • Run substructure search for one SMARTS pattern in one database.
  • Resolve a chemical name to a SMILES string.

See Tools for the full parameter reference.

Example prompt

Use DeepMedChem to list the available databases, then find three shape-similar
molecules to aspirin, SMILES CC(=O)Oc1ccccc1C(=O)O, in Enamine. Include product
IDs, SMILES, the metric, scores, and any returned prices.
DeepMedChem chat walkthrough for aspirin shape-similarity search: search results, available databases, ranked molecules, price comparison, and export and interpretation notes
Contents

Command Reference

Every navigator command and what it does.

Append --help to any workflow command for its options (e.g. navigator status --help).

CommandPurpose
navigator loginAssume the pull role and authenticate Docker to ECR
navigator pullPull / update the container image
navigator updateCheck for a newer production image, pull it, and report whether it changed
navigator machine-idPrint this machine's license fingerprint
navigator update-license <file>Install a signed license file
navigator verify-licenseVerify the installed license
navigator data catalogList the databases you can install
navigator data install <db[@rel]>Download + verify + decrypt + install a database release
navigator data listList installed database releases
navigator data verify <db@rel>Re-verify an installed release offline (signature + hashes)
navigator data remove <db@rel>Delete an installed release from ./databases
navigator init / propose / ingest / update-params / statusWorkflow (forwarded to the licensed CLI)
navigator transition --to <preset>Switch strategy, keeping the archive and budget
navigator rosterList the public strategy presets (no license required)
navigator self-testReport packaged-runtime health without disclosing data (no license required)
navigator shellOpen a shell in the image (debugging)
navigator uninstallRemove the installed command + config
Contents

Install a Database

Install curated, client-side-encrypted chemical spaces — online or fully air-gapped — or bring your own.

Navigator screens a make-on-demand chemical space (reactions + synthons). You can bring your own via ./inputs, or install one of Deep-MedChem's curated spaces (e.g. Freedom Space, ~1.8M synthons).

How releases are secured

Database releases are client-side encrypted: the bundles are served from a public bucket as ciphertext, so the download needs no credentials, and only your machine can decrypt them. The database install key is embedded in your signed license (the same license.json from Activate your license), so there is normally nothing extra to install — activating your license also enables database decryption.

Air-gapped / override

If Deep-MedChem instead sends a standalone key, save it as ./db_install.key (or point DMC_NAV_DB_INSTALL_KEY_FILE in .env at it); a non-empty key file takes precedence over the license-embedded key.

Browse and install

navigator data catalog                    # databases you can install
navigator data install freedom-space-5    # download + verify + decrypt + install
navigator data list                       # -> ["freedom-space-5@2026-03-296b.2"]
navigator data verify freedom-space-5@2026-03-296b.2   # re-check signature + hashes

data install downloads the encrypted objects, verifies the release's Ed25519 signature before touching any payload, unwraps the data key locally with your install key, decrypts, checks every hash, and atomically installs into ./databases. Nothing is decryptable without the install key, and a tampered bundle fails closed.

Fully offline / air-gapped install

If the host has no internet, copy the release bundle onto it (same catalog/ + releases/… layout) and point the installer at the local mirror — decryption still happens on-box with your key:

navigator data install freedom-space-5 --source /mnt/usb/dmc-navigator-databases

Remove a release you no longer need with navigator data remove <db@release>.

Contents

Worked Examples (Glide)

One command screens a make-on-demand chemical space against a target with your own Glide, running the resumable propose → dock → ingest loop.

One command screens a make-on-demand chemical space against a target with your own Glide, running the resumable propose → dock → ingest loop for a fixed number of iterations. Everything here is customer-facing: the optimizer runs in the licensed container; docking runs on your host in your Schrödinger environment (Schrödinger is never inside the image).

Three worked targets are wired end-to-end — KIF11, PYRD, TGFR1 — each with a real example Glide grid and the same drug-like property filter and per-target hit threshold we use internally.

TL;DR

# from the repo root, after: install → login → pull → update-license → data install
export SCHRODINGER=/opt/schrodinger2026-1              # your install
examples/run_navigator.sh TGFR1                        # gamma, 100k budget, 10 rounds, Glide

Prerequisites

navigator installed and the image pulled (./install_navigator.sh, navigator login, navigator pull).
A valid license activated (navigator update-license …, navigator verify-license).

The database installed once:

navigator data install freedom-space-5    # ~1.8M synthons, encrypted; decrypts locally
For real docking, SCHRODINGER pointing at your install (Glide + LigPrep). No Schrödinger? Use --scorer mock to watch the loop turn (a stand-in score, not chemistry).

The one command

examples/run_navigator.sh <TARGET> [options]
OptionValuesDefaultMeaning
<TARGET>KIF11 PYRD TGFR1—which examples/configs/<TARGET>.json
--methodgamma alpha beta analog allgammastrategy (or all four)
--budget10k 100k 1m or an integer100ktotal molecules docked
--itersinteger10propose/dock/ingest rounds (batch = budget ÷ iters)
--databasedb@releasefreedom-space-5@2026-03-296b.2installed release to screen
--scorerglide mockglidereal Glide, or the no-Schrödinger stand-in
--poolinteger20000surrogate candidate-pool per round
--gpuflagoffXGBoost surrogate on CUDA (falls back to CPU if absent)
--precisionHTVS SP XPHTVSGlide precision (overrides docking_settings)
--statusflag—print status of this target's runs and exit

Examples

examples/run_navigator.sh TGFR1                          # default: gamma, 100k, Glide HTVS
examples/run_navigator.sh KIF11 --budget 10k --gpu       # quick 10k run, GPU surrogate
examples/run_navigator.sh PYRD  --method all             # gamma+alpha+beta+analog, separate runs
examples/run_navigator.sh TGFR1 --scorer mock --budget 200 --iters 2   # smoke, no Schrödinger
examples/run_navigator.sh KIF11 --database enamine-real-v5a@2026-07-02.1  # a different space

What it does

Each round: the container proposes a batch (surrogate-guided, diversity-aware), you dock it with Glide on the host, the container ingests the scores and refits — for --iters rounds. State lives in runs/<target>_<method>_<budget>_<scorer>/.

  • Resumable. Re-run the exact same command to continue after a Ctrl-C, reboot, or spot reclaim — nothing already docked is re-docked, and a batch that was proposed but not yet scored is recovered automatically.
  • Compiled logs. Progress prints one clean line per phase and is appended to runs/<run>/pipeline.log; the optimizer prints single-line errors by design. Set DMC_NAV_DEBUG=1 in .env only when you need full tracebacks.
  • Property filter. The config's space.property_constraints is the additive (generation-time) drug-like prefilter — approximate by design. Reactive-group / exact-structure exclusions are left to your scoring step.

Bring your own target

Copy a config, point space.database at your installed release (or your own space.reactions_path/synthons_path under ./inputs), set objective, and drop your Glide grid into examples/docking/ with a matching docking_settings.json entry. glide_batch.py is yours to adapt to your site's Glide/scheduler — the optimizer only consumes the returned batch_id,product_id,status,score CSV.

Files

PathRole
run_navigator.shthe one-command pipeline (host orchestrator)
configs/{KIF11,PYRD,TGFR1}.jsonper-target run configs (Freedom + property filter + gamma)
docking/docking_settings.jsonper-target Glide grid / precision / pH
docking/glide-grid_*.zip, glide-dock_*.inexample grids (replace with your own)
scoring/glide_batch.pyyour Glide adapter (LigPrep+Epik → Glide → scores); resume-safe
scoring/mock_score.pydependency-free stand-in scorer (smoke only)
Contents

Installation

Prerequisites, installing the navigator command, and authenticating to pull the container image.

Prerequisites

  • A Linux x86_64 / amd64 host. The published image is currently linux/amd64 only; arm64 is not a supported production target.
  • Docker Engine 24+ with the docker compose plugin.
  • AWS CLI with the customer source access key supplied by Deep-MedChem. The source identity cannot pull from ECR directly; navigator login assumes the short-lived pull role automatically.
  • A license file — issued by Deep-MedChem for your machine (see Activate your license).

1. Install

git clone https://github.com/Deep-MedChem/dmc-navigator-on-prem.git
cd dmc-navigator-on-prem
./install_navigator.sh

This installs the navigator command at ~/.local/bin/dmc-navigator/navigator and seeds .env with the production image reference. Open a new shell (or export PATH="$PATH:$HOME/.local/bin/dmc-navigator") so navigator is on your PATH.

2. Authenticate and pull the image

The installer configures the production image. Use the supplied wrapper to pull the release for your host.

Configure the source access key supplied by Deep-MedChem under any AWS profile name you choose:

aws configure --profile dmc-navigator-source

Then authenticate and pull:

AWS_PROFILE=dmc-navigator-source navigator login
navigator pull
navigator roster      # public strategy metadata; no license required
navigator self-test   # packaged-runtime health; no license required

How login works

navigator login checks the active identity. Unless it is already an arn:aws:sts::815935788477:assumed-role/navigator-onprem-pull/... session, the script assumes arn:aws:iam::815935788477:role/navigator-onprem-pull, uses those temporary credentials only for the ECR password request, and discards them. It does not need jq and does not write assumed-role credentials to disk.

Updating the image

Run navigator update. It fetches the configured tag in .env (DMC_NAV_IMAGE_TAG) and reports whether the local image changed. Existing runs, inputs, and the installed license remain in place.

Existing `latest` installs

Change DMC_NAV_IMAGE_TAG=latest to DMC_NAV_IMAGE_TAG=stable in .env once, then run navigator update.

Contents

Activate Your License

Bind Navigator to your machine with a signed license issued by Deep-MedChem.

The license is bound to this machine's hardware fingerprint.

1. Print your machine fingerprint

machine-id reads your host's DMI identity directly, so it needs no image, registry, or license — you can run it right after installing (even before navigator pull):

navigator machine-id
# -> a long integer, e.g. 65422506854891754323540879716734070853

2. Send it to Deep-MedChem

Send that integer to Deep-MedChem. We return a license.json (which also carries your database install key, so activating it enables database downloads — see Databases).

3. Install and verify

This step uses the image, so navigator pull first:

navigator update-license /path/to/license.json
navigator verify-license
# -> ✅ Valid license (customer='<you>', expires=YYYY-MM-DD)

License is hardware-bound

If you move to a different machine/VM, re-run navigator machine-id there and request a new license — the old one will report a hardware-fingerprint mismatch.

"No license found"

Install one with navigator update-license, or check that DMC_NAV_LICENSE_FILE in .env points at it.

Contents

Run the Workflow

Drive the resumable propose → dock → ingest loop — the fast path with the worked examples, or the manual loop by hand.

Fastest path — the worked examples

examples/run_navigator.sh drives the whole resumable propose → dock → ingest loop for you against Freedom Space, docking each batch with your own Glide, for three ready-made targets (KIF11, PYRD, TGFR1). After installing a database:

export SCHRODINGER=/opt/schrodinger2026-1        # your install
examples/run_navigator.sh TGFR1                  # gamma, 100k budget, 10 rounds, Glide
examples/run_navigator.sh KIF11 --budget 10k --gpu     # quick run, GPU surrogate
examples/run_navigator.sh PYRD  --scorer mock --budget 200 --iters 2   # smoke, no Schrödinger

It is resumable (re-run the same command to continue), writes a compiled runs/<run>/pipeline.log, and lets you pick the strategy (--method gamma|alpha|beta|analog|all) and budget (--budget 10k|100k|1m). See Worked examples for all options.

Manual loop

To drive the steps yourself, put your target config and reaction/synthon inputs under ./inputs, then:

navigator init  --run-dir runs/hk --config-json inputs/HK.json --overwrite
proposals="$(navigator propose --run-dir runs/hk)"
# stdout: runs/hk/proposals/iteration_0000_proposals.parquet
# also writes:
#   runs/hk/proposals/iteration_0000_proposals.csv
#   runs/hk/scores/iteration_0000_scores_template.csv

# Copy the template, set each row's status and score externally, then ingest it.
cp runs/hk/scores/iteration_0000_scores_template.csv \
   runs/hk/scores/iteration_0000_scores.csv
navigator ingest  --run-dir runs/hk --scores runs/hk/scores/iteration_0000_scores.csv
navigator propose --run-dir runs/hk           # next batch
navigator status  --run-dir runs/hk

To screen an installed database instead of your own inputs, point init at it with --database (and a target):

navigator init --run-dir runs/freedom --database freedom-space-5@2026-03-296b.2 \
  --target inputs/my_target.json --overwrite
navigator propose --run-dir runs/freedom

Path mapping

Paths are relative to the container's working directory: runs/… maps to ./runs, inputs/… to ./inputs, and installed databases live in ./databases.

The image's self-contained example target is named examples/configs/HK.json (not examples/targets/HK.json). Target configs use space.reactions_path and space.synthons_path; the install smoke-test notebook shows how to copy and adapt that example.

Append --help to any workflow command for its options (navigator status --help).

Score handoff contract

propose writes iteration_NNNN_proposals.parquet (+ .csv) and a iteration_NNNN_scores_template.csv, plus a per-batch JSON manifest under checkpoints/. You return a file with these columns:

ColumnMeaning
product_idmust exist exactly once in the pending batch
statusvalid, failed, timeout, filtered, or cancelled
scorenumeric only for valid rows
batch_id(optional) must match the pending batch if present

Ingestion rejects unknown/duplicate/wrong-batch rows, verifies returned SMILES canonicalize to the proposed structure, counts failed docks toward the budget but excludes them from the regression target, is idempotent for byte-identical re-ingestion, and checkpoints atomically.

Contents

Choosing a Strategy

Navigator ships four optimizer strategies, selected by the strategy field in your target config.

The optimizer ships four strategies, selected by the strategy field in your target config (navigator roster lists them):

PresetRole
alpha_diversity_screeningDefault. Broad global discovery — start here.
gamma_diversity_screeningFaster/balanced alternative screen.
beta_diversity_screeningAdvanced exploration (experimental).
analog_harvestHarvest analogs of your best chemotypes (beta).

Run alpha_diversity_screening first; once you have measured hits, switch to analog harvesting over the same archive and budget:

navigator transition --run-dir runs/hk --to analog_harvest
navigator propose    --run-dir runs/hk

analog_harvest reports how concentrated its hits are on every proposal and warns if a campaign narrows to one or two chemotype families.

Honesty note

analog_harvest has the strongest single-run hit-count result on record, but it strongly concentrates into a few chemotypes — it is a harvesting policy, not a validated replacement for global discovery. beta_diversity_screening is experimental.

Contents

Notes & Troubleshooting

Common issues and design notes for the DMC Navigator on-prem workflow.

  • Clean errors by design. Errors print a single line. For full tracebacks while diagnosing, set DMC_NAV_DEBUG=1 in .env.
  • License is hardware-bound. If you move to a different machine/VM, re-run navigator machine-id there and request a new license — the old one will report a hardware-fingerprint mismatch.
  • "No license found". Install one with navigator update-license, or check that DMC_NAV_LICENSE_FILE in .env points at it.
  • Permissions on ./runs. The container runs as your UID/GID (recorded in .env at install) so generated files are owned by you.
  • AWS AccessDenied during login. Confirm that the active profile contains the customer source credentials supplied by Deep-MedChem. Do not add ECR permissions to that user; it only needs permission to assume navigator-onprem-pull.
  • arm64 host. The current release is linux/amd64 only. Use a supported x86_64 Linux host for production rather than relying on emulation.
  • Updating the image. Run navigator update. It fetches the configured tag in .env (DMC_NAV_IMAGE_TAG) and reports whether the local image changed. Existing runs, inputs, and the installed license remain in place.
  • Existing latest installs. Change DMC_NAV_IMAGE_TAG=latest to DMC_NAV_IMAGE_TAG=stable in .env once, then run navigator update.
Contents

Overview

Run the DMC Navigator production workflow on your own machine, fully offline — a resumable propose → dock → ingest loop over make-on-demand chemical space.

Run the DMC Navigator production workflow on your own machine, fully offline.

The on-prem package contains no source code and builds nothing. It pulls a pre-built, obfuscated, license-gated container image from Deep-MedChem and wraps it in a small navigator command. Your molecules, run state, and license never leave your host.

Production updates arrive through the stable image channel. Deep-MedChem moves that tag only after a reviewed on-prem release passes tests and image smoke checks; you choose when to install it by running navigator update.

Principles

  • Offline — after the image is pulled the workflow runs with no network access. The one exception is navigator data (downloading an encrypted database from Deep-MedChem's public bucket); databases are also installable fully offline from a local mirror (see Databases).
  • Licensed — the image only runs with a valid license issued for this machine (see Activate your license).
  • Self-contained — run state lives in ./runs, inputs in ./inputs, installed databases in ./databases.

The workflow

Navigator drives a resumable optimization loop. The optimizer runs in the licensed container; you own and run the scoring step (e.g. Glide docking) in your own environment — Schrödinger is never inside the image.

init → propose a batch → you dock/score it → ingest scores → propose … → complete

propose is a deterministic function of (observation archive, seed, iteration), so a run is reproducible, resumable, and idempotent on re-ingestion.

Get started

1. Install

Clone the installer, run install_navigator.sh, authenticate, and pull the image.

2. Activate your license

Print the machine fingerprint and install the signed license.

3. Install a database

Download, verify, and decrypt a curated chemical space, or bring your own.

4. Run the workflow

Drive the propose → dock → ingest loop — the fast path or by hand.

Contents

About CHEESE On-Prem

What CHEESE is, the search methods and chemical spaces of an on-prem installation, and how to order the molecules you find.

CHEESE (CHEmical Embeddings Search Engine) is a fast, scalable and accurate platform for structure-, 3D shape- and electrostatic-based similarity search across ultra-large chemical spaces.

An on-prem installation runs the CHEESE framework on your own server, enabling ligand-based virtual screening (LBVS) against the chemical spaces installed at your site. Queries and results stay on the installation.

What is CHEESE?

CHEESE reformulates molecular similarity search as a vector space problem. Instead of directly computing 3D shape or electrostatic similarity scores, it uses learned molecular embeddings that preserve those properties. A query is then answered by a fast approximate, yet precise, nearest-neighbour search in that space.

Databases

A synthon space describes compounds through building blocks and vendor reaction rules. An enumerated collection stores individual structures and can contain in-stock or make-on-demand products. For an overview of suppliers, ordering and lead times, see Choose a database.

Search methods

Shape similarity

Compares the 3D molecular shape and volume overlap, finding structurally similar compounds regardless of their chemical composition.

Electrostatic similarity

Compares molecules by their 3D electrostatic potential fields, finding compounds with similar charge distributions. Useful for finding bioisosteres and pharmacophore matches.

Morgan fingerprints

A 2D fingerprint method that compares molecular substructures and connectivity patterns.

Substructure filter

Keeps only the compounds that contain a substructure you draw, or enter as SMARTS. The Presets menu offers ready-made substructures such as the alpha-amino acid core.

Property filter

Keeps only the compounds whose calculated properties fall within the ranges you set, for example molecular weight or logP. The Rule of Five preset sets the usual drug-likeness limits.

Behind the technology

CHEESE is based on a neural embedding model trained to preserve pairwise distances derived from 3D shape and electrostatic similarity metrics. The embeddings are indexed into a vector database, which enables:

  • Real-time search via Euclidean distance
  • Multi-ligand (batch) virtual screening

Example use case

Follow the neurosteroid case study for a worked example using CHEESE embeddings, or read the methods and figures.

Ordering molecules

Found interesting compounds through CHEESE? You can order them directly from the vendors, using the molecule IDs from your search results.

Search & identify. Use CHEESE to find molecules similar to your query compounds across billions of structures.

Export molecule IDs. Download the molecule IDs and vendor information from your search results.

Contact vendors. Send the molecule IDs to the respective vendors to get quotes and place orders.

Receive compounds. Get your selected compounds delivered directly from the vendor for your research.

Installed databases

Your site's /api/v2/catalog shows which libraries are installed, their release IDs and the capabilities of each. Use the on-prem API guide to inspect the catalogue and repeat a search against the same release.

Contents

CHEESE on-prem API and Python

How to call the CHEESE API on an on-prem installation — what each request does, what to send, and what comes back.

Use the HTTPS origin of your own V2 installation for both the browser and the API. In Bash, set it once, using your site's real hostname without a trailing slash.

export SITE_URL='https://cheese.example.org'

Your ingress may require SSO or a site-issued credential. Ask your administrator for the approved API client configuration. The examples below use curl. If authentication is required, use the protected curl configuration file provided by your administrator with each call (for example, curl --config /private/path/site.curl …). Keep credentials on your workstation. The on-prem search service has no cloud credit balance.

1. Discover what is available

GET /api/v2/catalog

curl --fail --show-error --silent "$SITE_URL/api/v2/catalog" | python3 -m json.tool

Each entry in libraries gives a database_id, release_id and available capabilities. Select an installed library that supports the operation you want. Set its ID once for the examples below. The search examples use jq to encode JSON.

read -r -p 'Installed database ID: ' DATABASE_ID
export DATABASE_ID

Connect Python to your site

Install the deepmedchem client on the workstation or notebook server that can reach the same CHEESE HTTPS origin. Use the on-prem SDK wheel supplied with your delivery. For a disconnected site, install it with the accompanying wheelhouse, checksum manifest and locked requirements. The kit README identifies the matching Python and platform. The client sends your requests to the running CHEESE API.

With the environment variables above and your site's approved SDK authentication configured, repeat a Morgan search against an installed library:

import os
from deepmedchem import Client

with Client(on_prem=True, api_url=os.environ["SITE_URL"]) as cheese:
    libraries = cheese.catalog()["libraries"]
    print([(entry["database_id"], entry["release_id"]) for entry in libraries])
    hits = cheese.search("CCO", database=os.environ["DATABASE_ID"], limit=3)
    print(hits)

On an SDK installation with the supplied CHEESE (on-prem) Jupyter kernel, the kernel configuration supplies the site origin. Use the site-specific example shipped with that kernel.

GET /api/v2/usage: Usage

What it does: shows the plan and the credit balance. On an on-prem installation it reports unlimited use.

Example:

curl --fail --show-error --silent "$SITE_URL/api/v2/usage"

GET /health/live and GET /health/ready: Health checks

These backend probes are usually called inside the cluster. Your ingress determines whether they are exposed at the site URL. To verify the customer-facing site, check that the catalogue returns JSON with the expected libraries, then complete a search. Some ingress configurations serve the browser app with HTTP 200 on an unrecognised path.

  • GET /health/live confirms that the backend process is running.
  • GET /health/ready confirms that the backend has loaded its chemical spaces and can accept search requests.

For a first cross-check, choose the same library and Morgan method in the browser, enter the SMILES CCO, and repeat the query with the similarity request below. Check that the response names the expected database and release and contains a ranked structure. For site acceptance use the query and expected result in your handoff.

POST /api/v2/search: Find ECFP4/Tanimoto neighbors

What it does: finds molecules similar to your query by ECFP4 fingerprint (Morgan), the search page's "morgan" method.

Request:

FieldMeaning
query_smiles*The query molecule.
database_id*Where to search, from the catalogue.
limitHow many hits to return.
structure_query, property_constraintsOptional filters.
include_synthons, include_properties, include_predicted_propertiesOptional extra data.

Example:

jq -n --arg db "$DATABASE_ID" '{"query_smiles":"CCO","database_id":$db,"limit":3}' | \
  curl --fail --show-error --silent "$SITE_URL/api/v2/search" \
    -H 'Content-Type: application/json' --data-binary @-

What you get: results, each with rank, smiles, score (1 for the query itself), metric, catalog_id and product_id. The response also says which database_release and engine_version were used.

POST /api/v2/search_cheese: Shape or electrostatic reranking

What it does: reranks candidates by CHEESE shape or electrostatic similarity. It's the search page's "shape" and "electrostatic" methods.

Request: the same fields as /search, plus scorer* (shape or esp).

Example:

jq -n --arg db "$DATABASE_ID" '{"query_smiles":"CCO","database_id":$db,"limit":3,"scorer":"shape"}' | \
  curl --fail --show-error --silent "$SITE_URL/api/v2/search_cheese" \
    -H 'Content-Type: application/json' --data-binary @-

POST /api/v2/search_substructure: Substructure search

What it does: finds molecules that contain a given substructure. It's the search page's substructure filter.

Request:

  • query: an object with format (smiles) and value (the substructure).
  • database_id*, limit, and optional property_constraints, price, timeout_seconds, exclude_smiles.

Example:

jq -n --arg db "$DATABASE_ID" '{"query":{"format":"smiles","value":"c1ccccc1C(=O)N"},"database_id":$db,"limit":3}' | \
  curl --fail --show-error --silent "$SITE_URL/api/v2/search_substructure" \
    -H 'Content-Type: application/json' --data-binary @-

What you get: results with smiles, plus matches showing which atoms matched, metric ("exact catalogue substructure") and engine_version.

Note

A request without query.format fails with invalid_schema / "Field required". That's the error to look for if a substructure search is refused.

POST /api/v2/substructure: Legacy substructure search

An older form of the substructure search: query_smiles* and database_id*, with limit, include_synthons, timeout_seconds. The search page doesn't use it; prefer /search_substructure.

POST /api/v2/sample: Sample molecules from one library

What it does: returns random molecules from one library. It's the search page's random-query button.

Request: database_id*, count (how many), optional seed (same seed, same sample).

Example:

jq -n --arg db "$DATABASE_ID" '{"database_id":$db,"count":2}' | \
  curl --fail --show-error --silent "$SITE_URL/api/v2/sample" \
    -H 'Content-Type: application/json' --data-binary @-

What you get: results, each with index, smiles and product_id, plus the seed used, so the sample can be repeated.

POST /api/v2/structure_queries:validate: Check a structure query

Checks a reusable structure query before you use it in a search. The request needs expression*, and may include schema_version and stereo. Useful for testing a query definition on its own.

3. Multi-database and selection workflows

Availability depends on the installed API and catalogue capabilities. Consult your site's /api/v2/openapi.json before using these operations.

OperationWhat it does
POST /api/v2/search_auto:planShows which libraries an automatic search would use, before running it.
POST /api/v2/search_autoSearches every eligible library and merges the unique molecules. Partial results include the status of each source.
POST /api/v2/search_auto:streamThe same search, streamed: each library's results arrive as it finishes.
POST /api/v2/selections:validateChecks a selection document (database, strategy, optional references, constraints, objectives).
POST /api/v2/selections:estimateEstimates the work a selection would take, before creating it.
POST /api/v2/selectionsCreates a selection (the same document as above).

Their request fields include selection, substructure, scope, availability, databases, timeout_seconds, include_catalogues and max_synthesis_days (for the search_auto family) and the selection document fields listed above. The full structure of these documents is in the schema.

4. Where to look next

On your installation:

  • Full schema: /api/v2/openapi.json
  • Installed libraries with their capabilities: /api/v2/catalog
  • Backend's own documentation page: /api/v2/docs

In these docs:

Contents

Classic CLI

Operate a Classic Docker Compose site, choose its databases and diagnose startup problems.

This page applies to the Classic single-host Docker Compose delivery. For the Kubernetes kit or a V2 offline bundle, use the commands in Installation and deployment options.

Install and start

Follow the Classic Compose guide to install the CLI on the target host. Run cheese --help to see the commands in your installation.

CommandWhen to use it
cheese aws-authStore the AWS credentials issued for image pulls and database downloads. Run cheese aws-auth --check to verify access.
cheese update-imagesPull the Classic images before requesting the host licence.
cheese generate-license-keyGenerate the host identifier requested by Deep MedChem.
cheese update-licenseInstall the signed JSON licence returned for that host.
cheese startStart the stack and run the configuration preflight.
cheese doctorInspect an installation with a missing database, failed startup or configuration problem.
cheese stopStop the stack.

Add a database

Run the following commands on your Classic host, choosing a download directory with enough free space for the selected libraries.

cheese configure-dbs
cheese download-dbs --dest /srv/cheese-databases

The downloader registers the selected databases in the engine configuration. For a manually indexed collection, consult the Classic index inference guide. Check the index layout, delimiter and container-visible paths in the database configuration reference.

Update

Use cheese update for the Classic scripts and images, then follow the restart and verification sequence in the Compose guide. Run a known search at the site URL and check the returned library after restarting.

Contents

Classic index inference

Index your own molecule database for CHEESE search, with input formats, indexing modes, and SMILES standardisation.

This guide covers custom databases on Classic Docker Compose. To index your own molecule file for Classic search, run inference on it. Inference computes the embeddings and search indexes for every molecule in the file.

Run inference

Usage: cheese run-inference [options]
Options:
  --input_file             Input file in CSV format [REQUIRED]
  --dest                   Destination folder [REQUIRED]
  --index_type             'clustered', 'in_memory', or 'auto' (default: auto)
  --chunk_size             Lines processed per chunk (default: 100000)
  --batch_size             Batch size for embedding computation on GPU (default: 32)
  --valid_smiles           Check SMILES validity (default: false)
  --canonicalize_smiles    Canonicalise SMILES (default: false)
  --skip_file_headers      Skip the file header line (default: true)
  --gpu_devices            IDs of the GPU devices to use (default: 0)
  --clustering_batch_size  Batch size for clustering (default: 10000)
  -h, --help               Show this help message

Example:

cheese run-inference \
  --input_file test_mols.txt \
  --dest . \
  --index_type in_memory \
  --chunk_size 100 \
  --batch_size 32 \
  --valid_smiles false \
  --canonicalize_smiles false \
  --skip_file_headers true \
  --gpu_devices 0 \
  --clustering_batch_size 1000

Index types

  • clustered: requires a GPU.
  • in_memory: runs on CPU or GPU.
  • auto (default): uses clustered if the input file is larger than 1 GB, and in_memory otherwise.

CPU or GPU

Inference runs on CPU unless you pass --gpu_devices. When you pass it, CHEESE looks for GPUs first and fails with an error if none is found.

Input format

The input file is a list of molecules, one per line, with SMILES and an ID:

SMILES,id
CCO,ethanol
CCCO,propan-1-ol
CC(C)O,propan-2-ol

.smi, .sdf, and .txt files are also supported.

Output

Embeddings are saved as .npy files, which are NumPy arrays. The API can also return JSON or CSV, but for large sets we recommend .npy or .parquet.

Registering the database

After inference, add the output folder to your configuration so CHEESE can use it. Run cheese configure-engine and add an entry, as described in the Classic database configuration guide:

OUTPUT_DIRECTORIES:
  MyDatabase: "/path/to/my_output"

DELIMITERS:
  MyDatabase: ","

INDEX_TYPES:
  MyDatabase: "in_memory"

SMILES standardisation

CHEESE expects SMILES in canonical, RDKit-compatible form, neutralised where possible. Inference can canonicalise for you with --canonicalize_smiles. In casual use you can skip standardisation, but consistent input always gives better results. This is the standardisation used during CHEESE model training:

from rdkit import Chem
from rdkit.Chem.MolStandardize import rdMolStandardize


def standardize(smiles):
    """
    Follows the steps in
    https://github.com/greglandrum/RSC_OpenScience_Standardization_202104/blob/main/MolStandardize%20pieces.ipynb
    Source: https://bitsilla.com/blog/2021/06/standardizing-a-molecule-using-rdkit/
    """
    mol = Chem.MolFromSmiles(smiles)

    # Remove Hs, disconnect metals, normalise, and reionise the molecule
    clean_mol = rdMolStandardize.Cleanup(mol)

    # If there are several fragments, keep the parent (the main molecule)
    parent_clean_mol = rdMolStandardize.FragmentParent(clean_mol)

    # Try to neutralise the molecule
    uncharger = rdMolStandardize.Uncharger()
    uncharged_parent_clean_mol = uncharger.uncharge(parent_clean_mol)

    # Canonicalise the tautomer
    te = rdMolStandardize.TautomerEnumerator()
    taut_uncharged_parent_clean_mol = te.Canonicalize(uncharged_parent_clean_mol)

    return Chem.MolToSmiles(taut_uncharged_parent_clean_mol)
Contents

Installation and deployment options

Choose the deployment and licence for CHEESE Search or DMC Navigator and connect a Python client to your site.

ComponentDelivery
CHEESE Search UI and APIKubernetes kit or single-host installation
CHEESE Python clientWorkstation or notebook environment that connects to the installed search service
DMC NavigatorSeparate Docker installer for the production optimizer

CHEESE Search deployments

The CHEESE on-prem repository contains the installers and deployment guides. Start with the delivery type in your handoff. The README in the kit gives the commands, filenames and checksums for that release.

Your deliveryInstallation guide and toolingLicensing and transfer
Protected Kubernetes with encrypted .dmch librariesOpen the kit's README.md, then cluster-install/README.md. Run the kit's ./cheese from its extracted directory.Cluster-bound offline file or cluster-bound connected activation, plus a signed data grant for the delivered libraries. Stage the images and data through your approved transfer path.
Standard Kubernetes / HelmFollow the cluster guide for registry access and release sync. For an ordinary disconnected kit, follow the disconnected guide and its ./site-install command.Cluster-bound agent or offline cluster licence. A node-bound licence is available for an agreed single-node trial.
V2 offline bundle on one Linux hostFollow the target-host steps in the offline bundle guide. Docker Engine with Compose v2 runs the services. The CLI uses cheese v2.Transfer the bundle and its independent trusted digest. A customer-licensed bundle uses the issued host licence file or the lease maintained by the site's licensing agent.
Classic Docker Compose on one hostFollow the Classic Compose installation for the Classic CLI, image pulls and database selection.Deep MedChem issues AWS access for the image and database downloads, and a separate licence file for the host.

Choose a Kubernetes licence

  • Offline cluster file. Register the cluster UID and the site's recipient public key through the delivery channel. For protected data, obtain the signed cluster licence and the matching database grant. Renew through an updated delivery before expiry. The cluster can stay disconnected from the internet.
  • Connected cluster activation. Use the customer invitation to register the site and retrieve its materials. Activate with the supplied kit, then retrieve the matching signed data grant as directed by the invitation. The licensing agent renews its lease over outbound HTTPS to the approved licensing service. Stage images and data separately through your registry and transfer process.
  • Node-bound trial. A one-node trial uses a file tied to that worker. Moving the service to another worker requires a new licence. For protected Kubernetes choose one of the two cluster-bound modes, both of which support worker replacement. Rebuilding the cluster changes its identity.

The Kubernetes licensing reference explains the chart settings for each mode.

Install a protected Kubernetes delivery

  1. Prepare the site. Confirm the Kubernetes context and cluster UID, namespace, release name, internal HTTPS hostname, ingress authentication, registry, and storage with your administrator. Size memory and storage for the approved roster, including space for staging and rollback. Confirm the installer can read the cluster identity and Kubernetes service endpoints. Connected licensing also needs a separate ReadWriteMany state claim. See the sizing guide.
  2. Verify and stage the delivery. Check the kit and add-on against the independently supplied digests before extraction. Verify their contents, image references, profile, model, and expected database releases against the handoff. For Artifactory, use the Docker registry endpoint and repository key, mirror each image by digest and provision pull access on every eligible worker. Include the licensing agent image for a connected site.
  3. Configure one site. Keep the prefilled operator YAML, signed files and credential paths in a private site directory. Set SITE to the absolute path of that YAML. In the verified kit, run ./cheese --version. Open the guide named in the handoff, either cluster-install/offline.md or cluster-install/connected.md. It covers cluster identity, licensing and data grants for your mode.
  4. Load data and install. Follow that guide to import the selected stock catalogues and model, import the protected packages, and install the API and UI. Keep the installation on the same context, namespace, data claim and approved image set throughout.
  5. Verify at the site URL. From the kit, run ./cheese status --site "$SITE". Open the internal HTTPS URL from a scientist's workstation and run the first search. Repeat it with the API and check the returned database release against your handoff. On sites with interactive SSO the kit verifier needs an ingress path that permits it; use your site's authenticated browser and API workflow to verify the user-facing route.

Save the operator file and release information with your site's installation record. Use them for updates, recovery and support.

DMC Navigator

The Navigator on-prem installer supplies the navigator CLI and Docker Compose configuration for the prebuilt DMC Navigator production image. The production target is a Linux x86-64 Docker host. Registry access permits the image pull, and a separate signed, machine-bound Navigator licence enables the optimizer. CHEESE cluster licences cover the CHEESE service. Navigator has its own installer; this release has no combined CHEESE and Navigator Helm chart.

  1. Follow Navigator installation to install the CLI, authenticate, pull the image and run navigator self-test.
  2. Run navigator machine-id on the intended host. Install the issued licence with navigator update-license and check it with navigator verify-license. See Activate your licence.
  3. Install and verify an entitled Navigator database. On a disconnected host, use the signed release from your local mirror after the image is staged.
  4. Start a Navigator campaign. The container proposes compounds. Your own scoring software evaluates them, then Navigator ingests the scores for the next round.
Contents

Updates, recovery and support

Update the application and database releases independently, verify the site, and collect a local support report.

CHEESE on protected Kubernetes

Start in the verified installer kit. Set SITE to the absolute path of the private operator YAML for the release you are operating. Confirm its cluster UID, context, namespace, Helm release and expected database/release pairs. Schedule a maintenance window for data reload and run one change at a time.

ChangeProcedure
Application updateKeep the current kit, approved image digests, values, profile, still-valid grant and database files. Stage the new kit and add-on and verify their digests. Mirror the new images, prepare the new operator file, and run ./cheese update --site "$SITE" from the new kit. Compare the served catalogue to the roster you retained.
Add or update a libraryObtain the approved database ID, release ID, signed media and matching grant/profile. Stage and verify the media. Follow the kit's ordinary import procedure for stock releases or ./cheese import --site "$SITE" --media "$PACKAGE_DIR_ON_MEDIA_NODE" for protected packages, using the import worker's media path. Apply the updated roster with ./cheese update --site "$SITE". Retain the previous data until the new release passes the search check.
Recover a previous releaseFollow the rollback sequence in the supplied protected add-on. Restore the matching profile, valid grant, image digests, operator values and database releases together with the Kubernetes release. Restoring a Helm revision alone cannot restore removed data or an expired grant.

After each change run ./cheese verify --site "$SITE" where the site permits the verifier. Repeat the reference search through the browser and the authenticated API at the site's HTTPS address. Compare the database ID, release and result to your acceptance record.

Troubleshoot and export diagnostics

  • Catalogue missing or wrong release. Compare /api/v2/catalog with the operator file. Check the import result, grant roster and data claim before repeating the import.
  • Pods cannot pull an image. Verify the digest at your internal registry and check that the worker trusts its CA and has the image-pull credential.
  • Local verification works, browser or SDK fails. Test the site hostname, TLS and ingress authentication from the user's network. An SSO redirect to a sign-in page requires the site's authenticated client workflow.

Generate a support report locally from the verified kit. Choose a new output filename and review its coverage and contents before sharing through your support channel.

./cheese diagnostics --site "$SITE" --since 24h --output cheese-support.json

Include the kit version, operation, expected and observed database/release IDs, and a redacted error. Keep raw logs, credentials and query structures on-site. The support report reference describes the report fields and retention limits.

Other CHEESE installations

  • Standard Helm or disconnected Kubernetes. Follow the update and rollback section in the Helm guide or the air-gap guide. Keep the previous library directories and images available when changing the Helm revision.
  • V2 single-host bundle. Follow the offline update procedure. It verifies the new bundle against its trusted digest and restores the previous running bundle if the health check fails.
  • Classic single-host Compose. Use the Compose operator guide for image updates, selecting database downloads and checking the local installation.

DMC Navigator

Navigator has its own image and database releases. Follow the Navigator update procedure on the Docker host. Run navigator self-test to check the packaged runtime and navigator verify-license to check the host licence. Install and verify database releases separately with Navigator data management. For campaign or scoring failures, use Navigator troubleshooting.

Contents

On-prem getting started

Choose the on-prem workflow for CHEESE Search, its Python client, or the DMC Navigator production optimizer.

Choose your workflow

What you want to doWhat runs on your siteStart here
Search your licensed chemical spaces in a browserCHEESE Search runtime, API, UI and installed librariesRun a first search
Repeat a CHEESE search in a script or notebookThe deepmedchem Python client on a workstation or notebook server, pointed at your CHEESE siteConnect Python to your site
Propose compounds, score them in your own environment and ingest the scoresThe DMC Navigator production image on a Docker host, operated with the navigator CLIInstall Navigator and run a campaign
  1. Open the CHEESE site URL supplied by your administrator. Sign in if your site requires it.
  2. Select an installed library and the Morgan similarity method. Paste the SMILES CCO into the search form and submit. For acceptance testing, use the reference query, library and expected result supplied with your delivery.
  3. Inspect the returned structures and scores. Use the same query and library in the on-prem API guide to repeat the search from code. Record the database ID and release if you need to reproduce a result.

The site catalogue lists the releases and search methods available to you. For purchasing information, use Choose a database. For an introduction to shape and electrostatic similarity, read About CHEESE.

Install or administer a site

What you need to doWhere to start
Identify your kit, check prerequisites and choose a licenceDeployment options and licences
Upgrade the application or a library, restore a previous release or collect diagnosticsUpdates, recovery and support
Maintain a Classic single-host deploymentClassic CLI and Classic index inference

CHEESE and Navigator have separate release media, licences and update commands. The CHEESE Helm chart deploys the search service. Install Navigator separately with its public Docker installer.

The CHEESE on-prem repository contains the installation tools and operator guides. For a disconnected deployment, open the README shipped with your release media. For a new delivery, contact Deep MedChem with your infrastructure, network policy and requested libraries.

Contents

Optimization constraints and custom scores

Declare supported chemistry requirements before custom scoring with Navigator.

Declare supported chemistry in the optimization call: hard requirements in constraints= / properties=, preferences in objectives=. Navigator guides synthon search and sampling before verifying final products. Docking and proprietary models belong in an optional callback.

import deepmedchem as dmc

capabilities = dmc.catalog()["optimization"]
assert capabilities.get("constraints", {}).get("enabled"), "Constraint support is not enabled"

# docking_score is your batch scorer: list[str] -> one score per molecule.
result = dmc.optimize(
    docking_score,
    direction="minimize",
    database="enamine",
    budget=2000,
    batch_size=100,
    properties={"MolWt": (None, 400)},
    constraints={"structures": {
        "all": [{"pattern_id": "alpha-amino-acid/v1"}],
        "none": [{"query": {"format": "smarts", "value": "[N+](=O)[O-]"}}],
    }},
)

The versioned pattern has a precise chemical definition. Use a typed SMARTS or SMILES query for a different motif. Structure groups support all, none, and any with minimum and conditions. Matching uses chirality. Counts mean unique atom matches, including overlapping matches; count bounds are limited to 1000.

properties= is a convenient descriptor-window mapping. constraints.properties accepts typed registry conditions such as {"property_id": "rdkit.mol_wt", "operator": "lte", "value": 400, "units": "Da"}. Both forms intersect with the druglike profile if supplied; contradictions are rejected.

Guided acquisition is the default. Structure anchors restrict synthon tuple branches, including motifs crossing reaction junctions. Released descriptor caches, reaction offsets and calibrated margins guide property-feasible sampling. Exact product checks then remove false positives, including count and stereochemistry mismatches. Unsupported anchor cases retain broader routes; missing property assets use a reported fallback. Inspect optimization.engine.constraint_acquisition for the actual execution path. Search remains heuristic rather than exhaustive.

A built-in-only optimization needs no callback or local RDKit installation:

result = dmc.optimize(
    database="enamine", budget=500, batch_size=50, name="internal-qed",
    properties={"MolWt": (None, 400), "MolLogP": (0, 3)},
    objectives=[{"type": "property", "property_id": "rdkit.qed",
                 "lower": 0, "upper": 1}],
)

Check catalog()["optimization"]["objectives"]["enabled"]. Supported objective types are property, similarity, predicted_property and an optional external term. Each term declares finite normalization bounds lower < upper, direction (default maximize), and a positive weight (default 1). The service clips the normalized value to [0,1], reverses it for minimized terms and maximizes their weighted mean. Objective normalization bounds do not enforce eligibility; hard bounds belong in constraints.

result = dmc.optimize(
    docking_score, direction="maximize", database="enamine", budget=500, batch_size=50,
    properties={"MolWt": (None, 400)},
    objectives=[
        {"type": "external", "direction": "minimize", "lower": -12, "upper": -4, "weight": 2},
        {"type": "property", "property_id": "rdkit.qed", "lower": 0, "upper": 1},
    ],
)

Here the callback returns raw docking scores only. Built-in components are computed internally; the learned external scorer is trained separately. Results contain the aggregate score and raw components in metrics.objective_0, metrics.objective_1, etc.

For similarity within a required substructure domain, combine the structure constraint with {"type": "similarity", "metric_id": "rdkit.ecfp4_tanimoto", "reference_smiles": "CCO", "lower": 0, "upper": 1}. Morgan-OR ranks tuples inside the constrained branches; exact product fingerprints determine the final score.

ADMET availability is specific to the database and its installed release. With a client, inspect client.optimizations.capabilities("enamine"); the returned predicted_properties maps endpoint IDs to units. The equivalent catalog field is optimization.database_capabilities["enamine-real-v5a"].predicted_properties. The legacy optimization.constraints.predicted_properties contains only endpoints shared by every advertised database, so it can be empty while Enamine supports ADMET. Also check the catalog's constraints.enabled and objectives.enabled flags.

with dmc.Client() as client:
    capabilities = client.optimizations.capabilities("enamine")
    endpoint = "openadmet-herg-pchembl"
    units = capabilities["predicted_properties"][endpoint]
    result = dmc.optimize(
        client=client,
        database="enamine",
        direction="maximize",  # aggregate desirability
        budget=100,
        batch_size=20,
        constraints={"predicted_properties": [
            {"endpoint_id": endpoint, "operator": "lte", "value": 6, "units": units},
        ]},
        objectives=[
            {"type": "predicted_property", "endpoint_id": endpoint, "units": units,
             "direction": "minimize", "lower": 3, "upper": 8},
        ],
    )

The bounds above illustrate the API; choose thresholds for your experiment. CP16 ranks synthon tuples before assembly. The matching full-product model supplies the final eligibility check and objective value. These are model predictions, not experimental measurements. A database with no advertised endpoint rejects that term before a campaign is created. Adding an external docking term keeps docking in the callback while the same internal ADMET guidance and checks remain active.

Do not hide supported motifs, descriptor limits or ADMET thresholds in callback penalties. Rejected candidates use no molecule scoring budget. Built-in-only hosted runs reserve their complete requested credit budget at creation; external and mixed runs retain per-round credit reservations. Imported seed evidence retains its existing audit policy.

For the CLI, save the constraint object as constraints.json:

dmc optimize run my-docking -d enamine --minimize --property MolWt=:400 \
    --constraints constraints.json --score-cmd './dock.sh {input} {output}'

Constraints are part of the run identity. Reuse the same specification to resume; choose a new run name to change requirements. The manual synchronous and asynchronous create/ask/tell APIs accept the same constraints object. Resource constraint_execution entries explain where checks execute. RDKit is optional on the client; chemistry queries compile on the worker before the first batch is proposed.

For built-in-only CLI runs, supply --maximize --objectives objectives.json and omit --score-cmd. Mixed runs use both options and an explicit external term. The synchronous and asynchronous create APIs accept the same objective list. Changing terms, normalization or constraints requires a new run name.

Contents

Python quickstart

Install DeepMedChem, authenticate once, and search chemical space as a Python library.

Install the chemistry-thin SDK. It contains no RDKit, model weights, or local chemical-space data.

python -m pip install deepmedchem
deepmedchem login

deepmedchem login approves the device in your browser and stores the key in the OS keychain (or a 0600 credentials file on hosts without one). In automation, set DEEPMEDCHEM_API_KEY instead. The compatibility variables DMC_API_KEY and CHEESE_API_KEY remain supported during migration.

The examples below are shown as they appear in a Jupyter notebook. End a cell with a bare expression (hits, not print(hits)) to see the compact result representation.

1. Import and check the key

import deepmedchem as dmc

dmc.usage()
Usage(plan='premium', credits=unlimited)

usage() returns the plan and remaining daily credits. It needs no database, so it is the cheapest way to confirm that authentication works.

2. Which chemical spaces exist?

import pandas as pd

libraries = dmc.catalog()["libraries"]
pd.DataFrame(
    {
        "database_id": l["database_id"],
        "name": l["name"],
        "molecules": f"{l['product_count']:,}",
        "prices": l["pricing"]["available"],
    }
    for l in libraries
)
              database_id                  name          molecules  prices
0    cheminfinita-2026-02  ChemInfinita 2026-02    794,249,963,054   False
1             d2b-spacem1           D2B SpaceM1      1,489,758,122   False
2        enamine-real-v5a      Enamine REAL v5a     93,407,931,591    True
3         freedom-space-5       Freedom Space 5    296,350,180,179    True
4  synple-explore-2025-10        Synple eXplore  9,532,882,668,261    True
5   synple-synple-2025-10                Synple  7,606,081,396,275    True
6            vast-2026-h2          VAST 2026 H2      6,798,511,197    True

The catalog is the source of truth for what each space supports. See chemical spaces and capabilities.

aspirin = "CC(=O)Oc1ccccc1C(=O)O"

hits = dmc.search(aspirin, database="enamine-real-v5a", method="shape", limit=9)
hits
SearchResult(9 molecules, method='shape', database='enamine-real-v5a')

method is "morgan" (the default), "shape", or "esp"; see choosing a search method.

Use the bare result, not print()

print(hits) writes the whole raw response. A bare hits (or repr(hits)) gives the one-line summary above.

The result is a list of SMILES

SearchResult is an ordered sequence of SMILES. Iteration, indexing, slicing, and smiles all use the same ranking.

len(hits), hits[0], hits[:3]
(9,
 'O=C(O)Oc1ccccc1C(=O)O',
 ['O=C(O)Oc1ccccc1C(=O)O', 'COC(=O)Oc1ccccc1C(=O)O', 'COC(=O)Oc1ccccc1C(C)=O'])

Aligned columns are available without another request:

pd.DataFrame({"smiles": hits.smiles, "score": hits.scores, "price_usd": hits.prices})
                          smiles     score  price_usd
0          O=C(O)Oc1ccccc1C(=O)O  0.972565        245
1         COC(=O)Oc1ccccc1C(=O)O  0.971898        163
2         COC(=O)Oc1ccccc1C(C)=O  0.955080        163
3          CC(=O)c1ccccc1OC(=O)O  0.924291        245
4         O=C(O)COc1ccccc1C(=O)O  0.871286        245
5  CC(C)(C)OC(=O)Oc1ccccc1C(=O)O  0.807577        163
6     O=C(O)c1ccccc1Oc1ccc(F)cc1  0.739560        163
7       O=C(O)NCCOc1ccccc1C(=O)O  0.728522        163
8       O=C(O)CCCOc1ccccc1C(=O)O  0.721572        245

Prices are positive whole US dollars for US delivery and default to 1 mg where the vendor uses pack sizes. An unavailable price is None. See chemical spaces and capabilities for database support.

Typed rows and provenance

Typed row access and provenance come from the original response and require no further request:

best = hits.hits[0]
best.rank, best.smiles, best.score, best.price, best.product_id
(1, 'O=C(O)Oc1ccccc1C(=O)O', 0.9725648164749146, 245, 'd72ff65eda257ec576fbbefd')
hits.meta
SearchMeta(request_id='8c88948b-c223-4ff8-9c3e-f1f3b3608da7', database='enamine-real-v5a', release='2026-09-06.2', method='shape', metric='CHEESE shape cosine', returned=9, elapsed_ms=583.7)

hits.request_id, hits.database_release, and the complete forward-compatible response in hits.raw are also available. Keep the release when you need to reproduce a result.

See the molecules

With RDKit installed (it is not an SDK dependency), draw the query and the top hits:

from rdkit import Chem
from rdkit.Chem import Draw

mols = [Chem.MolFromSmiles(s) for s in [aspirin, *hits.smiles[:5]]]
labels = ["query"] + [f"{s:.2f}  ${p}" for s, p in zip(hits.scores[:5], hits.prices[:5])]
Draw.MolsToGridImage(mols, molsPerRow=3, legends=labels, subImgSize=(260, 200))

Aspirin and its five best shape-similarity hits from Enamine REAL

4. Search methods: Morgan/ECFP4 vs shape vs electrostatics

method= decides what “similar” means. The same query, database, and limit give different rankings.

morgan (default)shapeesp
Compares2D structure: shared circular atom neighbourhoods (radius 2, ECFP4)3D shape of the molecule's conformers3D electrostatic potential (partial-charge distribution)
ScoreECFP4 Tanimoto, 0–1CHEESE shape cosineCHEESE electrostatic cosine
Model in responserdkit-ecfp4-r2-n2048 (2048-bit fingerprint)shapesimespsim
FindsClose analogues with the same chemotype and substituent patternsMolecules that fill space like the query, even with a different scaffoldMolecules that present a similar charge pattern, such as polar or hydrogen-bonding motifs
Typical useSAR expansion, quick first lookScaffold hopping, shape-based ligand designBioisostere ideas, when interactions matter more than the skeleton
CostFastestSlower, separate capacitySlower, separate capacity

Keep these points in mind:

  • All three methods start from the same pool of constructible products. shape and esp then exactly rerank that pool with the CHEESE model, so rankings overlap and no method returns a molecule the proposal step never assembled.
  • Scores are not comparable across methods or model versions. A shape score of 0.9 does not mean “more similar” than an ECFP4 score of 0.7. Compare ranks, or use one method per question.
  • Shape and electrostatic scores depend on the conformer and partial-charge assumptions of the pinned model release. Record model_version and database_release to reproduce a run.
  • For small queries such as ethanol the methods mostly agree. Differences grow with size and flexibility.

Start with morgan. Switch to shape when you want different scaffolds with a similar 3D footprint, and to esp when the interaction pattern, rather than the skeleton, is the point.

Compare the methods on one query

Celecoxib, top 20 from Enamine REAL. The RDKit ECFP4 similarity to the query puts the three rankings on one 2D yardstick.

from rdkit import DataStructs
from rdkit.Chem import rdFingerprintGenerator

celecoxib = "Cc1ccc(-c2cc(C(F)(F)F)nn2-c2ccc(S(N)(=O)=O)cc2)cc1"
ecfp4 = rdFingerprintGenerator.GetMorganGenerator(radius=2, fpSize=2048)
fp_query = ecfp4.GetFingerprint(Chem.MolFromSmiles(celecoxib))

def ecfp4_to_query(smiles):
    return DataStructs.TanimotoSimilarity(fp_query, ecfp4.GetFingerprint(Chem.MolFromSmiles(smiles)))

runs = {m: dmc.search(celecoxib, database="enamine", method=m, limit=20) for m in ["morgan", "shape", "esp"]}

pd.DataFrame(
    {
        "method": m,
        "metric": r.metric,
        "model_version": r.raw["model_version"],
        "score range": f"{min(r.scores):.2f}-{max(r.scores):.2f}",
        "mean ECFP4 to query": round(sum(map(ecfp4_to_query, r.smiles)) / len(r), 2),
        "server time (ms)": round(r.timing_ms["total"]),
    }
    for m, r in runs.items()
)
   method                       metric         model_version score range  mean ECFP4 to query  server time (ms)
0  morgan               ECFP4 Tanimoto  rdkit-ecfp4-r2-n2048   0.46-0.53                 0.48               364
1   shape          CHEESE shape cosine              shapesim   0.64-0.77                 0.46               672
2     esp  CHEESE electrostatic cosine                espsim   0.64-0.79                 0.47               671

How many molecules do two top-20 lists share?

names = list(runs)
pd.DataFrame(
    [[len(set(runs[a].smiles) & set(runs[b].smiles)) for b in names] for a in names],
    index=names, columns=names,
)
        morgan  shape  esp
morgan      20      7    8
shape        7     20    7
esp          8      7   20

Top three hits per method, labelled with the method score and the ECFP4 similarity to the query:

Celecoxib and the top three Morgan, shape, and electrostatic hits

For this query the mean ECFP4 similarity is nearly the same for all three methods, yet only 7–8 of 20 molecules are shared between any two. Each method reorders the same candidate pool, so they choose different molecules from similar neighbourhoods. Morgan ranks by 2D fragments alone (note the tied 0.53 scores). Shape and electrostatic hits often have lower ECFP4 similarity but a high 3D score, such as a different linker or rearranged core with a similar footprint. This is one query: judge the methods on your own target.

Client.search_cheese(..., scorer="shape" | "esp") is the same call restricted to the CHEESE methods, and Client.search() accepts the same method=.

5. Database shorthands

Wherever a database is expected, a short alias such as "enamine" resolves to the full ID (enamine-real-v5a). Aliases exist only for make-on-demand spaces; full IDs always work.

a = dmc.search("CCO", database="enamine", limit=1)
b = dmc.search("CCO", database="enamine-real-v5a", limit=1)

a.database_id, a.database_release, a.database_id == b.database_id
('enamine-real-v5a', '2026-09-06.2', True)

6. Substructure

Substructure search finds exact containment, so scores are None. The default query language is SMARTS; pass format="smiles" for SMILES.

motif = dmc.substructure("C(=O)N1CCC1", database="enamine", limit=5)  # N-acyl azetidine
pd.DataFrame({"smiles": motif.smiles, "score": motif.scores, "price_usd": motif.prices})
                                          smiles score  price_usd
0         NC(=O)N1CC(C(=O)N2CCCc3cccc(Br)c3C2)C1  None        163
1  CN(C(=O)C1CC2(C1)CN(C(=O)OCc1ccccc1)C2)[C@H]1[...  None        163
2  COc1nc(CN(C[C@@H]2CCC[C@H]2CF)C(=O)C2CN(C(C)=O...  None        245
3                      CCC(CC)CSCC(C)C(=O)N1CCC1  None        163
4      CC(C)(C)OC(=O)N1CC(c2ocnc2CNCC2(OCCO)CCOC2)C1  None        163

Demanding motifs can take tens of seconds; see substructure search for timeout_seconds, coverage, and partial results.

7. Random sample

The same seed on the same database release and sampling version returns the same molecules.

s1 = dmc.sample(database="enamine", count=5, seed=42)
s2 = dmc.sample(database="enamine", count=5, seed=42)
s1.smiles == s2.smiles, s1.sampling_method, s1.seed
(True, 'route_product_tuple', 42)

The SDK never invents a numeric similarity for an exact or random result. See random sampling for the distribution semantics.

8. One client for several calls

Use an explicit client when several calls should share one connection, or when working with selections and durable runs:

from deepmedchem import Client

with Client() as client:
    first = client.search("CCO", database="enamine", method="morgan", limit=3)
    second = client.search("CCN", database="enamine", method="morgan", limit=3)

first.smiles, second.smiles
(['CCCCO', 'CCCCCO', 'CCC(CC)CO'], ['CCCC', 'CCCCF', 'CCCCC'])

9. Save results

to_file infers the format from the suffix: .csv, .sdf (requires RDKit), .smi, or .json. It returns the number of molecules written. to_pandas(), to_csv(), to_sdf(), and to_records() are also available.

import tempfile, pathlib

out = pathlib.Path(tempfile.mkdtemp())
hits.to_file(out / "aspirin_shape.csv"), hits.to_file(out / "aspirin_shape.smi")
(9, 9)

The CSV starts with rank, smiles, score, price, product_id, database_id, database_release, reaction_id, metric and then any further populated fields.

10. Errors

Every API failure raises DeepMedChemError with code, status_code, retryable, and request_id. The client already retries transient 429, 503, and 504 responses twice, honouring Retry-After.

from deepmedchem import DeepMedChemError

for bad in [dict(smiles="not-a-smiles", database="enamine"), dict(smiles="CCO", database="no-such-space")]:
    try:
        dmc.search(**bad)
    except DeepMedChemError as e:
        print(f"{e.code:22} HTTP {e.status_code}  retryable={e.retryable}  {e}")
worker_error           HTTP 400  retryable=False  invalid SMILES
unavailable_library    HTTP 400  retryable=False  library not loaded: no-such-space

Retry only when retryable is true. Quote request_id when contacting support. A missing credential raises the code missing_api_key. See errors for the status mapping.

11. Async

deepmedchem.aio provides matching short-lived async operations, and AsyncClient supports explicit connection reuse. Jupyter allows top-level await:

from deepmedchem import aio

(await aio.search("CCO", database="enamine", limit=3)).smiles
['CCCCO', 'CCCCCO', 'CCC(CC)CO']

12. From hits to a vendor request

prepare_order turns a results CSV into a reviewable quote or order request for each vendor. It sends nothing: it only writes files (and the CLI can open your mail client with the draft). Price estimates are deliberately left out of the request.

from deepmedchem import prepare_order

bundle = prepare_order(out / "aspirin_shape.csv", get_quote=True, output_dir=out / "quote")
print((bundle.directory / "summary.txt").read_text())
DeepMedChem quote request bundle
Source: aspirin_shape.csv
Molecules: 9
Vendor requests: 1

Enamine: 9 molecules -> info@enamine.net (enamine/)

If an email draft did not open, copy the matching email.txt and attach or paste molecules.csv.

13. The same from a terminal

The package installs the deepmedchem command, also available as dmc.

deepmedchem usage
deepmedchem databases --detailed
deepmedchem search CCO -d enamine -n 3 -o hits.csv
deepmedchem substructure 'C(=O)N1CCC1' -d enamine -n 20
deepmedchem sample -d enamine -n 100 --seed 12345
deepmedchem order hits.csv --get-quote --no-open

deepmedchem search CCO -d enamine -n 3 prints a table and a one-line summary (-o also saves the file and reports Saved 3 molecules to hits.csv (csv).):

rank   score  price  smiles
----  ------  -----  ---------
   1  0.4167   $245  CCCCO
   2  0.3846   $245  CCCCCO
   3  0.3846   $245  CCC(CC)CO

Searched ~93.4B source combinations (Enamine REAL v5a) in 693 ms.
Similarity range: 0.38-0.42 ECFP4 Tanimoto.

See the Python reference for profiles, credential precedence, and every result field.

Contents

Python reference

Lightweight operations, result models, clients, profiles, and compatibility.

Lookup material for the public deepmedchem names: operations, result models, clients, errors, profiles and authentication, databases and prices, the command line, and the ordering helpers. The tables were generated from deepmedchem 0.3.0b4 and from live calls. The tutorials are the Python quickstart, the Selection builder, and Python durable runs.

The examples are shown as they appear in a Jupyter notebook. They assume you are signed in (see the quickstart).

1. Public operations

Five module-level functions, each with an aio twin in deepmedchem.aio. Each one creates a short-lived client, makes one call, and closes it. For several calls, or for selections and runs, use a Client.

FunctionReturnsWhat it does
search(smiles, ...)SearchResultranked similarity: method="morgan" (default), "shape", or "esp"
substructure(query, ...)SubstructureResultexact containment, SMARTS (default) or SMILES; no ranking
sample(...)SampleResultrandom molecules from one chemical space, optionally seeded
catalog()dictthe live catalog: libraries, releases, capabilities, limits, registries
usage()Usageaccount plan and daily credits

Operation-specific parameters and their defaults (a blank cell means the function does not take it):

Parametersearchsubstructuresample
smilesrequired
queryrequired
databaserequiredrequiredrequired
method'morgan'
format'smarts'
limit20100
timeout_seconds30
count100
seedNone
include_synthonsFalseFalseFalse

Every function also accepts the connection options shared with Client (section 4): api_key, api_url, profile, credential_provider, timeout (seconds, default 45), and transport.

The API validates these ranges and reports a violation as an invalid_schema error:

ArgumentRange
search limit1–200
substructure limit1–200
substructure timeout_seconds1–120
sample count1–1000
SMILES length1–2048 characters

2. Result models

SearchResult, SubstructureResult, and SampleResult are ordered sequences of SMILES: iteration, indexing, slicing, and smiles all use the same ranking. Every attribute below is read locally from the response you already have; none sends a request.

import pandas as pd
import deepmedchem as dmc

hits = dmc.search("CC(=O)Oc1ccccc1C(=O)O", database="enamine", limit=3, include_synthons=True)
hits
SearchResult(3 molecules, method='morgan', database='enamine-real-v5a')
# aligned views, one entry per hit
pd.DataFrame({name: getattr(hits, name) for name in ("ranks", "smiles", "scores", "ids", "prices")})
   ranks                         smiles    scores                       ids  prices
0      1          O=C(O)Oc1ccccc1C(=O)O  0.703704  d72ff65eda257ec576fbbefd     245
1      2         COC(=O)Oc1ccccc1C(=O)O  0.666667  edd180638b6c99968e5e6ec8     163
2      3  CC(C)(C)OC(=O)Oc1ccccc1C(=O)O  0.606061  326b09cf92a37112432f0845     163
AttributeTypeMeaning
smiles, scores, ids, ranks, priceslistaligned columns. scores is None for substructure and sample; ids are product IDs; prices are whole US dollars or None
hitstuple[Hit, ...]immutable typed rows (below)
metaSearchMetacompact provenance (below)
warningstupletyped code / message pairs
rawdictthe complete, forward-compatible JSON response
request_id, database_id, database_release, scorer, metric, counts, timing_msresponse fields
resultslist[dict]the response rows as plain dictionaries

repr(result) is bounded and never includes the response. to_records(), to_pandas(), to_csv(), to_sdf(), and to_file() are covered in section 3.

Hit (immutable row)

FieldTypeDefault
smilesstrrequired
rankintrequired
scorefloat | NoneNone
product_idstr | NoneNone
reaction_idstr | NoneNone
metricstr | NoneNone
priceint | NoneNone
propertiesdict[str, float] | NoneNone
predicted_propertiesdict[str, float] | NoneNone
acquisitionPredictedPropertyAcquisitionHit | NoneNone

Anything else the service returns is kept and exposed as hit.extra:

sorted(hits.hits[0].extra)
['admet_acquisition_scores',
 'admet_in_domain',
 'approximate_properties',
 'constraint_evidence',
 'proposal_score',
 'synthons']

price is a positive whole number of US dollars, or None when no price is available. acquisition is set only for predicted-property selections (see the Selection builder). synthons appears only with include_synthons=True.

SearchMeta and Usage

hits.meta
SearchMeta(request_id='ccfbdac5-1968-4ce8-b4db-884e56f286a2', database='enamine-real-v5a', release='2026-09-06.2', method='morgan', metric='ECFP4 Tanimoto', returned=3, elapsed_ms=504.7299531288445)
SearchMeta fieldTypeDefault
request_idstr | NoneNone
databasestr | NoneNone
releasestr | NoneNone
methodstr | NoneNone
metricstr | NoneNone
returnedint0
elapsed_msfloat | NoneNone
Usage fieldTypeDefault
planstr | NoneNone
limitint | NoneNone
usedint0
remainingint | NoneNone
unlimitedboolFalse
windowstr | None'day'
reset_atstr | NoneNone
seconds_to_resetint | NoneNone
promoUsagePromotion | NoneNone
user_idstr | NoneNone

Usage.tier is an alias for plan (free, registered, private, premium, …). unlimited=True means the credit counters do not apply.

What substructure and sample add

motif = dmc.substructure("C(=O)N1CCC1", database="enamine", limit=2)
draw = dmc.sample(database="enamine", count=2, seed=1)

extra = lambda r: [k for k in r.raw if k not in hits.raw]
{"substructure": extra(motif), "sample": extra(draw)}
{'substructure': ['indexed_reactions',
  'available_reactions',
  'indexed_products',
  'available_products',
  'coverage_fraction',
  'timed_out',
  'search_complete',
  'query'],
 'sample': ['sampling_method',
  'sampling_version',
  'seed',
  'requested',
  'returned',
  'deduplicated']}

Substructure rows carry the exact atoms and bonds that matched; sample rows are indexed, not ranked:

sorted(motif.hits[0].extra), motif.raw["coverage_fraction"], motif.raw["timed_out"]
(['matched_atom_indices', 'matched_bond_indices', 'synthons'], 1.0, False)

3. Exporting results

to_file(path) writes CSV, SDF, SMILES, or JSON and returns the number of molecules written. The format comes from the suffix (.csv, .sdf/.sd/.mol, .smi/.smiles/.txt, .json) or from format=. SDF needs RDKit and writes scores and prices as tags. to_records() returns the rows as dictionaries; to_pandas() needs pandas.

import tempfile, pathlib

out = pathlib.Path(tempfile.mkdtemp())
{suffix: hits.to_file(out / f"hits.{suffix}") for suffix in ("csv", "smi", "json", "sdf")}
{'csv': 3, 'smi': 3, 'json': 3, 'sdf': 3}

The CSV starts with the common columns, then every other field that is set on at least one hit:

pd.read_csv(out / "hits.csv").columns.tolist()
['rank',
 'smiles',
 'score',
 'price',
 'product_id',
 'database_id',
 'database_release',
 'reaction_id',
 'metric',
 'proposal_score',
 'synthons']
(out / "hits.smi").read_text().splitlines()[:2]
['O=C(O)Oc1ccccc1C(=O)O d72ff65eda257ec576fbbefd',
 'COC(=O)Oc1ccccc1C(=O)O edd180638b6c99968e5e6ec8']

4. Clients

Client (sync) and AsyncClient (async) hold one connection, so several calls reuse it. They offer the same simple methods as the module-level functions plus the advanced selections and runs namespaces. Use them as context managers (with Client() as client: and async with AsyncClient() as client:), or call close() yourself (await client.close() for the async one).

ParameterDefaultMeaning
api_keyNoneexplicit key; highest precedence (section 7)
api_urlNoneoverride the API host
profileNonewhich profile to use (section 6)
account_urlNoneoverride the account-service host
timeout45.0per-request timeout in seconds
max_retries2retries for 429, 503, 504, and network errors
retry_backoff0.25the delay doubles from this value up to 5 s and honours Retry-After (up to 30 s)
credential_providerNonea callable or object with get_api_key() (section 7)
transportNonean httpx transport, mainly for tests
application'deepmedchem-python'identifies your tool in request headers
application_versionNoneversion reported in request headers
from deepmedchem import Client, AsyncClient

client = Client()
{
    "methods": [n for n in dir(client) if not n.startswith("_")],
    "namespaces": [n for n in ("selections", "runs") if hasattr(client, n)],
}
{'methods': ['catalog',
  'close',
  'runs',
  'sample',
  'search',
  'search_cheese',
  'search_substructure',
  'selections',
  'usage'],
 'namespaces': ['selections', 'runs']}

search_cheese is the shape/electrostatic route that search(method=...) uses internally:

r = client.search_cheese("CCO", database="enamine", scorer="shape", limit=2)
r, client.close()
(SearchResult(2 molecules, method='shape', database='enamine-real-v5a'), None)

5. Errors

Failures raise DeepMedChemError. Local mistakes such as a bad argument raise ValueError before any request.

AttributeMeaning
codestable machine-readable code
status_codeHTTP status, or None for errors raised locally
retryablewhether retrying the same call can succeed
request_idquote it when contacting support
from deepmedchem import DeepMedChemError

cases = {
    "no credential":     lambda: Client(profile="dev"),
    "wrong key":         lambda: Client(api_key="invalid").search("CCO", database="enamine", limit=1),
    "server unreachable": lambda: Client(api_url="http://127.0.0.1:9", timeout=2, max_retries=0).search("CCO", database="enamine", limit=1),
    "invalid SMILES":    lambda: dmc.search("not-a-smiles", database="enamine"),
    "unknown database":  lambda: dmc.search("CCO", database="no-such-space"),
    "limit too large":   lambda: dmc.search("CCO", database="enamine", limit=500),
    "unknown method":    lambda: dmc.search("CCO", database="enamine", method="nope"),
    "unknown profile":   lambda: Client(profile="nope"),
}
rows = []
for label, call in cases.items():
    try:
        call()
    except DeepMedChemError as e:
        rows.append((label, "DeepMedChemError", e.code, e.status_code, e.retryable))
    except ValueError as e:
        rows.append((label, "ValueError", None, None, None))
pd.DataFrame(rows, columns=["case", "raised", "code", "status", "retryable"])
                 case            raised                 code  status retryable
0       no credential  DeepMedChemError      missing_api_key     NaN     False
1           wrong key  DeepMedChemError         unauthorized   401.0     False
2  server unreachable  DeepMedChemError      transport_error     NaN      True
3      invalid SMILES  DeepMedChemError         worker_error   400.0     False
4    unknown database  DeepMedChemError  unavailable_library   400.0     False
5     limit too large  DeepMedChemError       invalid_schema   422.0     False
6      unknown method        ValueError                  NaN     NaN      None
7     unknown profile        ValueError                  NaN     NaN      None

Codes you will meet:

CodeStatusRetryableMeaning
missing_api_keynonenono credential found for the profile
unauthorized401nomissing or invalid key
invalid_schema422noan argument failed validation (range, length, pattern)
invalid_request400noa semantic problem, such as an unknown property or contradictory constraints
unavailable_library400nothe chemical space is not loaded
worker_error400nothe engine rejected the input, for example an invalid SMILES
durable_required413nothe selection is over the synchronous budget; use a run
run_not_found404nounknown run ID
idempotency_conflict409nothe idempotency key was already used with different content
transport_errornoneyesthe request could not be completed (network)
client_timeoutnonenoruns.wait(timeout=...) ran out of time

429, 503, and 504 responses are retried automatically, then raised with retryable=True. See errors for the HTTP error envelope.

6. Profiles and configuration

A profile bundles the three hosts the SDK talks to: the API, the web app used for login, and the account service used for usage(). The SDK never derives one host from another.

Profileapi_urlweb_urlaccount_url
defaulthttps://api.deepmedchem.comhttps://cheese.deepmedchem.comhttps://api.cheese.deepmedchem.com
devhttps://api-dev.deepmedchem.comhttps://cheese-new-dev.deepmedchem.comhttps://api.cheese-dev.deepmedchem.com

Profile precedence: the profile= argument, then DEEPMEDCHEM_PROFILE, then the active profile in the configuration file, then default. Non-secret settings live in a TOML file at a platform-specific path that deepmedchem status prints; API keys are never written there.

deepmedchem status
profile: default
api_url: https://api.deepmedchem.com
web_url: https://cheese.deepmedchem.com
account_url: https://api.cheese.deepmedchem.com
config_path: ~/Library/Application Support/deepmedchem/config.toml
authenticated: True
Environment variableEffect
DEEPMEDCHEM_API_KEYAPI key (also DMC_API_KEY, CHEESE_API_KEY)
DEEPMEDCHEM_PROFILEselect a profile
DEEPMEDCHEM_API_URL (also DMC_API_URL), DEEPMEDCHEM_WEB_URL, DEEPMEDCHEM_ACCOUNT_URLoverride the default profile's hosts
DEEPMEDCHEM_CREDENTIAL_STOREfile or keyring to force one credential store (default auto)
DEEPMEDCHEM_NO_BROWSERmake login print the approval URL instead of opening a browser

7. Authentication

Credential precedence, first match wins:

  1. the api_key= argument,
  2. DEEPMEDCHEM_API_KEY, then DMC_API_KEY, then CHEESE_API_KEY,
  3. a credential_provider (a callable returning a key or None, or an object with get_api_key()),
  4. the selected profile's stored key: the OS keychain, or a 0600 credentials file next to the configuration file on hosts without a keychain.
deepmedchem login               # approve this device in your browser and store the key
deepmedchem login --profile dev
deepmedchem status --verify     # confirm the stored key is accepted by the API
deepmedchem logout --profile dev

login --token-stdin reads a key from standard input for headless setups.

A provider is only consulted after the explicit key and the environment variables:

def from_vault():
    return None           # return the key from your secret manager here

with Client(credential_provider=from_vault) as c:
    account = c.usage()
account
Usage(plan='premium', credits=unlimited)
deepmedchem status --verify
profile: default
api_url: https://api.deepmedchem.com
web_url: https://cheese.deepmedchem.com
account_url: https://api.cheese.deepmedchem.com
config_path: ~/Library/Application Support/deepmedchem/config.toml
authenticated: True
verified: True
plan: premium
credits_remaining: unlimited
credits_limit: 1000000

8. Databases and prices

Use the catalog to see what is available. Database IDs are release-pinned names such as enamine-real-v5a; a short alias resolves to the full ID wherever a database is expected, and full IDs and private IDs always work verbatim. Aliases exist for make-on-demand spaces only.

deepmedchem databases
abbreviation  molecules  prices  orders
------------  ---------  ------  ------------------------
enamine          ~93.4B  yes     info@enamine.net
freedom          296.4B  yes     sales@chem-space.com
explore            9.5T  yes     sales@emolecules.com
synple             7.6T  yes     sales@emolecules.com
vast               6.8B  yes     VAST@XtalPi.com
cheminfinita     794.2B  -       info@otava.ca
spacem1            1.5B  -       hello@molecule.one

7 databases. Lead times vary by database; see --detailed.
Order or request quotes by email, or run `dmc order results.csv`.
rows = [
    (l["database_id"], l["release_id"], l["pricing"]["available"], l["pricing"].get("currency"), l["pricing"].get("ship_to"), l["pricing"].get("default_amount_mg"))
    for l in dmc.catalog()["libraries"]
]
pd.DataFrame(rows, columns=["database_id", "release", "prices", "currency", "ship_to", "default_mg"])
              database_id         release  prices currency ship_to  default_mg
0    cheminfinita-2026-02       2026-02.3   False      NaN     NaN         NaN
1             d2b-spacem1    2025-09-24.4   False      NaN     NaN         NaN
2        enamine-real-v5a    2026-09-06.2    True      USD      US         1.0
3         freedom-space-5  2026-03-296b.4    True      USD      US         1.0
4  synple-explore-2025-10       2025-10.4    True      USD      US         1.0
5   synple-synple-2025-10       2025-10.4    True      USD      US         1.0
6            vast-2026-h2       2026-h2.3    True      USD      US         1.0

hit.price and the aligned result.prices list are whole US dollars for US delivery, defaulting to 1 mg where the vendor uses pack sizes, taken from the original response without another request. A missing or unsupported price is None, never zero. Prices are estimates; request a binding quote from the vendor before ordering. See chemical spaces and capabilities for database support.

9. Command line

The package installs deepmedchem and the short alias dmc. Commands exit 0 on success and 1 on an error, which is printed to standard error.

CommandPurpose
login, status, logoutstore, check, or remove credentials
usageplan and remaining daily credits
databases (alias catalog)list searchable databases; --detailed adds IDs and provider details
search SMILES -d DB [-m morgan|shape|esp] [-n N]similarity search
substructure QUERY -d DB [-f smiles|smarts] [-n N] [--timeout-seconds S]exact substructure
sample -d DB [-n N] [--seed S]random sample
order RESULTS.csvprepare vendor request drafts (section 10)

Common options: --profile NAME, --json (print the raw response), and, on the three search commands, -o FILE and --format csv|sdf|smi|json.

deepmedchem --version
deepmedchem search CCO -d enamine -n 2 -o cli.csv
0.3.0b4
rank   score  price  smiles
----  ------  -----  ------
   1  0.4167   $245  CCCCO
   2  0.3846   $245  CCCCCO

Searched ~93.4B source combinations (Enamine REAL v5a) in 639 ms.
Similarity range: 0.38-0.42 ECFP4 Tanimoto.
Saved 2 molecules to cli.csv (csv).
pd.read_csv("cli.csv")[["rank", "smiles", "score", "price"]]
   rank  smiles     score  price
0     1   CCCCO  0.416667    245
1     2  CCCCCO  0.384615    245

A failing command prints the error and exits with 1:

deepmedchem search CCO -d no-such-space; echo "exit code: $?"
error: library not loaded: no-such-space [unavailable_library]
exit code: 1

10. Ordering helpers

prepare_order(results_csv, ...) turns a results CSV (as written by to_csv or -o) into one reviewable request per vendor. It never sends anything and never includes prices: it writes files, and deepmedchem order can additionally open your mail client with each draft. Pass get_quote=True to ask for a quote instead of an order.

from deepmedchem import prepare_order

bundle = prepare_order(out / "hits.csv", get_quote=True, output_dir=out / "quote", amount_mg=5, name="A. Chemist")
bundle.mode, bundle.molecule_count, [(d.vendor, d.email, len(d.molecules)) for d in bundle.drafts]
('quote', 3, [('Enamine', 'info@enamine.net', 3)])
sorted(str(p.relative_to(bundle.directory)) for p in bundle.directory.rglob("*") if p.is_file())
['enamine/email.txt', 'enamine/molecules.csv', 'manifest.json', 'summary.txt']
ObjectFields
OrderBundledirectory, mode (order or quote), drafts, molecule_count
OrderDraftvendor, email, molecules, directory, csv_path, email_path, subject, body, mailto_url
OrderMoleculedatabase_id, deepmedchem_id, smiles

Parameters: database (when the CSV has no database_id column), output_dir, to (override the recipient, combining all rows), amount_mg, name. The directory must not already exist. Databases without a known vendor contact need to=.

11. Compatibility

Older names still work during the migration window.

NameIs
DMCClient, AsyncDMCClient, DMCErroraliases of Client, AsyncClient, DeepMedChemError
Client.search_cheese(..., scorer=), Client.search_substructure(..., query_format=)the underlying methods behind search(method=...) and substructure(...)
DMC_API_KEY, CHEESE_API_KEY, DMC_API_URLaccepted alongside the DEEPMEDCHEM_* variables
keychain entries from dmc-navigatorread and copied to the new location on first use
from deepmedchem import DMCClient, AsyncDMCClient, DMCError

DMCClient is Client, AsyncDMCClient is AsyncClient, DMCError is DeepMedChemError
(True, True, True)
Contents

Python durable runs

Create typed runs and resume progress, events, partial results, errors, and cancellation.

A run is durable, observable execution. Once the service accepts it, it keeps going if your client disconnects, reports progress per item, keeps partial results, and can be cancelled. Runs are retained for 30 days.

There are two kinds:

KindUse it for
selection_batchone selection template applied independently to many query molecules (1–1000 items)
selectionone selection you want executed durably

Do not loop over many queries with search(): put them in one selection_batch so progress, partial results, cancellation, and per-item errors stay visible. The sections below follow the life of one run. Selections themselves are covered in the Selection builder; the HTTP routes and limits are in the runs API guide.

The examples below are shown as they appear in a Jupyter notebook. They assume you are signed in (see the Python quickstart).

1. Describe the work: a batch

One template, with a named reference slot (query), and one item per molecule that fills the slot. Item IDs are yours (letters, digits, ., _, -; up to 128 characters) and come back with each result.

import pandas as pd
from deepmedchem import Client, Run, Selection

template = (
    Selection.from_database("enamine-real-v5a")
    .ranked()
    .require_preset("lipinski-ro5/v1")
    .maximize_similarity("rdkit.ecfp4_tanimoto", reference="query")   # "query" is filled per item
    .limit(5)
)

leads = {
    "aspirin":     "CC(=O)Oc1ccccc1C(=O)O",
    "ibuprofen":   "CC(C)Cc1ccc(C(C)C(=O)O)cc1",
    "paracetamol": "CC(=O)Nc1ccc(O)cc1",
    "broken":      "not-a-smiles",          # one bad input on purpose
}
spec = Run.selection_batch(
    template=template,
    items={item_id: {"query": smiles} for item_id, smiles in leads.items()},
    metadata={"campaign": "lead-expansion-demo"},
)
spec.to_dict()["kind"], len(spec.to_dict()["items"])
('selection_batch', 4)

One item as it will be sent:

spec.to_dict()["items"][0]
{'id': 'aspirin',
 'references': [{'id': 'query',
   'structure': {'format': 'smiles', 'value': 'CC(=O)Oc1ccccc1C(=O)O'}}]}

2. Estimate

Ask before you submit. admissible says whether the service will accept it; limits and work show the budgets and what the run would reserve. Runs are created through a Client (client.runs); Client() is your signed-in connection to the API, and it sends no request until you call something.

client = Client()

est = client.runs.estimate(spec)
est["admissible"], est["limits"]
(True, {'items': 1000, 'body_bytes': 5242880, 'result_cells': 100000})
est["work"]
{'items': 4,
 'result_cells': 20,
 'reservation': {'active_runs': 1,
  'queued_items': 4,
  'work_units': 4.0,
  'result_bytes': 40960,
  'model_calls': 0}}

3. Create

create returns after the run is durably accepted, not when it finishes. An idempotency_key is required: it makes the call safe to repeat (see section 9).

run = client.runs.create(spec, idempotency_key="docs-runs-leads-v1")
run.id, run.kind, run.status, run.progress.model_dump()
('run_808b5d37276f409c9aa256229c',
 'selection_batch',
 'queued',
 {'total': 4,
  'pending': 4,
  'running': 0,
  'succeeded': 0,
  'failed': 0,
  'cancelled': 0})

Calling create again with the same key returns the same run, so the status you see may already be final.

4. Follow the events

watch yields events until the run is terminal. Every event carries the progress counters at that moment. Besides the milestones shown here (queued, each item succeeded or failed, completed), the service also emits finer events such as item.started, and item.retrying when it retries an item. after= resumes from a sequence number, so a restarted notebook or script does not replay what it has seen.

MILESTONES = {"run.queued", "item.succeeded", "item.failed", "run.completed"}

rows = [
    (e.sequence, e.type, e.item_id, e.status)
    for e in client.runs.watch(run.id, after=0)
    if e.type in MILESTONES
]
pd.DataFrame(rows, columns=["seq", "event", "item", "status"])
   seq           event         item                 status
0    1      run.queued          NaN                 queued
1    6  item.succeeded      aspirin              succeeded
2    7  item.succeeded    ibuprofen              succeeded
3    8  item.succeeded  paracetamol              succeeded
4   13     item.failed       broken                 failed
5   14   run.completed          NaN  completed_with_errors

To resume, pass the last sequence number you stored:

# resume: only events after the last one you stored (here: the third milestone)
last_seen = rows[2][0]
[(e.sequence, e.type, e.item_id) for e in client.runs.events(run.id, after=last_seen) if e.type in MILESTONES]
[(8, 'item.succeeded', 'paracetamol'),
 (13, 'item.failed', 'broken'),
 (14, 'run.completed', None)]

5. Wait for the end

wait blocks until the run is terminal. Terminal states are completed, completed_with_errors, failed, and cancelled. completed_with_errors is a normal outcome: successful items are kept and no exception is raised. Pass timeout= (seconds) to stop waiting without stopping the run; it raises a DeepMedChemError with code client_timeout.

final = client.runs.wait(run.id)
final.status, final.terminal, final.progress.model_dump()
('completed_with_errors',
 True,
 {'total': 4,
  'pending': 0,
  'running': 0,
  'succeeded': 3,
  'failed': 1,
  'cancelled': 0})

6. Read the results

Each entry has an id (the item ID you gave), a status, and either a result (the same structure as a selection result) or an error. order="completion" (default) can be consumed while the run is active; order="input" returns your original order once it is terminal. The iterator fetches further pages for you.

rows = []
for item in client.runs.iter_results(run.id, order="input"):
    if item.ok:
        top = item.result["results"][0]
        rows.append((item.id, item.status, len(item.result["results"]), top["smiles"], round(top["score"], 2)))
    else:
        rows.append((item.id, item.status, 0, None, None))
pd.DataFrame(rows, columns=["item", "status", "hits", "best hit", "ecfp4"])
          item     status  hits                                 best hit  ecfp4
0      aspirin  succeeded     5                    O=C(O)Oc1ccccc1C(=O)O   0.70
1    ibuprofen  succeeded     5  CC(C(=O)O)c1ccc(CC(Cc2ccccc2)C(=O)O)cc1   0.69
2  paracetamol  succeeded     5            CC(=O)Nc1ccc(-c2ccc(O)cc2)cc1   0.87
3       broken     failed     0                                      NaN    NaN

A failed item keeps its own error

One invalid molecule does not affect its siblings. The error says what failed and for which item:

failed = [item for item in client.runs.iter_results(run.id) if not item.ok]
[(item.id, item.error["message"]) for item in failed], sorted(failed[0].error)
([('broken', 'invalid SMILES')],
 ['attempt_count',
  'code',
  'field',
  'item_id',
  'message',
  'retry_after_seconds',
  'retryable',
  'run_id'])

7. Item status view

iter_items(status=...) lists items by status without their (large) results. Always pass a status.

{
    status: [item.id for item in client.runs.iter_items(run.id, status=status)]
    for status in ("succeeded", "failed")
}
{'succeeded': ['aspirin', 'ibuprofen', 'paracetamol'], 'failed': ['broken']}

8. Run resource and retention

retrieve returns the current state at any time, from any process, as long as you have the run ID.

again = client.runs.retrieve(run.id)
again.status, again.raw["created_at"], again.raw["expires_at"]
('completed_with_errors',
 '2026-10-05T04:36:22.846471Z',
 '2026-11-04T04:36:22.846471Z')

9. Safe retries: idempotency

The same key with the same content returns the original run (no duplicate work). The same key with different content is refused.

from deepmedchem import DeepMedChemError

same = client.runs.create(spec, idempotency_key="docs-runs-leads-v1")
print("same run returned:", same.id == run.id)

other = Run.selection_batch(template=template, items={"ethanol": {"query": "CCO"}})
try:
    client.runs.create(other, idempotency_key="docs-runs-leads-v1")
except DeepMedChemError as e:
    print(e.code, e.status_code, "-", e)
same run returned: True
idempotency_conflict 409 - Idempotency-Key was already used with a different request

10. Cancel

cancel stops queued items; items already running finish. The call returns at once with status cancelling; wait then reports cancelled. Successful items keep their results. Cancelling a finished run is harmless.

import time

molecules = ["CCO", "CCN", "CCC", "CCCC", "c1ccccc1", "CC(=O)O", "CCOC", "CCS", "CCCl", "CCBr",
             "CC#N", "CC=O", "CCCO", "CCCN", "c1ccncc1", "C1CCCCC1", "CC(C)O", "CC(C)N", "OCCO", "NCCN"]
shape_template = (
    Selection.from_database("enamine-real-v5a").ranked()
    .maximize_similarity("cheese.shape", reference="q").limit(20)
)
big = Run.selection_batch(template=shape_template, items={f"m{i:02d}": {"q": s} for i, s in enumerate(molecules)})

slow = client.runs.create(big, idempotency_key="docs-runs-cancel-v1")
time.sleep(2)
cancelling = client.runs.cancel(slow.id)
print("right after cancel:", cancelling.status, cancelling.progress.model_dump())
right after cancel: cancelling {'total': 20, 'pending': 0, 'running': 7, 'succeeded': 1, 'failed': 0, 'cancelled': 12}
done = client.runs.wait(slow.id)
done.status, done.progress.model_dump()
('cancelled',
 {'total': 20,
  'pending': 0,
  'running': 0,
  'succeeded': 8,
  'failed': 0,
  'cancelled': 12})
pd.Series([item.status for item in client.runs.iter_results(slow.id)]).value_counts()
cancelled    12
succeeded     8
Name: count, dtype: int64

11. One selection as a run

Run.selection runs a single selection durably: it keeps going if your client disconnects, and you follow it with the same watch, wait, and iter_results calls. When selections.estimate says a selection is durable, its reusable_run_request is a ready-made run/1 request that you can pass to runs.create.

single = (
    Selection.from_database("enamine-real-v5a")
    .reference("aspirin", smiles=leads["aspirin"]).ranked()
    .maximize_similarity("rdkit.ecfp4_tanimoto", reference="aspirin")
    .limit(50)
)
one = client.runs.create(Run.selection(single), idempotency_key="docs-runs-single-v1")
client.runs.wait(one.id).status
'completed'
item = next(iter(client.runs.iter_results(one.id)))
item.id, item.ok, len(item.result["results"]), item.result["results"][0]["smiles"]
('selection', True, 50, 'O=C(O)Oc1ccccc1C(=O)O')

12. Async

AsyncClient has the same runs methods; iterators use async for.

from deepmedchem import AsyncClient

async with AsyncClient() as aclient:
    state = await aclient.runs.retrieve(run.id)
    ids = [i.id async for i in aclient.runs.iter_results(run.id, order="input")]
state.status, ids
('completed_with_errors', ['aspirin', 'ibuprofen', 'paracetamol', 'broken'])

13. Run errors

problems = {
    "unknown run":       lambda: client.runs.retrieve("run_doesnotexist"),
    "bad item ID":       lambda: client.runs.create(
        Run.selection_batch(template=template, items={"has space": {"query": "CCO"}}),
        idempotency_key="docs-runs-badid-v1"),
    "no idempotency key": lambda: client.runs.create(spec, idempotency_key=""),
}
for label, call in problems.items():
    try:
        call()
    except DeepMedChemError as e:
        print(f"{label:20} {e.code} (HTTP {e.status_code}): {str(e)[:70]}")
    except ValueError as e:
        print(f"{label:20} ValueError (raised locally): {e}")
unknown run          run_not_found (HTTP 404): Run not found.
bad item ID          invalid_schema (HTTP 422): String should match pattern '^[A-Za-z0-9._-]{1,128}$'
no idempotency key   ValueError (raised locally): idempotency_key is required by the supported SDK
client.close()
Contents

Selection builder

Build, validate, export, and replay molecule-selection/1 without local chemistry.

A selection describes which molecules you want from a chemical space, in four parts:

PartQuestion it answersBuilder methods
strategyHow is the space explored?.ranked(), .sample()
constraintsWhat is allowed? (hard gates).where(), .require_preset(), .require_pattern(), .require_different_scaffold()
objectivesWhat is better? (ranking).maximize_similarity()
portfolioWhat set do I get back?.limit(), .max_per_scaffold()

The builder does no chemistry locally. It builds the selection; the service validates, estimates, and executes it. The builder does not infer shape versus electrostatic, logP versus logD, scaffold method, matching policy, or predictive model: you choose each one explicitly.

The examples below are shown as they appear in a Jupyter notebook. They assume you are signed in (see the Python quickstart).

1. Your first selection

Similar to aspirin by ECFP4, 5 results. Builder methods return a new selection each time, so a chain reads like a sentence.

import pandas as pd
from deepmedchem import Client, Selection

aspirin = "CC(=O)Oc1ccccc1C(=O)O"

selection = (
    Selection.from_database("enamine")                      # which chemical space
    .reference("aspirin", smiles=aspirin)                   # a named query molecule
    .ranked()                                               # strategy: rank by objective
    .maximize_similarity("rdkit.ecfp4_tanimoto", reference="aspirin")
    .limit(5)
)
print(selection.to_yaml())
schema_version: molecule-selection/1
database:
  database_id: enamine-real-v5a
references:
- id: aspirin
  structure:
    format: smiles
    value: CC(=O)Oc1ccccc1C(=O)O
strategy:
  type: ranked
constraints: {}
objectives:
- type: similarity
  reference_id: aspirin
  metric_id: rdkit.ecfp4_tanimoto
  direction: maximize
portfolio:
  limit: 5
execution:
  quality: balanced
include: []

Client() is a signed-in connection to the DeepMedChem API. Every call goes through it. Creating it sends no request. It reads your key (from deepmedchem login or DEEPMEDCHEM_API_KEY) and opens a connection that later calls can reuse. Selections are available on a client, as client.selections.

client = Client()   # close it with client.close(), or use `with Client() as client:`

result = client.selections.create(selection)
result
SelectionResult(5 molecules, method=None, database=None)

The result is the same kind of object as a search result: a list of SMILES with typed hits.

pd.DataFrame({"smiles": result.smiles, "score": result.scores, "price_usd": result.prices})
                             smiles     score  price_usd
0             O=C(O)Oc1ccccc1C(=O)O  0.703704        245
1            COC(=O)Oc1ccccc1C(=O)O  0.666667        163
2     CC(C)(C)OC(=O)Oc1ccccc1C(=O)O  0.606061        163
3             CC(=O)c1ccccc1OC(=O)O  0.600000        245
4  CC(=O)Oc1cccc(C(=O)Oc2ccccc2)c1C  0.555556        163

2. Objectives: what “better” means

An objective ranks the molecules that already pass your constraints, using a reference molecule and a metric you choose (rdkit.ecfp4_tanimoto, cheese.shape or cheese.electrostatic), and it never excludes any of them. See Search methods in the Python quickstart for how they differ.

shape = (
    Selection.from_database("enamine")
    .reference("aspirin", smiles=aspirin)
    .maximize_similarity("cheese.shape", reference="aspirin")
    .limit(5)
)
r = client.selections.create(shape)
pd.DataFrame({"smiles": r.smiles, "shape score": r.scores})
                   smiles  shape score
0   O=C(O)Oc1ccccc1C(=O)O     0.972565
1  COC(=O)Oc1ccccc1C(=O)O     0.971898
2  COC(=O)Oc1ccccc1C(C)=O     0.955080
3   CC(=O)c1ccccc1OC(=O)O     0.924291
4  O=C(O)COc1ccccc1C(=O)O     0.871286

3. Constraints: what is allowed

Constraints are hard gates verified on every returned product; objectives only rank. Approximate synthon-level descriptors may speed up candidate acquisition, but each returned molecule is checked exactly. The registry of property IDs comes from the catalog and depends on what the respective database supports:

space = next(l for l in client.catalog()["libraries"] if l["database_id"] == "enamine-real-v5a")
pd.DataFrame(space["properties"]).rename(columns={"legacy_name": "RDKit name"})
             property_id         RDKit name  units
0           rdkit.mol_wt              MolWt     Da
1     rdkit.crippen_logp            MolLogP      1
2              rdkit.hbd         NumHDonors  count
3              rdkit.hba      NumHAcceptors  count
4  rdkit.rotatable_bonds  NumRotatableBonds  count
5             rdkit.tpsa               TPSA    A^2
6    rdkit.fraction_csp3       FractionCSP3      1
7   rdkit.aromatic_rings   NumAromaticRings  count

Property constraints .where()

Exactly one operator: gt, gte, lt, lte, or range=(low, high). units is required and checked against the registry. fidelity defaults to exact_product and missing to reject.

mw_window = selection.where("rdkit.mol_wt", range=(250, 350), units="Da").include("properties")
r = client.selections.create(mw_window)
pd.DataFrame({"smiles": r.smiles, "MW": [round(h.properties["MolWt"]) for h in r.hits]})
                              smiles   MW
0   CC(=O)Oc1cccc(C(=O)Oc2ccccc2)c1C  270
1  CC(=O)Oc1cccc(C(=O)Oc2ccccc2C)c1C  284
2  CC(=O)Oc1cccc(C(=O)OCc2ccccc2)c1C  284
3     CC(C)(C)OC(=O)COc1ccccc1C(=O)O  252
4     CC(C)(C)OC(=O)NOc1ccccc1C(=O)O  253

Returned properties use RDKit names (MolWt, MolLogP, …).

Presets .require_preset()

A preset is a named bundle of ordinary constraints. lipinski-ro5/v1 is MW ≤ 500 Da, Crippen cLogP ≤ 5, HBD ≤ 5, and HBA ≤ 10, with no unannounced extra rule. The service expands the preset, so you can see exactly what you asked for:

lipinski = selection.require_preset("lipinski-ro5/v1")
normalized = client.selections.validate(lipinski).normalized_selection
pd.DataFrame(normalized["constraints"]["properties"])[["property_id", "operator", "value", "units"]]
          property_id operator  value  units
0        rdkit.mol_wt      lte  500.0     Da
1  rdkit.crippen_logp      lte    5.0      1
2           rdkit.hbd      lte    5.0  count
3           rdkit.hba      lte   10.0  count

Explicit constraints intersect with preset constraints; an empty intersection is a validation error.

Structure and relationship constraints

require_pattern() takes a reviewed pattern ID; require_different_scaffold() compares to a reference using an explicit scaffold method. Evidence can be returned with include("constraint_evidence").

scaffold_hop = (
    selection
    .require_different_scaffold("rdkit.bemis_murcko", reference="aspirin")
    .require_pattern("alpha-amino-acid/v1", min_count=1)
    .include("constraint_evidence")
)
r = client.selections.create(scaffold_hop)
r.smiles
['CC(=O)NC(C(=O)NCCOc1ccccc1C(=O)O)c1ccccc1',
 'CC(=O)N[C@H](Cc1ccccc1)C(=O)NCCOc1ccccc1C(=O)O',
 'O=C(COc1ccccc1C(=O)O)NC(C(=O)O)c1ccccc1',
 'O=C(COc1ccccc1C(=O)O)N[C@H](C(=O)O)c1ccccc1',
 'O=C(COc1ccccc1C(=O)O)N[C@@H](C(=O)O)c1ccccc1']

Each hit reports which constraints it satisfied:

r.hits[0].raw["constraint_evidence"]
[{'constraint_id': 'alpha-amino-acid', 'type': 'structure', 'match_count': 1, 'passed': True},
 {'constraint_id': 'scaffold-0', 'type': 'scaffold_relation', 'operator': 'different', 'passed': True}]

4. Portfolio: the returned set

.limit(n) (1–1000) bounds the set; .max_per_scaffold(n) caps how many hits share a Bemis–Murcko scaffold. These rules run after eligibility and ranking, so they never turn a hard constraint into a preference.

diverse = selection.limit(10).max_per_scaffold(1)
r = client.selections.create(diverse)
len(r), len(set(r.smiles))
(10, 10)

5. No-reference selections: constrained sampling

.sample() replaces ranking by a draw from the space's advertised distribution, conditioned on your constraints. It is not “draw random molecules, then filter”. A seed is reproducible only with the same database release and sampling algorithm version.

sampled = (
    Selection.from_database("enamine")
    .sample(seed=42)
    .require_preset("lipinski-ro5/v1")
    .limit(5)
)
r = client.selections.create(sampled)
r.smiles
['COC(C(=O)N1CCC(CCC(=O)c2cnc(C3CC3)o2)C1)C(=O)N1CCC(O)C(F)C1',
 'CCCn1nnnc1C(N1CCN(C)C(CC)C1)C(C)(C)c1ccccc1',
 'C[C@H]1C(CNC(=O)C[C@@H](NC(=O)c2ccc(Cl)cn2)C2CC2)[C@@H]1C',
 'CCOC(=O)N(C)CC(=O)N(C)CC1CN(c2nc(C)nc3c2CCCC3)CCO1',
 'COc1ccsc1CN(CCC1(O)CCOC1)C(=O)[C@H](O)C(C)(C)C']

6. Copy-on-write: experimental arms from one base

Every method returns a new object, so one base selection can safely fan out.

base = selection.require_preset("lipinski-ro5/v1")
arms = {
    "small":  base.where("rdkit.mol_wt", lte=300, units="Da"),
    "lipophilic": base.where("rdkit.crippen_logp", gte=3, units="1"),
}
rows = []
for name, arm in arms.items():
    r = client.selections.create(arm.include("properties"))
    rows += [(name, h.smiles, round(h.score, 2), round(h.properties["MolWt"]), round(h.properties["MolLogP"], 1)) for h in r.hits[:3]]
pd.DataFrame(rows, columns=["arm", "smiles", "ecfp4", "MW", "cLogP"])
          arm                                            smiles  ecfp4   MW  cLogP
0       small                             O=C(O)Oc1ccccc1C(=O)O   0.70  182    1.4
1       small                            COC(=O)Oc1ccccc1C(=O)O   0.67  196    1.5
2       small                     CC(C)(C)OC(=O)Oc1ccccc1C(=O)O   0.61  238    2.7
3  lipophilic                  CC(=O)Oc1cccc(C(=O)Oc2ccccc2)c1C   0.56  270    3.1
4  lipophilic  CC(=O)Oc1cccc(C(=O)Oc2cccc(C(=O)c3ccccc3)c2C)c1C   0.53  388    4.7
5  lipophilic                 CC(=O)Oc1cccc(C(=O)Oc2ccccc2C)c1C   0.51  284    3.4

The base is unchanged by either arm:

base.to_dict()["constraints"]
{'presets': [{'preset_id': 'lipinski-ro5', 'version': '1'}]}

7. Export and replay

A selection is a plain document (schema molecule-selection/1) in JSON or YAML: store it, review it, send it to a colleague, rerun it.

text = scaffold_hop.to_json(indent=None)
print(text[:160], "...")
{"constraints": {"relationships": [{"method_id": "rdkit.bemis_murcko", "operator": "different", "reference_id": "aspirin", "type": "scaffold_relation"}], "struc ...
replayed = Selection.model_validate(scaffold_hop.to_dict())
replayed.to_dict() == scaffold_hop.to_dict()
True

8. Validate before spending work

Local checks only catch malformed documents; remote validate resolves release-specific capabilities and tells you, per constraint, how it will be executed.

v = client.selections.validate(lipinski)
v.valid, v.selection_hash[:12], v.warnings
(True, '906f1e40537f', [])
pd.DataFrame(v.constraint_execution)
                        path                             status                                           message
0  constraints.properties[0]  conservative_approximate_pushdown  Every returned assembled product is verified e...
1  constraints.properties[1]  conservative_approximate_pushdown  Every returned assembled product is verified e...
2  constraints.properties[2]  conservative_approximate_pushdown  Every returned assembled product is verified e...
3  constraints.properties[3]  conservative_approximate_pushdown  Every returned assembled product is verified e...

Each condition is reported as exact pushdown, conservative approximate pushdown plus exact final verification, post-assembly only, or unsupported.

Local errors (raised immediately, no request)

def attempt(label, fn):
    try:
        fn()
    except ValueError as e:                      # pydantic.ValidationError is a ValueError too
        print(f"{label:24} -> {str(e).splitlines()[0]}")

attempt("limit too large",   lambda: selection.limit(5000))
attempt("preset w/o version", lambda: selection.require_preset("lipinski-ro5"))
attempt("two operators",     lambda: selection.where("rdkit.mol_wt", gt=1, lt=2, units="Da"))
attempt("duplicate ref id",  lambda: selection.reference("aspirin", smiles="C"))
attempt("acquire on sample", lambda: sampled.acquire_predicted_property("openadmet-herg-pchembl", direction="minimize", keep_fraction=0.5))
limit too large          -> selection limit must be between 1 and 1,000
preset w/o version       -> preset must include a version, for example lipinski-ro5/v1
two operators            -> provide exactly one of gt, gte, lt, lte, or range
duplicate ref id         -> duplicate reference ID: aspirin
acquire on sample        -> predicted-property acquisition requires ranked strategy

Remote errors (the service knows the registries)

from deepmedchem import DeepMedChemError

problems = {
    "unknown property": selection.where("rdkit.nope", gt=1, units="Da"),
    "wrong units":      selection.where("rdkit.mol_wt", gt=1, units="kg"),
    "contradiction":    selection.require_preset("lipinski-ro5/v1").where("rdkit.mol_wt", gt=600, units="Da"),
}
for label, bad in problems.items():
    try:
        client.selections.validate(bad)
    except DeepMedChemError as e:
        print(f"{label:18} {e.code} (HTTP {e.status_code}): {e}")
unknown property   invalid_request (HTTP 400): unsupported property_id: rdkit.nope
wrong units        invalid_request (HTTP 400): rdkit.mol_wt requires units 'Da', got 'kg'
contradiction      invalid_request (HTTP 400): contradictory constraints for rdkit.mol_wt

9. Estimate: synchronous or durable?

estimate says how the work must run. Small, single-reference selections are synchronous; anything over the budget needs a durable run. The service never silently runs a hidden job or relaxes a condition.

def tier(sel):
    e = client.selections.estimate(sel)
    return e.execution_tier, e.work["reason"]

pd.DataFrame(
    [
        ("5 hits, one objective", *tier(selection)),
        ("1000 hits",             *tier(selection.limit(1000))),
    ],
    columns=["selection", "tier", "reason"],
)
               selection         tier                                         reason
0  5 hits, one objective  synchronous          within synchronous execution contract
1              1000 hits      durable  portfolio limit exceeds synchronous limit 200

A durable estimate is a successful answer, not an error. It carries a reusable run/1 request:

est = client.selections.estimate(selection.limit(1000))
if est.execution_tier == "synchronous":
    result = client.selections.create(est.normalized_selection)
else:
    # a durable estimate carries a ready-to-use run/1 request
    print("durable; reusable run request available:", est.reusable_run_request is not None)
durable; reusable run request available: True

Sending an over-budget selection straight to create is refused, not silently run:

try:
    client.selections.create(selection.limit(1000))
except DeepMedChemError as e:
    print(e.code, e.status_code)
durable_required 413

10. Read the result

create returns a normal result (list of SMILES, typed hits) plus the normalized selection, its hash, and counts that explain what the engine did.

r = client.selections.create(lipinski.include("properties"))
r.status, r.id[:12], r.selection_hash[:12], r.database_release
('completed', 'sel_2af11d1e', '2af11d1e99e0', '2026-09-06.2')
# what the engine did: proposals in, assembled products, dropped by exact checks, returned
pd.Series(r.counts, name="count").to_frame()
                              count
proposed                        100
normalized_candidates           100
approximate_property_dropped      0
approximate_admet_dropped         0
assembly_attempted              100
assembly_failed                  51
duplicate_products                0
admet_out_of_domain               0
exact_property_dropped            0
exact_constraint_dropped          0
exact_admet_scored                0
exact_admet_dropped               0
returned                          5
refill_rounds                     1
candidates_considered           100
stop_reason          target_reached
pd.DataFrame([h.properties for h in r.hits]).assign(smiles=r.smiles).round(1)
   MolWt  MolLogP  NumHDonors  NumHAcceptors                            smiles
0  182.1      1.4         2.0            3.0             O=C(O)Oc1ccccc1C(=O)O
1  196.2      1.5         1.0            4.0            COC(=O)Oc1ccccc1C(=O)O
2  238.2      2.7         1.0            4.0     CC(C)(C)OC(=O)Oc1ccccc1C(=O)O
3  180.2      1.9         1.0            3.0             CC(=O)c1ccccc1OC(=O)O
4  270.3      3.1         0.0            4.0  CC(=O)Oc1cccc(C(=O)Oc2ccccc2)c1C

11. Predicted-property shortlist acquisition (experimental)

acquire_predicted_property keeps the best rank quantile of a similarity shortlist for an advertised predicted endpoint (here: hERG pChEMBL, lower is better). It is available only for ranked selections that already have a similarity objective. It is an acquisition signal, not a hard ADMET constraint, and the values are predictions, not assays. Use exact RDKit constraints (section 3) for eligibility.

Endpoint support is release-specific, so check which endpoints a database advertises:

pd.DataFrame(space["predicted_property_endpoints"])[["endpoint_id", "units", "qualification"]].head(6)
                       endpoint_id             units                  qualification
0   openadmet-caco2-a-to-b-logpapp       log10(cm/s)  experimental-acquisition-only
1   openadmet-caco2-b-to-a-logpapp       log10(cm/s)  experimental-acquisition-only
2  openadmet-clint-human-microsome  log10(uL/min/mg)  experimental-acquisition-only
3  openadmet-clint-mouse-microsome  log10(uL/min/mg)  experimental-acquisition-only
4    openadmet-clint-rat-microsome  log10(uL/min/mg)  experimental-acquisition-only
5         openadmet-cyp1a2-logac50      log10(molar)  experimental-acquisition-only
herg = selection.acquire_predicted_property(
    "openadmet-herg-pchembl", direction="minimize", keep_fraction=0.25
)
r = client.selections.create(herg)
a = r.acquisition
print(f"{a.candidates_before} candidates -> {a.candidates_after} kept ({a.direction} {a.endpoint_id}, {a.units})")
print(a.qualification, "| model:", a.predicted_model_version)
100 candidates -> 25 kept (minimize openadmet-herg-pchembl, pChEMBL)
experimental-acquisition-only | model: herg-chemeleon-baseline@93f6527a4766

Per-hit predicted values and their applicability come with response-level model version, direction, units, qualification, and candidate counts:

pd.DataFrame(
    {
        "smiles": r.smiles,
        "ecfp4": [round(h.score, 2) for h in r.hits],
        "predicted hERG pChEMBL": [round(h.acquisition.predicted_value, 2) for h in r.hits],
        "in domain": [h.acquisition.applicable for h in r.hits],
    }
)
                     smiles  ecfp4  predicted hERG pChEMBL  in domain
0     O=C(O)Oc1ccccc1C(=O)O   0.70                    4.54       True
1    COC(=O)Oc1ccccc1C(=O)O   0.67                    4.70       True
2     CC(=O)c1ccccc1OC(=O)O   0.60                    4.30       True
3    O=C(O)COc1ccccc1C(=O)O   0.53                    4.28       True
4  O=C(O)CCCOc1ccccc1C(=O)O   0.49                    3.24       True

12. Pinning a release

Selection.from_database(db, release=...) pins the release, so a selection can be rerun against the same data. Without it the current release is used. Either way, the result reports the release it searched; store it together with the selection hash.

current = space["release_id"]
for release in [None, current]:
    sel = (Selection.from_database("enamine", release=release)
           .reference("a", smiles=aspirin)
           .maximize_similarity("rdkit.ecfp4_tanimoto", reference="a").limit(1))
    r = client.selections.create(sel)
    print(f"requested={release!s:12} searched={r.database_release}")
requested=None         searched=2026-09-06.2
requested=2026-09-06.2 searched=2026-09-06.2
client.close()
Contents

Tools and prototypes

Try Deep MedChem research demos or run public tools for synthon search, property scoring, chemical-space mapping, and portfolio selection.

Use the hosted prototypes to explore a query in your browser. The open-source tools below include examples you can run locally. For the libraries and capabilities installed at your own CHEESE site, use its database picker or the on-prem getting started guide.

Open-source tools

SynthonOR

Search for molecules similar to a SMILES query using building-block fingerprints. SynthonOR combines fingerprints from compatible synthons to approximate the product fingerprint, and returns candidate reaction and synthon IDs. Install the Python package with pip install synthonor and follow the README example to index its bundled synthon table. You can also try different fingerprints on the hosted Freedom Space subset. Python package · Code and example · Browser demo

SynFactor

Use this research prototype to explore how closely building blocks can predict a property model’s score for the assembled molecule. Train on the bundled example space, cache a short vector for each synthon, then combine the vectors to score candidate products. The repository includes runnable scripts and comparisons against the original model’s predictions. SynFactor code and worked example

OPDiv

Starting from a scored hit list, select a fixed number of candidates while enforcing a maximum pairwise similarity. The Python example shows how the similarity limit changes which candidates enter the batch. Install with pip install opdiv. Python package · Code and example · OPDiv preprint

Hosted prototypes

Search from a ligand’s bound conformation. Pick a built-in conformer or co-crystal to start, or supply an SDF, MOL, or co-crystal PDB. Choose a shape, electrostatic, or pharmacophore comparison and inspect the query and hits together in the 3D workspace. For overlaying two molecules already retrieved in CHEESE, see the conformer alignment guide. Open the CHEESE 3D research preview · Worked 3D search examples

SynthonGPT

Start from a SMILES query and search a make-on-demand library for candidates assembled from its building blocks and reactions. Select a library or leave the database on auto. Try similarity for analogues, substructure to seek products containing the query, or superstructure to look for smaller structures contained in it. Open the SynthonGPT prototype · Read the technical report

SynthonMap

Explore where building blocks and their possible products lie in a two-dimensional map of chemical space. Switch between the Synthon scatter plot and Full-space density views to compare individual building blocks with the distribution of products. The public repository includes a CPU example for generating a density map. Open the SynthonMap viewer · Code and examples · Cartography paper

Contents

Getting started

Find the guide for your scientific workflow, programming interface, or on-prem deployment.

Search and screening

Interfaces

To work inStart with
An HTTP client or serviceHosted API quickstart or your on-prem API
A Python script or notebookPython SDK quickstart
A terminalCLI guide
ChatGPT, Claude, or an in-house MCP clientLLM integrations

Deployment

Open the on-prem guide to install CHEESE Search and its API, connect a local Python client, or set up the separate Navigator Docker image. Each delivery has its own installation and licence instructions.

Contents

Benchmarks & Property Prediction

ADMET property prediction on the TDC benchmarks and evaluation of CHEESE search against state-of-the-art methods.

We used the learned molecule representations to train ADMET property prediction models. The newly trained models enable real-time property prediction. We also evaluated our fine-tuned models for property prediction using the TDC (Therapeutics Data Commons) ADMET Benchmarks, and they stand fairly well in most of the tasks.

TDC ADMET benchmarks

BenchmarkMetricOur scoreBest score
CYP2C9_VeithAUPRC ↑0.5890.794
CYP2D6_VeithAUPRC ↑0.4300.721
CYP3A4_VeithAUPRC ↑0.6930.882
CYP2D6_substrateAUPRC ↑0.4670.711
CYP3A4_substrateAUPRC ↑0.6130.680
CYP2C9_substrateAUPRC ↑0.2820.437
Bioavailability_MaAUROC ↑0.6310.748
HIA_HouAUROC ↑0.8700.988
Pgp_BroccatelliAUROC ↑0.8250.994
BBB_MartinsAUROC ↑0.7630.923
hERGAUROC ↑0.7730.875
AMESAUROC ↑0.7190.865
DILIAUROC ↑0.8550.937
Caco2_WangMAE ↓0.3770.285
Lipophilicity_AstraZenecaMAE ↓0.5950.533
Solubility_AqSolDBMAE ↓0.8830.727
PPBR_AZMAE ↓9.7398.251
LD50_ZhuMAE ↓0.6400.588

Evaluation against SOTA

Comparison of our models against state-of-the-art molecular search on enumerative databases called Smallworld (used in ZINC22) and random molecule retrieval. 100 search queries with 30 results were performed using each method.

Our models are clearly better than random search since they are able to retrieve much more similar molecules. They are also beating Smallworld on 2D Morgan and 3D Electrostatic search.

Contents

Case Study: Finding EGFR Inhibitors

A case study using CHEESE similarity search to find new inhibitors of the human Epidermal Growth Factor Receptor (EGFR).

To show the potential application of our tool, we performed a case study where we worked with the human Epidermal Growth Factor Receptor (EGFR). The EGFR has more than 3000 inhibitors in the ZINC15 database.

Methodology & results

  • Searched 100 randomly selected inhibitors using our tool
  • Found at least one new inhibitor for 14 of the query inhibitors
  • Discovered 5 new inhibitors from a single query inhibitor
  • Some newly found inhibitors were highly similar in 3D Shape and Electrostatic similarity

Takeaway

This shows that our tool is able to find molecules with similar binding properties and is very promising to find new inhibitors for a target.

Contents

References

Key references for the CHEESE platform.

  • Bolcato, Giovanni, Esther Heid, and Jonas Boström. "On the Value of Using 3D Shape and Electrostatic Similarities in Deep Generative Methods." Journal of Chemical Information and Modeling 62.6 (2022): 1388-1398.
  • Huang, Kexin, et al. "Therapeutics data commons: Machine learning datasets and tasks for drug discovery and development." arXiv preprint arXiv:2102.09548 (2021).
  • Sterling, Teague, and John J. Irwin. "ZINC 15 – ligand discovery for everyone." Journal of Chemical Information and Modeling 55.11 (2015): 2324-2337.
Contents

Learn

Case studies, benchmarks, and worked examples for the CHEESE platform.

Material for going deeper than the guides: how CHEESE performs, how it has been applied, and worked end-to-end examples.

Case study: EGFR inhibitors

Finding new inhibitors of the human Epidermal Growth Factor Receptor with CHEESE similarity search.

Benchmarks and property prediction

ADMET prediction on the TDC benchmarks and CHEESE search evaluated against state-of-the-art methods.

References

Key publications and background reading for the CHEESE platform.

Worked examples

Research and code

For runnable examples and browser demos, visit Tools and prototypes.

If you are working on…Start hereGo deeper
Interpreting 3D similarity hitsCHEESE neurosteroid case studyMethods and figures on Substack · CHEESE paper code and data
Exploring a make-on-demand chemical spaceInteractive SynthonMap viewerCartography paper · SynthonMap repository
Selecting a small, diverse set for testingPortfolio rules in the APIOPDiv preprint · OPDiv repository
Contents

Batch Similarity

GET /batch_similarity

{
  "tags": [
    "Similarity (for on-prem users only)"
  ],
  "summary": "Batch Similarity",
  "description": "Compute similarity between two sets of molecules: either centroid (pharmacophore) or batch (enrichment)\n'centroid' mode: computes mean embedding (centroid) for the first and second set of molecules and returns its distance\n'batch' mode: means it computes similarities of max 10K randomly sampled pairs and averages the result \n\nParameters:\n- smiles1 and smiles2 (List[str]): Lists of smiles.\n- similarity_metric (EmbNames): The model and similarity metric to use for the calculation.\n- distance_type (DistanceType): The type of vector distance to use for the similarity calculation.\n- sim_mode (SearchModes): The mode of similarity (default is \"centroid\", another is \"batch\").\n\nReturns:\n- A dictionary containing the molecules of the nearest cluster, possibly with a message pointing to the path where to find embeddings",
  "operationId": "batch_similarity_batch_similarity_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Smiles1",
        "type": "array",
        "items": {
          "type": "string"
        },
        "default": [
          "CC(=O)Oc1ccccc1C(=O)O",
          "CC(=O)Oc1ccncc1C(=O)O",
          "CC(=O)Oc1cnccc1C(=O)O"
        ]
      },
      "name": "smiles1",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Smiles2",
        "type": "array",
        "items": {
          "type": "string"
        },
        "default": [
          "CC=O",
          "CCC",
          "CCCC=O"
        ]
      },
      "name": "smiles2",
      "in": "query"
    },
    {
      "description": "CHEESE Model & Similarity Metric",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmbNames"
          }
        ],
        "description": "CHEESE Model & Similarity Metric",
        "default": "all"
      },
      "name": "similarity_metric",
      "in": "query"
    },
    {
      "description": "Select Vector Distance",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DistanceType"
          }
        ],
        "description": "Select Vector Distance",
        "default": "euclidean"
      },
      "name": "distance_type",
      "in": "query"
    },
    {
      "description": "The mode of similarity",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchModes"
          }
        ],
        "description": "The mode of similarity",
        "default": "centroid"
      },
      "name": "sim_mode",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Centroid Embeddings

GET /centroid_embeddings

{
  "tags": [
    "Computing Embeddings (for on-prem users only)"
  ],
  "summary": "Centroid Embeddings",
  "description": "Get centroid embeddings for a specified database and search type.\n\nThis endpoint returns the centroid embeddings for a given database and search type.\n\nParameters:\n- db_name (str): The name of the database.\n- search_type (str): The type of search to perform.\n- save_embs (bool): Whether to save centroid embeddings (default is False)\n- dest (str): Destination path to save the centroid embeddings (default is /tmp/embeddings).\n\nReturns:\n- A JSON response containing the centroid embeddings.",
  "operationId": "centroid_embeddings_centroid_embeddings_get",
  "parameters": [
    {
      "description": "Selected Database",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DatabaseEnumAll"
          }
        ],
        "description": "Selected Database",
        "default": "CHEMINFINITA-SYNTHON"
      },
      "name": "db_name",
      "in": "query"
    },
    {
      "description": "The type of centroids to get",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchTypes"
          }
        ],
        "description": "The type of centroids to get",
        "default": "espsim_shape"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Whether to get centroid molecules",
      "required": false,
      "schema": {
        "title": "Centroid Mols",
        "type": "boolean",
        "description": "Whether to get centroid molecules",
        "default": true
      },
      "name": "centroid_mols",
      "in": "query"
    },
    {
      "description": "Whether to save embeddings",
      "required": false,
      "schema": {
        "title": "Save Embs",
        "type": "boolean",
        "description": "Whether to save embeddings",
        "default": true
      },
      "name": "save_embs",
      "in": "query"
    },
    {
      "description": "Whether to compute centroid molecules for custom databases. Please note that depending on the size of Your database, it may take a few hours ! ",
      "required": false,
      "schema": {
        "title": "Compute Centroid Mols",
        "type": "boolean",
        "description": "Whether to compute centroid molecules for custom databases. Please note that depending on the size of Your database, it may take a few hours ! ",
        "default": false
      },
      "name": "compute_centroid_mols",
      "in": "query"
    },
    {
      "description": "Destination path",
      "required": false,
      "schema": {
        "title": "Dest",
        "type": "string",
        "description": "Destination path",
        "default": "/data/embeddings"
      },
      "name": "dest",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Cluster

GET /cluster

{
  "tags": [
    "Advanced (for on-prem users only)"
  ],
  "summary": "Cluster",
  "description": "Retrieve a cluster by its ID\n\nThis endpoint allows users to get embeddings and molecules of a particular cluster. \n\nParameters:\n- cluster_id (int): The cluster ID\n- db_name (DatabaseEnum): The database to use for the search.\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- save_embs (bool): Whether to save embeddings for the retrieved cluster (default is False)\n- dest (str): Destination path to save the embeddings of the retrieved cluster (default is /tmp/cluster_embeddings).\n\nReturns:\n- A dictionary containing the molecules of the nearest cluster, possibly with a message pointing to the path where to find embeddings",
  "operationId": "cluster_cluster_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Cluster Id",
        "type": "integer",
        "default": 0
      },
      "name": "cluster_id",
      "in": "query"
    },
    {
      "description": "Selected Database",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DatabaseEnumAll"
          }
        ],
        "description": "Selected Database",
        "default": "CHEMINFINITA-SYNTHON"
      },
      "name": "db_name",
      "in": "query"
    },
    {
      "description": "The search type",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchTypes"
          }
        ],
        "description": "The search type",
        "default": "espsim_shape"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Whether to save embeddings for the retrieved cluster",
      "required": false,
      "schema": {
        "title": "Save Embs",
        "type": "boolean",
        "description": "Whether to save embeddings for the retrieved cluster",
        "default": false
      },
      "name": "save_embs",
      "in": "query"
    },
    {
      "description": "Destination path",
      "required": false,
      "schema": {
        "title": "Dest",
        "type": "string",
        "description": "Destination path",
        "default": "/tmp/cluster_embeddings"
      },
      "name": "dest",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Database Similarity

GET /database_similarity

{
  "tags": [
    "Similarity (for on-prem users only)"
  ],
  "summary": "Database Similarity",
  "description": "Estimate distance between two databases based on centroid embeddings.\n\nThis endpoint returns the distance score between two databases. This functionality assumes that inference was already performed on the databases !\n\nParameters:\n- db_name (str): The name of the database.\n- target_db_name (str): The name of the database against which to compare.\n- similarity_metric (str): The type of similarity to get.\n- sim_mode (str): The mode of similarity. 'centroid' computes similarity between the centroids of centroids of the databases. 'batch' computes average similarity between the database centroids\n\nReturns:\n- A JSON response containing the centroid embeddings.",
  "operationId": "database_similarity_database_similarity_get",
  "parameters": [
    {
      "description": "Selected database",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DatabaseEnumAll"
          }
        ],
        "description": "Selected database",
        "default": "CHEMINFINITA-SYNTHON"
      },
      "name": "db_name",
      "in": "query"
    },
    {
      "description": "Target database against whichto compare to",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DatabaseEnumAll"
          }
        ],
        "description": "Target database against whichto compare to",
        "default": "CHEMINFINITA-SYNTHON"
      },
      "name": "target_db_name",
      "in": "query"
    },
    {
      "description": "The similarity metric",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmbNamesNoAll"
          }
        ],
        "description": "The similarity metric",
        "default": "morgan"
      },
      "name": "similarity_metric",
      "in": "query"
    },
    {
      "description": "Select Vector Distance",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DistanceType"
          }
        ],
        "description": "Select Vector Distance",
        "default": "euclidean"
      },
      "name": "distance_type",
      "in": "query"
    },
    {
      "description": "The mode of similarity",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchModes"
          }
        ],
        "description": "The mode of similarity",
        "default": "centroid"
      },
      "name": "sim_mode",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Download Link

POST /prepare_download

{
  "tags": [
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "Download Link",
  "description": "Getting the download link for a search job\n\nParameters:\n- job_name (str): The job ID\n- file format (str) : The response file format : csv, json, xlsx, sdf\n\nReturns:\n- The status of the download link generation",
  "operationId": "download_link_prepare_download_post",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Job Name",
        "type": "string",
        "default": "XXX"
      },
      "name": "job_name",
      "in": "query"
    },
    {
      "description": "Selected Databases",
      "required": false,
      "schema": {
        "title": "Db Name",
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Selected Databases",
        "default": [
          "CHEMINFINITA-SYNTHON"
        ]
      },
      "name": "db_name",
      "in": "query"
    },
    {
      "description": "File formats",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/FileFormat"
        },
        "description": "File formats",
        "default": [
          "csv"
        ]
      },
      "name": "file_format",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Include Properties",
        "type": "boolean",
        "default": false
      },
      "name": "include_properties",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Include Metadata",
        "type": "boolean",
        "default": false
      },
      "name": "include_metadata",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Sim Th",
        "type": "number",
        "default": 0
      },
      "name": "sim_th",
      "in": "query"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "title": "Data",
          "allOf": [
            {
              "$ref": "#/components/schemas/AnyDictModel"
            }
          ],
          "default": {
            "prop_ranges": {
              "caco2_wang": {
                "min": -100000,
                "max": 100000
              },
              "clearance_hepatocyte_az": {
                "min": -100000,
                "max": 100000
              },
              "clearance_microsome_az": {
                "min": -100000,
                "max": 100000
              },
              "half_life_obach": {
                "min": -100000,
                "max": 100000
              },
              "ld50_zhu": {
                "min": -100000,
                "max": 100000
              },
              "lipophilicity_astrazeneca": {
                "min": -100000,
                "max": 100000
              },
              "ppbr_az": {
                "min": -100000,
                "max": 100000
              },
              "solubility_aqsoldb": {
                "min": -100000,
                "max": 100000
              },
              "vdss_lombardo": {
                "min": -100000,
                "max": 100000
              },
              "ames": {
                "min": -100000,
                "max": 100000
              },
              "bbb_martins": {
                "min": -100000,
                "max": 100000
              },
              "bioavailability_ma": {
                "min": -100000,
                "max": 100000
              },
              "cyp2c9_substrate_carbonmangels": {
                "min": -100000,
                "max": 100000
              },
              "cyp2c9_veith": {
                "min": -100000,
                "max": 100000
              },
              "cyp2d6_substrate_carbonmangels": {
                "min": -100000,
                "max": 100000
              },
              "cyp2d6_veith": {
                "min": -100000,
                "max": 100000
              },
              "cyp3a4_substrate_carbonmangels": {
                "min": -100000,
                "max": 100000
              },
              "cyp3a4_veith": {
                "min": -100000,
                "max": 100000
              },
              "dili": {
                "min": -100000,
                "max": 100000
              },
              "herg": {
                "min": -100000,
                "max": 100000
              },
              "hia_hou": {
                "min": -100000,
                "max": 100000
              },
              "pgp_broccatelli": {
                "min": -100000,
                "max": 100000
              },
              "molecular_weight": {
                "min": -100000,
                "max": 100000
              },
              "formal_charge": {
                "min": -100000,
                "max": 100000
              },
              "clogp": {
                "min": -100000,
                "max": 100000
              },
              "heavy_atoms": {
                "min": -100000,
                "max": 100000
              },
              "h_bond_acceptors": {
                "min": -100000,
                "max": 100000
              },
              "h_bond_donor": {
                "min": -100000,
                "max": 100000
              },
              "rotatable_bonds": {
                "min": -100000,
                "max": 100000
              },
              "num_of_rings": {
                "min": -100000,
                "max": 100000
              },
              "molar_refractivity": {
                "min": -100000,
                "max": 100000
              },
              "number_of_atoms": {
                "min": -100000,
                "max": 100000
              },
              "topological_surface_area_mapping": {
                "min": -100000,
                "max": 100000
              }
            },
            "neighbor_ids": []
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Embeddings

GET /embeddings

{
  "tags": [
    "Computing Embeddings (for on-prem users only)"
  ],
  "summary": "Embeddings",
  "description": "Get embeddings for a list of molecules.\n\nThis endpoint allows users to get embeddings for a list of molecules.\n\nParameters:\n- search_input (List[str]): The input molecules to get embeddings for.\n- search_type (List[str]): The type of embeddings to calculate.\n- save_embs (bool): Whether to save embeddings (default is False)\n- dest (str): Destination path to save the embeddings (default is /tmp/embeddings).\n\nReturns:\n- A JSON response containing the embeddings for the input molecules.",
  "operationId": "embeddings_embeddings_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "array",
        "items": {
          "type": "string"
        },
        "default": [
          "CC(=O)Oc1ccccc1C(=O)O",
          "CC(=O)Oc1ccccc1C(N)=O",
          "CC(=O)Nc1ccccc1C(=O)O"
        ]
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "description": "Type of embeddings to calculate",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmbNames"
          }
        ],
        "description": "Type of embeddings to calculate",
        "default": "all"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Whether to save embeddings",
      "required": false,
      "schema": {
        "title": "Save Embs",
        "type": "boolean",
        "description": "Whether to save embeddings",
        "default": true
      },
      "name": "save_embs",
      "in": "query"
    },
    {
      "description": "Destination path",
      "required": false,
      "schema": {
        "title": "Dest",
        "type": "string",
        "description": "Destination path",
        "default": "/tmp/embeddings"
      },
      "name": "dest",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Embeddings File

GET /embeddings_file

{
  "tags": [
    "CLI commands (for on-prem users only)"
  ],
  "summary": "Embeddings File",
  "description": "Get embeddings for a file of molecules.\n\nThis endpoint allows users to get embeddings for a list of molecules uploaded in a CSV file.\n\nParameters:\n- input_file (List[str]): The input file to get embeddings for.\n- smiles_col (str) : The column name of SMILES strings in case of a csv file (default 'SMILES')\n- search_type (List[str]): The type of embeddings to calculate.\n- dest (str): Destination path to save the embeddings (default is /tmp/embeddings).\n\nReturns:\n- A JSON response containing the status of the request if it's successful.",
  "operationId": "embeddings_file_embeddings_file_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Input File",
        "type": "string",
        "default": ""
      },
      "name": "input_file",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Smiles Col",
        "type": "string",
        "default": "SMILES"
      },
      "name": "smiles_col",
      "in": "query"
    },
    {
      "description": "Type of embeddings to calculate",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmbNames"
          }
        ],
        "description": "Type of embeddings to calculate",
        "default": "all"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Destination path",
      "required": false,
      "schema": {
        "title": "Dest Folder",
        "type": "string",
        "description": "Destination path",
        "default": "/tmp/embeddings"
      },
      "name": "dest_folder",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Get Available Dbs Info

GET /available_databases

{
  "tags": [
    "Searching with CHEESE"
  ],
  "summary": "Get Available Dbs Info",
  "description": "Get all databases available for similarity search.\n\nThis endpoint returns a list of all databases that can be used for molecule searches.\n\nReturns:\n- A dictionary containing the list of available databases with some of their details (vendor, vendor webpage, number of molecules, quotation email).",
  "operationId": "get_available_dbs_info_available_databases_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Get Histograms

GET /get_sim_histograms

{
  "tags": [
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "Get Histograms",
  "operationId": "get_histograms_get_sim_histograms_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Job Name",
        "type": "string",
        "default": "XXX"
      },
      "name": "job_name",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "N Bins",
        "type": "integer",
        "default": 20
      },
      "name": "n_bins",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Get Prop Histograms

GET /get_prop_histograms

{
  "tags": [
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "Get Prop Histograms",
  "operationId": "get_prop_histograms_get_prop_histograms_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Job Name",
        "type": "string",
        "default": "XXX"
      },
      "name": "job_name",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "N Bins",
        "type": "integer",
        "default": 20
      },
      "name": "n_bins",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Get Random Molecules

GET /random_molecule

{
  "tags": [
    "Searching with CHEESE"
  ],
  "summary": "Get Random Molecules",
  "description": "Get random molecule(s) from any available database.\n\nThis endpoint returns a specified number of random molecules in SMILES format from a random selection of databases.\n\nParameters:\n- n_mols (int): The number of random molecules to retrieve (default is 1).\n\nReturns:\n- A list of SMILES strings representing the random molecules.",
  "operationId": "get_random_molecules_random_molecule_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "N Mols",
        "default": 1
      },
      "name": "n_mols",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Get Rate Limit Status

GET /rate-limit/status

{
  "tags": [
    "General"
  ],
  "summary": "Get Rate Limit Status",
  "description": "Return current user's API usage/remaining requests in active window.",
  "operationId": "get_rate_limit_status_rate_limit_status_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Get Rate Limit Status

GET /rate_limit_status

{
  "tags": [
    "Testing and Health Checks"
  ],
  "summary": "Get Rate Limit Status",
  "description": "Return current per-user daily API usage and remaining request budget.\n\nResponse fields:\n- limit: maximum requests/day for account tier\n- used: requests already consumed today\n- remaining: requests left today\n- reset_at: ISO timestamp for next UTC reset\n- seconds_to_reset: seconds until reset\n- account_type: resolved user account tier",
  "operationId": "get_rate_limit_status_rate_limit_status_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Get Synthongpt Smarts Patterns Endpoint

GET /synthongpt_smarts_patterns

{
  "tags": [
    "SynthonGPT"
  ],
  "summary": "Get Synthongpt Smarts Patterns Endpoint",
  "operationId": "get_synthongpt_smarts_patterns_endpoint_synthongpt_smarts_patterns_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Health Check

GET /test

{
  "tags": [
    "Testing and Health Checks"
  ],
  "summary": "Health Check",
  "description": "Health check endpoint to verify the status of the API.\n\nThis endpoint can be used to ensure that the API is running and responsive. It returns a simple status message.\n\nReturns:\n- A JSON response with a status message indicating the health of the API.",
  "operationId": "health_check_test_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Job Info

GET /job_info

{
  "tags": [
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "Job Info",
  "operationId": "job_info_job_info_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Job Name",
        "type": "string",
        "default": ""
      },
      "name": "job_name",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Job Status

GET /job_status

{
  "tags": [
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "Job Status",
  "operationId": "job_status_job_status_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Job Name",
        "type": "string",
        "default": ""
      },
      "name": "job_name",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

License Key

GET /generate_license_key

{
  "tags": [
    "Advanced (for on-prem users only)"
  ],
  "summary": "License Key",
  "operationId": "license_key_generate_license_key_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

License

GET /license_information

{
  "tags": [
    "Advanced (for on-prem users only)"
  ],
  "summary": "License",
  "operationId": "license_license_information_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Nearest Cluster

GET /nearest_cluster

{
  "tags": [
    "Advanced (for on-prem users only)"
  ],
  "summary": "Nearest Cluster",
  "description": "Retrieve the nearest cluster to a single molecule\n\nThis endpoint allows users to get the nearest cluster to a molecule according to a search type. \n\nParameters:\n- search_input (str): The molecule embedding used as an input to the search (default is the morgan embedding of Aspirin ).\n- db_name (DatabaseEnum): The database to use for the search.\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- save_embs (bool): Whether to save embeddings for the nearest cluster (default is False)\n- dest (str): Destination path to save the embeddings of the nearest cluster (default is /tmp/nearest_embeddings).\n\nReturns:\n- A dictionary containing the molecules of the nearest cluster, possibly with a message pointing to the path where to find embeddings",
  "operationId": "nearest_cluster_nearest_cluster_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "string",
        "default": "CC(=O)Oc1ccccc1C(=O)O"
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "description": "Selected Database",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DatabaseEnumAll"
          }
        ],
        "description": "Selected Database",
        "default": "CHEMINFINITA-SYNTHON"
      },
      "name": "db_name",
      "in": "query"
    },
    {
      "description": "The search type",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchTypes"
          }
        ],
        "description": "The search type",
        "default": "espsim_shape"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Whether to save embeddings for the retrieved cluster",
      "required": false,
      "schema": {
        "title": "Save Embs",
        "type": "boolean",
        "description": "Whether to save embeddings for the retrieved cluster",
        "default": false
      },
      "name": "save_embs",
      "in": "query"
    },
    {
      "description": "Destination path",
      "required": false,
      "schema": {
        "title": "Dest",
        "type": "string",
        "description": "Destination path",
        "default": "/tmp/nearest_embeddings"
      },
      "name": "dest",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Paging Props

POST /get_molsearch_page

{
  "tags": [
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "Paging Props",
  "operationId": "paging_props_get_molsearch_page_post",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Job Name",
        "type": "string",
        "default": "XXX"
      },
      "name": "job_name",
      "in": "query"
    },
    {
      "description": "Selected Database",
      "required": false,
      "schema": {
        "title": "Db Name",
        "type": "string",
        "description": "Selected Database",
        "default": "CHEMINFINITA-SYNTHON"
      },
      "name": "db_name",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Page Size",
        "type": "integer",
        "default": 30
      },
      "name": "page_size",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Page Num",
        "type": "integer",
        "default": 1
      },
      "name": "page_num",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Include Properties",
        "type": "boolean",
        "default": false
      },
      "name": "include_properties",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Include Synthons",
        "type": "boolean",
        "default": false
      },
      "name": "include_synthons",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Sim Th",
        "type": "number",
        "default": 0
      },
      "name": "sim_th",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "D Min",
        "type": "number",
        "default": 0
      },
      "name": "d_min",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "D Max",
        "type": "number",
        "default": 1
      },
      "name": "d_max",
      "in": "query"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "title": "Data",
          "allOf": [
            {
              "$ref": "#/components/schemas/AnyDictModel"
            }
          ],
          "default": {
            "prop_ranges": {
              "caco2_wang": {
                "min": -100000,
                "max": 100000
              },
              "clearance_hepatocyte_az": {
                "min": -100000,
                "max": 100000
              },
              "clearance_microsome_az": {
                "min": -100000,
                "max": 100000
              },
              "half_life_obach": {
                "min": -100000,
                "max": 100000
              },
              "ld50_zhu": {
                "min": -100000,
                "max": 100000
              },
              "lipophilicity_astrazeneca": {
                "min": -100000,
                "max": 100000
              },
              "ppbr_az": {
                "min": -100000,
                "max": 100000
              },
              "solubility_aqsoldb": {
                "min": -100000,
                "max": 100000
              },
              "vdss_lombardo": {
                "min": -100000,
                "max": 100000
              },
              "ames": {
                "min": -100000,
                "max": 100000
              },
              "bbb_martins": {
                "min": -100000,
                "max": 100000
              },
              "bioavailability_ma": {
                "min": -100000,
                "max": 100000
              },
              "cyp2c9_substrate_carbonmangels": {
                "min": -100000,
                "max": 100000
              },
              "cyp2c9_veith": {
                "min": -100000,
                "max": 100000
              },
              "cyp2d6_substrate_carbonmangels": {
                "min": -100000,
                "max": 100000
              },
              "cyp2d6_veith": {
                "min": -100000,
                "max": 100000
              },
              "cyp3a4_substrate_carbonmangels": {
                "min": -100000,
                "max": 100000
              },
              "cyp3a4_veith": {
                "min": -100000,
                "max": 100000
              },
              "dili": {
                "min": -100000,
                "max": 100000
              },
              "herg": {
                "min": -100000,
                "max": 100000
              },
              "hia_hou": {
                "min": -100000,
                "max": 100000
              },
              "pgp_broccatelli": {
                "min": -100000,
                "max": 100000
              },
              "molecular_weight": {
                "min": -100000,
                "max": 100000
              },
              "formal_charge": {
                "min": -100000,
                "max": 100000
              },
              "clogp": {
                "min": -100000,
                "max": 100000
              },
              "heavy_atoms": {
                "min": -100000,
                "max": 100000
              },
              "h_bond_acceptors": {
                "min": -100000,
                "max": 100000
              },
              "h_bond_donor": {
                "min": -100000,
                "max": 100000
              },
              "rotatable_bonds": {
                "min": -100000,
                "max": 100000
              },
              "num_of_rings": {
                "min": -100000,
                "max": 100000
              },
              "molar_refractivity": {
                "min": -100000,
                "max": 100000
              },
              "number_of_atoms": {
                "min": -100000,
                "max": 100000
              },
              "topological_surface_area_mapping": {
                "min": -100000,
                "max": 100000
              }
            },
            "neighbor_ids": []
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Predict Array

GET /predict_array

{
  "tags": [
    "Predict Properties"
  ],
  "summary": "Predict Array",
  "description": "Predict properties for an array of molecules.\n\nThis endpoint allows users to predict various properties and descriptors for a list of molecules.\n\nParameters:\n- request (Request): The request object.\n- search_input (List[str]): The input molecules in SMILES format.\n- descriptors (bool): Whether to include molecular descriptors in the results (default is True).\n- properties (bool): Whether to include molecular properties in the results (default is True).\n- filename (str): The name of the file to save the prediction results (default is \"properties_and_descriptors\").\n\nReturns:\n- A JSON response containing the predicted properties and descriptors.",
  "operationId": "predict_array_predict_array_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "array",
        "items": {
          "type": "string"
        },
        "default": [
          "CC(=O)Oc1ccccc1C(=O)O",
          "CC(=O)Oc1ccncc1C(=O)O",
          "CC(=O)Oc1cnccc1C(=O)O"
        ]
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Descriptors",
        "type": "boolean",
        "default": true
      },
      "name": "descriptors",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Properties",
        "type": "boolean",
        "default": true
      },
      "name": "properties",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Filename",
        "type": "string",
        "default": "properties_and_descriptors"
      },
      "name": "filename",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Predict

GET /predict

{
  "tags": [
    "Predict Properties"
  ],
  "summary": "Predict",
  "description": "Predict properties for a single molecule.\n\nThis endpoint allows users to predict various properties and descriptors for a given molecule.\n\nParameters:\n- search_input (str): The input molecule in SMILES format.\n- descriptors (bool): Whether to include molecular descriptors in the results (default is True).\n- properties (bool): Whether to include molecular properties in the results (default is False).\n\nReturns:\n- A JSON response containing the predicted properties and descriptors.",
  "operationId": "predict_predict_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "string",
        "default": "CC(=O)Oc1ccccc1C(=O)O"
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Descriptors",
        "type": "boolean",
        "default": true
      },
      "name": "descriptors",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Properties",
        "type": "boolean",
        "default": false
      },
      "name": "properties",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Readiness

GET /health

{
  "tags": [
    "Testing and Health Checks"
  ],
  "summary": "Readiness",
  "operationId": "readiness_health_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Search Array

GET /molsearch_array

{
  "tags": [
    "Searching with CHEESE"
  ],
  "summary": "Search Array",
  "description": "Search by an array of molecules based on multiple criteria. \n\nThis endpoint allows users to search by multiple molecules while choosing from several search types and additinal search parameters.  \nMultiple databases can be specified for the search.\n\nParameters:\n- search_type (str): The type of search to perform.\n- n_neighbors (int): The number of neighbors to consider.\n- search_quality (str): The quality of the search.\n- search_input (List[str]): The input molecules to search for.\n- db_names (List[str]): The databases to use for the search.\n- descriptors (bool): Whether to include molecular descriptors in the results (default is False).\n- properties (bool): Whether to include molecular properties in the results (default is False).\n- filter_molecules (bool): Whether to filter molecules based on specific criteria (default is False).\n- filename (str): The name of the file to save the search results (default is \"search_results\").\n\nReturns:\n- A dictionary with the search results and search metadata.",
  "operationId": "search_array_molsearch_array_get",
  "parameters": [
    {
      "description": "The type of search to perform",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchTypes"
          }
        ],
        "description": "The type of search to perform",
        "default": "espsim_shape"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "N Neighbors",
        "type": "integer",
        "default": 30
      },
      "name": "n_neighbors",
      "in": "query"
    },
    {
      "description": "Speed/Accuracy Tradeoff",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchQuality"
          }
        ],
        "description": "Speed/Accuracy Tradeoff",
        "default": "fast"
      },
      "name": "search_quality",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "array",
        "items": {
          "type": "string"
        },
        "default": [
          "CC(=O)Oc1ccccc1C(=O)O",
          "CC(=O)Oc1ccccc1C(N)=O",
          "CC(=O)Nc1ccccc1C(=O)O"
        ]
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "description": "Selected Databases",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/DatabaseEnumAll"
        },
        "description": "Selected Databases",
        "default": [
          "CHEMINFINITA-SYNTHON"
        ]
      },
      "name": "db_names",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Descriptors",
        "type": "boolean",
        "default": false
      },
      "name": "descriptors",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Properties",
        "type": "boolean",
        "default": false
      },
      "name": "properties",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Filter Molecules",
        "type": "boolean",
        "default": false
      },
      "name": "filter_molecules",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Filename",
        "type": "string",
        "default": "search_results"
      },
      "name": "filename",
      "in": "query"
    },
    {
      "description": "Override the Accept header. 'json' or 'csv'.",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ResponseFormat"
          }
        ],
        "description": "Override the Accept header. 'json' or 'csv'."
      },
      "name": "format",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Search Batch

GET /batch_search

{
  "tags": [
    "Searching with CHEESE"
  ],
  "summary": "Search Batch",
  "description": "Run a similarity search for multiple query molecules in a single request and use centroid or batch mode to identify the set similar molecules.\n\nBatch search modes are:\n- 'centroid' mode: computes mean embedding (centroid) for the input set of molecules and returns neighbors closest to the centroid\n- 'batch' mode: retrieves similar molecules based on the list of molecules in the query by retrieving N similar molecules for each molecule in the query list   \n\nMultiple databases can be specified for the search.\n\nParameters:\n- search_type (str): The type of search to perform.\n- n_neighbors (int): The number of neighbors to retrieve.\n- search_input (List[str]): The input molecules to search by.\n- db_names (str): The databases to use in the search.\n- search_mode (str): The mode of the batch search (default is \"centroid\", another is \"batch\").\n\nReturns:\n- A dictionary with list of retrieved molecules, list of molecule ids, and list of origin DBs for each molecule.",
  "operationId": "search_batch_batch_search_get",
  "parameters": [
    {
      "description": "The type of search to perform",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmbNamesNoAll"
          }
        ],
        "description": "The type of search to perform",
        "default": "espsim_shape"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "N Neighbors",
        "type": "integer",
        "default": 30
      },
      "name": "n_neighbors",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "array",
        "items": {
          "type": "string"
        },
        "default": [
          "CC(=O)Oc1ccccc1C(=O)O",
          "CC(=O)Oc1ccccc1C(N)=O",
          "CC(=O)Nc1ccccc1C(=O)O"
        ]
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "description": "Selected Databases",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/DatabaseEnumAll"
        },
        "description": "Selected Databases",
        "default": [
          "CHEMINFINITA-SYNTHON"
        ]
      },
      "name": "db_names",
      "in": "query"
    },
    {
      "description": "The type of batch search to perform",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchModes"
          }
        ],
        "description": "The type of batch search to perform",
        "default": "centroid"
      },
      "name": "search_mode",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Search Embedding

GET /molsearch_embedding

{
  "tags": [
    "Advanced (for on-prem users only)"
  ],
  "summary": "Search Embedding",
  "description": "Search for a single molecule based on various criteria.\n\nThis endpoint allows users to search for a molecule embedding using different search types and qualities. \nMultiple databases can be specified for the search.\n\nParameters:\n- query_emb (List[float]): The molecule embedding used as an input to the search (default is the morgan embedding of Aspirin ).\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- search_quality (SearchQuality): The quality of the search (default is \"fast\").\n- db_names (List[DatabaseEnum]): The databases to use for the search.\n- n_neighbors (int): The number of neighbors to consider (default is 30).\n\nReturns:\n- A dictionary containing the search input, search type, number of neighbors, search quality, and databases used.",
  "operationId": "search_embedding_molsearch_embedding_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Query Emb",
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "name": "query_emb",
      "in": "query"
    },
    {
      "description": "The type of search to perform",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchTypes"
          }
        ],
        "description": "The type of search to perform",
        "default": "espsim_shape"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Speed/Accuracy Tradeoff",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchQuality"
          }
        ],
        "description": "Speed/Accuracy Tradeoff",
        "default": "fast"
      },
      "name": "search_quality",
      "in": "query"
    },
    {
      "description": "Selected Databases",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/DatabaseEnumAll"
        },
        "description": "Selected Databases",
        "default": [
          "CHEMINFINITA-SYNTHON"
        ]
      },
      "name": "db_names",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "N Neighbors",
        "type": "integer",
        "default": 30
      },
      "name": "n_neighbors",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Search File

GET /search_file

{
  "tags": [
    "CLI commands (for on-prem users only)"
  ],
  "summary": "Search File",
  "description": "Search a of molecules based on various criteria.\n\nThis endpoint allows users to search for multiple molecules using different search types and qualities. \nMultiple databases can be specified for the search.\n\nParameters:\n- input_file (str) : Path to the input file\n- smiles_col (str) : The column name of SMILES strings in case of a csv file (default 'SMILES')\n- search_type (str): The type of search to perform.\n- n_neighbors (int): The number of neighbors to consider.\n- search_quality (str): The quality of the search.\n- db_names (List[str]): The databases to use for the search.\n- output_file (str) : Path to the destination file\n\nReturns:\n- A dictionary containing the search results.",
  "operationId": "search_file_search_file_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Input File",
        "type": "string",
        "default": ""
      },
      "name": "input_file",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Smiles Col",
        "type": "string",
        "default": "SMILES"
      },
      "name": "smiles_col",
      "in": "query"
    },
    {
      "description": "The type of search to perform",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchTypes"
          }
        ],
        "description": "The type of search to perform",
        "default": "espsim_shape"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "N Neighbors",
        "type": "integer",
        "default": 30
      },
      "name": "n_neighbors",
      "in": "query"
    },
    {
      "description": "Speed/Accuracy Tradeoff",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchQuality"
          }
        ],
        "description": "Speed/Accuracy Tradeoff",
        "default": "fast"
      },
      "name": "search_quality",
      "in": "query"
    },
    {
      "description": "Selected Databases",
      "required": false,
      "schema": {
        "title": "Db Names",
        "type": "string",
        "description": "Selected Databases",
        "default": "ZINC15,ENAMINE-REAL"
      },
      "name": "db_names",
      "in": "query"
    },
    {
      "description": "Destination file",
      "required": false,
      "schema": {
        "title": "Output File",
        "type": "string",
        "description": "Destination file",
        "default": "/tmp/search_results.csv"
      },
      "name": "output_file",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Search One Molecule Job

GET /submit_molsearch

{
  "tags": [
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "Search One Molecule Job",
  "description": "Submit a job to search by a single molecule using various criteria.\n\nParameters:\n- search_input (str): The input molecule to search for (default is \"CC(=O)Oc1ccccc1C(=O)O\")\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\")\n- db_names (List[DatabaseEnum]): The databases to use for the search\n- n_neighbors (int): The number of neighbors to consider (maximum is 100K)\n\nReturns:\n- A dictionary containing the search input, search type, number of neighbors, search quality, and databases used.",
  "operationId": "search_one_molecule_job_submit_molsearch_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "string",
        "default": "CC(=O)Oc1ccccc1C(=O)O"
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "description": "The type of search to perform",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchTypes"
          }
        ],
        "description": "The type of search to perform",
        "default": "espsim_shape"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Speed/Accuracy Tradeoff",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchQuality"
          }
        ],
        "description": "Speed/Accuracy Tradeoff",
        "default": "fast"
      },
      "name": "search_quality",
      "in": "query"
    },
    {
      "description": "Selected Databases",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/DatabaseEnumAll"
        },
        "description": "Selected Databases",
        "default": [
          "CHEMINFINITA-SYNTHON"
        ]
      },
      "name": "db_names",
      "in": "query"
    },
    {
      "description": "The number of neighbors to consider (maximum is 100K)",
      "required": false,
      "schema": {
        "title": "N Neighbors",
        "type": "integer",
        "description": "The number of neighbors to consider (maximum is 100K)",
        "default": 100000
      },
      "name": "n_neighbors",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Include Properties",
        "type": "boolean",
        "default": false
      },
      "name": "include_properties",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Search One Molecule

GET /molsearch

{
  "tags": [
    "Searching with CHEESE"
  ],
  "summary": "Search One Molecule",
  "description": "Search by a single molecule based on various criteria.\n\nThis endpoint allows users to search by a single molecule while choosing from several search types and additinal search parameters. . \nMultiple databases can be specified for the search. \n\nLimitations:\n- this endpoint is limited to retrieve 100 molecules. For more use the /jobs endpoints.\n- this endpoint allows you to use max two databases. For more use the /jobs endpoints.\n\nParameters:\n- search_input (str): The input molecule to search for (default is \"CC(=O)Oc1ccccc1C(=O)O\").\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- search_quality (SearchQuality): The quality of the search (default is \"fast\").\n- db_names (List[DatabaseEnum]): The databases to use for the search.\n- n_neighbors (int): The number of neighbors to consider (default is 30).\n- descriptors (bool): Whether to include molecular descriptors in the results (default is True).\n- properties (bool): Whether to include molecular properties in the results (default is True).\n- filter_molecules (bool): Whether to filter molecules based on specific criteria (default is False).\n- order_molecules (bool): Whether to order molecules based on specific criteria (default is False).\n- filtering (FilteringEnum): Filters such as Lipinsky, QED, PAINS, Substructure, Superstructure... (default is No Solvents filter)\n- ordering (OrderingEnum): Orderings such as Similarity, Morgan Tanimoto, Shapesim Dissimilarity, Espsim Dissimilarity... (defailt is Similarity)\n\nReturns:\n- A dictionary with list of retrieved molecules, list of molecule ids, and list of origin DBs for each molecule.",
  "operationId": "search_one_molecule_molsearch_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "string",
        "default": "CC(=O)Oc1ccccc1C(=O)O"
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "description": "The type of search to perform",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/SearchTypes"
        },
        "description": "The type of search to perform",
        "default": [
          "espsim_shape"
        ]
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Speed/Accuracy Tradeoff",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchQuality"
          }
        ],
        "description": "Speed/Accuracy Tradeoff",
        "default": "fast"
      },
      "name": "search_quality",
      "in": "query"
    },
    {
      "description": "Selected Databases",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/DatabaseEnumAll"
        },
        "description": "Selected Databases",
        "default": [
          "CHEMINFINITA-SYNTHON"
        ]
      },
      "name": "db_names",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "N Neighbors",
        "type": "integer",
        "default": 30
      },
      "name": "n_neighbors",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Descriptors",
        "type": "boolean",
        "default": true
      },
      "name": "descriptors",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Properties",
        "type": "boolean",
        "default": true
      },
      "name": "properties",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Filter Molecules",
        "type": "boolean",
        "default": false
      },
      "name": "filter_molecules",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Order Molecules",
        "type": "boolean",
        "default": true
      },
      "name": "order_molecules",
      "in": "query"
    },
    {
      "description": "Selected Filters",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/FilteringEnum"
        },
        "description": "Selected Filters",
        "default": [
          "No solvents"
        ]
      },
      "name": "filtering",
      "in": "query"
    },
    {
      "description": "Selected Ordering",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/OrderingEnum"
        },
        "description": "Selected Ordering",
        "default": [
          "Similarity"
        ]
      },
      "name": "ordering",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Search One Molecule Simple

GET /molsearch_simple

{
  "tags": [
    "Searching with CHEESE"
  ],
  "summary": "Search One Molecule Simple",
  "description": "Search by a single molecule based on various criteria.\n\nThis endpoint allows users to search by a molecule while choosing from several search types and additinal search parameters. \nMultiple databases can be specified for the search.\n\nLimitations:\n- this endpoint is limited to retrieve 100 molecules. For more use the /jobs endpoints.\n- this endpoint allows you to use max two databases. For more use the /jobs endpoints.\n\nParameters:\n- search_input (str): The input molecule to search for (default is \"CC(=O)Oc1ccccc1C(=O)O\").\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- search_quality (SearchQuality): The quality of the search (default is \"fast\").\n- db_names (List[DatabaseEnum]): The databases to use for the search.\n- n_neighbors (int): The number of neighbors to consider (default is 30).\n\nReturns:\n- A dictionary with list of retrieved molecules, list of molecule ids, and list of origin DBs for each molecule.",
  "operationId": "search_one_molecule_simple_molsearch_simple_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "string",
        "default": "CC(=O)Oc1ccccc1C(=O)O"
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "description": "The type of search to perform",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/SearchTypes"
        },
        "description": "The type of search to perform",
        "default": [
          "espsim_shape"
        ]
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Speed/Accuracy Tradeoff",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchQuality"
          }
        ],
        "description": "Speed/Accuracy Tradeoff",
        "default": "fast"
      },
      "name": "search_quality",
      "in": "query"
    },
    {
      "description": "Selected Databases",
      "required": false,
      "schema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/DatabaseEnumAll"
        },
        "description": "Selected Databases",
        "default": [
          "CHEMINFINITA-SYNTHON"
        ]
      },
      "name": "db_names",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "N Neighbors",
        "type": "integer",
        "default": 30
      },
      "name": "n_neighbors",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Similarity Matrix

GET /similarity_matrix

{
  "tags": [
    "Similarity (for on-prem users only)"
  ],
  "summary": "Similarity Matrix",
  "description": "Calculate the similarity matrix between a list of molecules\n\nThis endpoint allows users to calculate the similarity between list of molecules based on their SMILES strings.\n\nParameters:\n- smiles (List[str]): List of smiles.\n- similarity_metric (EmbNames): The model and similarity metric to use for the calculation.\n- distance_type (DistanceType): The type of vector distance to use for the similarity calculation.\n- save_matrix (bool): Whether to save the similarity matrix (default is False)\n- dest (str): Destination path to save the embeddings of the similarity matrix (default is /tmp/sim_matrix.npy , resulting files will have similarity metrics as suffixes !).\n\nReturns:\n- A JSON response containing the similarity scores between the list of molecules.",
  "operationId": "similarity_matrix_similarity_matrix_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Smiles",
        "type": "array",
        "items": {
          "type": "string"
        },
        "default": [
          "CC(=O)Oc1ccccc1C(=O)O",
          "CC(=O)Oc1ccncc1C(=O)O",
          "CC(=O)Oc1cnccc1C(=O)O"
        ]
      },
      "name": "smiles",
      "in": "query"
    },
    {
      "description": "CHEESE Model & Similarity Metric",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmbNames"
          }
        ],
        "description": "CHEESE Model & Similarity Metric",
        "default": "all"
      },
      "name": "similarity_metric",
      "in": "query"
    },
    {
      "description": "Select Vector Distance",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DistanceType"
          }
        ],
        "description": "Select Vector Distance",
        "default": "euclidean"
      },
      "name": "distance_type",
      "in": "query"
    },
    {
      "description": "Whether to save the resulting similarity matrix",
      "required": false,
      "schema": {
        "title": "Save Matrix",
        "type": "boolean",
        "description": "Whether to save the resulting similarity matrix",
        "default": false
      },
      "name": "save_matrix",
      "in": "query"
    },
    {
      "description": "Destination path",
      "required": false,
      "schema": {
        "title": "Dest",
        "type": "string",
        "description": "Destination path",
        "default": "/tmp/sim_matrix.npy"
      },
      "name": "dest",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Similarity

GET /similarity

{
  "tags": [
    "Similarity (for on-prem users only)"
  ],
  "summary": "Similarity",
  "description": "Calculate the similarity between two molecules.\n\nThis endpoint allows users to calculate the similarity between two molecules based on their SMILES strings.\n\nParameters:\n- smiles1 (str): The SMILES string of the first molecule.\n- smiles2 (str): The SMILES string of the second molecule.\n- similarity_metric (EmbNames): The model and similarity metric to use for the calculation.\n- distance_type (DistanceType): The type of vector distance to use for the similarity calculation.\n\nReturns:\n- A JSON response containing the similarity score between the two molecules.",
  "operationId": "similarity_similarity_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Smiles1",
        "type": "string",
        "default": "CC(=O)Oc1ccccc1C(=O)O"
      },
      "name": "smiles1",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Smiles2",
        "type": "string",
        "default": "CC(=O)Oc1cnccc1C(=O)O"
      },
      "name": "smiles2",
      "in": "query"
    },
    {
      "description": "CHEESE Model & Similarity Metric",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmbNames"
          }
        ],
        "description": "CHEESE Model & Similarity Metric",
        "default": "all"
      },
      "name": "similarity_metric",
      "in": "query"
    },
    {
      "description": "Select Vector Distance",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DistanceType"
          }
        ],
        "description": "Select Vector Distance",
        "default": "euclidean"
      },
      "name": "distance_type",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Submit Synthon Job

POST /submit_synthongpt_job

{
  "tags": [
    "SynthonGPT",
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "Submit Synthon Job",
  "operationId": "submit_synthon_job_submit_synthongpt_job_post",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "string",
        "default": "CC(=O)Oc1ccccc1C(=O)O"
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "description": "Selected SynthonGPT database. Canonical names stay exposed; legacy CHEMSPACE-FREEDOM-142B is still accepted.",
      "required": false,
      "schema": {
        "title": "Db Name",
        "type": "string",
        "description": "Selected SynthonGPT database. Canonical names stay exposed; legacy CHEMSPACE-FREEDOM-142B is still accepted.",
        "default": "CHEMSPACE-FREEDOM-SYNTHON"
      },
      "name": "db_name",
      "in": "query"
    },
    {
      "description": "Fast synthon search (100 results)",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SearchQuality"
          }
        ],
        "description": "Fast synthon search (100 results)",
        "default": "100"
      },
      "name": "search_quality",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Include Properties",
        "type": "boolean",
        "default": true
      },
      "name": "include_properties",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Include Metadata",
        "type": "boolean",
        "default": false
      },
      "name": "include_metadata",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Include Synthons",
        "type": "boolean",
        "default": false
      },
      "name": "include_synthons",
      "in": "query"
    },
    {
      "description": "shape|esp|morgan",
      "required": false,
      "schema": {
        "title": "Synthon Scorer",
        "type": "string",
        "description": "shape|esp|morgan",
        "default": "shape"
      },
      "name": "synthon_scorer",
      "in": "query"
    },
    {
      "description": "similarity|substructure|superstructure",
      "required": false,
      "schema": {
        "title": "Search Mode",
        "type": "string",
        "description": "similarity|substructure|superstructure",
        "default": "similarity"
      },
      "name": "search_mode",
      "in": "query"
    },
    {
      "description": "fuzzy|exact",
      "required": false,
      "schema": {
        "title": "Structure Match Mode",
        "type": "string",
        "description": "fuzzy|exact",
        "default": "fuzzy"
      },
      "name": "structure_match_mode",
      "in": "query"
    },
    {
      "description": "Optional predefined SMARTS pattern id",
      "required": false,
      "schema": {
        "title": "Smarts Prefilter Pattern Id",
        "type": "string",
        "description": "Optional predefined SMARTS pattern id",
        "default": ""
      },
      "name": "smarts_prefilter_pattern_id",
      "in": "query"
    },
    {
      "description": "Optional predefined SMARTS pattern label",
      "required": false,
      "schema": {
        "title": "Smarts Prefilter Pattern Label",
        "type": "string",
        "description": "Optional predefined SMARTS pattern label",
        "default": ""
      },
      "name": "smarts_prefilter_pattern_label",
      "in": "query"
    },
    {
      "description": "Optional predefined SMARTS pattern SMARTS",
      "required": false,
      "schema": {
        "title": "Smarts Prefilter Pattern Smarts",
        "type": "string",
        "description": "Optional predefined SMARTS pattern SMARTS",
        "default": ""
      },
      "name": "smarts_prefilter_pattern_smarts",
      "in": "query"
    },
    {
      "description": "include|exclude",
      "required": false,
      "schema": {
        "title": "Smarts Prefilter Mode",
        "type": "string",
        "description": "include|exclude",
        "default": "include"
      },
      "name": "smarts_prefilter_mode",
      "in": "query"
    },
    {
      "description": "exact_sss",
      "required": false,
      "schema": {
        "title": "Synthon Search Backend",
        "type": "string",
        "description": "exact_sss",
        "default": "exact_sss"
      },
      "name": "synthon_search_backend",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Sample Size",
        "type": "integer",
        "default": 100
      },
      "name": "sample_size",
      "in": "query"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "title": "Payload",
          "type": "object"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

User Downloads

GET /user_downloads

{
  "tags": [
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "User Downloads",
  "operationId": "user_downloads_user_downloads_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

User Jobs

GET /user_jobs

{
  "tags": [
    "CHEESE Jobs (for registered users only)"
  ],
  "summary": "User Jobs",
  "operationId": "user_jobs_user_jobs_get",
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Visualise

GET /visualise

{
  "tags": [
    "Chemical Space Visualisation (for on-prem users only)"
  ],
  "summary": "Visualise",
  "description": "Get 2D coordinates for a list of molecules.\n\nThis endpoint allows users to get 2D coordinates for a list of molecules.\n\nParameters:\n- search_input (List[str]): The input molecules to get 2D coordinates for.\n- search_type (List[str]): The type of 2D coordinates to calculate.\n- visualisation_method (List[str]): The method (PCA or UMAP) of dimensionality reduction.\n- save_coordinates (bool): Whether to save the visualization coordinates.\n- dest (str): Destination path to save the coordinates (default is /tmp/visualization_coordinates).\n\nReturns:\n- A JSON response containing the 2D coordinates for the input molecules.",
  "operationId": "visualise_visualise_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Search Input",
        "type": "array",
        "items": {
          "type": "string"
        },
        "default": [
          "CC(=O)Oc1ccccc1C(=O)O",
          "CC(=O)Oc1ccncc1C(=O)O",
          "CC(=O)Oc1cnccc1C(=O)O"
        ]
      },
      "name": "search_input",
      "in": "query"
    },
    {
      "description": "Type of embeddings to calculate",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmbNamesNoAll"
          }
        ],
        "description": "Type of embeddings to calculate",
        "default": "morgan"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Type of visualisation",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VisualisationMethods"
          }
        ],
        "description": "Type of visualisation",
        "default": "umap"
      },
      "name": "visualisation_method",
      "in": "query"
    },
    {
      "description": "Whether to save the visualization coordinates",
      "required": false,
      "schema": {
        "title": "Save Coordinates",
        "type": "boolean",
        "description": "Whether to save the visualization coordinates",
        "default": false
      },
      "name": "save_coordinates",
      "in": "query"
    },
    {
      "description": "Destination path",
      "required": false,
      "schema": {
        "title": "Dest",
        "type": "string",
        "description": "Destination path",
        "default": "/tmp/visualization_coordinates"
      },
      "name": "dest",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Visualize File

GET /visualise_file

{
  "tags": [
    "CLI commands (for on-prem users only)"
  ],
  "summary": "Visualize File",
  "description": "Get 2D visualization coordinates for a file of molecules.\n\nThis endpoint allows users to get 2D coordinates for a file of molecules.\n\nParameters:\n- input_file (str) : Path to the input file\n- smiles_col (str) : The column name of SMILES strings in case of a csv file (default 'SMILES')\n- search_type (str): The type of CHEESE coordinates to calculate. (default : 'morgan')\n- visualisation_method (List[str]): The method (PCA or UMAP) of dimensionality reduction.\n- dest_folder (str): Destination path to save the coordinates (default is /tmp/visualization_coordinates).\n\nReturns:\n- A JSON response containing the 2D coordinates for the input molecules.",
  "operationId": "visualize_file_visualise_file_get",
  "parameters": [
    {
      "required": false,
      "schema": {
        "title": "Input File",
        "type": "string",
        "default": ""
      },
      "name": "input_file",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "title": "Smiles Col",
        "type": "string",
        "default": "SMILES"
      },
      "name": "smiles_col",
      "in": "query"
    },
    {
      "description": "Type of embeddings to calculate",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EmbNamesNoAll"
          }
        ],
        "description": "Type of embeddings to calculate",
        "default": "morgan"
      },
      "name": "search_type",
      "in": "query"
    },
    {
      "description": "Type of visualisation",
      "required": false,
      "schema": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VisualisationMethods"
          }
        ],
        "description": "Type of visualisation",
        "default": "umap"
      },
      "name": "visualisation_method",
      "in": "query"
    },
    {
      "description": "Destination path",
      "required": false,
      "schema": {
        "title": "Dest Folder",
        "type": "string",
        "description": "Destination path",
        "default": "/tmp/visualization_coordinates"
      },
      "name": "dest_folder",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {}
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
Full legacy OpenAPI contract
Contents

Endpoint reference

Generated request, response, and schema details for every legacy CHEESE API route.

Legacy API

These pages document the legacy hosted CHEESE API for existing integrations. New integrations should use the CHEESE API v2 quickstart and the v2 endpoint reference.

The endpoint pages below are generated from the legacy OpenAPI contract pinned with this documentation build. The development host is https://api.cheese-dev.deepmedchem.com; production is https://api.cheese.deepmedchem.com. See the Search API overview for authentication and worked Python examples.

Jobs

Similarity and embeddings

Prediction, clustering, and visualization

Databases, downloads, and account

The pinned source contract is available at /openapi-cheese-legacy.json.

Contents

Cancel Run

POST /api/v2/runs/{run_id}:cancel

{
  "operationId": "cancelRun",
  "parameters": [
    {
      "in": "path",
      "name": "run_id",
      "required": true,
      "schema": {
        "title": "Run Id",
        "type": "string"
      }
    },
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RunResource"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Cancel Run",
  "tags": [
    "Runs"
  ]
}
Full v2 OpenAPI contract
Contents

Create Run

POST /api/v2/runs

{
  "operationId": "createRun",
  "parameters": [
    {
      "in": "header",
      "name": "Idempotency-Key",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Idempotency-Key"
      }
    },
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RunSpecification"
        }
      }
    },
    "required": true
  },
  "responses": {
    "202": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RunResource"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Create Run",
  "tags": [
    "Runs"
  ]
}
Full v2 OpenAPI contract
Contents

Create Selection

POST /api/v2/selections

{
  "operationId": "createSelection",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SelectionDocument"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SelectionResponse"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Create Selection",
  "tags": [
    "Selections"
  ]
}
Full v2 OpenAPI contract
Contents

Estimate Run

POST /api/v2/runs:estimate

{
  "operationId": "estimateRun",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/RunSpecification"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "additionalProperties": true,
            "title": "Response Estimaterun",
            "type": "object"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Estimate Run",
  "tags": [
    "Runs"
  ]
}
Full v2 OpenAPI contract
Contents

Estimate Selection

POST /api/v2/selections:estimate

{
  "operationId": "estimateSelection",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SelectionDocument"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SelectionEstimate"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Estimate Selection",
  "tags": [
    "Selections"
  ]
}
Full v2 OpenAPI contract
Contents

Live

GET /health/live

{
  "operationId": "getLiveness",
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "additionalProperties": true,
            "title": "Response Getliveness",
            "type": "object"
          }
        }
      },
      "description": "Successful Response"
    }
  },
  "summary": "Live",
  "tags": [
    "Operations"
  ]
}
Full v2 OpenAPI contract
Contents

Ready

GET /health/ready

{
  "operationId": "getReadiness",
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "additionalProperties": true,
            "title": "Response Getreadiness",
            "type": "object"
          }
        }
      },
      "description": "Successful Response"
    }
  },
  "summary": "Ready",
  "tags": [
    "Operations"
  ]
}
Full v2 OpenAPI contract
Contents

Catalog

GET /api/v2/catalog

{
  "operationId": "listChemicalSpaces",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "additionalProperties": true,
            "title": "Response Listchemicalspaces",
            "type": "object"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Catalog",
  "tags": [
    "Catalog"
  ]
}
Full v2 OpenAPI contract
Contents

List Run Events

GET /api/v2/runs/{run_id}/events

{
  "operationId": "listRunEvents",
  "parameters": [
    {
      "in": "path",
      "name": "run_id",
      "required": true,
      "schema": {
        "title": "Run Id",
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "after",
      "required": false,
      "schema": {
        "default": 0,
        "title": "After",
        "type": "integer"
      }
    },
    {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
        "default": 200,
        "title": "Limit",
        "type": "integer"
      }
    },
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Page"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "List Run Events",
  "tags": [
    "Runs"
  ]
}
Full v2 OpenAPI contract
Contents

List Run Items

GET /api/v2/runs/{run_id}/items

{
  "operationId": "listRunItems",
  "parameters": [
    {
      "in": "path",
      "name": "run_id",
      "required": true,
      "schema": {
        "title": "Run Id",
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Cursor"
      }
    },
    {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
        "default": 100,
        "title": "Limit",
        "type": "integer"
      }
    },
    {
      "in": "query",
      "name": "status_filter",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Status Filter"
      }
    },
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Page"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "List Run Items",
  "tags": [
    "Runs"
  ]
}
Full v2 OpenAPI contract
Contents

List Run Results

GET /api/v2/runs/{run_id}/results

{
  "operationId": "listRunResults",
  "parameters": [
    {
      "in": "path",
      "name": "run_id",
      "required": true,
      "schema": {
        "title": "Run Id",
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Cursor"
      }
    },
    {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
        "default": 100,
        "title": "Limit",
        "type": "integer"
      }
    },
    {
      "in": "query",
      "name": "order",
      "required": false,
      "schema": {
        "default": "completion",
        "title": "Order",
        "type": "string"
      }
    },
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Page"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "List Run Results",
  "tags": [
    "Runs"
  ]
}
Full v2 OpenAPI contract
Contents

List Runs

GET /api/v2/runs

{
  "operationId": "listRuns",
  "parameters": [
    {
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Cursor"
      }
    },
    {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
        "default": 50,
        "title": "Limit",
        "type": "integer"
      }
    },
    {
      "in": "query",
      "name": "status_filter",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "Status Filter"
      }
    },
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Page"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "List Runs",
  "tags": [
    "Runs"
  ]
}
Full v2 OpenAPI contract
Contents

Retrieve Run

GET /api/v2/runs/{run_id}

{
  "operationId": "retrieveRun",
  "parameters": [
    {
      "in": "path",
      "name": "run_id",
      "required": true,
      "schema": {
        "title": "Run Id",
        "type": "string"
      }
    },
    {
      "in": "header",
      "name": "If-None-Match",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "If-None-Match"
      }
    },
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RunResource"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Retrieve Run",
  "tags": [
    "Runs"
  ]
}
Full v2 OpenAPI contract
Contents

Retrieve Run Item

GET /api/v2/runs/{run_id}/items/{item_id}

{
  "operationId": "retrieveRunItem",
  "parameters": [
    {
      "in": "path",
      "name": "run_id",
      "required": true,
      "schema": {
        "title": "Run Id",
        "type": "string"
      }
    },
    {
      "in": "path",
      "name": "item_id",
      "required": true,
      "schema": {
        "title": "Item Id",
        "type": "string"
      }
    },
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/RunItemResource"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Retrieve Run Item",
  "tags": [
    "Runs"
  ]
}
Full v2 OpenAPI contract
Contents

Sample molecules from one chemical space

POST /api/v2/sample

{
  "operationId": "sampleMolecules",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SampleRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SampleResponse"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Sample molecules from one chemical space",
  "tags": [
    "Sampling"
  ]
}
Full v2 OpenAPI contract
Contents

Rerank candidates by CHEESE shape or electrostatic similarity

POST /api/v2/search_cheese

{
  "operationId": "searchCheese",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/CheeseSearchRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SearchResponse"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Rerank candidates by CHEESE shape or electrostatic similarity",
  "tags": [
    "Search"
  ]
}
Full v2 OpenAPI contract
Contents

Find exact assembled-product substructure matches

POST /api/v2/search_substructure

{
  "operationId": "searchSubstructure",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SubstructureSearchRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SubstructureSearchResponse"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Find exact assembled-product substructure matches",
  "tags": [
    "Search"
  ]
}
Full v2 OpenAPI contract
Contents

Legacy Substructure Search

POST /api/v2/substructure

{
  "deprecated": true,
  "operationId": "searchSubstructureLegacy",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/LegacySubstructureRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SubstructureSearchResponse"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Legacy Substructure Search",
  "tags": [
    "Deprecated"
  ]
}
Full v2 OpenAPI contract
Contents

Find ECFP4/Tanimoto neighbors

POST /api/v2/search

{
  "operationId": "searchSynthonOR",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/DefaultSearchRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SearchResponse"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Find ECFP4/Tanimoto neighbors",
  "tags": [
    "Search"
  ]
}
Full v2 OpenAPI contract
Contents

Validate Selection

POST /api/v2/selections:validate

{
  "operationId": "validateSelection",
  "parameters": [
    {
      "in": "header",
      "name": "x-dmc-client",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ],
        "title": "X-Dmc-Client"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/SelectionDocument"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/SelectionValidation"
          }
        }
      },
      "description": "Successful Response"
    },
    "422": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      },
      "description": "Validation Error"
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ],
  "summary": "Validate Selection",
  "tags": [
    "Selections"
  ]
}
Full v2 OpenAPI contract
Contents

Endpoint reference

Generated request, response, authentication, and example details for every CHEESE API v2 operation.

Contents

API reference

Generated endpoint reference for CHEESE API v2 and the legacy hosted API.

Every endpoint page is generated from an OpenAPI contract pinned with this documentation build, so the reference always matches the deployed contract it names.

CHEESE API v2

The current API-first interface: SynthonOR and CHEESE similarity search, substructure search, sampling, composable selections, and durable multi-query runs.

v2 endpoint reference

All API v2 operations — requests, responses, authentication, and examples.

Interactive API explorer

Live Swagger UI served by the deployed API itself — try requests against the current development deployment.

New to the API? Start with the quickstart. The pinned contract is published at /openapi-v2.json.

Legacy CHEESE API

The previous hosted 39-route service, documented for existing integrations during the migration/support window.

Legacy endpoint reference

All 39 legacy routes generated from the pinned legacy OpenAPI contract.

The pinned legacy contract is published at /openapi-cheese-legacy.json. Migration guidance lives in the legacy Search API guide.

v2 OpenAPI contract
{
  "components": {
    "schemas": {
      "AnyStructureGroup": {
        "additionalProperties": false,
        "properties": {
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/StructureCondition"
            },
            "maxItems": 16,
            "title": "Conditions",
            "type": "array"
          },
          "minimum": {
            "default": 0,
            "minimum": 0.0,
            "title": "Minimum",
            "type": "integer"
          }
        },
        "title": "AnyStructureGroup",
        "type": "object"
      },
      "CheeseSearchRequest": {
        "additionalProperties": false,
        "description": "Stable public request for CHEESE exact product reranking.",
        "properties": {
          "database_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Database Id",
            "type": "string"
          },
          "include_synthons": {
            "default": false,
            "title": "Include Synthons",
            "type": "boolean"
          },
          "limit": {
            "default": 20,
            "maximum": 200.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "query_smiles": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Query Smiles",
            "type": "string"
          },
          "scorer": {
            "pattern": "^(shape|esp)$",
            "title": "Scorer",
            "type": "string"
          },
          "shortlist_multiplier": {
            "default": 10,
            "description": "Candidate over-fetch multiplier; 0 disables over-fetch and scores exactly limit proposals, while preserving exact endpoint-specific product scoring.",
            "maximum": 200.0,
            "minimum": 0.0,
            "title": "Shortlist Multiplier",
            "type": "integer"
          }
        },
        "required": [
          "query_smiles",
          "database_id",
          "scorer"
        ],
        "title": "CheeseSearchRequest",
        "type": "object"
      },
      "ConstraintExecution": {
        "properties": {
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "path": {
            "title": "Path",
            "type": "string"
          },
          "status": {
            "enum": [
              "exact_pushdown",
              "conservative_approximate_pushdown",
              "post_assembly_only",
              "unsupported"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "path",
          "status"
        ],
        "title": "ConstraintExecution",
        "type": "object"
      },
      "Constraints": {
        "additionalProperties": false,
        "properties": {
          "presets": {
            "items": {
              "$ref": "#/components/schemas/PresetReference"
            },
            "maxItems": 16,
            "title": "Presets",
            "type": "array"
          },
          "properties": {
            "items": {
              "$ref": "#/components/schemas/PropertyCondition"
            },
            "maxItems": 32,
            "title": "Properties",
            "type": "array"
          },
          "reactions": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "maxItems": 16,
            "title": "Reactions",
            "type": "array"
          },
          "relationships": {
            "items": {
              "$ref": "#/components/schemas/ScaffoldRelationship"
            },
            "maxItems": 16,
            "title": "Relationships",
            "type": "array"
          },
          "structures": {
            "$ref": "#/components/schemas/StructureConstraints"
          }
        },
        "title": "Constraints",
        "type": "object"
      },
      "CountConstraint": {
        "additionalProperties": false,
        "properties": {
          "max": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max"
          },
          "min": {
            "default": 1,
            "minimum": 0.0,
            "title": "Min",
            "type": "integer"
          }
        },
        "title": "CountConstraint",
        "type": "object"
      },
      "DatabaseSelection": {
        "additionalProperties": false,
        "properties": {
          "database_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Database Id",
            "type": "string"
          },
          "release_id": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Release Id"
          }
        },
        "required": [
          "database_id"
        ],
        "title": "DatabaseSelection",
        "type": "object"
      },
      "DefaultSearchRequest": {
        "additionalProperties": false,
        "description": "Stable public request for fixed ECFP4/Tanimoto search.",
        "properties": {
          "database_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Database Id",
            "type": "string"
          },
          "include_synthons": {
            "default": false,
            "title": "Include Synthons",
            "type": "boolean"
          },
          "limit": {
            "default": 20,
            "maximum": 200.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "query_smiles": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Query Smiles",
            "type": "string"
          },
          "shortlist_multiplier": {
            "default": 10,
            "description": "Candidate over-fetch multiplier; 0 disables over-fetch and scores exactly limit proposals, while preserving exact endpoint-specific product scoring.",
            "maximum": 200.0,
            "minimum": 0.0,
            "title": "Shortlist Multiplier",
            "type": "integer"
          }
        },
        "required": [
          "query_smiles",
          "database_id"
        ],
        "title": "DefaultSearchRequest",
        "type": "object"
      },
      "Execution": {
        "additionalProperties": false,
        "properties": {
          "quality": {
            "default": "balanced",
            "enum": [
              "fast",
              "balanced"
            ],
            "title": "Quality",
            "type": "string"
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed"
          },
          "shortlist_multiplier": {
            "default": 10,
            "description": "Candidate over-fetch multiplier; 0 disables over-fetch and scores exactly the portfolio limit with the selected objective.",
            "maximum": 200.0,
            "minimum": 0.0,
            "title": "Shortlist Multiplier",
            "type": "integer"
          }
        },
        "title": "Execution",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "LegacySubstructureRequest": {
        "additionalProperties": false,
        "properties": {
          "database_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Database Id",
            "type": "string"
          },
          "include_synthons": {
            "default": false,
            "title": "Include Synthons",
            "type": "boolean"
          },
          "limit": {
            "default": 100,
            "maximum": 200.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "query_smiles": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Query Smiles",
            "type": "string"
          },
          "timeout_seconds": {
            "default": 50,
            "maximum": 120.0,
            "minimum": 1.0,
            "title": "Timeout Seconds",
            "type": "integer"
          }
        },
        "required": [
          "query_smiles",
          "database_id"
        ],
        "title": "LegacySubstructureRequest",
        "type": "object"
      },
      "Page": {
        "properties": {
          "data": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Data",
            "type": "array"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          }
        },
        "required": [
          "data"
        ],
        "title": "Page",
        "type": "object"
      },
      "Portfolio": {
        "additionalProperties": false,
        "properties": {
          "limit": {
            "default": 100,
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "max_per_scaffold": {
            "anyOf": [
              {
                "maximum": 1000.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Per Scaffold"
          }
        },
        "title": "Portfolio",
        "type": "object"
      },
      "PresetReference": {
        "additionalProperties": false,
        "properties": {
          "preset_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Preset Id",
            "type": "string"
          },
          "version": {
            "maxLength": 32,
            "minLength": 1,
            "title": "Version",
            "type": "string"
          }
        },
        "required": [
          "preset_id",
          "version"
        ],
        "title": "PresetReference",
        "type": "object"
      },
      "PropertyCondition": {
        "additionalProperties": false,
        "properties": {
          "missing": {
            "const": "reject",
            "default": "reject",
            "title": "Missing",
            "type": "string"
          },
          "operator": {
            "enum": [
              "gt",
              "gte",
              "lt",
              "lte",
              "range"
            ],
            "title": "Operator",
            "type": "string"
          },
          "property_id": {
            "maxLength": 256,
            "minLength": 1,
            "title": "Property Id",
            "type": "string"
          },
          "required_fidelity": {
            "const": "exact_product",
            "default": "exact_product",
            "title": "Required Fidelity",
            "type": "string"
          },
          "type": {
            "const": "property",
            "default": "property",
            "title": "Type",
            "type": "string"
          },
          "units": {
            "maxLength": 32,
            "minLength": 1,
            "title": "Units",
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "$ref": "#/components/schemas/RangeValue"
              }
            ],
            "title": "Value"
          }
        },
        "required": [
          "property_id",
          "operator",
          "value",
          "units"
        ],
        "title": "PropertyCondition",
        "type": "object"
      },
      "PropertyPreset": {
        "enum": [
          "lipinski-ro5",
          "navigator-druglike-v1"
        ],
        "title": "PropertyPreset",
        "type": "string"
      },
      "PropertyRange": {
        "properties": {
          "max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max"
          },
          "max_inclusive": {
            "default": true,
            "title": "Max Inclusive",
            "type": "boolean"
          },
          "min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min"
          },
          "min_inclusive": {
            "default": true,
            "title": "Min Inclusive",
            "type": "boolean"
          }
        },
        "title": "PropertyRange",
        "type": "object"
      },
      "RangeValue": {
        "additionalProperties": false,
        "properties": {
          "lower": {
            "title": "Lower",
            "type": "number"
          },
          "lower_inclusive": {
            "default": true,
            "title": "Lower Inclusive",
            "type": "boolean"
          },
          "upper": {
            "title": "Upper",
            "type": "number"
          },
          "upper_inclusive": {
            "default": true,
            "title": "Upper Inclusive",
            "type": "boolean"
          }
        },
        "required": [
          "lower",
          "upper"
        ],
        "title": "RangeValue",
        "type": "object"
      },
      "RankedStrategy": {
        "additionalProperties": false,
        "properties": {
          "type": {
            "const": "ranked",
            "default": "ranked",
            "title": "Type",
            "type": "string"
          }
        },
        "title": "RankedStrategy",
        "type": "object"
      },
      "Reference": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "pattern": "^[A-Za-z0-9._-]{1,128}$",
            "title": "Id",
            "type": "string"
          },
          "structure": {
            "$ref": "#/components/schemas/Structure"
          }
        },
        "required": [
          "id",
          "structure"
        ],
        "title": "Reference",
        "type": "object"
      },
      "RunInput": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "pattern": "^[A-Za-z0-9._-]{1,128}$",
            "title": "Id",
            "type": "string"
          },
          "references": {
            "items": {
              "$ref": "#/components/schemas/Reference"
            },
            "maxItems": 32,
            "minItems": 1,
            "title": "References",
            "type": "array"
          }
        },
        "required": [
          "id",
          "references"
        ],
        "title": "RunInput",
        "type": "object"
      },
      "RunItemResource": {
        "properties": {
          "attempt_count": {
            "default": 0,
            "title": "Attempt Count",
            "type": "integer"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "error": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "input_index": {
            "title": "Input Index",
            "type": "integer"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "status": {
            "enum": [
              "pending",
              "running",
              "succeeded",
              "failed",
              "cancelled"
            ],
            "title": "Status",
            "type": "string"
          },
          "timing_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Ms"
          }
        },
        "required": [
          "id",
          "input_index",
          "status"
        ],
        "title": "RunItemResource",
        "type": "object"
      },
      "RunLinks": {
        "properties": {
          "events": {
            "title": "Events",
            "type": "string"
          },
          "items": {
            "title": "Items",
            "type": "string"
          },
          "results": {
            "title": "Results",
            "type": "string"
          },
          "self": {
            "title": "Self",
            "type": "string"
          }
        },
        "required": [
          "self",
          "items",
          "results",
          "events"
        ],
        "title": "RunLinks",
        "type": "object"
      },
      "RunProgress": {
        "properties": {
          "cancelled": {
            "title": "Cancelled",
            "type": "integer"
          },
          "failed": {
            "title": "Failed",
            "type": "integer"
          },
          "pending": {
            "title": "Pending",
            "type": "integer"
          },
          "running": {
            "title": "Running",
            "type": "integer"
          },
          "succeeded": {
            "title": "Succeeded",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "pending",
          "running",
          "succeeded",
          "failed",
          "cancelled"
        ],
        "title": "RunProgress",
        "type": "object"
      },
      "RunResource": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "expires_at": {
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "enum": [
              "selection",
              "selection_batch"
            ],
            "title": "Kind",
            "type": "string"
          },
          "last_event_sequence": {
            "title": "Last Event Sequence",
            "type": "integer"
          },
          "links": {
            "$ref": "#/components/schemas/RunLinks"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Metadata",
            "type": "object"
          },
          "object": {
            "const": "run",
            "default": "run",
            "title": "Object",
            "type": "string"
          },
          "progress": {
            "$ref": "#/components/schemas/RunProgress"
          },
          "schema_version": {
            "const": "run/1",
            "default": "run/1",
            "title": "Schema Version",
            "type": "string"
          },
          "specification_hash": {
            "title": "Specification Hash",
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "completed",
              "completed_with_errors",
              "failed",
              "cancelling",
              "cancelled"
            ],
            "title": "Status",
            "type": "string"
          },
          "updated_at": {
            "title": "Updated At",
            "type": "string"
          },
          "warnings": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "created_at",
          "updated_at",
          "expires_at",
          "progress",
          "last_event_sequence",
          "specification_hash",
          "links"
        ],
        "title": "RunResource",
        "type": "object"
      },
      "RunSpecification": {
        "additionalProperties": false,
        "properties": {
          "failure_policy": {
            "const": "continue",
            "default": "continue",
            "title": "Failure Policy",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/RunInput"
            },
            "maxItems": 1000,
            "title": "Items",
            "type": "array"
          },
          "kind": {
            "enum": [
              "selection",
              "selection_batch"
            ],
            "title": "Kind",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {
              "type": "string"
            },
            "maxProperties": 32,
            "title": "Metadata",
            "type": "object"
          },
          "schema_version": {
            "const": "run/1",
            "default": "run/1",
            "title": "Schema Version",
            "type": "string"
          },
          "selection": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SelectionDocument"
              },
              {
                "type": "null"
              }
            ]
          },
          "selection_template": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Selection Template"
          }
        },
        "required": [
          "kind"
        ],
        "title": "RunSpecification",
        "type": "object"
      },
      "SampleHit": {
        "properties": {
          "index": {
            "title": "Index",
            "type": "integer"
          },
          "price": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price"
          },
          "product_id": {
            "title": "Product Id",
            "type": "string"
          },
          "properties": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Properties"
          },
          "reaction_id": {
            "title": "Reaction Id",
            "type": "string"
          },
          "smiles": {
            "title": "Smiles",
            "type": "string"
          },
          "synthons": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SynthonProvenance"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Synthons"
          }
        },
        "required": [
          "index",
          "smiles",
          "product_id",
          "reaction_id"
        ],
        "title": "SampleHit",
        "type": "object"
      },
      "SampleRequest": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "default": 100,
            "maximum": 1000.0,
            "minimum": 1.0,
            "title": "Count",
            "type": "integer"
          },
          "database_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Database Id",
            "type": "string"
          },
          "include_properties": {
            "default": false,
            "title": "Include Properties",
            "type": "boolean"
          },
          "include_synthons": {
            "default": false,
            "title": "Include Synthons",
            "type": "boolean"
          },
          "property_constraints": {
            "additionalProperties": {
              "$ref": "#/components/schemas/PropertyRange"
            },
            "maxProperties": 17,
            "title": "Property Constraints",
            "type": "object"
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed"
          }
        },
        "required": [
          "database_id"
        ],
        "title": "SampleRequest",
        "type": "object"
      },
      "SampleResponse": {
        "properties": {
          "database_id": {
            "title": "Database Id",
            "type": "string"
          },
          "database_release": {
            "title": "Database Release",
            "type": "string"
          },
          "deduplicated": {
            "default": 0,
            "title": "Deduplicated",
            "type": "integer"
          },
          "requested": {
            "title": "Requested",
            "type": "integer"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SampleHit"
            },
            "title": "Results",
            "type": "array"
          },
          "returned": {
            "title": "Returned",
            "type": "integer"
          },
          "sampling_method": {
            "default": "route_product_tuple",
            "title": "Sampling Method",
            "type": "string"
          },
          "sampling_version": {
            "default": "1",
            "title": "Sampling Version",
            "type": "string"
          },
          "seed": {
            "title": "Seed",
            "type": "integer"
          },
          "warnings": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "database_id",
          "database_release",
          "seed",
          "requested",
          "returned",
          "results"
        ],
        "title": "SampleResponse",
        "type": "object"
      },
      "SampleStrategy": {
        "additionalProperties": false,
        "properties": {
          "distribution": {
            "default": "route_product_tuple",
            "enum": [
              "route_product_tuple",
              "eligible_row"
            ],
            "title": "Distribution",
            "type": "string"
          },
          "type": {
            "const": "sample",
            "default": "sample",
            "title": "Type",
            "type": "string"
          }
        },
        "title": "SampleStrategy",
        "type": "object"
      },
      "ScaffoldRelationship": {
        "additionalProperties": false,
        "properties": {
          "method_id": {
            "const": "rdkit.bemis_murcko",
            "title": "Method Id",
            "type": "string"
          },
          "operator": {
            "enum": [
              "different",
              "same"
            ],
            "title": "Operator",
            "type": "string"
          },
          "reference_id": {
            "pattern": "^[A-Za-z0-9._-]{1,128}$",
            "title": "Reference Id",
            "type": "string"
          },
          "type": {
            "const": "scaffold_relation",
            "default": "scaffold_relation",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "reference_id",
          "method_id",
          "operator"
        ],
        "title": "ScaffoldRelationship",
        "type": "object"
      },
      "ScorerName": {
        "enum": [
          "morgan",
          "shape",
          "esp"
        ],
        "title": "ScorerName",
        "type": "string"
      },
      "SearchCounts": {
        "properties": {
          "additive_property_dropped": {
            "default": 0,
            "title": "Additive Property Dropped",
            "type": "integer"
          },
          "admet_acquisition_dropped": {
            "default": 0,
            "title": "Admet Acquisition Dropped",
            "type": "integer"
          },
          "admet_out_of_domain": {
            "default": 0,
            "title": "Admet Out Of Domain",
            "type": "integer"
          },
          "assembled": {
            "default": 0,
            "title": "Assembled",
            "type": "integer"
          },
          "duplicate_products": {
            "default": 0,
            "title": "Duplicate Products",
            "type": "integer"
          },
          "duplicate_tuples": {
            "default": 0,
            "title": "Duplicate Tuples",
            "type": "integer"
          },
          "exact_constraint_dropped": {
            "default": 0,
            "title": "Exact Constraint Dropped",
            "type": "integer"
          },
          "exact_property_dropped": {
            "default": 0,
            "title": "Exact Property Dropped",
            "type": "integer"
          },
          "invalid": {
            "default": 0,
            "title": "Invalid",
            "type": "integer"
          },
          "property_approximation_unavailable": {
            "default": 0,
            "title": "Property Approximation Unavailable",
            "type": "integer"
          },
          "proposed": {
            "default": 0,
            "title": "Proposed",
            "type": "integer"
          },
          "returned": {
            "default": 0,
            "title": "Returned",
            "type": "integer"
          }
        },
        "title": "SearchCounts",
        "type": "object"
      },
      "SearchHit": {
        "properties": {
          "admet_acquisition_scores": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Admet Acquisition Scores"
          },
          "admet_in_domain": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Admet In Domain"
          },
          "approximate_properties": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approximate Properties"
          },
          "constraint_evidence": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Constraint Evidence"
          },
          "metric": {
            "title": "Metric",
            "type": "string"
          },
          "price": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price"
          },
          "product_id": {
            "title": "Product Id",
            "type": "string"
          },
          "properties": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Properties"
          },
          "proposal_score": {
            "title": "Proposal Score",
            "type": "number"
          },
          "rank": {
            "title": "Rank",
            "type": "integer"
          },
          "reaction_id": {
            "title": "Reaction Id",
            "type": "string"
          },
          "score": {
            "title": "Score",
            "type": "number"
          },
          "smiles": {
            "title": "Smiles",
            "type": "string"
          },
          "synthons": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SynthonProvenance"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Synthons"
          }
        },
        "required": [
          "rank",
          "smiles",
          "score",
          "metric",
          "proposal_score",
          "product_id",
          "reaction_id"
        ],
        "title": "SearchHit",
        "type": "object"
      },
      "SearchResponse": {
        "properties": {
          "admet_acquisition_models": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "Admet Acquisition Models",
            "type": "object"
          },
          "admet_acquisition_semantics": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Admet Acquisition Semantics"
          },
          "counts": {
            "$ref": "#/components/schemas/SearchCounts"
          },
          "database_id": {
            "title": "Database Id",
            "type": "string"
          },
          "database_release": {
            "title": "Database Release",
            "type": "string"
          },
          "effective_shortlist": {
            "title": "Effective Shortlist",
            "type": "integer"
          },
          "engine_version": {
            "title": "Engine Version",
            "type": "string"
          },
          "exact_property_postfilter": {
            "default": true,
            "title": "Exact Property Postfilter",
            "type": "boolean"
          },
          "metric": {
            "title": "Metric",
            "type": "string"
          },
          "model_version": {
            "title": "Model Version",
            "type": "string"
          },
          "property_constraints": {
            "additionalProperties": {
              "$ref": "#/components/schemas/PropertyRange"
            },
            "title": "Property Constraints",
            "type": "object"
          },
          "property_preset": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PropertyPreset"
              },
              {
                "type": "null"
              }
            ]
          },
          "query_smiles": {
            "title": "Query Smiles",
            "type": "string"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SearchHit"
            },
            "title": "Results",
            "type": "array"
          },
          "scorer": {
            "$ref": "#/components/schemas/ScorerName"
          },
          "shortlist_multiplier": {
            "title": "Shortlist Multiplier",
            "type": "integer"
          },
          "timing_ms": {
            "$ref": "#/components/schemas/SearchTimings"
          },
          "warnings": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "query_smiles",
          "database_id",
          "database_release",
          "model_version",
          "engine_version",
          "scorer",
          "metric",
          "shortlist_multiplier",
          "effective_shortlist",
          "results",
          "counts",
          "timing_ms"
        ],
        "title": "SearchResponse",
        "type": "object"
      },
      "SearchTimings": {
        "properties": {
          "assembly_and_scoring": {
            "default": 0.0,
            "title": "Assembly And Scoring",
            "type": "number"
          },
          "proposal": {
            "default": 0.0,
            "title": "Proposal",
            "type": "number"
          },
          "query": {
            "default": 0.0,
            "title": "Query",
            "type": "number"
          },
          "total": {
            "default": 0.0,
            "title": "Total",
            "type": "number"
          }
        },
        "title": "SearchTimings",
        "type": "object"
      },
      "SelectionDocument": {
        "additionalProperties": false,
        "description": "Portable, replayable selection intent.",
        "properties": {
          "constraints": {
            "$ref": "#/components/schemas/Constraints"
          },
          "database": {
            "$ref": "#/components/schemas/DatabaseSelection"
          },
          "execution": {
            "$ref": "#/components/schemas/Execution"
          },
          "include": {
            "items": {
              "enum": [
                "properties",
                "constraint_evidence",
                "objective_components",
                "execution_plan",
                "synthons",
                "match_evidence"
              ],
              "type": "string"
            },
            "title": "Include",
            "type": "array"
          },
          "objectives": {
            "items": {
              "$ref": "#/components/schemas/SimilarityObjective"
            },
            "maxItems": 16,
            "title": "Objectives",
            "type": "array"
          },
          "portfolio": {
            "$ref": "#/components/schemas/Portfolio"
          },
          "references": {
            "items": {
              "$ref": "#/components/schemas/Reference"
            },
            "maxItems": 32,
            "title": "References",
            "type": "array"
          },
          "schema_version": {
            "const": "molecule-selection/1",
            "default": "molecule-selection/1",
            "title": "Schema Version",
            "type": "string"
          },
          "strategy": {
            "discriminator": {
              "mapping": {
                "ranked": "#/components/schemas/RankedStrategy",
                "sample": "#/components/schemas/SampleStrategy"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/RankedStrategy"
              },
              {
                "$ref": "#/components/schemas/SampleStrategy"
              }
            ],
            "title": "Strategy"
          }
        },
        "required": [
          "database",
          "strategy"
        ],
        "title": "SelectionDocument",
        "type": "object"
      },
      "SelectionEstimate": {
        "properties": {
          "coverage": {
            "additionalProperties": true,
            "title": "Coverage",
            "type": "object"
          },
          "execution_tier": {
            "enum": [
              "synchronous",
              "durable"
            ],
            "title": "Execution Tier",
            "type": "string"
          },
          "normalized_selection": {
            "$ref": "#/components/schemas/SelectionDocument"
          },
          "reusable_run_request": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reusable Run Request"
          },
          "selection_hash": {
            "title": "Selection Hash",
            "type": "string"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/WarningMessage"
            },
            "title": "Warnings",
            "type": "array"
          },
          "work": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                },
                {
                  "type": "string"
                }
              ]
            },
            "title": "Work",
            "type": "object"
          }
        },
        "required": [
          "normalized_selection",
          "selection_hash",
          "execution_tier",
          "work"
        ],
        "title": "SelectionEstimate",
        "type": "object"
      },
      "SelectionResponse": {
        "additionalProperties": true,
        "properties": {
          "counts": {
            "additionalProperties": true,
            "title": "Counts",
            "type": "object"
          },
          "database_release": {
            "title": "Database Release",
            "type": "string"
          },
          "execution_plan": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Execution Plan"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "normalized_selection": {
            "$ref": "#/components/schemas/SelectionDocument"
          },
          "object": {
            "const": "selection",
            "default": "selection",
            "title": "Object",
            "type": "string"
          },
          "request_id": {
            "title": "Request Id",
            "type": "string"
          },
          "results": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Results",
            "type": "array"
          },
          "selection_hash": {
            "title": "Selection Hash",
            "type": "string"
          },
          "status": {
            "enum": [
              "completed",
              "completed_with_warnings"
            ],
            "title": "Status",
            "type": "string"
          },
          "timing_ms": {
            "additionalProperties": {
              "type": "number"
            },
            "title": "Timing Ms",
            "type": "object"
          },
          "warnings": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "id",
          "status",
          "request_id",
          "selection_hash",
          "normalized_selection",
          "database_release"
        ],
        "title": "SelectionResponse",
        "type": "object"
      },
      "SelectionValidation": {
        "properties": {
          "constraint_execution": {
            "items": {
              "$ref": "#/components/schemas/ConstraintExecution"
            },
            "title": "Constraint Execution",
            "type": "array"
          },
          "normalized_selection": {
            "$ref": "#/components/schemas/SelectionDocument"
          },
          "selection_hash": {
            "title": "Selection Hash",
            "type": "string"
          },
          "valid": {
            "title": "Valid",
            "type": "boolean"
          },
          "warnings": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "valid",
          "normalized_selection",
          "selection_hash"
        ],
        "title": "SelectionValidation",
        "type": "object"
      },
      "SimilarityObjective": {
        "additionalProperties": false,
        "properties": {
          "direction": {
            "const": "maximize",
            "default": "maximize",
            "title": "Direction",
            "type": "string"
          },
          "metric_id": {
            "enum": [
              "rdkit.ecfp4_tanimoto",
              "cheese.shape",
              "cheese.electrostatic"
            ],
            "title": "Metric Id",
            "type": "string"
          },
          "reference_id": {
            "pattern": "^[A-Za-z0-9._-]{1,128}$",
            "title": "Reference Id",
            "type": "string"
          },
          "type": {
            "const": "similarity",
            "default": "similarity",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "reference_id",
          "metric_id"
        ],
        "title": "SimilarityObjective",
        "type": "object"
      },
      "Structure": {
        "additionalProperties": false,
        "properties": {
          "format": {
            "$ref": "#/components/schemas/StructureFormat"
          },
          "value": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "format",
          "value"
        ],
        "title": "Structure",
        "type": "object"
      },
      "StructureCondition": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "$ref": "#/components/schemas/CountConstraint"
          },
          "id": {
            "anyOf": [
              {
                "pattern": "^[A-Za-z0-9._-]{1,128}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id"
          },
          "pattern_id": {
            "anyOf": [
              {
                "maxLength": 256,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pattern Id"
          },
          "query": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Structure"
              },
              {
                "type": "null"
              }
            ]
          },
          "relation": {
            "const": "contains",
            "default": "contains",
            "title": "Relation",
            "type": "string"
          },
          "type": {
            "const": "structure",
            "default": "structure",
            "title": "Type",
            "type": "string"
          }
        },
        "title": "StructureCondition",
        "type": "object"
      },
      "StructureConstraints": {
        "additionalProperties": false,
        "properties": {
          "all": {
            "items": {
              "$ref": "#/components/schemas/StructureCondition"
            },
            "maxItems": 16,
            "title": "All",
            "type": "array"
          },
          "any": {
            "$ref": "#/components/schemas/AnyStructureGroup"
          },
          "none": {
            "items": {
              "$ref": "#/components/schemas/StructureCondition"
            },
            "maxItems": 16,
            "title": "None",
            "type": "array"
          }
        },
        "title": "StructureConstraints",
        "type": "object"
      },
      "StructureFormat": {
        "enum": [
          "smiles",
          "smarts"
        ],
        "title": "StructureFormat",
        "type": "string"
      },
      "SubstructureQuery": {
        "additionalProperties": false,
        "properties": {
          "format": {
            "pattern": "^(smiles|smarts)$",
            "title": "Format",
            "type": "string"
          },
          "value": {
            "maxLength": 2048,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "format",
          "value"
        ],
        "title": "SubstructureQuery",
        "type": "object"
      },
      "SubstructureSearchCounts": {
        "properties": {
          "duplicate_products": {
            "default": 0,
            "title": "Duplicate Products",
            "type": "integer"
          },
          "exact_mismatches": {
            "default": 0,
            "title": "Exact Mismatches",
            "type": "integer"
          },
          "invalid": {
            "default": 0,
            "title": "Invalid",
            "type": "integer"
          },
          "native_candidates": {
            "default": 0,
            "title": "Native Candidates",
            "type": "integer"
          },
          "returned": {
            "default": 0,
            "title": "Returned",
            "type": "integer"
          }
        },
        "title": "SubstructureSearchCounts",
        "type": "object"
      },
      "SubstructureSearchHit": {
        "properties": {
          "matched_atom_indices": {
            "items": {
              "type": "integer"
            },
            "title": "Matched Atom Indices",
            "type": "array"
          },
          "matched_bond_indices": {
            "items": {
              "type": "integer"
            },
            "title": "Matched Bond Indices",
            "type": "array"
          },
          "price": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price"
          },
          "product_id": {
            "title": "Product Id",
            "type": "string"
          },
          "rank": {
            "title": "Rank",
            "type": "integer"
          },
          "reaction_id": {
            "title": "Reaction Id",
            "type": "string"
          },
          "smiles": {
            "title": "Smiles",
            "type": "string"
          },
          "synthons": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/SynthonProvenance"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Synthons"
          }
        },
        "required": [
          "rank",
          "smiles",
          "product_id",
          "reaction_id",
          "matched_atom_indices",
          "matched_bond_indices"
        ],
        "title": "SubstructureSearchHit",
        "type": "object"
      },
      "SubstructureSearchRequest": {
        "additionalProperties": false,
        "description": "Exact positive substructure search over assembled products.",
        "properties": {
          "database_id": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Database Id",
            "type": "string"
          },
          "include_synthons": {
            "default": false,
            "title": "Include Synthons",
            "type": "boolean"
          },
          "limit": {
            "default": 100,
            "maximum": 200.0,
            "minimum": 1.0,
            "title": "Limit",
            "type": "integer"
          },
          "query": {
            "$ref": "#/components/schemas/SubstructureQuery"
          },
          "timeout_seconds": {
            "default": 50,
            "maximum": 120.0,
            "minimum": 1.0,
            "title": "Timeout Seconds",
            "type": "integer"
          }
        },
        "required": [
          "query",
          "database_id"
        ],
        "title": "SubstructureSearchRequest",
        "type": "object"
      },
      "SubstructureSearchResponse": {
        "properties": {
          "available_products": {
            "title": "Available Products",
            "type": "integer"
          },
          "available_reactions": {
            "title": "Available Reactions",
            "type": "integer"
          },
          "counts": {
            "$ref": "#/components/schemas/SubstructureSearchCounts"
          },
          "coverage_fraction": {
            "title": "Coverage Fraction",
            "type": "number"
          },
          "database_id": {
            "title": "Database Id",
            "type": "string"
          },
          "database_release": {
            "title": "Database Release",
            "type": "string"
          },
          "engine_version": {
            "title": "Engine Version",
            "type": "string"
          },
          "indexed_products": {
            "title": "Indexed Products",
            "type": "integer"
          },
          "indexed_reactions": {
            "title": "Indexed Reactions",
            "type": "integer"
          },
          "metric": {
            "default": "exact assembled-product substructure",
            "title": "Metric",
            "type": "string"
          },
          "query": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SubstructureQuery"
              },
              {
                "type": "null"
              }
            ]
          },
          "query_smiles": {
            "title": "Query Smiles",
            "type": "string"
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/SubstructureSearchHit"
            },
            "title": "Results",
            "type": "array"
          },
          "timed_out": {
            "title": "Timed Out",
            "type": "boolean"
          },
          "timing_ms": {
            "$ref": "#/components/schemas/SearchTimings"
          },
          "warnings": {
            "items": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "title": "Warnings",
            "type": "array"
          }
        },
        "required": [
          "query_smiles",
          "database_id",
          "database_release",
          "engine_version",
          "results",
          "counts",
          "timing_ms",
          "indexed_reactions",
          "available_reactions",
          "indexed_products",
          "available_products",
          "coverage_fraction",
          "timed_out"
        ],
        "title": "SubstructureSearchResponse",
        "type": "object"
      },
      "SynthonProvenance": {
        "properties": {
          "slot": {
            "title": "Slot",
            "type": "integer"
          },
          "smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Smiles"
          },
          "synthon_id": {
            "title": "Synthon Id",
            "type": "string"
          }
        },
        "required": [
          "slot",
          "synthon_id"
        ],
        "title": "SynthonProvenance",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WarningMessage": {
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "WarningMessage",
        "type": "object"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "in": "header",
        "name": "x-api-key",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "contact": {
      "name": "DeepMedChem",
      "url": "https://docs.deepmedchem.com/"
    },
    "description": "Use the default search for ECFP4/Tanimoto neighbors, CHEESE search for shape or electrostatic reranking, substructure search for exact matching, and selections for composable scientific intent.",
    "summary": "Versioned chemical-space search and molecule selection API.",
    "title": "DeepMedChem CHEESE API",
    "version": "0.2.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v2/catalog": {
      "get": {
        "operationId": "listChemicalSpaces",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Listchemicalspaces",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Catalog",
        "tags": [
          "Catalog"
        ]
      }
    },
    "/api/v2/runs": {
      "get": {
        "operationId": "listRuns",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status_filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter"
            }
          },
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Runs",
        "tags": [
          "Runs"
        ]
      },
      "post": {
        "operationId": "createRun",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 256,
                  "minLength": 1,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          },
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunSpecification"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunResource"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Create Run",
        "tags": [
          "Runs"
        ]
      }
    },
    "/api/v2/runs/{run_id}": {
      "get": {
        "operationId": "retrieveRun",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-None-Match"
            }
          },
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunResource"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Retrieve Run",
        "tags": [
          "Runs"
        ]
      }
    },
    "/api/v2/runs/{run_id}/events": {
      "get": {
        "operationId": "listRunEvents",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": 0,
              "title": "After",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 200,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Run Events",
        "tags": [
          "Runs"
        ]
      }
    },
    "/api/v2/runs/{run_id}/items": {
      "get": {
        "operationId": "listRunItems",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status_filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter"
            }
          },
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Run Items",
        "tags": [
          "Runs"
        ]
      }
    },
    "/api/v2/runs/{run_id}/items/{item_id}": {
      "get": {
        "operationId": "retrieveRunItem",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "item_id",
            "required": true,
            "schema": {
              "title": "Item Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunItemResource"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Retrieve Run Item",
        "tags": [
          "Runs"
        ]
      }
    },
    "/api/v2/runs/{run_id}/results": {
      "get": {
        "operationId": "listRunResults",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "default": "completion",
              "title": "Order",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "List Run Results",
        "tags": [
          "Runs"
        ]
      }
    },
    "/api/v2/runs/{run_id}:cancel": {
      "post": {
        "operationId": "cancelRun",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "title": "Run Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunResource"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Cancel Run",
        "tags": [
          "Runs"
        ]
      }
    },
    "/api/v2/runs:estimate": {
      "post": {
        "operationId": "estimateRun",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunSpecification"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Estimaterun",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Estimate Run",
        "tags": [
          "Runs"
        ]
      }
    },
    "/api/v2/sample": {
      "post": {
        "operationId": "sampleMolecules",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SampleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SampleResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Sample molecules from one chemical space",
        "tags": [
          "Sampling"
        ]
      }
    },
    "/api/v2/search": {
      "post": {
        "operationId": "searchSynthonOR",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DefaultSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Find ECFP4/Tanimoto neighbors",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v2/search_cheese": {
      "post": {
        "operationId": "searchCheese",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheeseSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Rerank candidates by CHEESE shape or electrostatic similarity",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v2/search_substructure": {
      "post": {
        "operationId": "searchSubstructure",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubstructureSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubstructureSearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Find exact assembled-product substructure matches",
        "tags": [
          "Search"
        ]
      }
    },
    "/api/v2/selections": {
      "post": {
        "operationId": "createSelection",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectionDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelectionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Create Selection",
        "tags": [
          "Selections"
        ]
      }
    },
    "/api/v2/selections:estimate": {
      "post": {
        "operationId": "estimateSelection",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectionDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelectionEstimate"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Estimate Selection",
        "tags": [
          "Selections"
        ]
      }
    },
    "/api/v2/selections:validate": {
      "post": {
        "operationId": "validateSelection",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SelectionDocument"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SelectionValidation"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Validate Selection",
        "tags": [
          "Selections"
        ]
      }
    },
    "/api/v2/substructure": {
      "post": {
        "deprecated": true,
        "operationId": "searchSubstructureLegacy",
        "parameters": [
          {
            "in": "header",
            "name": "x-dmc-client",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Dmc-Client"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegacySubstructureRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubstructureSearchResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "summary": "Legacy Substructure Search",
        "tags": [
          "Deprecated"
        ]
      }
    },
    "/health/live": {
      "get": {
        "operationId": "getLiveness",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Getliveness",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Live",
        "tags": [
          "Operations"
        ]
      }
    },
    "/health/ready": {
      "get": {
        "operationId": "getReadiness",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Getreadiness",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "summary": "Ready",
        "tags": [
          "Operations"
        ]
      }
    }
  }
}
legacy OpenAPI contract
{
  "openapi": "3.0.2",
  "info": {
    "title": "Legacy CHEESE API",
    "description": "Reference for the legacy hosted CHEESE API. New integrations should use CHEESE API v2; these routes remain available for existing integrations during the migration/support window.",
    "contact": {
      "name": "DeepMedchem",
      "url": "https://deepmedchem.com/",
      "email": "info@deepmedchem.com"
    },
    "version": "0.0.1"
  },
  "paths": {
    "/rate-limit/status": {
      "get": {
        "tags": [
          "General"
        ],
        "summary": "Get Rate Limit Status",
        "description": "Return current user's API usage/remaining requests in active window.",
        "operationId": "get_rate_limit_status_rate_limit_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/random_molecule": {
      "get": {
        "tags": [
          "Searching with CHEESE"
        ],
        "summary": "Get Random Molecules",
        "description": "Get random molecule(s) from any available database.\n\nThis endpoint returns a specified number of random molecules in SMILES format from a random selection of databases.\n\nParameters:\n- n_mols (int): The number of random molecules to retrieve (default is 1).\n\nReturns:\n- A list of SMILES strings representing the random molecules.",
        "operationId": "get_random_molecules_random_molecule_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "N Mols",
              "default": 1
            },
            "name": "n_mols",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/rate_limit_status": {
      "get": {
        "tags": [
          "Testing and Health Checks"
        ],
        "summary": "Get Rate Limit Status",
        "description": "Return current per-user daily API usage and remaining request budget.\n\nResponse fields:\n- limit: maximum requests/day for account tier\n- used: requests already consumed today\n- remaining: requests left today\n- reset_at: ISO timestamp for next UTC reset\n- seconds_to_reset: seconds until reset\n- account_type: resolved user account tier",
        "operationId": "get_rate_limit_status_rate_limit_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/available_databases": {
      "get": {
        "tags": [
          "Searching with CHEESE"
        ],
        "summary": "Get Available Dbs Info",
        "description": "Get all databases available for similarity search.\n\nThis endpoint returns a list of all databases that can be used for molecule searches.\n\nReturns:\n- A dictionary containing the list of available databases with some of their details (vendor, vendor webpage, number of molecules, quotation email).",
        "operationId": "get_available_dbs_info_available_databases_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/molsearch_simple": {
      "get": {
        "tags": [
          "Searching with CHEESE"
        ],
        "summary": "Search One Molecule Simple",
        "description": "Search by a single molecule based on various criteria.\n\nThis endpoint allows users to search by a molecule while choosing from several search types and additinal search parameters. \nMultiple databases can be specified for the search.\n\nLimitations:\n- this endpoint is limited to retrieve 100 molecules. For more use the /jobs endpoints.\n- this endpoint allows you to use max two databases. For more use the /jobs endpoints.\n\nParameters:\n- search_input (str): The input molecule to search for (default is \"CC(=O)Oc1ccccc1C(=O)O\").\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- search_quality (SearchQuality): The quality of the search (default is \"fast\").\n- db_names (List[DatabaseEnum]): The databases to use for the search.\n- n_neighbors (int): The number of neighbors to consider (default is 30).\n\nReturns:\n- A dictionary with list of retrieved molecules, list of molecule ids, and list of origin DBs for each molecule.",
        "operationId": "search_one_molecule_simple_molsearch_simple_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "string",
              "default": "CC(=O)Oc1ccccc1C(=O)O"
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "description": "The type of search to perform",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SearchTypes"
              },
              "description": "The type of search to perform",
              "default": [
                "espsim_shape"
              ]
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Speed/Accuracy Tradeoff",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchQuality"
                }
              ],
              "description": "Speed/Accuracy Tradeoff",
              "default": "fast"
            },
            "name": "search_quality",
            "in": "query"
          },
          {
            "description": "Selected Databases",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/DatabaseEnumAll"
              },
              "description": "Selected Databases",
              "default": [
                "CHEMINFINITA-SYNTHON"
              ]
            },
            "name": "db_names",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "N Neighbors",
              "type": "integer",
              "default": 30
            },
            "name": "n_neighbors",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/molsearch": {
      "get": {
        "tags": [
          "Searching with CHEESE"
        ],
        "summary": "Search One Molecule",
        "description": "Search by a single molecule based on various criteria.\n\nThis endpoint allows users to search by a single molecule while choosing from several search types and additinal search parameters. . \nMultiple databases can be specified for the search. \n\nLimitations:\n- this endpoint is limited to retrieve 100 molecules. For more use the /jobs endpoints.\n- this endpoint allows you to use max two databases. For more use the /jobs endpoints.\n\nParameters:\n- search_input (str): The input molecule to search for (default is \"CC(=O)Oc1ccccc1C(=O)O\").\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- search_quality (SearchQuality): The quality of the search (default is \"fast\").\n- db_names (List[DatabaseEnum]): The databases to use for the search.\n- n_neighbors (int): The number of neighbors to consider (default is 30).\n- descriptors (bool): Whether to include molecular descriptors in the results (default is True).\n- properties (bool): Whether to include molecular properties in the results (default is True).\n- filter_molecules (bool): Whether to filter molecules based on specific criteria (default is False).\n- order_molecules (bool): Whether to order molecules based on specific criteria (default is False).\n- filtering (FilteringEnum): Filters such as Lipinsky, QED, PAINS, Substructure, Superstructure... (default is No Solvents filter)\n- ordering (OrderingEnum): Orderings such as Similarity, Morgan Tanimoto, Shapesim Dissimilarity, Espsim Dissimilarity... (defailt is Similarity)\n\nReturns:\n- A dictionary with list of retrieved molecules, list of molecule ids, and list of origin DBs for each molecule.",
        "operationId": "search_one_molecule_molsearch_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "string",
              "default": "CC(=O)Oc1ccccc1C(=O)O"
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "description": "The type of search to perform",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/SearchTypes"
              },
              "description": "The type of search to perform",
              "default": [
                "espsim_shape"
              ]
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Speed/Accuracy Tradeoff",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchQuality"
                }
              ],
              "description": "Speed/Accuracy Tradeoff",
              "default": "fast"
            },
            "name": "search_quality",
            "in": "query"
          },
          {
            "description": "Selected Databases",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/DatabaseEnumAll"
              },
              "description": "Selected Databases",
              "default": [
                "CHEMINFINITA-SYNTHON"
              ]
            },
            "name": "db_names",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "N Neighbors",
              "type": "integer",
              "default": 30
            },
            "name": "n_neighbors",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Descriptors",
              "type": "boolean",
              "default": true
            },
            "name": "descriptors",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Properties",
              "type": "boolean",
              "default": true
            },
            "name": "properties",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Filter Molecules",
              "type": "boolean",
              "default": false
            },
            "name": "filter_molecules",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Order Molecules",
              "type": "boolean",
              "default": true
            },
            "name": "order_molecules",
            "in": "query"
          },
          {
            "description": "Selected Filters",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/FilteringEnum"
              },
              "description": "Selected Filters",
              "default": [
                "No solvents"
              ]
            },
            "name": "filtering",
            "in": "query"
          },
          {
            "description": "Selected Ordering",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/OrderingEnum"
              },
              "description": "Selected Ordering",
              "default": [
                "Similarity"
              ]
            },
            "name": "ordering",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/molsearch_array": {
      "get": {
        "tags": [
          "Searching with CHEESE"
        ],
        "summary": "Search Array",
        "description": "Search by an array of molecules based on multiple criteria. \n\nThis endpoint allows users to search by multiple molecules while choosing from several search types and additinal search parameters.  \nMultiple databases can be specified for the search.\n\nParameters:\n- search_type (str): The type of search to perform.\n- n_neighbors (int): The number of neighbors to consider.\n- search_quality (str): The quality of the search.\n- search_input (List[str]): The input molecules to search for.\n- db_names (List[str]): The databases to use for the search.\n- descriptors (bool): Whether to include molecular descriptors in the results (default is False).\n- properties (bool): Whether to include molecular properties in the results (default is False).\n- filter_molecules (bool): Whether to filter molecules based on specific criteria (default is False).\n- filename (str): The name of the file to save the search results (default is \"search_results\").\n\nReturns:\n- A dictionary with the search results and search metadata.",
        "operationId": "search_array_molsearch_array_get",
        "parameters": [
          {
            "description": "The type of search to perform",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchTypes"
                }
              ],
              "description": "The type of search to perform",
              "default": "espsim_shape"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "N Neighbors",
              "type": "integer",
              "default": 30
            },
            "name": "n_neighbors",
            "in": "query"
          },
          {
            "description": "Speed/Accuracy Tradeoff",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchQuality"
                }
              ],
              "description": "Speed/Accuracy Tradeoff",
              "default": "fast"
            },
            "name": "search_quality",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "CC(=O)Oc1ccccc1C(=O)O",
                "CC(=O)Oc1ccccc1C(N)=O",
                "CC(=O)Nc1ccccc1C(=O)O"
              ]
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "description": "Selected Databases",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/DatabaseEnumAll"
              },
              "description": "Selected Databases",
              "default": [
                "CHEMINFINITA-SYNTHON"
              ]
            },
            "name": "db_names",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Descriptors",
              "type": "boolean",
              "default": false
            },
            "name": "descriptors",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Properties",
              "type": "boolean",
              "default": false
            },
            "name": "properties",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Filter Molecules",
              "type": "boolean",
              "default": false
            },
            "name": "filter_molecules",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Filename",
              "type": "string",
              "default": "search_results"
            },
            "name": "filename",
            "in": "query"
          },
          {
            "description": "Override the Accept header. 'json' or 'csv'.",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ResponseFormat"
                }
              ],
              "description": "Override the Accept header. 'json' or 'csv'."
            },
            "name": "format",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/submit_molsearch": {
      "get": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "Search One Molecule Job",
        "description": "Submit a job to search by a single molecule using various criteria.\n\nParameters:\n- search_input (str): The input molecule to search for (default is \"CC(=O)Oc1ccccc1C(=O)O\")\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\")\n- db_names (List[DatabaseEnum]): The databases to use for the search\n- n_neighbors (int): The number of neighbors to consider (maximum is 100K)\n\nReturns:\n- A dictionary containing the search input, search type, number of neighbors, search quality, and databases used.",
        "operationId": "search_one_molecule_job_submit_molsearch_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "string",
              "default": "CC(=O)Oc1ccccc1C(=O)O"
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "description": "The type of search to perform",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchTypes"
                }
              ],
              "description": "The type of search to perform",
              "default": "espsim_shape"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Speed/Accuracy Tradeoff",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchQuality"
                }
              ],
              "description": "Speed/Accuracy Tradeoff",
              "default": "fast"
            },
            "name": "search_quality",
            "in": "query"
          },
          {
            "description": "Selected Databases",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/DatabaseEnumAll"
              },
              "description": "Selected Databases",
              "default": [
                "CHEMINFINITA-SYNTHON"
              ]
            },
            "name": "db_names",
            "in": "query"
          },
          {
            "description": "The number of neighbors to consider (maximum is 100K)",
            "required": false,
            "schema": {
              "title": "N Neighbors",
              "type": "integer",
              "description": "The number of neighbors to consider (maximum is 100K)",
              "default": 100000
            },
            "name": "n_neighbors",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Include Properties",
              "type": "boolean",
              "default": false
            },
            "name": "include_properties",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/synthongpt_smarts_patterns": {
      "get": {
        "tags": [
          "SynthonGPT"
        ],
        "summary": "Get Synthongpt Smarts Patterns Endpoint",
        "operationId": "get_synthongpt_smarts_patterns_endpoint_synthongpt_smarts_patterns_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/submit_synthongpt_job": {
      "post": {
        "tags": [
          "SynthonGPT",
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "Submit Synthon Job",
        "operationId": "submit_synthon_job_submit_synthongpt_job_post",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "string",
              "default": "CC(=O)Oc1ccccc1C(=O)O"
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "description": "Selected SynthonGPT database. Canonical names stay exposed; legacy CHEMSPACE-FREEDOM-142B is still accepted.",
            "required": false,
            "schema": {
              "title": "Db Name",
              "type": "string",
              "description": "Selected SynthonGPT database. Canonical names stay exposed; legacy CHEMSPACE-FREEDOM-142B is still accepted.",
              "default": "CHEMSPACE-FREEDOM-SYNTHON"
            },
            "name": "db_name",
            "in": "query"
          },
          {
            "description": "Fast synthon search (100 results)",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchQuality"
                }
              ],
              "description": "Fast synthon search (100 results)",
              "default": "100"
            },
            "name": "search_quality",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Include Properties",
              "type": "boolean",
              "default": true
            },
            "name": "include_properties",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Include Metadata",
              "type": "boolean",
              "default": false
            },
            "name": "include_metadata",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Include Synthons",
              "type": "boolean",
              "default": false
            },
            "name": "include_synthons",
            "in": "query"
          },
          {
            "description": "shape|esp|morgan",
            "required": false,
            "schema": {
              "title": "Synthon Scorer",
              "type": "string",
              "description": "shape|esp|morgan",
              "default": "shape"
            },
            "name": "synthon_scorer",
            "in": "query"
          },
          {
            "description": "similarity|substructure|superstructure",
            "required": false,
            "schema": {
              "title": "Search Mode",
              "type": "string",
              "description": "similarity|substructure|superstructure",
              "default": "similarity"
            },
            "name": "search_mode",
            "in": "query"
          },
          {
            "description": "fuzzy|exact",
            "required": false,
            "schema": {
              "title": "Structure Match Mode",
              "type": "string",
              "description": "fuzzy|exact",
              "default": "fuzzy"
            },
            "name": "structure_match_mode",
            "in": "query"
          },
          {
            "description": "Optional predefined SMARTS pattern id",
            "required": false,
            "schema": {
              "title": "Smarts Prefilter Pattern Id",
              "type": "string",
              "description": "Optional predefined SMARTS pattern id",
              "default": ""
            },
            "name": "smarts_prefilter_pattern_id",
            "in": "query"
          },
          {
            "description": "Optional predefined SMARTS pattern label",
            "required": false,
            "schema": {
              "title": "Smarts Prefilter Pattern Label",
              "type": "string",
              "description": "Optional predefined SMARTS pattern label",
              "default": ""
            },
            "name": "smarts_prefilter_pattern_label",
            "in": "query"
          },
          {
            "description": "Optional predefined SMARTS pattern SMARTS",
            "required": false,
            "schema": {
              "title": "Smarts Prefilter Pattern Smarts",
              "type": "string",
              "description": "Optional predefined SMARTS pattern SMARTS",
              "default": ""
            },
            "name": "smarts_prefilter_pattern_smarts",
            "in": "query"
          },
          {
            "description": "include|exclude",
            "required": false,
            "schema": {
              "title": "Smarts Prefilter Mode",
              "type": "string",
              "description": "include|exclude",
              "default": "include"
            },
            "name": "smarts_prefilter_mode",
            "in": "query"
          },
          {
            "description": "exact_sss",
            "required": false,
            "schema": {
              "title": "Synthon Search Backend",
              "type": "string",
              "description": "exact_sss",
              "default": "exact_sss"
            },
            "name": "synthon_search_backend",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Sample Size",
              "type": "integer",
              "default": 100
            },
            "name": "sample_size",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Payload",
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/get_molsearch_page": {
      "post": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "Paging Props",
        "operationId": "paging_props_get_molsearch_page_post",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Job Name",
              "type": "string",
              "default": "XXX"
            },
            "name": "job_name",
            "in": "query"
          },
          {
            "description": "Selected Database",
            "required": false,
            "schema": {
              "title": "Db Name",
              "type": "string",
              "description": "Selected Database",
              "default": "CHEMINFINITA-SYNTHON"
            },
            "name": "db_name",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Page Size",
              "type": "integer",
              "default": 30
            },
            "name": "page_size",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Page Num",
              "type": "integer",
              "default": 1
            },
            "name": "page_num",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Include Properties",
              "type": "boolean",
              "default": false
            },
            "name": "include_properties",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Include Synthons",
              "type": "boolean",
              "default": false
            },
            "name": "include_synthons",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Sim Th",
              "type": "number",
              "default": 0
            },
            "name": "sim_th",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "D Min",
              "type": "number",
              "default": 0
            },
            "name": "d_min",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "D Max",
              "type": "number",
              "default": 1
            },
            "name": "d_max",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Data",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AnyDictModel"
                  }
                ],
                "default": {
                  "prop_ranges": {
                    "caco2_wang": {
                      "min": -100000,
                      "max": 100000
                    },
                    "clearance_hepatocyte_az": {
                      "min": -100000,
                      "max": 100000
                    },
                    "clearance_microsome_az": {
                      "min": -100000,
                      "max": 100000
                    },
                    "half_life_obach": {
                      "min": -100000,
                      "max": 100000
                    },
                    "ld50_zhu": {
                      "min": -100000,
                      "max": 100000
                    },
                    "lipophilicity_astrazeneca": {
                      "min": -100000,
                      "max": 100000
                    },
                    "ppbr_az": {
                      "min": -100000,
                      "max": 100000
                    },
                    "solubility_aqsoldb": {
                      "min": -100000,
                      "max": 100000
                    },
                    "vdss_lombardo": {
                      "min": -100000,
                      "max": 100000
                    },
                    "ames": {
                      "min": -100000,
                      "max": 100000
                    },
                    "bbb_martins": {
                      "min": -100000,
                      "max": 100000
                    },
                    "bioavailability_ma": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp2c9_substrate_carbonmangels": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp2c9_veith": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp2d6_substrate_carbonmangels": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp2d6_veith": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp3a4_substrate_carbonmangels": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp3a4_veith": {
                      "min": -100000,
                      "max": 100000
                    },
                    "dili": {
                      "min": -100000,
                      "max": 100000
                    },
                    "herg": {
                      "min": -100000,
                      "max": 100000
                    },
                    "hia_hou": {
                      "min": -100000,
                      "max": 100000
                    },
                    "pgp_broccatelli": {
                      "min": -100000,
                      "max": 100000
                    },
                    "molecular_weight": {
                      "min": -100000,
                      "max": 100000
                    },
                    "formal_charge": {
                      "min": -100000,
                      "max": 100000
                    },
                    "clogp": {
                      "min": -100000,
                      "max": 100000
                    },
                    "heavy_atoms": {
                      "min": -100000,
                      "max": 100000
                    },
                    "h_bond_acceptors": {
                      "min": -100000,
                      "max": 100000
                    },
                    "h_bond_donor": {
                      "min": -100000,
                      "max": 100000
                    },
                    "rotatable_bonds": {
                      "min": -100000,
                      "max": 100000
                    },
                    "num_of_rings": {
                      "min": -100000,
                      "max": 100000
                    },
                    "molar_refractivity": {
                      "min": -100000,
                      "max": 100000
                    },
                    "number_of_atoms": {
                      "min": -100000,
                      "max": 100000
                    },
                    "topological_surface_area_mapping": {
                      "min": -100000,
                      "max": 100000
                    }
                  },
                  "neighbor_ids": []
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/get_download_link": {
      "get": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "Download Link",
        "description": "Getting the download link for a search job\n\nParameters:\n- job_name (str): The job ID\n- file format (str) : The response file format : csv, json, xlsx, sdf\n\nReturns:\n- The status of the download link generation",
        "operationId": "download_link_get_download_link_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Job Name",
              "type": "string",
              "default": "XXX"
            },
            "name": "job_name",
            "in": "query"
          },
          {
            "description": "Selected Databases",
            "required": false,
            "schema": {
              "title": "Db Name",
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Selected Databases",
              "default": [
                "CHEMINFINITA-SYNTHON"
              ]
            },
            "name": "db_name",
            "in": "query"
          },
          {
            "description": "File formats",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/FileFormat"
              },
              "description": "File formats",
              "default": [
                "csv"
              ]
            },
            "name": "file_format",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/get_sim_histograms": {
      "get": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "Get Histograms",
        "operationId": "get_histograms_get_sim_histograms_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Job Name",
              "type": "string",
              "default": "XXX"
            },
            "name": "job_name",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "N Bins",
              "type": "integer",
              "default": 20
            },
            "name": "n_bins",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/get_prop_histograms": {
      "get": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "Get Prop Histograms",
        "operationId": "get_prop_histograms_get_prop_histograms_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Job Name",
              "type": "string",
              "default": "XXX"
            },
            "name": "job_name",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "N Bins",
              "type": "integer",
              "default": 20
            },
            "name": "n_bins",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/prepare_download": {
      "post": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "Download Link",
        "description": "Getting the download link for a search job\n\nParameters:\n- job_name (str): The job ID\n- file format (str) : The response file format : csv, json, xlsx, sdf\n\nReturns:\n- The status of the download link generation",
        "operationId": "download_link_prepare_download_post",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Job Name",
              "type": "string",
              "default": "XXX"
            },
            "name": "job_name",
            "in": "query"
          },
          {
            "description": "Selected Databases",
            "required": false,
            "schema": {
              "title": "Db Name",
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Selected Databases",
              "default": [
                "CHEMINFINITA-SYNTHON"
              ]
            },
            "name": "db_name",
            "in": "query"
          },
          {
            "description": "File formats",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/FileFormat"
              },
              "description": "File formats",
              "default": [
                "csv"
              ]
            },
            "name": "file_format",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Include Properties",
              "type": "boolean",
              "default": false
            },
            "name": "include_properties",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Include Metadata",
              "type": "boolean",
              "default": false
            },
            "name": "include_metadata",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Sim Th",
              "type": "number",
              "default": 0
            },
            "name": "sim_th",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "title": "Data",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AnyDictModel"
                  }
                ],
                "default": {
                  "prop_ranges": {
                    "caco2_wang": {
                      "min": -100000,
                      "max": 100000
                    },
                    "clearance_hepatocyte_az": {
                      "min": -100000,
                      "max": 100000
                    },
                    "clearance_microsome_az": {
                      "min": -100000,
                      "max": 100000
                    },
                    "half_life_obach": {
                      "min": -100000,
                      "max": 100000
                    },
                    "ld50_zhu": {
                      "min": -100000,
                      "max": 100000
                    },
                    "lipophilicity_astrazeneca": {
                      "min": -100000,
                      "max": 100000
                    },
                    "ppbr_az": {
                      "min": -100000,
                      "max": 100000
                    },
                    "solubility_aqsoldb": {
                      "min": -100000,
                      "max": 100000
                    },
                    "vdss_lombardo": {
                      "min": -100000,
                      "max": 100000
                    },
                    "ames": {
                      "min": -100000,
                      "max": 100000
                    },
                    "bbb_martins": {
                      "min": -100000,
                      "max": 100000
                    },
                    "bioavailability_ma": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp2c9_substrate_carbonmangels": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp2c9_veith": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp2d6_substrate_carbonmangels": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp2d6_veith": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp3a4_substrate_carbonmangels": {
                      "min": -100000,
                      "max": 100000
                    },
                    "cyp3a4_veith": {
                      "min": -100000,
                      "max": 100000
                    },
                    "dili": {
                      "min": -100000,
                      "max": 100000
                    },
                    "herg": {
                      "min": -100000,
                      "max": 100000
                    },
                    "hia_hou": {
                      "min": -100000,
                      "max": 100000
                    },
                    "pgp_broccatelli": {
                      "min": -100000,
                      "max": 100000
                    },
                    "molecular_weight": {
                      "min": -100000,
                      "max": 100000
                    },
                    "formal_charge": {
                      "min": -100000,
                      "max": 100000
                    },
                    "clogp": {
                      "min": -100000,
                      "max": 100000
                    },
                    "heavy_atoms": {
                      "min": -100000,
                      "max": 100000
                    },
                    "h_bond_acceptors": {
                      "min": -100000,
                      "max": 100000
                    },
                    "h_bond_donor": {
                      "min": -100000,
                      "max": 100000
                    },
                    "rotatable_bonds": {
                      "min": -100000,
                      "max": 100000
                    },
                    "num_of_rings": {
                      "min": -100000,
                      "max": 100000
                    },
                    "molar_refractivity": {
                      "min": -100000,
                      "max": 100000
                    },
                    "number_of_atoms": {
                      "min": -100000,
                      "max": 100000
                    },
                    "topological_surface_area_mapping": {
                      "min": -100000,
                      "max": 100000
                    }
                  },
                  "neighbor_ids": []
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/job_status": {
      "get": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "Job Status",
        "operationId": "job_status_job_status_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Job Name",
              "type": "string",
              "default": ""
            },
            "name": "job_name",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/job_info": {
      "get": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "Job Info",
        "operationId": "job_info_job_info_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Job Name",
              "type": "string",
              "default": ""
            },
            "name": "job_name",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/user_jobs": {
      "get": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "User Jobs",
        "operationId": "user_jobs_user_jobs_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/user_downloads": {
      "get": {
        "tags": [
          "CHEESE Jobs (for registered users only)"
        ],
        "summary": "User Downloads",
        "operationId": "user_downloads_user_downloads_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/predict": {
      "get": {
        "tags": [
          "Predict Properties"
        ],
        "summary": "Predict",
        "description": "Predict properties for a single molecule.\n\nThis endpoint allows users to predict various properties and descriptors for a given molecule.\n\nParameters:\n- search_input (str): The input molecule in SMILES format.\n- descriptors (bool): Whether to include molecular descriptors in the results (default is True).\n- properties (bool): Whether to include molecular properties in the results (default is False).\n\nReturns:\n- A JSON response containing the predicted properties and descriptors.",
        "operationId": "predict_predict_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "string",
              "default": "CC(=O)Oc1ccccc1C(=O)O"
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Descriptors",
              "type": "boolean",
              "default": true
            },
            "name": "descriptors",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Properties",
              "type": "boolean",
              "default": false
            },
            "name": "properties",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/predict_array": {
      "get": {
        "tags": [
          "Predict Properties"
        ],
        "summary": "Predict Array",
        "description": "Predict properties for an array of molecules.\n\nThis endpoint allows users to predict various properties and descriptors for a list of molecules.\n\nParameters:\n- request (Request): The request object.\n- search_input (List[str]): The input molecules in SMILES format.\n- descriptors (bool): Whether to include molecular descriptors in the results (default is True).\n- properties (bool): Whether to include molecular properties in the results (default is True).\n- filename (str): The name of the file to save the prediction results (default is \"properties_and_descriptors\").\n\nReturns:\n- A JSON response containing the predicted properties and descriptors.",
        "operationId": "predict_array_predict_array_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "CC(=O)Oc1ccccc1C(=O)O",
                "CC(=O)Oc1ccncc1C(=O)O",
                "CC(=O)Oc1cnccc1C(=O)O"
              ]
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Descriptors",
              "type": "boolean",
              "default": true
            },
            "name": "descriptors",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Properties",
              "type": "boolean",
              "default": true
            },
            "name": "properties",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Filename",
              "type": "string",
              "default": "properties_and_descriptors"
            },
            "name": "filename",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Testing and Health Checks"
        ],
        "summary": "Readiness",
        "operationId": "readiness_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/test": {
      "get": {
        "tags": [
          "Testing and Health Checks"
        ],
        "summary": "Health Check",
        "description": "Health check endpoint to verify the status of the API.\n\nThis endpoint can be used to ensure that the API is running and responsive. It returns a simple status message.\n\nReturns:\n- A JSON response with a status message indicating the health of the API.",
        "operationId": "health_check_test_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/batch_search": {
      "get": {
        "tags": [
          "Searching with CHEESE"
        ],
        "summary": "Search Batch",
        "description": "Run a similarity search for multiple query molecules in a single request and use centroid or batch mode to identify the set similar molecules.\n\nBatch search modes are:\n- 'centroid' mode: computes mean embedding (centroid) for the input set of molecules and returns neighbors closest to the centroid\n- 'batch' mode: retrieves similar molecules based on the list of molecules in the query by retrieving N similar molecules for each molecule in the query list   \n\nMultiple databases can be specified for the search.\n\nParameters:\n- search_type (str): The type of search to perform.\n- n_neighbors (int): The number of neighbors to retrieve.\n- search_input (List[str]): The input molecules to search by.\n- db_names (str): The databases to use in the search.\n- search_mode (str): The mode of the batch search (default is \"centroid\", another is \"batch\").\n\nReturns:\n- A dictionary with list of retrieved molecules, list of molecule ids, and list of origin DBs for each molecule.",
        "operationId": "search_batch_batch_search_get",
        "parameters": [
          {
            "description": "The type of search to perform",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EmbNamesNoAll"
                }
              ],
              "description": "The type of search to perform",
              "default": "espsim_shape"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "N Neighbors",
              "type": "integer",
              "default": 30
            },
            "name": "n_neighbors",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "CC(=O)Oc1ccccc1C(=O)O",
                "CC(=O)Oc1ccccc1C(N)=O",
                "CC(=O)Nc1ccccc1C(=O)O"
              ]
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "description": "Selected Databases",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/DatabaseEnumAll"
              },
              "description": "Selected Databases",
              "default": [
                "CHEMINFINITA-SYNTHON"
              ]
            },
            "name": "db_names",
            "in": "query"
          },
          {
            "description": "The type of batch search to perform",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchModes"
                }
              ],
              "description": "The type of batch search to perform",
              "default": "centroid"
            },
            "name": "search_mode",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/embeddings": {
      "get": {
        "tags": [
          "Computing Embeddings (for on-prem users only)"
        ],
        "summary": "Embeddings",
        "description": "Get embeddings for a list of molecules.\n\nThis endpoint allows users to get embeddings for a list of molecules.\n\nParameters:\n- search_input (List[str]): The input molecules to get embeddings for.\n- search_type (List[str]): The type of embeddings to calculate.\n- save_embs (bool): Whether to save embeddings (default is False)\n- dest (str): Destination path to save the embeddings (default is /tmp/embeddings).\n\nReturns:\n- A JSON response containing the embeddings for the input molecules.",
        "operationId": "embeddings_embeddings_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "CC(=O)Oc1ccccc1C(=O)O",
                "CC(=O)Oc1ccccc1C(N)=O",
                "CC(=O)Nc1ccccc1C(=O)O"
              ]
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "description": "Type of embeddings to calculate",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EmbNames"
                }
              ],
              "description": "Type of embeddings to calculate",
              "default": "all"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Whether to save embeddings",
            "required": false,
            "schema": {
              "title": "Save Embs",
              "type": "boolean",
              "description": "Whether to save embeddings",
              "default": true
            },
            "name": "save_embs",
            "in": "query"
          },
          {
            "description": "Destination path",
            "required": false,
            "schema": {
              "title": "Dest",
              "type": "string",
              "description": "Destination path",
              "default": "/tmp/embeddings"
            },
            "name": "dest",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/centroid_embeddings": {
      "get": {
        "tags": [
          "Computing Embeddings (for on-prem users only)"
        ],
        "summary": "Centroid Embeddings",
        "description": "Get centroid embeddings for a specified database and search type.\n\nThis endpoint returns the centroid embeddings for a given database and search type.\n\nParameters:\n- db_name (str): The name of the database.\n- search_type (str): The type of search to perform.\n- save_embs (bool): Whether to save centroid embeddings (default is False)\n- dest (str): Destination path to save the centroid embeddings (default is /tmp/embeddings).\n\nReturns:\n- A JSON response containing the centroid embeddings.",
        "operationId": "centroid_embeddings_centroid_embeddings_get",
        "parameters": [
          {
            "description": "Selected Database",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DatabaseEnumAll"
                }
              ],
              "description": "Selected Database",
              "default": "CHEMINFINITA-SYNTHON"
            },
            "name": "db_name",
            "in": "query"
          },
          {
            "description": "The type of centroids to get",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchTypes"
                }
              ],
              "description": "The type of centroids to get",
              "default": "espsim_shape"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Whether to get centroid molecules",
            "required": false,
            "schema": {
              "title": "Centroid Mols",
              "type": "boolean",
              "description": "Whether to get centroid molecules",
              "default": true
            },
            "name": "centroid_mols",
            "in": "query"
          },
          {
            "description": "Whether to save embeddings",
            "required": false,
            "schema": {
              "title": "Save Embs",
              "type": "boolean",
              "description": "Whether to save embeddings",
              "default": true
            },
            "name": "save_embs",
            "in": "query"
          },
          {
            "description": "Whether to compute centroid molecules for custom databases. Please note that depending on the size of Your database, it may take a few hours ! ",
            "required": false,
            "schema": {
              "title": "Compute Centroid Mols",
              "type": "boolean",
              "description": "Whether to compute centroid molecules for custom databases. Please note that depending on the size of Your database, it may take a few hours ! ",
              "default": false
            },
            "name": "compute_centroid_mols",
            "in": "query"
          },
          {
            "description": "Destination path",
            "required": false,
            "schema": {
              "title": "Dest",
              "type": "string",
              "description": "Destination path",
              "default": "/data/embeddings"
            },
            "name": "dest",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/visualise": {
      "get": {
        "tags": [
          "Chemical Space Visualisation (for on-prem users only)"
        ],
        "summary": "Visualise",
        "description": "Get 2D coordinates for a list of molecules.\n\nThis endpoint allows users to get 2D coordinates for a list of molecules.\n\nParameters:\n- search_input (List[str]): The input molecules to get 2D coordinates for.\n- search_type (List[str]): The type of 2D coordinates to calculate.\n- visualisation_method (List[str]): The method (PCA or UMAP) of dimensionality reduction.\n- save_coordinates (bool): Whether to save the visualization coordinates.\n- dest (str): Destination path to save the coordinates (default is /tmp/visualization_coordinates).\n\nReturns:\n- A JSON response containing the 2D coordinates for the input molecules.",
        "operationId": "visualise_visualise_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "CC(=O)Oc1ccccc1C(=O)O",
                "CC(=O)Oc1ccncc1C(=O)O",
                "CC(=O)Oc1cnccc1C(=O)O"
              ]
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "description": "Type of embeddings to calculate",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EmbNamesNoAll"
                }
              ],
              "description": "Type of embeddings to calculate",
              "default": "morgan"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Type of visualisation",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/VisualisationMethods"
                }
              ],
              "description": "Type of visualisation",
              "default": "umap"
            },
            "name": "visualisation_method",
            "in": "query"
          },
          {
            "description": "Whether to save the visualization coordinates",
            "required": false,
            "schema": {
              "title": "Save Coordinates",
              "type": "boolean",
              "description": "Whether to save the visualization coordinates",
              "default": false
            },
            "name": "save_coordinates",
            "in": "query"
          },
          {
            "description": "Destination path",
            "required": false,
            "schema": {
              "title": "Dest",
              "type": "string",
              "description": "Destination path",
              "default": "/tmp/visualization_coordinates"
            },
            "name": "dest",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/similarity": {
      "get": {
        "tags": [
          "Similarity (for on-prem users only)"
        ],
        "summary": "Similarity",
        "description": "Calculate the similarity between two molecules.\n\nThis endpoint allows users to calculate the similarity between two molecules based on their SMILES strings.\n\nParameters:\n- smiles1 (str): The SMILES string of the first molecule.\n- smiles2 (str): The SMILES string of the second molecule.\n- similarity_metric (EmbNames): The model and similarity metric to use for the calculation.\n- distance_type (DistanceType): The type of vector distance to use for the similarity calculation.\n\nReturns:\n- A JSON response containing the similarity score between the two molecules.",
        "operationId": "similarity_similarity_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Smiles1",
              "type": "string",
              "default": "CC(=O)Oc1ccccc1C(=O)O"
            },
            "name": "smiles1",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Smiles2",
              "type": "string",
              "default": "CC(=O)Oc1cnccc1C(=O)O"
            },
            "name": "smiles2",
            "in": "query"
          },
          {
            "description": "CHEESE Model & Similarity Metric",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EmbNames"
                }
              ],
              "description": "CHEESE Model & Similarity Metric",
              "default": "all"
            },
            "name": "similarity_metric",
            "in": "query"
          },
          {
            "description": "Select Vector Distance",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DistanceType"
                }
              ],
              "description": "Select Vector Distance",
              "default": "euclidean"
            },
            "name": "distance_type",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/similarity_matrix": {
      "get": {
        "tags": [
          "Similarity (for on-prem users only)"
        ],
        "summary": "Similarity Matrix",
        "description": "Calculate the similarity matrix between a list of molecules\n\nThis endpoint allows users to calculate the similarity between list of molecules based on their SMILES strings.\n\nParameters:\n- smiles (List[str]): List of smiles.\n- similarity_metric (EmbNames): The model and similarity metric to use for the calculation.\n- distance_type (DistanceType): The type of vector distance to use for the similarity calculation.\n- save_matrix (bool): Whether to save the similarity matrix (default is False)\n- dest (str): Destination path to save the embeddings of the similarity matrix (default is /tmp/sim_matrix.npy , resulting files will have similarity metrics as suffixes !).\n\nReturns:\n- A JSON response containing the similarity scores between the list of molecules.",
        "operationId": "similarity_matrix_similarity_matrix_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Smiles",
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "CC(=O)Oc1ccccc1C(=O)O",
                "CC(=O)Oc1ccncc1C(=O)O",
                "CC(=O)Oc1cnccc1C(=O)O"
              ]
            },
            "name": "smiles",
            "in": "query"
          },
          {
            "description": "CHEESE Model & Similarity Metric",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EmbNames"
                }
              ],
              "description": "CHEESE Model & Similarity Metric",
              "default": "all"
            },
            "name": "similarity_metric",
            "in": "query"
          },
          {
            "description": "Select Vector Distance",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DistanceType"
                }
              ],
              "description": "Select Vector Distance",
              "default": "euclidean"
            },
            "name": "distance_type",
            "in": "query"
          },
          {
            "description": "Whether to save the resulting similarity matrix",
            "required": false,
            "schema": {
              "title": "Save Matrix",
              "type": "boolean",
              "description": "Whether to save the resulting similarity matrix",
              "default": false
            },
            "name": "save_matrix",
            "in": "query"
          },
          {
            "description": "Destination path",
            "required": false,
            "schema": {
              "title": "Dest",
              "type": "string",
              "description": "Destination path",
              "default": "/tmp/sim_matrix.npy"
            },
            "name": "dest",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/molsearch_embedding": {
      "get": {
        "tags": [
          "Advanced (for on-prem users only)"
        ],
        "summary": "Search Embedding",
        "description": "Search for a single molecule based on various criteria.\n\nThis endpoint allows users to search for a molecule embedding using different search types and qualities. \nMultiple databases can be specified for the search.\n\nParameters:\n- query_emb (List[float]): The molecule embedding used as an input to the search (default is the morgan embedding of Aspirin ).\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- search_quality (SearchQuality): The quality of the search (default is \"fast\").\n- db_names (List[DatabaseEnum]): The databases to use for the search.\n- n_neighbors (int): The number of neighbors to consider (default is 30).\n\nReturns:\n- A dictionary containing the search input, search type, number of neighbors, search quality, and databases used.",
        "operationId": "search_embedding_molsearch_embedding_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Query Emb",
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "name": "query_emb",
            "in": "query"
          },
          {
            "description": "The type of search to perform",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchTypes"
                }
              ],
              "description": "The type of search to perform",
              "default": "espsim_shape"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Speed/Accuracy Tradeoff",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchQuality"
                }
              ],
              "description": "Speed/Accuracy Tradeoff",
              "default": "fast"
            },
            "name": "search_quality",
            "in": "query"
          },
          {
            "description": "Selected Databases",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/DatabaseEnumAll"
              },
              "description": "Selected Databases",
              "default": [
                "CHEMINFINITA-SYNTHON"
              ]
            },
            "name": "db_names",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "N Neighbors",
              "type": "integer",
              "default": 30
            },
            "name": "n_neighbors",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/cluster": {
      "get": {
        "tags": [
          "Advanced (for on-prem users only)"
        ],
        "summary": "Cluster",
        "description": "Retrieve a cluster by its ID\n\nThis endpoint allows users to get embeddings and molecules of a particular cluster. \n\nParameters:\n- cluster_id (int): The cluster ID\n- db_name (DatabaseEnum): The database to use for the search.\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- save_embs (bool): Whether to save embeddings for the retrieved cluster (default is False)\n- dest (str): Destination path to save the embeddings of the retrieved cluster (default is /tmp/cluster_embeddings).\n\nReturns:\n- A dictionary containing the molecules of the nearest cluster, possibly with a message pointing to the path where to find embeddings",
        "operationId": "cluster_cluster_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Cluster Id",
              "type": "integer",
              "default": 0
            },
            "name": "cluster_id",
            "in": "query"
          },
          {
            "description": "Selected Database",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DatabaseEnumAll"
                }
              ],
              "description": "Selected Database",
              "default": "CHEMINFINITA-SYNTHON"
            },
            "name": "db_name",
            "in": "query"
          },
          {
            "description": "The search type",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchTypes"
                }
              ],
              "description": "The search type",
              "default": "espsim_shape"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Whether to save embeddings for the retrieved cluster",
            "required": false,
            "schema": {
              "title": "Save Embs",
              "type": "boolean",
              "description": "Whether to save embeddings for the retrieved cluster",
              "default": false
            },
            "name": "save_embs",
            "in": "query"
          },
          {
            "description": "Destination path",
            "required": false,
            "schema": {
              "title": "Dest",
              "type": "string",
              "description": "Destination path",
              "default": "/tmp/cluster_embeddings"
            },
            "name": "dest",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/nearest_cluster": {
      "get": {
        "tags": [
          "Advanced (for on-prem users only)"
        ],
        "summary": "Nearest Cluster",
        "description": "Retrieve the nearest cluster to a single molecule\n\nThis endpoint allows users to get the nearest cluster to a molecule according to a search type. \n\nParameters:\n- search_input (str): The molecule embedding used as an input to the search (default is the morgan embedding of Aspirin ).\n- db_name (DatabaseEnum): The database to use for the search.\n- search_type (SearchTypes): The type of search to perform (default is \"morgan\").\n- save_embs (bool): Whether to save embeddings for the nearest cluster (default is False)\n- dest (str): Destination path to save the embeddings of the nearest cluster (default is /tmp/nearest_embeddings).\n\nReturns:\n- A dictionary containing the molecules of the nearest cluster, possibly with a message pointing to the path where to find embeddings",
        "operationId": "nearest_cluster_nearest_cluster_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Search Input",
              "type": "string",
              "default": "CC(=O)Oc1ccccc1C(=O)O"
            },
            "name": "search_input",
            "in": "query"
          },
          {
            "description": "Selected Database",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DatabaseEnumAll"
                }
              ],
              "description": "Selected Database",
              "default": "CHEMINFINITA-SYNTHON"
            },
            "name": "db_name",
            "in": "query"
          },
          {
            "description": "The search type",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchTypes"
                }
              ],
              "description": "The search type",
              "default": "espsim_shape"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Whether to save embeddings for the retrieved cluster",
            "required": false,
            "schema": {
              "title": "Save Embs",
              "type": "boolean",
              "description": "Whether to save embeddings for the retrieved cluster",
              "default": false
            },
            "name": "save_embs",
            "in": "query"
          },
          {
            "description": "Destination path",
            "required": false,
            "schema": {
              "title": "Dest",
              "type": "string",
              "description": "Destination path",
              "default": "/tmp/nearest_embeddings"
            },
            "name": "dest",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/batch_similarity": {
      "get": {
        "tags": [
          "Similarity (for on-prem users only)"
        ],
        "summary": "Batch Similarity",
        "description": "Compute similarity between two sets of molecules: either centroid (pharmacophore) or batch (enrichment)\n'centroid' mode: computes mean embedding (centroid) for the first and second set of molecules and returns its distance\n'batch' mode: means it computes similarities of max 10K randomly sampled pairs and averages the result \n\nParameters:\n- smiles1 and smiles2 (List[str]): Lists of smiles.\n- similarity_metric (EmbNames): The model and similarity metric to use for the calculation.\n- distance_type (DistanceType): The type of vector distance to use for the similarity calculation.\n- sim_mode (SearchModes): The mode of similarity (default is \"centroid\", another is \"batch\").\n\nReturns:\n- A dictionary containing the molecules of the nearest cluster, possibly with a message pointing to the path where to find embeddings",
        "operationId": "batch_similarity_batch_similarity_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Smiles1",
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "CC(=O)Oc1ccccc1C(=O)O",
                "CC(=O)Oc1ccncc1C(=O)O",
                "CC(=O)Oc1cnccc1C(=O)O"
              ]
            },
            "name": "smiles1",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Smiles2",
              "type": "array",
              "items": {
                "type": "string"
              },
              "default": [
                "CC=O",
                "CCC",
                "CCCC=O"
              ]
            },
            "name": "smiles2",
            "in": "query"
          },
          {
            "description": "CHEESE Model & Similarity Metric",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EmbNames"
                }
              ],
              "description": "CHEESE Model & Similarity Metric",
              "default": "all"
            },
            "name": "similarity_metric",
            "in": "query"
          },
          {
            "description": "Select Vector Distance",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DistanceType"
                }
              ],
              "description": "Select Vector Distance",
              "default": "euclidean"
            },
            "name": "distance_type",
            "in": "query"
          },
          {
            "description": "The mode of similarity",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchModes"
                }
              ],
              "description": "The mode of similarity",
              "default": "centroid"
            },
            "name": "sim_mode",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/database_similarity": {
      "get": {
        "tags": [
          "Similarity (for on-prem users only)"
        ],
        "summary": "Database Similarity",
        "description": "Estimate distance between two databases based on centroid embeddings.\n\nThis endpoint returns the distance score between two databases. This functionality assumes that inference was already performed on the databases !\n\nParameters:\n- db_name (str): The name of the database.\n- target_db_name (str): The name of the database against which to compare.\n- similarity_metric (str): The type of similarity to get.\n- sim_mode (str): The mode of similarity. 'centroid' computes similarity between the centroids of centroids of the databases. 'batch' computes average similarity between the database centroids\n\nReturns:\n- A JSON response containing the centroid embeddings.",
        "operationId": "database_similarity_database_similarity_get",
        "parameters": [
          {
            "description": "Selected database",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DatabaseEnumAll"
                }
              ],
              "description": "Selected database",
              "default": "CHEMINFINITA-SYNTHON"
            },
            "name": "db_name",
            "in": "query"
          },
          {
            "description": "Target database against whichto compare to",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DatabaseEnumAll"
                }
              ],
              "description": "Target database against whichto compare to",
              "default": "CHEMINFINITA-SYNTHON"
            },
            "name": "target_db_name",
            "in": "query"
          },
          {
            "description": "The similarity metric",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EmbNamesNoAll"
                }
              ],
              "description": "The similarity metric",
              "default": "morgan"
            },
            "name": "similarity_metric",
            "in": "query"
          },
          {
            "description": "Select Vector Distance",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DistanceType"
                }
              ],
              "description": "Select Vector Distance",
              "default": "euclidean"
            },
            "name": "distance_type",
            "in": "query"
          },
          {
            "description": "The mode of similarity",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchModes"
                }
              ],
              "description": "The mode of similarity",
              "default": "centroid"
            },
            "name": "sim_mode",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/license_information": {
      "get": {
        "tags": [
          "Advanced (for on-prem users only)"
        ],
        "summary": "License",
        "operationId": "license_license_information_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/generate_license_key": {
      "get": {
        "tags": [
          "Advanced (for on-prem users only)"
        ],
        "summary": "License Key",
        "operationId": "license_key_generate_license_key_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/embeddings_file": {
      "get": {
        "tags": [
          "CLI commands (for on-prem users only)"
        ],
        "summary": "Embeddings File",
        "description": "Get embeddings for a file of molecules.\n\nThis endpoint allows users to get embeddings for a list of molecules uploaded in a CSV file.\n\nParameters:\n- input_file (List[str]): The input file to get embeddings for.\n- smiles_col (str) : The column name of SMILES strings in case of a csv file (default 'SMILES')\n- search_type (List[str]): The type of embeddings to calculate.\n- dest (str): Destination path to save the embeddings (default is /tmp/embeddings).\n\nReturns:\n- A JSON response containing the status of the request if it's successful.",
        "operationId": "embeddings_file_embeddings_file_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Input File",
              "type": "string",
              "default": ""
            },
            "name": "input_file",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Smiles Col",
              "type": "string",
              "default": "SMILES"
            },
            "name": "smiles_col",
            "in": "query"
          },
          {
            "description": "Type of embeddings to calculate",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EmbNames"
                }
              ],
              "description": "Type of embeddings to calculate",
              "default": "all"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Destination path",
            "required": false,
            "schema": {
              "title": "Dest Folder",
              "type": "string",
              "description": "Destination path",
              "default": "/tmp/embeddings"
            },
            "name": "dest_folder",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/search_file": {
      "get": {
        "tags": [
          "CLI commands (for on-prem users only)"
        ],
        "summary": "Search File",
        "description": "Search a of molecules based on various criteria.\n\nThis endpoint allows users to search for multiple molecules using different search types and qualities. \nMultiple databases can be specified for the search.\n\nParameters:\n- input_file (str) : Path to the input file\n- smiles_col (str) : The column name of SMILES strings in case of a csv file (default 'SMILES')\n- search_type (str): The type of search to perform.\n- n_neighbors (int): The number of neighbors to consider.\n- search_quality (str): The quality of the search.\n- db_names (List[str]): The databases to use for the search.\n- output_file (str) : Path to the destination file\n\nReturns:\n- A dictionary containing the search results.",
        "operationId": "search_file_search_file_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Input File",
              "type": "string",
              "default": ""
            },
            "name": "input_file",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Smiles Col",
              "type": "string",
              "default": "SMILES"
            },
            "name": "smiles_col",
            "in": "query"
          },
          {
            "description": "The type of search to perform",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchTypes"
                }
              ],
              "description": "The type of search to perform",
              "default": "espsim_shape"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "N Neighbors",
              "type": "integer",
              "default": 30
            },
            "name": "n_neighbors",
            "in": "query"
          },
          {
            "description": "Speed/Accuracy Tradeoff",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/SearchQuality"
                }
              ],
              "description": "Speed/Accuracy Tradeoff",
              "default": "fast"
            },
            "name": "search_quality",
            "in": "query"
          },
          {
            "description": "Selected Databases",
            "required": false,
            "schema": {
              "title": "Db Names",
              "type": "string",
              "description": "Selected Databases",
              "default": "ZINC15,ENAMINE-REAL"
            },
            "name": "db_names",
            "in": "query"
          },
          {
            "description": "Destination file",
            "required": false,
            "schema": {
              "title": "Output File",
              "type": "string",
              "description": "Destination file",
              "default": "/tmp/search_results.csv"
            },
            "name": "output_file",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/visualise_file": {
      "get": {
        "tags": [
          "CLI commands (for on-prem users only)"
        ],
        "summary": "Visualize File",
        "description": "Get 2D visualization coordinates for a file of molecules.\n\nThis endpoint allows users to get 2D coordinates for a file of molecules.\n\nParameters:\n- input_file (str) : Path to the input file\n- smiles_col (str) : The column name of SMILES strings in case of a csv file (default 'SMILES')\n- search_type (str): The type of CHEESE coordinates to calculate. (default : 'morgan')\n- visualisation_method (List[str]): The method (PCA or UMAP) of dimensionality reduction.\n- dest_folder (str): Destination path to save the coordinates (default is /tmp/visualization_coordinates).\n\nReturns:\n- A JSON response containing the 2D coordinates for the input molecules.",
        "operationId": "visualize_file_visualise_file_get",
        "parameters": [
          {
            "required": false,
            "schema": {
              "title": "Input File",
              "type": "string",
              "default": ""
            },
            "name": "input_file",
            "in": "query"
          },
          {
            "required": false,
            "schema": {
              "title": "Smiles Col",
              "type": "string",
              "default": "SMILES"
            },
            "name": "smiles_col",
            "in": "query"
          },
          {
            "description": "Type of embeddings to calculate",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EmbNamesNoAll"
                }
              ],
              "description": "Type of embeddings to calculate",
              "default": "morgan"
            },
            "name": "search_type",
            "in": "query"
          },
          {
            "description": "Type of visualisation",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/VisualisationMethods"
                }
              ],
              "description": "Type of visualisation",
              "default": "umap"
            },
            "name": "visualisation_method",
            "in": "query"
          },
          {
            "description": "Destination path",
            "required": false,
            "schema": {
              "title": "Dest Folder",
              "type": "string",
              "description": "Destination path",
              "default": "/tmp/visualization_coordinates"
            },
            "name": "dest_folder",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AnyDictModel": {
        "title": "AnyDictModel",
        "type": "object",
        "properties": {
          "prop_ranges": {
            "title": "Prop Ranges",
            "type": "object",
            "default": {
              "caco2_wang": {
                "min": -100000,
                "max": 100000
              },
              "clearance_hepatocyte_az": {
                "min": -100000,
                "max": 100000
              },
              "clearance_microsome_az": {
                "min": -100000,
                "max": 100000
              },
              "half_life_obach": {
                "min": -100000,
                "max": 100000
              },
              "ld50_zhu": {
                "min": -100000,
                "max": 100000
              },
              "lipophilicity_astrazeneca": {
                "min": -100000,
                "max": 100000
              },
              "ppbr_az": {
                "min": -100000,
                "max": 100000
              },
              "solubility_aqsoldb": {
                "min": -100000,
                "max": 100000
              },
              "vdss_lombardo": {
                "min": -100000,
                "max": 100000
              },
              "ames": {
                "min": -100000,
                "max": 100000
              },
              "bbb_martins": {
                "min": -100000,
                "max": 100000
              },
              "bioavailability_ma": {
                "min": -100000,
                "max": 100000
              },
              "cyp2c9_substrate_carbonmangels": {
                "min": -100000,
                "max": 100000
              },
              "cyp2c9_veith": {
                "min": -100000,
                "max": 100000
              },
              "cyp2d6_substrate_carbonmangels": {
                "min": -100000,
                "max": 100000
              },
              "cyp2d6_veith": {
                "min": -100000,
                "max": 100000
              },
              "cyp3a4_substrate_carbonmangels": {
                "min": -100000,
                "max": 100000
              },
              "cyp3a4_veith": {
                "min": -100000,
                "max": 100000
              },
              "dili": {
                "min": -100000,
                "max": 100000
              },
              "herg": {
                "min": -100000,
                "max": 100000
              },
              "hia_hou": {
                "min": -100000,
                "max": 100000
              },
              "pgp_broccatelli": {
                "min": -100000,
                "max": 100000
              },
              "molecular_weight": {
                "min": -100000,
                "max": 100000
              },
              "formal_charge": {
                "min": -100000,
                "max": 100000
              },
              "clogp": {
                "min": -100000,
                "max": 100000
              },
              "heavy_atoms": {
                "min": -100000,
                "max": 100000
              },
              "h_bond_acceptors": {
                "min": -100000,
                "max": 100000
              },
              "h_bond_donor": {
                "min": -100000,
                "max": 100000
              },
              "rotatable_bonds": {
                "min": -100000,
                "max": 100000
              },
              "num_of_rings": {
                "min": -100000,
                "max": 100000
              },
              "molar_refractivity": {
                "min": -100000,
                "max": 100000
              },
              "number_of_atoms": {
                "min": -100000,
                "max": 100000
              },
              "topological_surface_area_mapping": {
                "min": -100000,
                "max": 100000
              }
            }
          },
          "neighbor_ids": {
            "title": "Neighbor Ids",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "default": []
          }
        }
      },
      "DatabaseEnumAll": {
        "title": "DatabaseEnumAll",
        "enum": [
          "CHEMINFINITA-SYNTHON",
          "CHEMRIYA",
          "CHEMSPACE-5B-BEYOND-RO5",
          "CHEMSPACE-5B-FREEDOM",
          "CHEMSPACE-5B-RO5",
          "CHEMSPACE-FREEDOM-SYNTHON",
          "CHEMSPACE-SCREENING",
          "EMOLECULES-EXPLORE-SYNTHON",
          "EMOLECULES-SYNPLE-SYNTHON",
          "ENAMINE-AA",
          "ENAMINE-REAL",
          "ENAMINE-REAL-V5A-SYNTHON",
          "EXPLORE-DIVERSE",
          "EXPLORE-ENUMERATED",
          "MCULE-FULL",
          "MCULE-IN-STOCK",
          "MOLECULE-ONE",
          "MOLECULEONE-D2B-SYNTHON",
          "MOLPORT",
          "SYNPLE-4B",
          "XTALPI",
          "XTALPI-SYNTHON",
          "ZINC15"
        ],
        "description": "An enumeration."
      },
      "DistanceType": {
        "title": "DistanceType",
        "enum": [
          "euclidean",
          "cosine"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "EmbNames": {
        "title": "EmbNames",
        "enum": [
          "all",
          "morgan",
          "espsim_electrostatic",
          "espsim_shape",
          "synthongpt"
        ],
        "description": "An enumeration."
      },
      "EmbNamesNoAll": {
        "title": "EmbNamesNoAll",
        "enum": [
          "morgan",
          "espsim_electrostatic",
          "espsim_shape",
          "synthongpt"
        ],
        "description": "An enumeration."
      },
      "FileFormat": {
        "title": "FileFormat",
        "enum": [
          "csv",
          "xlsx",
          "json",
          "sdf"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "FilteringEnum": {
        "title": "FilteringEnum",
        "enum": [
          "Lipinsky rule of 5",
          "QED",
          "REOS",
          "Veber",
          "Ghose",
          "Drug-like",
          "Rough similar properties",
          "Murcko scaffold",
          "Murcko scaffold hop",
          "Substructure",
          "Superstructure",
          "No solvents",
          "No rare atoms",
          "Regioisomers",
          "PAINS"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "OrderingEnum": {
        "title": "OrderingEnum",
        "enum": [
          "Similarity",
          "Morgan Tanimoto",
          "MACS",
          "ERG",
          "USR",
          "Morgan Dissimilarity",
          "USR Dissimilarity",
          "Espsim Dissimilarity",
          "Shapesim Dissimilarity"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "ResponseFormat": {
        "title": "ResponseFormat",
        "enum": [
          "json",
          "csv"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "SearchModes": {
        "title": "SearchModes",
        "enum": [
          "centroid",
          "batch"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "SearchQuality": {
        "title": "SearchQuality",
        "enum": [
          "fast",
          "accurate",
          "very_accurate",
          "100",
          "1000",
          "10000"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "SearchTypes": {
        "title": "SearchTypes",
        "enum": [
          "morgan",
          "espsim_electrostatic",
          "espsim_shape",
          "synthongpt"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        }
      },
      "VisualisationMethods": {
        "title": "VisualisationMethods",
        "enum": [
          "umap",
          "pca"
        ],
        "description": "An enumeration."
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "tags": [
    {
      "name": "Searching with CHEESE",
      "description": "Search molecules programatically!"
    },
    {
      "name": "SynthonGPT",
      "description": "SynthonGPT-specific search helpers and job submission endpoints."
    },
    {
      "name": "Computing Embeddings (for on-prem users only)",
      "description": "Fetching CHEESE vector embeddings"
    },
    {
      "name": "Predict Properties",
      "description": "Property prediction"
    },
    {
      "name": "Testing and Health Checks",
      "description": "Testing if everything in the API works as it should."
    },
    {
      "name": "Similarity (for on-prem users only)",
      "description": "Compute Shape and Electrostatic Similarity with CHEESE."
    },
    {
      "name": "Advanced (for on-prem users only)",
      "description": "Miscellaneous features to play with CHEESE."
    },
    {
      "name": "CLI commands (for on-prem users only)",
      "description": "CLI commands for CHEESE."
    },
    {
      "name": "Chemical Space Visualisation (for on-prem users only)",
      "description": "Visualise CHEESE Embeddings. Coming Soon!",
      "externalDocs": {
        "description": "Items external docs",
        "url": "https://fastapi.tiangolo.com/"
      }
    }
  ],
  "servers": [
    {
      "url": "https://api.cheese-dev.deepmedchem.com",
      "description": "Development"
    },
    {
      "url": "https://api.cheese.deepmedchem.com",
      "description": "Production"
    }
  ]
}