Skip to main content
    Ivy Biosciences Docs/Call the platform/API/Reference/Reference/Compute/POST /v1/sync/similarity

    POST /v1/sync/similarity

    Compare two molecules — Computes Tanimoto, Dice and cosine similarity between two SMILES strings using Morgan, RDKit or MACCS fingerprints.

    Auth: required. Send an ivy_ API key (Authorization: Bearer ivy_…), a signed-in session token (Authorization: Bearer …) or the session cookie (browser sessions). See Authentication.

    Computes Tanimoto, Dice and cosine similarity between two SMILES strings using Morgan, RDKit or MACCS fingerprints. Scores run from 0 (different) to 1 (identical). An invalid SMILES returns HTTP 200 with success: false.

    Request

    Request body

    smiles1string
    smiles2string
    fingerprint_typeenum ("morgan" | "rdkit" | "maccs")
    radiusinteger

    Morgan fingerprint radius.

    Responses

    200 OK

    The calculation result. Check success: a failed calculation still returns HTTP 200.

    Response shape:

    successboolean
    dataobject

    Calculation output. For validate-smiles: results (each with input, valid, canonical, num_atoms, num_heavy_atoms or error) and total. For similarity: smiles1, smiles2, fingerprint_type, tanimoto, dice and cosine. For admet-quick: smiles plus the ADMET estimates. For molecular-properties: the property fields, plus admet when requested.

    errorstring

    Present when success is false.

    calculation_time_msnumber

    400 Bad Request

    Invalid request

    Response shape: object

    401 Unauthorized

    Authentication required

    Response shape: object

    422 Unprocessable Entity

    The request body failed validation; the body says which field

    Response shape: object

    429 Too Many Requests

    Rate limit exceeded

    Response shape: object

    502 Bad Gateway

    The compute service is unavailable. Retry with backoff.

    Response shape: object

    curl -X POST 'https://ivybiosciences.com/api/v1/sync/similarity' \
      -H "Authorization: Bearer $IVY_API_KEY" \
      -H 'Content-Type: application/json' \
      -d '{
      "smiles1": "",
      "smiles2": ""
    }'

    Was this page helpful?

    Loading...