File size: 7,846 Bytes
f51a864
629d5d5
 
f51a864
 
 
629d5d5
4c87714
f51a864
 
 
629d5d5
 
 
 
 
f51a864
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e5450c1
f51a864
e5450c1
 
629d5d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f51a864
 
629d5d5
f51a864
629d5d5
 
f51a864
 
629d5d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f51a864
629d5d5
 
 
f51a864
629d5d5
 
 
 
 
 
 
 
 
 
 
 
 
f51a864
 
629d5d5
 
 
 
 
f51a864
629d5d5
 
 
 
 
 
 
 
f51a864
 
629d5d5
f51a864
629d5d5
 
f51a864
629d5d5
 
 
 
 
 
 
f51a864
 
629d5d5
f51a864
629d5d5
f51a864
 
629d5d5
 
 
f51a864
 
 
629d5d5
 
f51a864
629d5d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f51a864
 
629d5d5
 
 
f51a864
 
629d5d5
 
f51a864
629d5d5
f51a864
629d5d5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f51a864
 
51c68d3
f51a864
51c68d3
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
---
license: other
pretty_name: OpenProteinSet Archive
size_categories:
  - 100K<n<1M
task_categories:
  - feature-extraction
  - other
tags:
  - biology
  - protein
  - msa
  - openfold
  - openproteinset
  - pdb
  - archive
configs:
  - config_name: files
    default: true
    data_files:
      - split: train
        path: metadata.csv
  - config_name: shards
    data_files:
      - split: train
        path: shards.csv
  - config_name: parts
    data_files:
      - split: train
        path: parts.csv
---

# OpenProteinSet

OpenProteinSet is an open-source corpus released by the OpenFold team (Ahdritz et al., NeurIPS 2023 Datasets and Benchmarks) that reproduces and extends the kind of training data used for AlphaFold2, which DeepMind never released. It contains more than 16 million precomputed multiple sequence alignments (MSAs), structural template hits from the Protein Data Bank, and AlphaFold2 structure predictions, and was used to train OpenFold from scratch to parity with AlphaFold2.
The corpus has two main components. The first is a faithful, updated reconstruction of AlphaFold2's PDB-side training set: MSAs and HHSearch template hits for every unique PDB chain, generated with the same pipeline (JackHMMER against UniRef90 and MGnify, HHBlits against BFD+Uniclust30, HHSearch against PDB70). The second is a Uniclust30-side set: one MSA per Uniclust30 cluster representative, totaling roughly 16M MSAs, from which a maximally diverse and deep subset is identified and paired with AlphaFold2 self-distillation predictions suitable for AlphaFold2-style noisy student training.
## What Is Included

| Component | Files | Size |
|---|---:|---:|
| `alignment_data/` | 524,454 | 600.05 GiB |
| `pdb_data/` | 3 | 52.22 GiB |
| `duplicate_pdb_chains.txt` | 1 | 4.31 MiB |

File types:

| Type | Files | Size |
|---|---:|---:|
| `.a3m` | 393,000 | 535.65 GiB |
| `.hhr` | 131,454 | 64.40 GiB |
| `.zip` | 1 | 51.77 GiB |
| `.json` | 2 | 456.83 MiB |
| `.txt` | 1 | 4.31 MiB |

Packaging summary:

| Item | Count / Size |
|---|---:|
| Original files | 524,458 |
| Original payload | 652.27 GiB |
| Tar shards | 31 |
| Split large-file parts | 3 |
| Archived tar payload | 601.38 GiB |
| Metadata generated | 2026-05-24T22:58:05Z |

## Repository Layout

```text
README.md
_MANIFEST.json
metadata.csv
shards.csv
parts.csv
shards/
  shard-00000.tar
  shard-00001.tar
  ...
large_files/
  pdb_data/pdb_mmcif.zip.part-00000
  pdb_data/pdb_mmcif.zip.part-00001
  pdb_data/pdb_mmcif.zip.part-00002
```

Most files live inside `shards/*.tar`. The large `pdb_data/pdb_mmcif.zip` file is stored as byte parts under `large_files/` so no single uploaded object is excessively large.

## Metadata Tables

`metadata.csv` is the default table shown in the Dataset Viewer. It has one row per original file.

| Column | Meaning |
|---|---|
| `path` | Original relative path in the OpenProteinSet tree. |
| `storage_type` | `tar` for files inside `shards/*.tar`, `parts` for files split into byte parts. |
| `shard_path` | Tar shard to download when `storage_type == "tar"`. |
| `member_path` | Path of the file inside the tar shard. |
| `parts_count` | Number of parts when `storage_type == "parts"`. |
| `part_paths` | Semicolon-separated part paths for split files. |
| `top_level`, `directory`, `filename`, `extension` | Path fields for filtering. |
| `size_bytes`, `size_human`, `modified_utc` | File size and timestamp captured during packaging. |

