a3m unknown | __key__ string | __url__ string |
|---|---|---|
[
62,
113,
117,
101,
114,
121,
95,
48,
10,
77,
76,
71,
70,
76,
83,
78,
72,
76,
86,
76,
67,
82,
83,
82,
76,
80,
76,
81,
78,
78,
75,
70,
84,
83,
65,
75,
82,
86,
71,
71,
65,
84,
89,
86,
65,
82,
80,
67,
77,
76,
76,
78,
... | PDB_paired_msas/complex_54618 | hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_paired_msas.tar.zst.part_aa |
"PnF1ZXJ5XzAKTU5QRkVLR1BEUFRLVE1MRUFTVEdQRlRZVFRUVFZTU1RUQVNHWVJRR1RJWUhQVE5WVEdQRkFBVkFWVlBHWUxBU1F(...TRUNCATED) | PDB_paired_msas/complex_63651 | "hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_p(...TRUNCATED) |
"PnF1ZXJ5XzAKTUtEQUhLVlZXVEVHTUZMUlBISEZRUUFFTllMRUdZTVJOV0dRQUhTR0NGV0dGTFRMRExEUVRMTFJRR0tJQUxOQUF(...TRUNCATED) | PDB_paired_msas/complex_51146 | "hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_p(...TRUNCATED) |
"PnF1ZXJ5XzAKTUFISEhISEhTU0dMRVZMRlFHUE1TU05NSUtBRENWVklFRFNGUkdGUFRFWUZDVFNQUllERUNMRFlWTElQTkdNSUt(...TRUNCATED) | PDB_paired_msas/complex_93097 | "hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_p(...TRUNCATED) |
"PnF1ZXJ5XzAKR1NITVRFQUVZTEFOWURQS0FGS0FRTExUVkRBVkxGVFlIRFFRTEtWTExWUVJTTkhQRkxHTFdHTFBHR0ZJREVUQ0R(...TRUNCATED) | PDB_paired_msas/complex_84269 | "hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_p(...TRUNCATED) |
"PnF1ZXJ5XzAKRElWTFRRU1BHU0xBVlNMR1FSQVRJU0NSQVNFU1ZERERHTlNGTEhXWVFRS1BHUVBQS0xMSVlSU1NOTElTR0lQRFJ(...TRUNCATED) | PDB_paired_msas/complex_81537 | "hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_p(...TRUNCATED) |
"PnF1ZXJ5XzAKTUlTTkVFUVRQTExLS0lOUFRFU1RTS0FFRU5FS1ZEU0tWS0FGS0tQTFNWRktHUExMSElTUEFFRUxZRkdTVEVTR0V(...TRUNCATED) | PDB_paired_msas/complex_30836 | "hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_p(...TRUNCATED) |
"PnF1ZXJ5XzAKTUVETE5WVkRTSU5HQUdTV0xWQU5RQUxMTFNZQVZOSVZBQUxBSUlJVkdMSUlBUk1JU05BVk5STE1JU1JLSURBVFZ(...TRUNCATED) | PDB_paired_msas/complex_81945 | "hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_p(...TRUNCATED) |
"PnF1ZXJ5XzAKS1FQQUFFUURTU0FFSEFES0dMSExFUVFMWVNWTUVESUNLTFZEQUlQTEhFTFRTSVNDQUtFTExRUVJFTFJSS0xMQUR(...TRUNCATED) | PDB_paired_msas/complex_107880 | "hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_p(...TRUNCATED) |
"PnF1ZXJ5XzAKQUFRUEFFRENORUxQUFJSTlRFSUxUR1NXU0RRVFlQRUdUUUFJWUtDUlBHWVJTTEdOSUlNVkNSS0dFV1ZBTE5QTFJ(...TRUNCATED) | PDB_paired_msas/complex_43894 | "hf://datasets/FosterBirnbaum/PottsMPNN_Training_MSAs@d6e18d926b8d60891ae1f3f2b838eb8e2c20920f/PDB_p(...TRUNCATED) |
Paired & Monomer MSA Database
This repository contains multiple sequence alignments (MSAs) and the mapping files needed to associate them with PDB complexes.
Contents
| File | Size | Description |
|---|---|---|
PDB_paired_msas.tar.zst.part_aa … part_af |
~10.7 GB each | Sharded, zstd-compressed tar archive of the paired PDB MSAs (.a3m files). |
cath42_msas.tar.gz |
13.3 GB | Gzip-compressed tar archive of the CATH 4.2 MSAs. |
cid_mapping.pkl |
7.84 MB | Dictionary mapping PDB chain IDs → a single representative chain ID (collapses duplicate chains). |
complex_map.pkl |
5.54 MB | Serialized ListIDMapper that maps a list of representative PDB IDs → complex_<N> IDs. |
.gitattributes |
— | Git LFS / Xet configuration. |
1. Unpacking the sharded paired MSA archive
PDB_paired_msas.tar.zst was compressed with zstd and then split into six
~10.7 GB shards (part_aa … part_af) so it could be uploaded to the Hub.
The archive was created with:
tar -cvf - -C /orcd/pool/005/keating_shared/fosterb PDB_paired_msas \
| zstd -T0 -10 -c \
| split -b 10G - PDB_paired_msas.tar.zst.part_
Because split used the default alphabetic suffixes (aa, ab, ac …), the
shards must be concatenated in alphabetical order (which part_* does
automatically), then decompressed and untarred.
Requirements
zstd- macOS:
brew install zstd - Debian/Ubuntu:
sudo apt-get install zstd
- macOS:
tar(preinstalled on Linux/macOS)
Option A — one-shot streaming (recommended, uses least disk space)
cat PDB_paired_msas.tar.zst.part_* | zstd -d | tar -xvf -
Option B — step-by-step (easier to debug / resume)
# 1. Reassemble the shards into a single archive
cat PDB_paired_msas.tar.zst.part_* > PDB_paired_msas.tar.zst
# 2. Decompress with zstd
zstd -d PDB_paired_msas.tar.zst -o PDB_paired_msas.tar
# 3. Extract the tar archive
tar -xvf PDB_paired_msas.tar
Note:
cat *relies on the shell expanding the shards in alphabetical order (aa < ab < ac …), which is exactly the order they must be joined in. Verify the shards concatenate to the expected size before decompressing.
After extraction you will have a PDB_paired_msas/ directory containing files
named by complex ID, e.g.:
PDB_paired_msas/
├── complex_100855.a3m
├── complex_101102.a3m
├── complex_101162.a3m
├── complex_101264.a3m
└── ...
See Section 3 for how these
complex_<N> labels map back to PDB complexes.
2. Unpacking the CATH 4.2 MSA archive
cath42_msas.tar.gz is a standard gzip-compressed tarball and can be extracted
in a single command:
tar -xzf cath42_msas.tar.gz
3. Mapping .a3m files to PDB complexes
The .a3m files in PDB_paired_msas/ are not named by PDB accession; they
are named complex_<N>.a3m, where <N> is an integer ID. Two pickle files are
provided to translate between PDB complexes and these complex IDs.
3.1 The two mapping files
cid_mapping.pkl— a plain Pythondict(pdb_match_dict). It maps a"<PDBID>_<chain>"string to a single representative"<PDBID>_<chain>". This collapses chains with identical/duplicate sequence information onto one representative so that redundant chains do not produce distinct complex IDs.complex_map.pkl— a serializedListIDMapper(see class below). It provides a reversible mapping between an ordered list of representative PDB IDs and acomplex_<N>ID. The lists are defined from the PDB-clust dataset (see the GitHub repo referenced below).
3.2 The ListIDMapper class
complex_map.pkl is created by the .save() method of the following class and
must be loaded with its .load() method (it is a dict with keys
list_to_id, id_to_list, and counter):
import pickle
class ListIDMapper:
def __init__(self):
self.list_to_id = {}
self.id_to_list = {}
self.counter = 0
def _make_id(self):
return f"complex_{self.counter}"
def register(self, lst):
"""Register a list and get a unique reversible ID."""
key = tuple(lst) # lists aren't hashable, so use tuple
if key in self.list_to_id:
return self.list_to_id[key]
new_id = self._make_id()
self.list_to_id[key] = new_id
self.id_to_list[new_id] = key
self.counter += 1
return new_id
def get_list(self, list_id):
"""Get the original list back from its ID."""
return list(self.id_to_list[list_id])
def get_id(self, lst):
"""Get ID from list."""
key = tuple(lst)
return self.list_to_id.get(key)
def check_entry(self, lst):
return tuple(lst) in self.list_to_id
def save(self, filename):
with open(filename, "wb") as f:
pickle.dump({
"list_to_id": self.list_to_id,
"id_to_list": self.id_to_list,
"counter": self.counter,
}, f)
def load(self, filename):
with open(filename, "rb") as f:
data = pickle.load(f)
self.list_to_id = data["list_to_id"]
self.id_to_list = data["id_to_list"]
self.counter = data["counter"]
3.3 Loading the mappings
import pickle
# Plain dict: "<PDBID>_<chain>" -> representative "<PDBID>_<chain>"
with open("cid_mapping.pkl", "rb") as f:
pdb_match_dict = pickle.load(f)
# ListIDMapper: list of representative PDB IDs <-> complex_<N>
complex_mapper = ListIDMapper()
complex_mapper.load("complex_map.pkl")
3.4 Going from PDB IDs → complex ID (as used in practice)
For a set of chains belonging to one complex, build the list of representative
IDs and look up the corresponding complex_<N>:
mapped_id_list = []
for t in chains: # t['label'] looks like "1ABC_1"
chain_key = t['label'].split('_')[0] + "_" + chain
mapped_id = pdb_match_dict.get(chain_key)
if mapped_id is None:
mapped_id = chain_key # fall back to the raw ID if unmapped
mapped_id_list.append(mapped_id)
complex_name = complex_mapper.get_id(mapped_id_list) # e.g. "complex_111859"
# -> load PDB_paired_msas/{complex_name}.a3m
3.5 Going the other way: complex ID → PDB IDs
Given an .a3m filename, recover the list of representative PDB IDs it was
built from:
pdb_ids = complex_mapper.get_list("complex_111859")
# -> ['1ABC_1', '2XYZ_1', ...]
Important: the list passed to
get_id()is order-sensitive (keys are stored as tuples). Reconstruct the list in the same order used to build the mapping (the order defined by the PDB-clust dataset).
References
- PDB-clust dataset / ProteinMPNN (definition of the complex lists): https://github.com/dauparas/ProteinMPNN
- Downloads last month
- 41