ZINC26:API: Difference between revisions
Jump to navigation
Jump to search
m (Frodo moved page ZINC26 to ZINC26:API: clarity) |
|||
| (4 intermediate revisions by one other user not shown) | |||
| Line 8: | Line 8: | ||
== API == | == API == | ||
* zinc26.docking.org/docs describes how to use. Here is a short tutorial to get you started using curl | * zinc26.docking.org/docs describes how to use. Here is a short tutorial to get you started using curl | ||
=== Get a token (valid for an hour) === | |||
* Command | |||
curl -X POST https://<host>/api/auth/login \ | |||
-H 'Content-Type: application/json' \ | |||
-d '{"username":"your@email.com","password":"yourpassword"}' | |||
* Response: | |||
{"access_token": "<token>", ...} | |||
=== SW search API === | === SW search API === | ||
==== Step 1 : Check available databases/categories/catalogs ==== | ==== Step 1 : Check available databases/categories/catalogs ==== | ||
* Command | * Command | ||
curl "https://zinc26.docking.org/sw/maps" | curl "https://zinc26.docking.org/sw/maps" | ||
* Response: | * Response: | ||
{"Bioactive": | {"Bioactive": | ||
| Line 22: | Line 30: | ||
==== Step 2 : Submit a search ==== | ==== Step 2 : Submit a search ==== | ||
* Command | * Command | ||
curl "https://zinc26.docking.org/sw/ | curl "https://zinc26.docking.org/sw/submit_search?database=Bioact&category=inVivo&catalog=dball&smiles=CCCCC&ced=4&ged=2&terminalUp=4&terminalDown=4&ringUp=2&ringDown=4&linkerUp=2&linkerDown=2&mutationMajor=4&mutationMinor=4&hybridisation=4&substitution=4&atomAlignment=true&multiSource=false&token=[access_token]" | ||
Required parameters: | Required parameters: | ||
- database — e.g. Purchasable, Bioact | - database — e.g. Purchasable, Bioact | ||
| Line 28: | Line 36: | ||
- catalog — e.g. dball (from /sw/maps) | - catalog — e.g. dball (from /sw/maps) | ||
- smiles — your query molecule in SMILES notation | - smiles — your query molecule in SMILES notation | ||
- token - access token (valid for 1 hour) | |||
Optional distance parameters: | Optional distance parameters: | ||
- ced — chemical edit distance (0 to 4, default to 4) | - ced — chemical edit distance (0 to 4, default to 4) | ||
| Line 73: | Line 82: | ||
<b>Three search types are supported:</b> | <b>Three search types are supported:</b> | ||
* Similarity search: | * Similarity search: | ||
curl "https://zinc26.docking.org/arthor/ | curl "https://zinc26.docking.org/arthor/submit_search?token=[access_token]&type=similarity&database=Bioact&category=inVivo&catalog=dball&query=CCO" | ||
* Substructure search: | * Substructure search: | ||
curl "https://zinc26.docking.org/arthor/ | curl "https://zinc26.docking.org/arthor/submit_search?token=[access_token]&type=substructure&database=Bioact&category=inVivo&catalog=dball&query=CCO&ringLocked=true&chainLocked=true&propertiesLocked=true" | ||
* SMARTS search: | * SMARTS search: | ||
curl "https://zinc26.docking.org/arthor/ | curl "https://zinc26.docking.org/arthor/submit_search?token=[access_token]&type=smarts&database=Bioact&category=inVivo&catalog=dball&ringLocked=true&chainLocked=true&propertiesLocked=true" | ||
Required parameters: | Required parameters: | ||
| Line 83: | Line 92: | ||
- database, category, catalog — from /arthor/maps | - database, category, catalog — from /arthor/maps | ||
- query — SMILES or SMARTS string (URL-encoded) | - query — SMILES or SMARTS string (URL-encoded) | ||
- token - access token (valid for 1 hour) | |||
Optional (substructure/smarts only): | Optional (substructure/smarts only): | ||
- ringLocked — default true | - ringLocked — default true | ||
| Line 105: | Line 115: | ||
=== Batch Job search API === | === Batch Job search API === | ||
==== Step 1 : Login and get token ==== | |||
curl -X POST https://zinc26.docking.org/api/auth/login \ | |||
-H "Content-Type: application/json" \ | |||
-d '{"email": "you@example.com", "password": "yourpassword"}' | |||
==== Step 2 : Submit a job ==== | |||
* Command Option A — JSON (molecules array, up to 10): | |||
curl -X POST https://zinc26.docking.org/psp/submit \ | |||
-H "Content-Type: application/json" \ | |||
-d '{ | |||
"token": "<your_token>", | |||
"db": "purchasable", | |||
"molecules": [ | |||
{"smiles": "CCO", "compound_id": "mol1"}, | |||
{"smiles": "c1ccccc1", "compound_id": "mol2"} | |||
] | |||
}' | |||
* Command Option B — File upload (.smi file, up to 10 molecules): | |||
curl -X POST https://zinc26.docking.org/psp/submit \ | |||
-F "token=<your_token>" \ | |||
-F "db=purchasable" \ | |||
-F "file=@molecules.smi" | |||
Your .smi file should have one molecule per line space separated (SMILES compound_id): | |||
CCO mol1 | |||
c1ccccc1 mol2 | |||
* Response: | |||
{"job_id": "abc-123", "slurm_ids": [], "status": "QUEUED"} | |||
==== Step 3 : Check job status ==== | |||
* Command | |||
curl "https://zinc26.docking.org/psp/status?job_id=abc-123" | |||
* Response | |||
Poll until state is COMPLETED (or FAILED): | |||
{ | |||
"job_id": "abc-123", | |||
"state": "COMPLETED", | |||
"progress": {"completed": 2, "total": 2}, | |||
"download_url": "/psp/download?job_id=abc-123" | |||
} | |||
==== Step 4: Download Results ==== | |||
* Command | |||
curl "https://zinc26.docking.org/psp/download?job_id=abc-123" -o results.zip | |||
== Coming soon == | == Coming soon == | ||
Latest revision as of 19:55, 25 September 2026
Introduction
ZINC26 is a search tool for purchasable chemical space. It uses Smallworld and Arthor technology from NextMove Software to allow searching billions of molecules in seconds. There is a batch interface and an interactive one.
- help page: ZINC26:Help
The new database is organized around a set of principles.
API
- zinc26.docking.org/docs describes how to use. Here is a short tutorial to get you started using curl
Get a token (valid for an hour)
- Command
curl -X POST https://<host>/api/auth/login \
-H 'Content-Type: application/json' \
-d '{"username":"your@email.com","password":"yourpassword"}'
- Response:
{"access_token": "<token>", ...}
SW search API
Step 1 : Check available databases/categories/catalogs
- Command
curl "https://zinc26.docking.org/sw/maps"
- Response:
{"Bioactive":
{"inVitro":
["00chembl","mapsAADAC","mapsAADAT","mapsAAK1","mapsABAT"]
}
}
Step 2 : Submit a search
- Command
curl "https://zinc26.docking.org/sw/submit_search?database=Bioact&category=inVivo&catalog=dball&smiles=CCCCC&ced=4&ged=2&terminalUp=4&terminalDown=4&ringUp=2&ringDown=4&linkerUp=2&linkerDown=2&mutationMajor=4&mutationMinor=4&hybridisation=4&substitution=4&atomAlignment=true&multiSource=false&token=[access_token]" Required parameters: - database — e.g. Purchasable, Bioact - category — e.g. inVivo (from /sw/maps) - catalog — e.g. dball (from /sw/maps) - smiles — your query molecule in SMILES notation - token - access token (valid for 1 hour) Optional distance parameters: - ced — chemical edit distance (0 to 4, default to 4) - ged — graph edit distance (0 to 2, default to 2) - terminalUp (0 to 8, default to 4) - terminalDown (0 to 8, default to 4) - ringUp (0 to 8, default to 2) - ringDown (0 to 8, default to 2) - linkerUp (0 to 8, default to 2) - linkerDown (0 to 8, default to 2) - mutationMajor (0 to 8, default to 4) - mutationMinor (0 to 8, default to 4) - hybridisation (0 to 8, default to 4) - substitution (0 to 8, default to 4)
- Response:
{"task_id": "abc-123", "status": "PENDING"}
Step 3 : Check for results
- Command
curl "https://zinc26.docking.org/sw/result?task_id=abc-123"
- Response
Poll this until status is SUCCESS (or FAILURE). While running it may return PROGRESS with partial results:
{
"task_id": "abc-123",
"status": "SUCCESS",
"results": [...]
}
Arthor search API
==== Step 1 : Check available database/category/catalog
- Command
curl "https://zinc26.docking.org/arthor/maps"
- Response:
{"Purchasable":
{
"bBlocks":
["bbA050","bbA100","bbA250","bbA500","bbA999","bbAFAS","bbAall"],
"covalent":["acrylamides","activated_amides_ureas","activated_ureas","aldehydes","aminonitriles"],
},
}
Step 2 : Submit a search
Three search types are supported:
- Similarity search:
curl "https://zinc26.docking.org/arthor/submit_search?token=[access_token]&type=similarity&database=Bioact&category=inVivo&catalog=dball&query=CCO"
- Substructure search:
curl "https://zinc26.docking.org/arthor/submit_search?token=[access_token]&type=substructure&database=Bioact&category=inVivo&catalog=dball&query=CCO&ringLocked=true&chainLocked=true&propertiesLocked=true"
- SMARTS search:
curl "https://zinc26.docking.org/arthor/submit_search?token=[access_token]&type=smarts&database=Bioact&category=inVivo&catalog=dball&ringLocked=true&chainLocked=true&propertiesLocked=true"
Required parameters: - type — similarity, substructure, or smarts - database, category, catalog — from /arthor/maps - query — SMILES or SMARTS string (URL-encoded) - token - access token (valid for 1 hour) Optional (substructure/smarts only): - ringLocked — default true - chainLocked — default true - propertiesLocked — default true
- Response
{"task_id": "abc-123", "status": "PENDING"}
Step 3 : Check for results
- Command
curl "https://zinc26.docking.org/arthor/result?task_id=abc-123"
- Response
Poll until status is SUCCESS. While running you may get PROGRESS with partial results:
{
"task_id": "abc-123",
"status": "SUCCESS",
"results": [...]
}
Batch Job search API
Step 1 : Login and get token
curl -X POST https://zinc26.docking.org/api/auth/login \ -H "Content-Type: application/json" \ -d '{"email": "you@example.com", "password": "yourpassword"}'
Step 2 : Submit a job
- Command Option A — JSON (molecules array, up to 10):
curl -X POST https://zinc26.docking.org/psp/submit \ -H "Content-Type: application/json" \ -d '{ "token": "<your_token>", "db": "purchasable", "molecules": [ {"smiles": "CCO", "compound_id": "mol1"}, {"smiles": "c1ccccc1", "compound_id": "mol2"} ] }'
- Command Option B — File upload (.smi file, up to 10 molecules):
curl -X POST https://zinc26.docking.org/psp/submit \ -F "token=<your_token>" \ -F "db=purchasable" \ -F "file=@molecules.smi"
Your .smi file should have one molecule per line space separated (SMILES compound_id):
CCO mol1 c1ccccc1 mol2
- Response:
{"job_id": "abc-123", "slurm_ids": [], "status": "QUEUED"}
Step 3 : Check job status
- Command
curl "https://zinc26.docking.org/psp/status?job_id=abc-123"
- Response
Poll until state is COMPLETED (or FAILED):
{
"job_id": "abc-123",
"state": "COMPLETED",
"progress": {"completed": 2, "total": 2},
"download_url": "/psp/download?job_id=abc-123"
}
Step 4: Download Results
- Command
curl "https://zinc26.docking.org/psp/download?job_id=abc-123" -o results.zip
Coming soon
- 3d database builder
- additional data
Tutorial in how to use datawarrior
- the columns in datawarrior are as follows.
- we are still working on adding a net_charge column.
- we suggest you proceed as follows.