CLI and python interface for ZINC tranche code generation and batch download
Project description
zinc-downloader
Reproducible and scriptable downloader for ZINC tranches.
zincdl allows reconstruction of ZINC tranche codes from property subsets, retrieval of corresponding download URLs, and batch file download from the public ZINC repository.
Relevant links
- ZINC tranche browser (ZINC20) – where tranches are browsable
- ZINC static files – source of downloadable tranche data
- ZINC Wiki – background on tranche organization
⚠️ Note
zincdlis an independent open-source utility for ZINC data access, and not affiliated with or maintained by the Irwin Lab @ UCSF. This tool only automates access to publicly available ZINC files and does not redistribute any data. Please avoid excessive parallel downloads.
🔧 Installation
$ pip install zincdl
Usage
You can generate tranche codes and corresponding URLs for arbitrary property selections, and optionally download them.
Note: using predefined subsets (via subset in generate_urls or --subset in CLI) yields the highest chance of successful downloads.
Python API
from zincdl import generate_urls
from zincdl.download import download_tranches
# Generate tranche URLs from an MW × logP region
urls = generate_urls(
mw=[300, 325],
logp=[2, 3],
fmt="mol2",
)
print(urls)
# [
# 'https://files2.docking.org/3D/CD/EBRN/CDEBRN.xaa.mol2.gz',
# 'https://files2.docking.org/3D/CF/EBRN/CFEBRN.xaa.mol2.gz',
# ...
# ]
# Download into a local directory
download_tranches(urls, out_dir="my_zinc")
CLI
# Show help
zincdl --help
# Preview tranche URLs (no download)
zincdl --mw 300,325 --logp 2,3 --fmt smi
# Download predefined subsets
zincdl --subset fragments --fmt mol2 --download --out-dir downloads/fragments
zincdl --subset leadlike --fmt smi --download --out-dir downloads/leadlike
# Include charge, pH, and reactivity filters
zincdl --subset druglike --charge 1 --fmt sdf --download --out-dir downloads/druglike_cationic
Citation
Please cite ZINC20 when using downloaded data:
Irwin, J. J.; Tang, K. G.; Young, J.; Dandarchuluun, C.; Wong, B. R.; Khurelbaatar, M.; Moroz, Y. S.; Mayfield, J.; Sayle, R. A. ZINC20 — A Free Ultralarge-Scale Chemical Database for Ligand Discovery. J. Chem. Inf. Model. 2020, 60, 6065–6073. https://doi.org/10.1021/acs.jcim.0c00675
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zincdl-0.1.0.tar.gz.
File metadata
- Download URL: zincdl-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97e16d97926726c00641a058f39e539a17faf6d39a438f2636741f4bb2f8e9d2
|
|
| MD5 |
5f2d805132671a0eaede35c7c920ec31
|
|
| BLAKE2b-256 |
3cbdd9b690292933248ce95f783aec6baf40eb9f4ebd55cddd246233b44b5244
|
File details
Details for the file zincdl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zincdl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4499fb5fb3b41a2ca23522fe9ebac7276050f30c761b82ff29c3b0ba686405d0
|
|
| MD5 |
e47d143bf93f2c0b2d64692dedc6dab1
|
|
| BLAKE2b-256 |
c84f6b2f8342c63fa2c2cd47b89f498716411789cbf22abd2810f5f266179055
|