M1 RetroScore API User Guide
- Getting started
- List searches
- Create search
- Get search metadata
- Get search results
- Check search status
- Delete search
Create a search
Request
http://localhost:2222/api/v2/batch-search
Body application/json
Target chemical compounds in SMILES format.
Example value: ["COC", "OCC(N)(CO)CCc1ccc(cc1)CCCCCCC"]
Maximum length: 100 000
Controls detail level of system output. Possible values:
best_path
- return the best synthetic pathway and its properties: score, price of starting materials and number of steps.all_paths
- if specified, the system will include the best found synthesis pathway and alternative pathways that can be viewed in SciFinderⁿ.
Default value: 'best_path'
If set to 'pass'
, targets that cannot be canonized by our SMILES parser won't cause the whole search request to be rejected.
Default value: 'reject'
Name of the search search.
Default value: part of the generated search ID
Additional parameters to further configure the search request. Overrides parameters defined by preset
.
Limits starting materials to those that fulfill the availibility criteria of the specified tiers:
1
- All starting materials ship in 1-5 business days.2
- All starting materials ship in 2-10 business days.3
- All starting materials ship within 4 weeks.4
- Starting materials may require synthesis and are usually shipped within 12 weeks.5
- Starting materials require custom quote (POA).
Default value: 3
Defines how long the search is running and for how many different intermediate compounds the system proposes reactions leading to them. 'short'
search is sufficient for compounds where you expect the synthetic pathway to be no longer than 5 steps.
Default value: 'short'
Machine Learning model used.
'metro'
- Fast, template based system. Reactions generated by this system are almost always supported by literature references. Results have high quality, although they cover only commonly used chemistry.'transformer'
- System that utilizes transformer architecture to propose reactions. It yields both diverse and robust results although it's slower than other systems.
Default value: 'transformer'
The amount of compound that the system optimizes the synthesis for. Higher scale will result in a longer synthetic pathway, starting at cheaper starting materials.
Default value: 'millimolar'
Reaction confidence threshold.
'high'
- High threshold reduces the number of possible pathways, ensuring that only the most certain reactions are included.'low'
- Low threshold expands the pool of possible pathways, offering more diversity but risking the inclusion of incorrect reactions.
Default value: 'high'
Minimum reference count.
Minimum number of references citing similar reaction center and mechanism. Higher values favor well-documented and commonly used reactions (potentially excluding those with uncommon reaction centers).
Note: Setting this parameter to 0
may include reactions without any literature backing. Additionally, when reaction_confidence_threshold
is set to 'low'
, this may lead to the inclusion of multiple incorrect reactions. We strongly recommend setting this to 1
or higher.
Default value: 10
Range: 0
- 1000
Enables the usage of the parameter sets created in the RetroScore web application. The value is the unique name specified during parameter set creation.
Example value: "base-parameters"
Default value: synthesis plan parameters chosen as "Default for API" in the RetroScore interface
Use the priority attribute in order to prioritize some jobs over other ones. Higher value translates to higher priority.
Range: 1
- 10
Default value: 5
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/batch-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"
],
"detail_level": "best_path",
"invalid_target_strategy": "reject",
"name": "my-search",
"parameters": {
"availability_tier": 3,
"length": "short",
"model": "metro",
"synthesis_scale": "millimolar",
"reaction_confidence_threshold": "high",
"min_reference_count": 10
},
"preset": "base-parameters",
"priority": 3,
"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"
}