`shards.csv` has one row per tar shard. `parts.csv` has one row per split file part. `_MANIFEST.json` contains the packaging summary used to build this card.

## Install

Use recent versions of the Hugging Face clients:

```python
# pip install -U huggingface_hub datasets
```

All examples below use Python APIs only.

## Inspect The File List

Load the metadata table with `datasets`:

```python
from datasets import load_dataset

repo_id = "LiteFold/OpenProteinSet-archive"
files = load_dataset(repo_id, "files", split="train")

print(files)
print(files[0])
```

For quick inspection without materializing the whole table:

```python
from datasets import load_dataset

repo_id = "LiteFold/OpenProteinSet-archive"
files = load_dataset(repo_id, "files", split="train", streaming=True)

for row in files:
    if row["extension"] == ".a3m":
        print(row["path"], row["shard_path"], row["size_human"])
        break
```

## Download One File From A Tar Shard

This downloads the shard that contains the file, then extracts only that member.

```python
from pathlib import Path
import tarfile

from datasets import load_dataset
from huggingface_hub import hf_hub_download

repo_id = "LiteFold/OpenProteinSet-archive"
out_dir = Path("./openproteinset")

files = load_dataset(repo_id, "files", split="train", streaming=True)
row = next(item for item in files if item["extension"] == ".a3m")

if row["storage_type"] != "tar":
    raise ValueError(f"{row['path']} is not stored in a tar shard")

shard = hf_hub_download(
    repo_id=repo_id,
    repo_type="dataset",
    filename=row["shard_path"],
)

with tarfile.open(shard) as archive:
    archive.extract(row["member_path"], path=out_dir)

print(out_dir / row["path"])
```

## Reassemble `pdb_mmcif.zip`

`pdb_data/pdb_mmcif.zip` is split into three parts. Reassemble it with the paths listed in `metadata.csv`:

```python
from pathlib import Path

from datasets import load_dataset
from huggingface_hub import hf_hub_download

repo_id = "LiteFold/OpenProteinSet-archive"
out_path = Path("./openproteinset/pdb_data/pdb_mmcif.zip")
out_path.parent.mkdir(parents=True, exist_ok=True)

files = load_dataset(repo_id, "files", split="train")
row = files.filter(lambda item: item["path"] == "pdb_data/pdb_mmcif.zip")[0]

with out_path.open("wb") as dst:
    for part_path in row["part_paths"].split(";"):
        part = hf_hub_download(
            repo_id=repo_id,
            repo_type="dataset",
            filename=part_path,
        )
        with Path(part).open("rb") as src:
            while chunk := src.read(8 * 1024 * 1024):
                dst.write(chunk)

print(out_path)
```

## Download And Restore Everything

This pulls the full repository snapshot, extracts all tar shards, and reassembles any split large files.

```python
from pathlib import Path
import csv
import tarfile

from huggingface_hub import snapshot_download

repo_id = "LiteFold/OpenProteinSet-archive"
snapshot = Path(snapshot_download(repo_id=repo_id, repo_type="dataset"))
out_dir = Path("./openproteinset")
out_dir.mkdir(parents=True, exist_ok=True)

for shard in sorted((snapshot / "shards").glob("*.tar")):
    with tarfile.open(shard) as archive:
        archive.extractall(out_dir)

with (snapshot / "metadata.csv").open(newline="") as handle:
    for row in csv.DictReader(handle):
        if row["storage_type"] != "parts":
            continue

        target = out_dir / row["path"]
        target.parent.mkdir(parents=True, exist_ok=True)
        with target.open("wb") as dst:
            for part_path in row["part_paths"].split(";"):
                with (snapshot / part_path).open("rb") as src:
                    while chunk := src.read(8 * 1024 * 1024):
                        dst.write(chunk)

print(out_dir)
```

## Citation

```
@inproceedings{ahdritz2023openproteinset,
  title     = {OpenProteinSet: Training Data for Structural Biology at Scale},
  author    = {Ahdritz, Gustaf and Bouatta, Nazim and Kadyan, Sachin and Jarosch, Lukas and Berenberg, Daniel and Fisk, Ian and Watkins, Andrew M. and Ra, Stephen and Bonneau, Richard and AlQuraishi, Mohammed},
  booktitle = {Advances in Neural Information Processing Systems 36: Datasets and Benchmarks Track},
  year      = {2023},
  url       = {https://openreview.net/forum?id=gO0kS0eE0F},
  eprint    = {2308.05326},
  archivePrefix = {arXiv},
  primaryClass  = {q-bio.BM}
}
```