v1

latestOpenAPI 3.0.22026-07-17171545.4 KB

Start Query

Input structure / property constraints, and receive a query_id that will be used for getting results. The query is then initiated asynchronously.

Then, proceed to /check_query to find out when the query is done.

Body Parameters:

When using this API in isolation from the matcher application, "use default value" is recommended for some parameters.

  • snapquery_id: use default value, matcher uses this to avoid duplicating query input state information for snapshotted queries
  • query_id: use default value, matcher uses this to directly load results and avoid rerunning queries, for snapshotted queries
  • query_type: "exact" or "substructure": specify what kind of search is run on the variable atoms (the atoms that change as part of the MMP transform)
  • transform_order: use default value, currently only "first_order" transform queries are implemented, "second_order" could be implemented in the future
  • sketched_content: These parameters refer to structures, and highlighted atoms, that would appear in sketcher(s) in the matcher frontend.
    • See documentation for sketched_content under the /validateSelection endpoint. sketched_content provides all structural constraints on returned transforms and MMPs. At least one of either mol1 or mol2 below must be filled out. For each mol, a molfile is required, and variable atom(s) indices are required. The environment atom indices are optional.
    • Not all atom/bond selections, as defined in sketched_content, will result in legal queries. The /validateSelection endpoint is designed to detect and correct atom/bond selections that will result in fruitless queries.
  • OPTIONAL_properties: comma-separated string of property_name values. Require that both compounds in each MMP result have at least one of these OPTIONAL_properties
  • REQUIRED_properties: comma-separated string of property_name values. Require that all compounds belonging to all MMPs in the results have every one of the REQUIRED_properties
    • At least one property must be provided, as either a REQUIRED or OPTIONAL property
  • advanced_options: (OPTIONAL):
    • variable_min_heavies: integer, minimum number of heavy (non-H) atoms in BOTH variable fragments that comprise a transform, for every transform found by the query
    • variable_max_heavies: integer, maximum number of heavy (non-H) atoms in BOTH variable fragments that comprise a transform, for every transform found by the query
    • compound_min_heavies: integer, minimum number of heavy (non-H) atoms in BOTH compounds, in every MMP found by the query
    • compound_max_heavies: integer, maximum number of heavy (non-H) atoms in BOTH compounds, in every MMP found by the query
    • aggregation_type: use default value: matcher telegraphs this parameter to subsequent endpoints that control how results are displayed in the frontend (starting with /aggregate_transforms), but this parameter should not affect the initial query itself. Accepted values are "individual_transforms" or "group_by_fragment"
    • snapfilter_id: use default value, can be used to avoid duplication of output filters for snapshotted queries
    • snapfilter_string: use default value, used to filter output for snapshotted queries

Returns query_id, a positive integer

post/start_query

Request body

snapquery_idstring
query_idinteger
query_type'exact' | 'substructure' required
transform_order'first_order' | 'second_order' required
REQUIRED_propertiesstring
OPTIONAL_propertiesstring
snapfilter_idstring
snapfilter_stringstring

Example request

{
  "snapquery_id": "",
  "query_id": -1,
  "query_type": "exact",
  "transform_order": "first_order",
  "sketched_content": {
    "mol1_molfile": "\n  Ketcher  8112214332D 1   1.00000     0.00000     0\n\n  7  7  0  0  0  0            999 V2000\n    6.1042   -4.2292    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.9702   -4.7292    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.9702   -5.7292    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.1042   -6.2292    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n    5.2382   -5.7292    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    5.2382   -4.7292    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.1042   -3.2292    0.0000 H   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0     0  0\n  2  3  2  0     0  0\n  3  4  1  0     0  0\n  4  5  2  0     0  0\n  5  6  1  0     0  0\n  6  1  2  0     0  0\n  1  7  1  0     0  0\nM  END\n",
    "mol1_variable_atoms": "6",
    "mol1_variable_bonds": "",
    "mol1_environment_atoms": "0",
    "mol1_environment_bonds": "",
    "mol2_molfile": "\n  Ketcher  8112214352D 1   1.00000     0.00000     0\n\n  7  7  0  0  0  0            999 V2000\n    6.4583   -4.4792    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    7.3243   -4.9792    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    7.3243   -5.9792    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.4583   -6.4792    0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n    5.5923   -5.9792    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    5.5923   -4.9792    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n    6.4583   -3.4792    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0     0  0\n  2  3  2  0     0  0\n  3  4  1  0     0  0\n  4  5  2  0     0  0\n  5  6  1  0     0  0\n  6  1  2  0     0  0\n  1  7  1  0     0  0\nM  END\n",
    "mol2_variable_atoms": "6",
    "mol2_variable_bonds": "",
    "mol2_environment_atoms": "0",
    "mol2_environment_bonds": ""
  },
  "REQUIRED_properties": "",
  "OPTIONAL_properties": "hERG_pIC50",
  "snapfilter_id": "",
  "snapfilter_string": ""
}

Response

Successful Response

{"stackTrail":"paths:/start_query:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}