--- pretty_name: Assay-aware BindingDB tags: - binding-affinity - drug-discovery - protein-ligand - biophysics - chemistry - biology - tabular - datasets size_categories: - 100K_seed_` reproduce the data used in the downstream binding affinity prediction experiments for seeds 0–9 and expose `train`, `validation`, and `test` splits. Eligible records require: - A precomputed Boltz-2 affinity representation. - A Qwen3 assay-context embedding. - Exactly one positive numeric Kd, Ki, or IC50 value. - No `<` or `>` qualifier. Unique PMIDs are shuffled with NumPy `RandomState(seed)`. Using integer truncation, 20% are assigned to test, 10% to validation, and the remainder to train, preventing PMID leakage. ## Data schema | Field | Type | Description | |---|---|---| | `reactant_set_id` | integer | BindingDB reactant-set identifier and primary record identifier. | | `pmid` | integer | PubMed identifier for the source publication. | | `protein` | string | Protein or biological target name. | | `ligand.smiles` | string | Ligand structure represented as SMILES. | | `affinity_data.type` | string | Measurement type, such as `Kd`, `Ki`, or `IC50`. | | `affinity_data.value` | float | Numeric affinity value. | | `affinity_data.relation` | string | Reported comparison operator, such as `=`, `<`, or `>`. | | `affinity_data.unit` | string | Unit associated with the affinity value. | | `DESCRIPTION` | string | BindingDB assay description. | | `assay_type` | string | One of `itc`, `spr`, `fpa`, or `rba`. | | `search_path` | list of strings | Locations searched when extracting experimental context. | | `supplementary_source` | list of strings | Supplementary sources used during extraction. | | `references_previous` | string, nullable | Relevant preceding references captured from the publication. | | `original_paragraph` | JSON string, nullable | Source passages serialized as JSON. | | `structured_description` | JSON string, nullable | Assay-aware structured extraction serialized as JSON. | | `source_filename` | string | Name of the source JSON file. | | `source_record_key` | string | Original record key in the source file. | `original_paragraph` and `structured_description` are JSON-encoded strings rather than nested Arrow objects because their internal structures vary among publications and assay types. They can be decoded into Python objects when nested data is needed. Both fields are nullable. ## Examples Install the Hugging Face Datasets library before running the examples: ```bash pip install datasets ``` ### Load the full dataset ```python from datasets import load_dataset dataset = load_dataset( "anonymousapple/Assay-aware-BindingDB", split="full", ) print(dataset) print(f"Number of records: {len(dataset):,}") ``` ### Load one complete assay Pass the assay configuration name as the second argument: ```python from datasets import load_dataset dataset = load_dataset( "anonymousapple/Assay-aware-BindingDB", "itc", split="full", ) print(f"ITC records: {len(dataset)}") ``` ### Read an individual record ```python record = dataset[0] print("Reactant set:", record["reactant_set_id"]) print("PMID:", record["pmid"]) print("Assay:", record["assay_type"]) print("Protein:", record["protein"]) print("Ligand SMILES:", record["ligand"]["smiles"]) affinity = record["affinity_data"] print( "Affinity:", affinity["type"], affinity["relation"], affinity["value"], affinity["unit"], ) ``` ### Read multiple records ```python for record in dataset.select(range(5)): print( record["reactant_set_id"], record["protein"], record["assay_type"], ) ``` ### Read structured descriptions Use `json.loads()` to decode the JSON string and `json.dumps()` with indentation to display it in a readable structure: ```python import json record = dataset[0] value = record["structured_description"] if value is not None: structured_description = json.loads(value) print( json.dumps( structured_description, indent=2, ensure_ascii=False, ) ) ``` After decoding, nested values can be accessed normally: ```python if record["structured_description"] is not None: structured_description = json.loads( record["structured_description"] ) print(json.dumps(structured_description, indent=2, ensure_ascii=False)) ``` The same approach works for `original_paragraph`: ```python value = record["original_paragraph"] if value is not None: original_paragraph = json.loads(value) print(json.dumps(original_paragraph, indent=2, ensure_ascii=False)) ``` ### Load a training-compatible seeded split Combine the assay and split seed in the configuration name, then select a normal Hugging Face split: ```python from datasets import load_dataset itc_train_seed_1 = load_dataset( "anonymousapple/Assay-aware-BindingDB", "itc_seed_1", split="train", ) itc_validation_seed_1 = load_dataset( "anonymousapple/Assay-aware-BindingDB", "itc_seed_1", split="validation", ) itc_test_seed_1 = load_dataset( "anonymousapple/Assay-aware-BindingDB", "itc_seed_1", split="test", ) ```