Download scripts/build_croissant.py from HFMI-PROFOUND/BILBY-PRO: direct link, hf CLI and curl.
- Browser
- Download file 44 kB
-
https://huggingface.co/datasets/HFMI-PROFOUND/BILBY-PRO/resolve/main/scripts/build_croissant.py
- Command line
-
hf download hf://datasets/HFMI-PROFOUND/BILBY-PRO/scripts/build_croissant.py
-
curl -L -o build_croissant.py https://huggingface.co/datasets/HFMI-PROFOUND/BILBY-PRO/resolve/main/scripts/build_croissant.py
44 kB
| #!/usr/bin/env python3 | |
| # Copyright 2026 Emile de Bruyn | |
| # SPDX-License-Identifier: Apache-2.0 | |
| """Build the Croissant descriptor from the released schemas and checksums.""" | |
| import csv | |
| import json | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| URL = "https://huggingface.co/datasets/HFMI-PROFOUND/BILBY-PRO" | |
| # Author names and order follow the author line of the camera-ready paper | |
| # (camera-ready.pdf), which is authoritative for this release. | |
| AUTHORS = [ | |
| "Emile de Bruyn", "Moritz Schäffler", "Jannik Schneider", | |
| "Sebastian R. Schmidt", "Chanwoong Hwang", "Aleena Siji", | |
| "Utkarsh Upadhyay", "Stefan Bauer", "Alexander Schug", | |
| "Stefan Kesselheim", "Artur Yakimovich", "Alina Bazarova", | |
| ] | |
| AFFILIATIONS = { | |
| 1: "Jülich Supercomputing Centre, Forschungszentrum Jülich", | |
| 2: "Center for Advanced Systems Understanding (CASUS), Görlitz, Germany", | |
| 3: "Helmholtz Munich", | |
| 4: "Scientific Computing Center, Karlsruhe Institute of Technology", | |
| 5: "Helmholtz-Zentrum Dresden-Rossendorf", | |
| 6: "Institute of Computer Science, University of Wrocław", | |
| 7: "Cluster of Excellence Physics of Life, TU Dresden", | |
| 8: "Department of Physics, University of Cologne", | |
| } | |
| # Positional affiliations of the author list above, as numbered in the paper. | |
| AUTHOR_AFFILIATIONS = [ | |
| [1], [1], [1], [1], [2], [3], [1], [3], [4], [1, 8], [2, 5, 6, 7], [1], | |
| ] | |
| # Release identity. DATE_PUBLISHED is the date the HFMI-PROFOUND/BILBY-PRO | |
| # repository was created and the v1.0.0 files were uploaded (2026-11-02); the | |
| # dataset DOI was registered two days later, on 2026-11-04. | |
| DOI = "10.57967/hf/11443" | |
| DOI_URL = f"https://doi.org/{DOI}" | |
| DATE_PUBLISHED = "2026-11-02" | |
| RELEASE_COMMIT = "b0312e0433191ec425c67e2f9a620c2f614551c2" | |
| TITLE = "BILBY-PRO: PROSITE-derived functional motif scaffolding benchmark" | |
| PAPER_TITLE = ( | |
| "Static Recovery Is Not Dynamic Stability: Dynamics-Aware Benchmarking of " | |
| "Protein Motif Scaffolding" | |
| ) | |
| KEYWORDS = [ | |
| "biology", "protein design", "protein structure", "motif scaffolding", | |
| "benchmark", "PROSITE", "PDB", "functional motifs", | |
| ] | |
| HISTORICAL_URL = ( | |
| "https://huggingface.co/datasets/anonymous-motif-scaffolding" | |
| "/prosite_functional_motif_scaffolding_benchmark/tree/" | |
| "b16ffd61dc6b84fffa10f007282d5ac22ba16b95" | |
| ) | |
| CONSTRUCTION_URL = f"{URL}/tree/main/construction" | |
| PROSITE_URL = "https://prosite.expasy.org/" | |
| PROSITE_LICENSE_URL = "https://prosite.expasy.org/prosite_license.html" | |
| PROSITE_ARCHIVE_URL = ( | |
| "https://ftp.expasy.org/databases/prosite/old_releases/prosite2021_04.tar.bz2" | |
| ) | |
| RCSB_URL = "https://www.rcsb.org/" | |
| WWPDB_URL = "https://www.wwpdb.org/" | |
| MOTIFBENCH_URL = "https://github.com/blt2114/MotifBench" | |
| def people(): | |
| """Person records, used for both sc:creator and sc:author.""" | |
| return [ | |
| {"@type": "sc:Person", "name": name, "affiliation": [ | |
| {"@type": "sc:Organization", "name": AFFILIATIONS[number]} | |
| for number in affiliations | |
| ]} | |
| for name, affiliations in zip(AUTHORS, AUTHOR_AFFILIATIONS) | |
| ] | |
| BIBTEX_FAMILY = {"Emile de Bruyn": "de Bruyn"} | |
| def bibtex_person(name): | |
| family = BIBTEX_FAMILY.get(name, name.split()[-1]) | |
| given = name[: -len(family)].strip() | |
| return f"{family}, {given}" | |
| # Preferred citation of the released asset itself (the dataset and its DOI). | |
| # The paper that describes it is cited separately in CITATION.cff and in the | |
| # "citation" property below. | |
| CITE_AS = ( | |
| "@dataset{debruyn_bilby_pro_2026,\n" | |
| " author = {" + " and ".join(bibtex_person(a) for a in AUTHORS) + "},\n" | |
| " title = {{" + TITLE + "}},\n" | |
| " year = {2026},\n" | |
| " month = nov,\n" | |
| " publisher = {Hugging Face},\n" | |
| " version = {1.0.0},\n" | |
| f" doi = {{{DOI}}},\n" | |
| f" url = {{{URL}}},\n" | |
| f" note = {{Corrected release of the benchmark introduced in " | |
| f"\"{PAPER_TITLE}\"}}\n" | |
| "}" | |
| ) | |
| # Croissant RAI 1.0 and provenance metadata, generated from the released files, | |
| # construction/README.md, construction/configs/reference.yaml, CHANGELOG.md and | |
| # scripts/validate_release.py. Every quantitative claim below is reproducible | |
| # from this snapshot (see provenance/ for the pinned digests). | |
| PROVENANCE = { | |
| "prov:wasDerivedFrom": [ | |
| { | |
| "@id": PROSITE_URL, | |
| "name": "PROSITE 2021_04 (SIB, Swiss-Prot + PROSITE)", | |
| "description": ( | |
| "Release 2021_04, dated 29 September 2021, of the curated protein " | |
| "pattern and profile database. Supplies the verbatim motif_name, " | |
| "pattern, motif_entry (PS accessions) and pdoc (PDOC accessions) " | |
| "values of motif_cases_metadata_croissant.csv and the PDB " | |
| "cross-references that define the candidate structure pool. " | |
| f"Licensing: {PROSITE_LICENSE_URL}" | |
| ), | |
| }, | |
| { | |
| "@id": PROSITE_ARCHIVE_URL, | |
| "name": "Archived PROSITE 2021_04 release used as pipeline input", | |
| "description": ( | |
| "prosite.dat parsed by construction/motifbench_prosite, pinned by " | |
| "scripts/reconstruct.py and documented in provenance/README.md " | |
| "(SHA-256 00f9598c5ddcef7b9d414cd24b968ad8a746e6b808e8fa525787f0e" | |
| "739f2e9c7)." | |
| ), | |
| }, | |
| { | |
| "@id": RCSB_URL, | |
| "name": "RCSB Protein Data Bank experimental structure entries", | |
| "description": ( | |
| "187 unique macromolecular depositions behind the 220 cases (164 " | |
| "X-ray diffraction, 15 solution NMR, 7 electron microscopy, 1 " | |
| "combined NMR and solution scattering; counted per case instead, " | |
| "the split is 194, 18, 7 and 1); all atomic coordinates and " | |
| "residue identities in motif_pdbs and original_pdbs. Entries " | |
| f"remain under their deposited PDB licenses: {WWPDB_URL}" | |
| ), | |
| }, | |
| { | |
| "@id": MOTIFBENCH_URL, | |
| "name": "MotifBench reference test-case table", | |
| "description": ( | |
| "The historical MotifBench test_cases.csv used only to drop " | |
| "candidate cases that duplicate an existing MotifBench problem; " | |
| "the released file layout and group definitions follow it." | |
| ), | |
| }, | |
| { | |
| "@id": HISTORICAL_URL, | |
| "name": "Peer-review snapshot of this benchmark", | |
| "description": ( | |
| "The anonymous submission release from which this corrected " | |
| "v1.0.0 snapshot derives: the same 220 cases, the same 440 PDB " | |
| "files and the same motif metadata table, with one infeasible " | |
| "contig gap corrected and the cluster case identifiers renamed " | |
| "from the _vN to the _cN suffix (see CHANGELOG.md)." | |
| ), | |
| }, | |
| ], | |
| "prov:wasGeneratedBy": { | |
| "@type": "prov:Activity", | |
| "@id": CONSTRUCTION_URL, | |
| "name": "BILBY-PRO construction pipeline and corrected release", | |
| "description": ( | |
| "Collection window: PROSITE release 2021_04 (29 September 2021) and " | |
| "PDB entries retrieved from live RCSB servers during the historical " | |
| "construction run, whose exact date and environment were not logged; " | |
| "the corrected release was published on 2026-11-02. Geographic scope: " | |
| "not applicable, the sources are global scientific repositories. " | |
| "Protocol (construction/motifbench_prosite, run as python -m " | |
| "motifbench_prosite --cli construction/configs/reference.yaml " | |
| "download,extract,analyze,export,benchmark): parse prosite.dat and " | |
| "keep the PROSITE entries carrying at least one 3D PDB " | |
| "cross-reference, filtered to pattern spans of 12-100 residues and " | |
| "at most 25 PDB " | |
| "records per pattern; retrieve those entries with Biopython's " | |
| "PDBList, converting mmCIF above 10 MB; match each IUPAC pattern " | |
| "against polymer sequences and merge contiguous matches into motif " | |
| "segments, absorbing short internal wildcard stretches as " | |
| "redesignable positions and keeping longer ones as non-motif context; " | |
| "keep candidates with at least 5 structural instances whose median " | |
| "pairwise CA RMSD falls below the conservation threshold " | |
| "(min_instances 5, rmsd_threshold 2.0 in configs/reference.yaml); " | |
| "cluster motif fragments with Foldseek (min_seq_id 0.5, cov_mode 1, " | |
| "cov_threshold 0.8) to derive cluster ratios, group 4 multi-state " | |
| "labels and cluster_membership.csv; discard cases that duplicate the " | |
| "reference MotifBench problems; tag assembly context as core (179 " | |
| "cases), ribosomal (30) or huge_assembly (11); and export MotifBench-" | |
| "compatible motif-only PDB files, source PDB files, segment and " | |
| "redesignable-residue annotations and contigs over the reference " | |
| "scaffold lengths 75, 100, 125, 150, 175, 200 and 225, with " | |
| "coordinates and residue labels normalized on export. Release " | |
| "1.0.0 additionally corrected the 1A22_PS01352_c1 contig gap (25-25 " | |
| "to 21-25), standardized the 400 cluster membership identifiers to " | |
| "the _cN suffix and pinned SHA-256 digests of all 445 released data " | |
| "files in provenance/release-sha256.txt." | |
| ), | |
| "prov:wasAssociatedWith": [ | |
| { | |
| "@type": "prov:SoftwareAgent", | |
| "@id": f"{CONSTRUCTION_URL}/motifbench_prosite", | |
| "name": "motifbench_prosite (Apache-2.0)", | |
| }, | |
| { | |
| "@type": "prov:SoftwareAgent", | |
| "@id": "https://github.com/steineggerlab/foldseek", | |
| "name": "Foldseek (structural clustering; version not recorded)", | |
| }, | |
| { | |
| "@type": "prov:SoftwareAgent", | |
| "@id": "https://biopython.org/", | |
| "name": "Biopython (PDBList, PDBParser, MMCIFParser, PDBIO)", | |
| }, | |
| ], | |
| }, | |
| } | |
| RAI_FIELDS = { | |
| # --- Collection ------------------------------------------------------- | |
| "rai:dataCollection": ( | |
| "No human subjects, crowdsourcing or private data were involved: the " | |
| "benchmark was assembled programmatically from public, curated " | |
| "scientific resources by the construction/motifbench_prosite pipeline, " | |
| "whose stages are (1) parse PROSITE release 2021_04 prosite.dat, (2) " | |
| "retrieve the 3D-cross-referenced PDB entries with Biopython's PDBList, " | |
| "(3) match IUPAC patterns to polymer sequences and extract residue-level " | |
| "coordinates, (4) compute structural conservation and Foldseek " | |
| "clustering statistics, (5) filter, normalize and export " | |
| "MotifBench-compatible files. All 220 cases derive from experimental " | |
| "depositions: 194 from X-ray diffraction, 18 from solution NMR, 7 from " | |
| "electron microscopy and 1 from combined NMR and solution scattering. " | |
| "The collection is unrestricted with respect to geography, population " | |
| "or organism; it is bounded only by which protein families PROSITE " | |
| "2021_04 patterns and the PDB had solved by that release. The source " | |
| "vocabulary and the PDB cross-references are therefore fixed at " | |
| "2021-09-29, while the underlying depositions keep their own deposition " | |
| "dates and span several decades of structural biology; the " | |
| "construction run itself was not logged, so its downloads reflected the " | |
| "live RCSB servers of that moment rather than a pinned snapshot. This " | |
| "corrected release was published on 2026-11-02 and its dataset DOI was " | |
| "registered on 2026-11-04." | |
| ), | |
| "rai:dataCollectionType": ["Secondary Data analysis", "Software Collection"], | |
| "rai:dataCollectionRawData": ( | |
| "Three inputs, none of them produced for this dataset: PROSITE release " | |
| "2021_04 prosite.dat of 29 September 2021 (SHA-256 " | |
| "00f9598c5ddcef7b9d414cd24b968ad8a746e6b808e8fa525787f0e739f2e9c7, " | |
| "tarball SHA-256 32db1518ae124f42f659b4a1151e4510b3aae6cb6a87f37950878334" | |
| "2a2c99d7, documented in provenance/README.md and pinned by " | |
| "scripts/reconstruct.py), which provides the " | |
| "verbatim pattern, motif_name, motif_entry and pdoc strings as well as " | |
| "the PDB cross-references; the experimentally determined PDB entries " | |
| "referenced by those patterns, 187 unique depositions that supply every " | |
| "coordinate distributed here; and the historical MotifBench reference " | |
| "table, used only to remove duplicated cases. No per-case manual " | |
| "measurement, wet-lab experiment or human annotation produced any value " | |
| "in the release." | |
| ), | |
| "rai:dataCollectionMissingData": ( | |
| "A case exists only if its PROSITE entry carries a 3D cross-reference in " | |
| "the 2021_04 release, matches a downloadable structure of at most 10 MB, " | |
| "yields at least 5 structural instances and passes the median pairwise " | |
| "RMSD screen; entries failing any of those steps, patterns whose matches " | |
| "were skipped after download failures, and functions without a PROSITE " | |
| "signature or without an experimental structure are absent. Because the " | |
| "historical run log, PDB snapshot and Foldseek version were not " | |
| "retained, the rejected and skipped inventories cannot be enumerated. " | |
| "Within the released cases, water atoms were stripped and ligand, ion " | |
| "and nucleic-acid coordinates are excluded from motif_pdbs, which holds " | |
| "polymer atoms only; original_pdbs retain the non-polymer entities of the " | |
| "deposition. Multi-chain and interface sites are therefore represented " | |
| "by a single chain only." | |
| ), | |
| "rai:dataCollectionTimeFrame": "2021-09-29", | |
| "rai:dataImputationProtocol": ( | |
| "No values were imputed, interpolated or modelled. Candidates that were " | |
| "unresolved, too large, failed to download or lacked 5 conserved " | |
| "instances were dropped rather than filled in, and no case carries " | |
| "placeholder coordinates. The only post-hoc correction is documented in " | |
| "CHANGELOG.md: at release 1.0.0 the contig of case 1A22_PS01352_c1 " | |
| "shortened an internal gap minimum from 25 to 21 residues so that the " | |
| "specified contig can reach the 75-residue target length, leaving motif " | |
| "residues, order, maximum gap and target length unchanged." | |
| ), | |
| # --- Preprocessing --------------------------------------------------- | |
| "rai:dataPreprocessingProtocol": [ | |
| "Pattern span filter 12-100 residues and at most 25 PDB records per " | |
| "pattern (prosite_filters in configs/reference.yaml).", | |
| "Contiguous pattern matches merged into motif segments; short internal " | |
| "wildcards absorbed as redesignable motif positions, longer wildcard " | |
| "spans kept as non-motif context, which is why 207 cases hold a single " | |
| "motif segment, 11 hold two and 2 hold three (235 segments in total).", | |
| "Structural conservation filter: minimum 5 instances and median pairwise " | |
| "CA RMSD below the configured 2.0 A threshold.", | |
| "Foldseek clustering of motif fragments (min_seq_id 0.5, cov_mode 1, " | |
| "cov_threshold 0.8) for cluster ratios, multi-state group 4 labels and " | |
| "the 400-row cluster_membership.csv. Note that configs/reference.yaml " | |
| "records multi_state_ratio 0.75 and multi_state_min_n 3, but " | |
| "PipelineConfig does not load those keys and the export code defaults to " | |
| "0.9 and 10; the historical settings are unknown, so the 96 group 4 " | |
| "labels are reported as released rather than re-derived.", | |
| "Removal of cases duplicating the reference MotifBench problems.", | |
| "Assembly context tagging from deposition metadata: pdb_n_chains, " | |
| "pdb_total_len, pdb_max_chain_len, pdb_has_nucleic_acid, " | |
| "pdb_is_ribosomal and pdb_is_huge_assembly, mapped to core, ribosomal " | |
| "or huge_assembly.", | |
| "Normalization on export: residue renumbering, chain remapping recorded " | |
| "in normalisation_chain_map, motif-only PDB with one chain per segment, " | |
| "water atoms stripped and non-polymer entities excluded.", | |
| "Contig construction against the reference scaffold lengths 75, 100, " | |
| "125, 150, 175, 200 and 225, with overly large internal gap minima " | |
| "reduced only as far as needed to fit the target length.", | |
| ], | |
| "rai:dataPreprocessingPlatform": [ | |
| "Python 3 command-line pipeline in construction/motifbench_prosite plus " | |
| "the external Foldseek binary, run from this repository; no hosted " | |
| "data-processing service or managed cluster is documented." | |
| ], | |
| "rai:preprocessingSoftwarePackages": [ | |
| "Dependencies declared by construction/pyproject.toml: python>=3.10, " | |
| "pandas>=1.5, biopython>=1.81, numpy, xarray, scipy, MDAnalysis, PyYAML " | |
| "and tqdm, plus Foldseek for structural clustering. The exact versions " | |
| "of the historical construction run are not established " | |
| "(construction/README.md), so they are not asserted here.", | |
| ], | |
| "rai:preprocessingVerification": [ | |
| "python3 -m pytest tests -q runs the release suite: Croissant descriptor " | |
| "reproducibility, table and identifier integrity, attribution and " | |
| "checksum tests.", | |
| "python3 scripts/validate_release.py re-derives every released residue " | |
| "set from the distributed PDB files, verifies that each motif PDB " | |
| "contains exactly the annotated residues with one CA atom each, checks " | |
| "that all exported CA coordinates match the corresponding source " | |
| "residues, confirms all 220 contigs are feasible for their target " | |
| "lengths, and compares 445 pinned digests in provenance/release-sha256.txt " | |
| "with the files and with the Hugging Face manifest.", | |
| "python3 -m mlcroissant validate --jsonld croissant.json (mlcroissant " | |
| "1.1.1) parses the descriptor and its record sets.", | |
| "A fresh reconstruction of the published selection has not been " | |
| "reproduced and cannot be, so the filters above are documented rather " | |
| "than re-executed.", | |
| ], | |
| # --- Annotation ------------------------------------------------------ | |
| "rai:dataAnnotationProtocol": [ | |
| "Motif boundaries come from PROSITE pattern matches mapped onto residue " | |
| "indices and coordinates of the source chain; redesignable_segments " | |
| "records the matched positions whose identity may be redesigned and " | |
| "not_motif_segments is empty in this release.", | |
| "Sequence annotations motif_entry, motif_name, pattern, pdoc and " | |
| "pdoc_url are copied verbatim from prosite.dat of release 2021_04, so " | |
| "they carry the curation state of PROSITE rather of this benchmark.", | |
| "Structural annotations median_pairwise_rmsd, rmsd_instance_count and " | |
| "rmsd_common_length are computed by MDAnalysis over the available " | |
| "instances of the motif segment set (5 to 316 instances, common aligned " | |
| "length 12 to 78 residues here).", | |
| "multi_state and group 4 come from Foldseek cluster ratios; assembly " | |
| "flags come from deposition metadata as described above.", | |
| "Contig annotations (contigs, contig, contig_original, length) are " | |
| "generated from the segment geometry by the export stage.", | |
| "No human annotation, no annotation guideline document and no " | |
| "annotator-agreement measurement exist for these fields; quality control " | |
| "is programmatic (see rai:preprocessingVerification).", | |
| "Motif function is not annotated here: it is inherited from the PROSITE " | |
| "signature and its PDOC page, reachable through pdoc_url.", | |
| ], | |
| "rai:dataAnnotationPlatform": [ | |
| "Not applicable: no human annotation platform, labeling service or " | |
| "crowdsourcing system was used; all attributes are derived by the " | |
| "construction pipeline and stored in motif_cases_metadata_croissant.csv, " | |
| "contigs.csv, contig_specifications.csv and cluster_membership.csv." | |
| ], | |
| "rai:annotationsPerItem": [ | |
| "One automated annotation record per case: 34 columns in " | |
| "motif_cases_metadata_croissant.csv, 9 in test_cases.csv, plus one contig " | |
| "row each; 0 human annotations per item. cluster_membership.csv adds " | |
| "180 non-representative member rows, so 400 member annotations cover the " | |
| "341 clustered PROSITE entries behind the 220 released representatives." | |
| ], | |
| "rai:machineAnnotationTools": [ | |
| "MDAnalysis (pairwise CA RMSD), Foldseek (structural clustering and " | |
| "multi-state labelling), Biopython (structure parsing, PDB retrieval, " | |
| "fragment writing), pandas and numpy (table construction)." | |
| ], | |
| "rai:annotatorDemographics": [ | |
| "Not applicable: no human annotators, and therefore no inter-annotator " | |
| "agreement, were involved in producing any released annotation." | |
| ], | |
| # --- Uses, biases, limitations, impact ------------------------------- | |
| "rai:dataUseCases": [ | |
| "Intended use: standardized evaluation of motif-scaffolding generative " | |
| "models, comparing whether a model can build a scaffold of the requested " | |
| "length around a fixed functional motif, with target coverage and " | |
| "structural recovery computed by the companion evaluation specification " | |
| "and per-solution metrics.", | |
| "Intended use: stratified analysis by assembly context (core, ribosomal, " | |
| "huge_assembly), by MotifBench group (1: 113, 2: 9, 3: 2, 4 multi-state: " | |
| "96 cases), by motif length (11 to 53 residues) and by structural " | |
| "conservation (median_pairwise_rmsd, rmsd_instance_count).", | |
| "Intended use: a documented, checksum-pinned and PROSITE-annotated " | |
| "benchmark panel for reporting and reproducing protein design results, " | |
| "and a starting point for dynamics-aware evaluation that requires " | |
| "separate simulation, since no trajectories are included here.", | |
| "Not intended: as a source of experimentally verified function, as a " | |
| "biological safety or risk assessment, as a therapeutic or engineering " | |
| "specification, or as a general-purpose training set; it is a small " | |
| "evaluation panel with no train, validation or test split.", | |
| "Not intended: as an unbiased measure of generalization, because " | |
| "overlap with the training data of evaluated models cannot be excluded " | |
| "and because the case set is heavily biased toward single conformations " | |
| "and contiguous motifs.", | |
| ], | |
| "rai:dataBiases": [ | |
| "Source-annotation bias: coverage follows PROSITE 2021_04 signatures and " | |
| "the historically well-studied families that have many solved " | |
| "structures, so abundant superfamilies are over-represented and " | |
| "under-solved protein classes are absent altogether.", | |
| "Structural-method bias: 194 of 220 cases come from X-ray diffraction, " | |
| "only 18 from solution NMR, 7 from electron microscopy and 1 from " | |
| "solution scattering, favouring rigid, crystallizable, soluble domains; " | |
| "membrane and transient complexes are under-represented.", | |
| "Selection bias toward rigidity: the 5-instance and RMSD-conservation " | |
| "filters prefer motifs that recur in nearly identical conformations, so " | |
| "flexible, context-dependent and induced-fit sites are systematically " | |
| "under-represented, and the scarcity of group 2 (9) and group 3 (2) " | |
| "cases reflects the contiguous, near-contiguous nature of PROSITE " | |
| "patterns rather than the true prevalence of multi-segment sites.", | |
| "Redundancy bias: 220 representatives stand for 341 clustered PROSITE " | |
| "entries and 16 source depositions serve more than one case (one " | |
| "deposition serves 19), so cases are not independent samples and " | |
| "aggregated scores are dominated by the largest clusters.", | |
| "Conformational bias: each case pins one representative state, so even " | |
| "the 96 multi-state cases describe a distribution only through cluster " | |
| "ratios, not through the alternative coordinates themselves.", | |
| "Train-test contamination: the sources are public and widely used, so " | |
| "pretrained structure models may have been trained on these or closely " | |
| "related structures; no held-out guarantee, sequence-identity split or " | |
| "date cutoff is provided, and the historical construction PDB snapshot " | |
| "was not recorded.", | |
| "Taxonomic and functional bias toward model organisms and enzymatic " | |
| "families represented in PROSITE; the 30 ribosomal and 11 huge_assembly " | |
| "cases are single-chain excerpts of larger complexes and do not carry " | |
| "their partners.", | |
| ], | |
| "rai:dataLimitations": [ | |
| "The benchmark covers only structurally conserved, contiguous or " | |
| "near-contiguous within-chain segments from PROSITE-linked experimental " | |
| "structures; it under-represents discontinuous functional sites formed " | |
| "by distant sequence positions, motifs with no solved structure and " | |
| "functions that depend on ligands, ions, nucleic acids, membranes or " | |
| "interaction partners, which are excluded from the motif files.", | |
| "Only one state per case is released, so a benchmark score does not " | |
| "characterise conformational ensembles, folding pathways or thermodynamic " | |
| "stability, and the paper's central finding is precisely that static " | |
| "recovery and dynamic stability disagree.", | |
| "High static success on these cases establishes neither biochemical " | |
| "activity of the transferred motif nor expression, solubility or safety " | |
| "of the design; nothing here substitutes for experimental testing.", | |
| "Statistical caution: 220 cases from 174 PROSITE entries and 187 " | |
| "depositions are not independent observations, no train/validation/test " | |
| "partition or cluster-disjoint split is provided, group 2 and group 3 " | |
| "contain only 9 and 2 cases, and no per-case confidence or uncertainty " | |
| "estimate accompanies the annotation values.", | |
| "Reproducibility limits: the historical run log, source revision, PDB " | |
| "snapshot, locked environment and Foldseek version were not retained and " | |
| "no reconstruction has been shown to reproduce the published selection, " | |
| "so the released files are the authoritative definition; 9 cases report " | |
| "median pairwise RMSD below 0.1 A and 5 cases above the 2.0 A threshold " | |
| "recorded in configs/reference.yaml, which is consistent with the " | |
| "documented uncertainty about the historical filter settings and makes " | |
| "strict threshold-based reproduction impossible.", | |
| "No functional annotation beyond the inherited PROSITE signature, no " | |
| "experimental activity data, no dynamics information, no designed " | |
| "solutions and no evaluation trajectories are included; sequence-side " | |
| "designs must be produced by the user's model and judged by the " | |
| "companion evaluation code.", | |
| ], | |
| "rai:personalSensitiveInformation": [ | |
| "The dataset contains no personal, human-subject or user-generated data: " | |
| "the released files carry protein sequence patterns, residue numbering, " | |
| "atomic coordinates and structural statistics only. No names, contact " | |
| "details, health information, identifiers of individuals, positions or " | |
| "other sensitive attributes are distributed; the demographic axes used " | |
| "for people-centred datasets (gender, ethnicity, socio-economic status, " | |
| "geography, language, age, culture, religion, disability status) do not " | |
| "apply, and species or organism metadata is limited to what the PDB " | |
| "deposition names in structure titles. Author and affiliation metadata " | |
| "describes the researchers who produced the benchmark, not data " | |
| "subjects, and no crowdsourced or third-party labour contributed to it." | |
| ], | |
| "rai:dataSocialImpact": ( | |
| "Positive: it makes a class of protein design capability measurable and " | |
| "reproducible against documented PROSITE and PDB sources, which supports " | |
| "transparent comparison, failure analysis and, in the long run, more " | |
| "reliable computational design of enzymes and binders. Negative and " | |
| "dual-use: the same capability is shared with any user, and progress on " | |
| "static motif transfer can be over-interpreted as progress toward " | |
| "functional proteins; benchmark results can also be biased by the " | |
| "structural coverage of the source databases, and inflated claims about " | |
| "designed proteins could misdirect downstream research. Mitigations: " | |
| "the panel ships evaluation specifications only, with no model weights, " | |
| "no generation code and no wet-lab protocols; the documented " | |
| "representativeness and reproduction limits above constrain the claims " | |
| "that can be made from a score; experimental validation and applicable " | |
| "biosafety review remain the responsibility of downstream users." | |
| ), | |
| "rai:dataConsent": ( | |
| "Not applicable: no human participants or personal data were collected, " | |
| "so no consent process was involved. Upstream consent and release terms " | |
| "apply to the redistributed PDB and PROSITE content: PROSITE 2021_04 " | |
| "specifies CC BY-NC-ND 4.0 for its pattern definitions and documentation " | |
| "and PDB entries remain under their deposited licenses." | |
| ), | |
| # --- Optional flags (data_modality / size / maintenance are omitted " | |
| # because mlcroissant 1.1.1 does not accept them on sc:Dataset). | |
| "rai:hasSyntheticData": False, | |
| } | |
| FIELDS = { | |
| "test_cases": { | |
| "pdb_id": "Unique BILBY-PRO benchmark case identifier, not just a four-character PDB ID.", | |
| "motif_residues": "Semicolon-separated chain and inclusive residue ranges in the normalized motif PDB.", | |
| "redesign_idcs": "Normalized motif residues whose amino acid identity may be redesigned.", | |
| "length": "Required total scaffold length in residues.", | |
| "group": "Benchmark group: segment-count groups 1-3 or multi-state group 4.", | |
| "not_motif": "Non-motif segments in normalized coordinates; empty in this release.", | |
| "motif_residues_original": "Motif segments in original PDB chain and residue numbering.", | |
| "redesign_idcs_original": "Redesignable residues in original PDB coordinates.", | |
| "not_motif_original": "Original structure segments outside the motif.", | |
| }, | |
| "motif_cases_metadata_croissant": { | |
| "benchmark_pdb_id": "Unique benchmark case identifier, joining the test-case and PDB files.", | |
| "case_id": "Canonical cluster-and-variant case identifier, such as cluster_085_c1.", | |
| "motif_entry": "PROSITE pattern accession of the selected representative motif.", | |
| "motif_name": ( | |
| "PROSITE entry name, copied verbatim from the PROSITE 2021_04 " | |
| "release; upstream PROSITE terms apply to this string." | |
| ), | |
| "pattern": ( | |
| "PROSITE sequence pattern, copied verbatim from the PROSITE 2021_04 " | |
| "release in PROSITE notation (CYS and HIS positions and position " | |
| "counts); the matching segment is fixed during scaffolding and its " | |
| "residue identities must be recovered, while redesignable_segments " | |
| "lists the positions whose amino acid identity may change. Upstream " | |
| "PROSITE terms apply to this string." | |
| ), | |
| "source_pdb": "Four-character PDB identifier of the source experimental structure.", | |
| "source_chain": "Source structure chain identifier before normalization.", | |
| "motif_segments": "Semicolon-separated normalized motif chain and inclusive residue ranges.", | |
| "motif_length": "Number of retained motif residues.", | |
| "scaffold_prefix_len": "Number of residues preceding the motif in the source structure.", | |
| "scaffold_suffix_len": "Number of residues following the motif in the source structure.", | |
| "motif_placement": "Colon-delimited native gaps and original-chain motif segments; not the design contig.", | |
| "redesignable_segments": "Normalized motif positions whose amino acid identities may be redesigned.", | |
| "not_motif_segments": "Normalized non-motif segments, empty in this release.", | |
| "pdoc": "PROSITE documentation accession associated with the motif entry.", | |
| "pdoc_url": "Official PROSITE documentation page URL.", | |
| "assembly_category": "Source assembly annotation: core, ribosomal, or huge_assembly.", | |
| "pdb_n_chains": "Number of chains in the source structure used for assembly annotation.", | |
| "pdb_total_len": "Total residue count used for source assembly annotation.", | |
| "pdb_max_chain_len": "Maximum chain length used for source assembly annotation.", | |
| "pdb_has_nucleic_acid": "Whether source assembly annotation detected nucleic acid.", | |
| "pdb_is_ribosomal": "Whether source assembly annotation detected ribosomal keywords.", | |
| "pdb_is_huge_assembly": "Whether source assembly exceeded a configured size threshold.", | |
| "median_pairwise_rmsd": "Median pairwise motif-instance RMSD in angstroms.", | |
| "rmsd_instance_count": "Number of instances used for the structural conservation statistics.", | |
| "rmsd_common_length": "Common motif length used for pairwise structural analysis.", | |
| "multi_state": "Whether the representative was annotated as multi-state.", | |
| "motif_segments_original": "Motif segments in the source PDB chain and residue numbering.", | |
| "redesignable_segments_original": "Redesignable segments in the source PDB numbering.", | |
| "not_motif_segments_original": "Non-motif source-structure segments in original numbering.", | |
| "normalisation_chain_map": "Mapping from original motif segments to exported chain and residue ranges.", | |
| "motif_pdb_path": "Repository-relative path to the normalized motif-only PDB.", | |
| "original_pdb_path": "Repository-relative path to the corresponding source structure PDB.", | |
| "structure_file_format": "File format of the associated source structure, PDB in this release.", | |
| }, | |
| "contigs": { | |
| "benchmark_pdb_id": "Unique benchmark case identifier.", | |
| "case_id": "Canonical cluster-and-variant case identifier.", | |
| "contigs": "Original-numbering semicolon-separated motif segments and inclusive variable-gap ranges.", | |
| }, | |
| "contig_specifications": { | |
| "problem": "Unique benchmark case identifier.", | |
| "length": "Target total scaffold length in residues.", | |
| "contig": "Normalized motif segments and variable-gap ranges, constrained by target length.", | |
| "contig_original": "Equivalent contig using source PDB chain and residue numbering.", | |
| }, | |
| "cluster_membership": { | |
| "benchmark_pdb_id": "Representative benchmark case identifier; multiple rows may share this value.", | |
| "case_id": "Canonical cluster-and-variant identifier of the benchmark representative.", | |
| "motif_entry": "PROSITE pattern accession for this cluster member, which may differ from the representative.", | |
| "role": "Whether this motif entry is the representative or another member of the cluster.", | |
| }, | |
| } | |
| INTEGER = { | |
| "length", "group", "motif_length", "scaffold_prefix_len", "scaffold_suffix_len", | |
| "pdb_n_chains", "pdb_total_len", "pdb_max_chain_len", "rmsd_instance_count", | |
| "rmsd_common_length", | |
| } | |
| BOOLEAN = {"pdb_has_nucleic_acid", "pdb_is_ribosomal", "pdb_is_huge_assembly", "multi_state"} | |
| RELATIONS = { | |
| ("motif_cases_metadata_croissant", "benchmark_pdb_id"): "test_cases/pdb_id", | |
| ("contigs", "benchmark_pdb_id"): "test_cases/pdb_id", | |
| ("contig_specifications", "problem"): "test_cases/pdb_id", | |
| ("cluster_membership", "benchmark_pdb_id"): "test_cases/pdb_id", | |
| ("contigs", "case_id"): "motif_cases_metadata_croissant/case_id", | |
| ("cluster_membership", "case_id"): "motif_cases_metadata_croissant/case_id", | |
| } | |
| CONTEXT = { | |
| "@language": "en", "@vocab": "https://schema.org/", "cr": "http://mlcommons.org/croissant/", | |
| "sc": "https://schema.org/", "dct": "http://purl.org/dc/terms/", | |
| "containedIn": "cr:containedIn", | |
| "prov": "http://www.w3.org/ns/prov#", | |
| "rai": "http://mlcommons.org/croissant/RAI/", | |
| "data": {"@id": "cr:data", "@type": "@json"}, | |
| "examples": {"@id": "cr:examples", "@type": "@json"}, | |
| "conformsTo": "dct:conformsTo", "citeAs": "cr:citeAs", "recordSet": "cr:recordSet", | |
| "field": "cr:field", "key": "cr:key", "source": "cr:source", "extract": "cr:extract", | |
| "fileObject": "cr:fileObject", "fileSet": "cr:fileSet", "column": "cr:column", | |
| "includes": "cr:includes", "references": "cr:references", | |
| "equivalentProperty": "cr:equivalentProperty", "fileProperty": "cr:fileProperty", | |
| "format": "cr:format", "isLiveDataset": "cr:isLiveDataset", "jsonPath": "cr:jsonPath", | |
| "md5": "cr:md5", "parentField": "cr:parentField", "path": "cr:path", | |
| "regex": "cr:regex", "repeated": "cr:repeated", "replace": "cr:replace", | |
| "samplingRate": "cr:samplingRate", "separator": "cr:separator", | |
| "subField": "cr:subField", "transform": "cr:transform", | |
| "dataType": {"@id": "cr:dataType", "@type": "@vocab"}, | |
| } | |
| def build(): | |
| with (ROOT / "provenance/release-sha256.txt").open() as handle: | |
| hashes = dict(line.rstrip("\n").split(" ", 1)[::-1] for line in handle) | |
| description = ( | |
| "BILBY-PRO benchmarks functional motif scaffolding in protein design with 220 cases " | |
| "from 174 PROSITE pattern entries. PROSITE 2021_04 (29 September 2021), maintained " | |
| "by SIB at https://prosite.expasy.org/, provided pattern definitions and 3D PDB " | |
| "cross-references. Its licensing conditions are at " | |
| "https://prosite.expasy.org/prosite_license.html. Structures and PROSITE-derived " | |
| "patterns retain upstream terms (PROSITE 2021_04 specifies CC BY-NC-ND 4.0); " | |
| "CC BY 4.0 covers independently constructed benchmark definitions and added " | |
| "annotations. Construction software by Emile de Bruyn is Apache-2.0. " | |
| "Release 1.0.0 is a frozen, checksum-pinned snapshot of the peer-review benchmark " | |
| f"(published 2026-11-02, DOI { DOI }), not a continuously updated stream: " | |
| "pin commit " | |
| "b0312e0433191ec425c67e2f9a620c2f614551c2 and verify it against " | |
| "provenance/release-sha256.txt, because the main branch may receive later " | |
| "revisions. Responsible-AI and provenance metadata (rai:* and prov:* properties, " | |
| "conforming to http://mlcommons.org/croissant/RAI/1.0) document collection, " | |
| "preprocessing, annotation, intended uses, biases and limitations." | |
| ) | |
| descriptor = { | |
| "@context": CONTEXT, "@type": "sc:Dataset", | |
| "conformsTo": [ | |
| "http://mlcommons.org/croissant/1.1", | |
| "http://mlcommons.org/croissant/RAI/1.0", | |
| ], | |
| "name": "BILBY-PRO", "alternateName": "BILBY-PRO benchmark", | |
| "description": description, "version": "1.0.0", "url": URL, | |
| "@id": URL, "identifier": DOI_URL, "sameAs": [DOI_URL], | |
| "keywords": KEYWORDS, | |
| "datePublished": DATE_PUBLISHED, | |
| "isLiveDataset": False, | |
| "license": "https://creativecommons.org/licenses/by/4.0/", | |
| "creator": people(), | |
| "author": people(), | |
| "publisher": {"@type": "sc:Organization", "name": "HFMI-PROFOUND"}, | |
| "citeAs": CITE_AS, | |
| # The benchmark dataset is cited above; the accompanying research paper is | |
| # described in CITATION.cff and README.md. | |
| "citation": ( | |
| PAPER_TITLE + " -- the publication that introduces and evaluates this " | |
| "benchmark; see CITATION.cff for the author-preferred citation." | |
| ), | |
| **PROVENANCE, **RAI_FIELDS, | |
| "distribution": [{ | |
| "@type": "cr:FileSet", "@id": "repository", "name": "repository", | |
| "description": ( | |
| "Released tree of the Hugging Face Git repository: the 220 motif " | |
| "and 220 original coordinate files of the two structure FileSets " | |
| "below, plus the CSV tables and the provenance, reconstruction " | |
| f"and validation material. Frozen at commit {RELEASE_COMMIT}; " | |
| "main may receive later revisions, so cite the commit or the DOI " | |
| "rather than the branch." | |
| ), | |
| "contentUrl": URL, "encodingFormat": "git+https", | |
| "includes": ["motif_pdbs/*.pdb", "original_pdbs/*.pdb"], | |
| }], "recordSet": [], | |
| } | |
| keys = {"test_cases": "pdb_id", "motif_cases_metadata_croissant": "benchmark_pdb_id", | |
| "contigs": "benchmark_pdb_id", "contig_specifications": "problem"} | |
| for name, descriptions in FIELDS.items(): | |
| filename = f"{name}.csv" | |
| with (ROOT / filename).open(newline="") as handle: | |
| columns = next(csv.reader(handle)) | |
| if set(columns) != set(descriptions): | |
| raise ValueError(f"{filename}: field descriptions do not match CSV columns") | |
| descriptor["distribution"].append({ | |
| "@type": "cr:FileObject", "@id": filename, "name": filename, | |
| "description": f"BILBY-PRO {name.replace('_', ' ')} table.", | |
| "contentUrl": f"{URL}/resolve/main/{filename}", "encodingFormat": "text/csv", | |
| "sha256": hashes[filename], | |
| }) | |
| record = {"@type": "cr:RecordSet", "@id": name, "name": name, | |
| "description": f"Rows of {filename}.", "field": []} | |
| if name in keys: | |
| record["key"] = {"@id": f"{name}/{keys[name]}"} | |
| for column in columns: | |
| kind = "Boolean" if column in BOOLEAN else "Integer" if column in INTEGER else ( | |
| "Float" if column == "median_pairwise_rmsd" else "Text" | |
| ) | |
| field = { | |
| "@type": "cr:Field", "@id": f"{name}/{column}", "name": column, | |
| "description": descriptions[column], "dataType": f"sc:{kind}", | |
| "source": {"fileObject": {"@id": filename}, "extract": {"column": column}}, | |
| } | |
| if (name, column) in RELATIONS: | |
| field["references"] = {"field": {"@id": RELATIONS[name, column]}} | |
| record["field"].append(field) | |
| descriptor["recordSet"].append(record) | |
| for directory, description in ( | |
| ("motif_pdbs", "Normalized motif-only PDBs, one chain per motif segment."), | |
| ("original_pdbs", "Source PDB structures corresponding to the benchmark cases."), | |
| ): | |
| descriptor["distribution"].append({ | |
| "@type": "cr:FileSet", "@id": directory, "name": directory, | |
| "description": description, "encodingFormat": "chemical/x-pdb", | |
| "containedIn": {"@id": "repository"}, "includes": f"{directory}/*.pdb", | |
| }) | |
| return descriptor | |
| if __name__ == "__main__": | |
| (ROOT / "croissant.json").write_text(json.dumps(build(), indent=2, ensure_ascii=False) + "\n") | |