Download scripts/download_rdock_validation_sets.py from QPromaQ/Docking_project: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/datasets/QPromaQ/Docking_project/resolve/main/scripts/download_rdock_validation_sets.py
- Command line
-
hf download hf://datasets/QPromaQ/Docking_project/scripts/download_rdock_validation_sets.py
-
curl -L -o download_rdock_validation_sets.py https://huggingface.co/datasets/QPromaQ/Docking_project/resolve/main/scripts/download_rdock_validation_sets.py
1.47 kB
| from __future__ import annotations | |
| import argparse | |
| import json | |
| from pathlib import Path | |
| import sys | |
| ROOT = Path(__file__).resolve().parents[1] | |
| if str(ROOT) not in sys.path: | |
| sys.path.insert(0, str(ROOT)) | |
| from docking_pipeline.validation import VALIDATION_URL, download_validation_set | |
| EXAMPLES = """Examples: | |
| python scripts/download_rdock_validation_sets.py --url <official_ASTEX_tar.gz> --out data/rdock_validation/ASTEX_rDock_TestSet | |
| python scripts/download_rdock_validation_sets.py --url <official_DUD_tar.gz> --out data/rdock_validation/DUD_rDock_TestSet --force | |
| Official index: https://rdock.github.io/validation-sets/ | |
| """ | |
| def main() -> int: | |
| parser = argparse.ArgumentParser( | |
| description="Download and unpack an official rDock validation-set archive.", | |
| epilog=EXAMPLES, | |
| formatter_class=argparse.RawDescriptionHelpFormatter, | |
| ) | |
| parser.add_argument("--url", required=True, help="Official validation-set tar.gz/zip URL from the rDock validation page") | |
| parser.add_argument("--out", required=True, help="Output directory to create/use") | |
| parser.add_argument("--force", action="store_true", help="Download/extract even if output directory is non-empty") | |
| args = parser.parse_args() | |
| out = download_validation_set(args.url, Path(args.out), force=args.force) | |
| print(json.dumps({"out": str(out), "official_index": VALIDATION_URL}, indent=2)) | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |