OneScience-Group/AlphaFold3_dataset
AlphaFold3 Dataset Dataset Description AlphaFold3_dataset is the companion dataset for the OneScience-Group/AlphaFold3/ model. It includes inference input examples, public search databases, MMseqs databases, sharded Jackhmmer databases, and alignment-related directories. The dataset ID is fixed as OneScience-Group/AlphaFold3_dataset. Supported Tasks This dataset supports the AlphaFold3 biomolecular structure prediction workflow. It provides both… See the full description on the dataset page: https://huggingface.co/datasets/OneScience-Group/AlphaFold3_dataset.
02.5k
1#!/usr/bin/env python32from __future__ import annotations3 4import argparse5import hashlib6import json7from pathlib import Path8 9try:10 import yaml11except ImportError as exc:12 raise SystemExit("PyYAML is required for dataset validation: pip install pyyaml") from exc13 14 15def sha256(path: Path) -> str:16 h = hashlib.sha256()17 with path.open("rb") as f:18 for chunk in iter(lambda: f.read(1024 * 1024), b""):19 h.update(chunk)20 return h.hexdigest()21 22 23def check_json(path: Path) -> None:24 data = json.loads(path.read_text(encoding="utf-8"))25 if data.get("dialect") != "alphafold3":26 raise AssertionError(f"{path} dialect is not alphafold3")27 if "sequences" not in data or not data["sequences"]:28 raise AssertionError(f"{path} has no sequences")29 30 31def main() -> None:32 parser = argparse.ArgumentParser()33 parser.add_argument("--root", default=".")34 parser.add_argument("--skip-hash", action="store_true")35 args = parser.parse_args()36 37 root = Path(args.root).resolve()38 manifest = yaml.safe_load((root / "metadata" / "file_manifest.yaml").read_text(encoding="utf-8"))39 40 for entry in manifest["dataset_directories"]:41 path = root / entry["path"]42 if not path.exists():43 raise AssertionError(f"missing linked dataset directory: {entry['path']}")44 45 for entry in manifest["files"]:46 path = root / entry["path"]47 if not path.is_file():48 raise AssertionError(f"missing verified data file: {entry['path']}")49 if path.name != Path(entry["source_path"]).name:50 raise AssertionError(f"filename mismatch: {entry['path']}")51 if path.stat().st_size != entry["size_bytes"]:52 raise AssertionError(f"size mismatch: {entry['path']}")53 if not args.skip_hash and sha256(path) != entry["sha256"]:54 raise AssertionError(f"sha256 mismatch: {entry['path']}")55 56 check_json(root / "data" / "infer_input_data" / "all_data" / "7r6r_data.json")57 check_json(root / "data" / "infer_input_data" / "all_data" / "t1119_data.json")58 print("dataset_validation_ok: true")59 60 61if __name__ == "__main__":62 main()63 