SpaceM1 API User Guide
Create a search
Request
http://localhost:2222/api/v2/spacem1-search
Body application/json
Target chemical compounds in SMILES format.
Example value: ["COC", "OCC(N)(CO)CCc1ccc(cc1)CCCCCCC"]
Maximum length: 100 000
Name of the search search.
Default value: part of the generated search ID
Targets metadata enables the naming of some compounds of the request. Each key of the parent dictionary should relate to an index of a target in the targets
array. Please note that the indices are numbered from 0. As naming compounds is optional, targets_metadata
should only contain the keys of targets that you want to name.
Example value: {"0": {"name": "Dicarbon monoxide"}}
Example
curl http://localhost:2222/api/v2/spacem1-search -X POST \
-H "Content-Type: application/json" \
-H "Authorization: ApiToken-v1 YOUR_API_TOKEN" \
-d '{
"targets": [
"OCC(N)(CO)CCc1ccc(cc1)CCCCCCC",
"O=C(Nc1cc(Nc2nc(-c3cnccc3)ccn2)c(cc1)C)c3ccc(cc3)CN3CCN(CC3)C",
"COC"
],
"name": "my-search",
"targets_metadata": { "2": { "name": "Dicarbon monoxide" } }
}'
Response
Body application/json
Search ID.
Search name.
Default value: part of the generated search ID if not specified in request
parameters
specified in the search request.
Final parameters used to create the search request. They are a combination of inputParams
and presetParams
.
Origin of the search request.
Parameters specified by chosen preset
in the search request.
Default value: "Default for search" preset configured in the RetroScore interface
Name of the preset applied to the search request.
Example
{
"id": "bcd34242-70c3-46f0-819d-e261eaf876f0",
"name": "my-search",
"size": 3,
"inputParams": {
"availability_tier": 3,
"length": "short",
"model": "metro",
"synthesis_scale": "millimolar",
"reaction_confidence_threshold": "high",
"min_reference_count": 10
},
"searchParams": {
"detail_level": "best_path",
"presets": {
"model": "metro",
"length": "short",
"datasets": [{ "id": "emolecules" }],
"synthesis_scale": "millimolar",
"availability_tier": 3,
"reaction_confidence_threshold": "high",
"min_reference_count": 10
}
},
"priority": 3,
"createdAt": "2023-04-07T10:13:29.932Z",
"source": "API_V2",
"presetParams": {
"availability_tier": 3,
"datasets": [{ "id": "emolecules" }],
"model": "metro",
"length": "regular",
"synthesis_scale": "millimolar",
"reaction_confidence_threshold": "high",
"min_reference_count": 10
},
"presetName": "base-parameters"
}