Legacy CHEESE API

Batch Similarity

Suggest an edit
GET
/batch_similarity

Compute similarity between two sets of molecules: either centroid (pharmacophore) or batch (enrichment) 'centroid' mode: computes mean embedding (centroid) for the first and second set of molecules and returns its distance 'batch' mode: means it computes similarities of max 10K randomly sampled pairs and averages the result

Parameters:

  • smiles1 and smiles2 (List[str]): Lists of smiles.
  • similarity_metric (EmbNames): The model and similarity metric to use for the calculation.
  • distance_type (DistanceType): The type of vector distance to use for the similarity calculation.
  • sim_mode (SearchModes): The mode of similarity (default is "centroid", another is "batch").

Returns:

  • A dictionary containing the molecules of the nearest cluster, possibly with a message pointing to the path where to find embeddings

Authorization

APIKeyHeader
X-API-Key<token>

In: header

Query Parameters

smiles1?array<string>

Default

[  "CC(=O)Oc1ccccc1C(=O)O",  "CC(=O)Oc1ccncc1C(=O)O",  "CC(=O)Oc1cnccc1C(=O)O"]
smiles2?array<string>

Default

[  "CC=O",  "CCC",  "CCCC=O"]
similarity_metric?EmbNames

CHEESE Model & Similarity Metric

Default"all"

Value in

  • "all"
  • "morgan"
  • "espsim_electrostatic"
  • "espsim_shape"
  • "synthongpt"
distance_type?DistanceType

Select Vector Distance

Default"euclidean"

Value in

  • "euclidean"
  • "cosine"
sim_mode?SearchModes

The mode of similarity

Default"centroid"

Value in

  • "centroid"
  • "batch"

Response Body

application/json

application/json

curl -X GET "https://example.com/batch_similarity"
null