RFD4-Proteina Training Mixture and Benchmarks: sample notebook

A worked notebook for RFD4-Proteina Training Mixture and Benchmarks, with 5 code cells and the output each one printed. On Scigantic it opens in a hosted JupyterLab with the dataset already mounted, so nothing is downloaded first.

Provider
NVIDIA
License
cc-by-4.0
Format
NumPy (in sampled files)
Stored at
Hugging Face (https://huggingface.co/datasets/nvidia/RFD4-Proteina)
Access
Free and public. No account with the data provider is needed.

The notebook

RFD4-Proteina: the temporal holdout

RFD4-Proteina is the RosettaCommons/NVIDIA biomolecular design model released in September 2026. This archive carries what it was trained on and what it was measured on. They are very different objects:

what it isusable here
benchmarks/640 annotated mmCIF complexes + 160 nanobody graftsyes, start here
train_datasets/238 GB of Parquet indices pointing at opaque .bin blob shardsnot directly

Everything in benchmarks/ was deposited on or after 2024-01-01, and every training filter is deposition_date < 2024-01-01. That is a clean temporal split you can reuse rather than inventing your own.

Start here

Two things that bite immediately: the files are Zstandard, not gzip, so gzip.open fails; and the panel is 128 files per modality with no protein-only set.

import gemmi, glob
# .cif.zst is Zstandard, and the notebook images do NOT ship the `zstandard`
# package. pyarrow does, and it is in this image, so decompress through it.
import pyarrow as pa

def read_zst(path):
    with pa.CompressedInputStream(pa.OSFile(path, 'rb'), 'zstd') as fh:
        return fh.read().decode()


PANEL = '/mnt/archive/benchmarks/ae_pdb_temporal_holdout_2026_10_04'
files = sorted(glob.glob(f'{PANEL}/protein_ligand/*.cif.zst'))
print(len(files), 'protein-ligand holdout complexes')

cif = read_zst(files[0])

# note: read_structure_string, NOT read_structure_from_string (which does not exist)
st = gemmi.read_structure_string(cif, format=gemmi.CoorFormat.Mmcif)
st.setup_entities()
print(st[0].count_atom_sites(), 'atoms; chains', [ch.name for ch in st[0]])

Output:

128 protein-ligand holdout complexes
1111 atoms; chains ['A', 'M']

What is actually in this panel

Before any numbers, look at it. Each tile is one non-polymer component found across the sample, drawn from the file's own _chem_comp_atom and _chem_comp_bond tables.

The single-atom tiles are metal ions. In a set named protein_ligand, most of the tiles are a single metal atom.

from collections import Counter
from rdkit import Chem, RDLogger
from rdkit.Chem import Draw, AllChem
RDLogger.DisableLog('rdApp.*')   # a few components fail valence; that is expected

METALS = {'CU','ZN','MG','CA','FE','MN','NA','K','NI','CO','CD','HG','PT','FE2','MO','AL'}
ORDER = {'SING': Chem.BondType.SINGLE, 'DOUB': Chem.BondType.DOUBLE,
         'TRIP': Chem.BondType.TRIPLE, 'AROM': Chem.BondType.AROMATIC}
SCAN = files[:40]                 # 40 of 128 keeps this cell quick

def nonpoly_names(path):
    """Component names that are NOT part of the polymer, for one structure."""
    s = gemmi.read_structure_string(read_zst(path), format=gemmi.CoorFormat.Mmcif)
    s.setup_entities()
    out = []
    for ch in s[0]:
        for res in ch:
            info = gemmi.find_tabulated_residue(res.name)   # None for the newest comps
            if info is None or not info.is_amino_acid():
                out.append(res.name)
    return out

def comp_mols(path):
    """{comp_id: Mol} from the file's own component dictionary. Without the bond table
    RDKit has no connectivity and every organic ligand collapses into a stack of atoms."""
    blk = gemmi.cif.read_string(read_zst(path)).sole_block()
    by = {}
    for r in blk.find('_chem_comp_atom.', ['comp_id', 'atom_id', 'type_symbol']):
        if r[2].strip('"\'').upper() == 'H':
            continue
        d = by.setdefault(r[0], {'idx': {}, 'rw': Chem.RWMol()})
        aid = r[1].strip('"\'')
        if aid in d['idx']:
            continue
        d['idx'][aid] = d['rw'].AddAtom(Chem.Atom(r[2].strip('"\'').capitalize()))
    for r in blk.find('_chem_comp_bond.', ['comp_id', 'atom_id_1', 'atom_id_2', 'value_order']):
        d = by.get(r[0])
        if not d:
            continue
        a, b = r[1].strip('"\''), r[2].strip('"\'')
        if a not in d['idx'] or b not in d['idx']:
            continue
        i, j = d['idx'][a], d['idx'][b]
        if d['rw'].GetBondBetweenAtoms(i, j):
            continue                                        # some bonds are listed twice
        d['rw'].AddBond(i, j, ORDER.get(r[3].strip('"\''), Chem.BondType.SINGLE))
    out = {}
    for cid, d in by.items():
        m = d['rw'].GetMol()
        try:
            Chem.SanitizeMol(m)
            AllChem.Compute2DCoords(m)
            out[cid] = m
        except Exception:
            pass
    return out

tally, depictions = Counter(), {}
for f in SCAN:
    names = nonpoly_names(f)
    tally.update(names)
    mols = comp_mols(f)
    for n in names:
        if n in mols:
            depictions.setdefault(n, mols[n])

wanted = [c for c, _ in tally.most_common(12) if c in depictions]
n_metal = sum(1 for c in wanted if c in METALS)
print(f'{n_metal} of the {len(wanted)} most common components are a single metal ion')
Draw.MolsToGridImage([depictions[c] for c in wanted],
                     legends=[f'{c}  ({depictions[c].GetNumAtoms()} atoms)' for c in wanted],
                     molsPerRow=4, subImgSize=(210, 170))

Output:

6 of the 12 most common components are a single metal ion

Which atoms were actually observed

This is the thing that makes the archive worth reading carefully. Missing heavy atoms in partially resolved residues were filled in by TMol Dunbrack side-chain packing, and each one is flagged in a non-standard _atom_site.is_imputed column.

Two traps in one cell. The column order is not canonical here (Cartn_x/y/z sit at positions 21-23, *after* atom_array_index), so you must address columns by name. And is_imputed holds the Python-style strings 'True'/'False', not an mmCIF boolean.

def imputed_atoms(path):
    text = read_zst(path)
    blk = gemmi.cif.read_string(text).sole_block()
    tab = blk.find('_atom_site.', ['label_comp_id', 'label_atom_id', 'is_imputed',
                                   'Cartn_x', 'Cartn_y', 'Cartn_z'])
    return tab, [r for r in tab if r['is_imputed'] == 'True']

# Imputation is rare, so most files show zero. Scan until we find one that has any,
# otherwise the flag looks like dead weight.
total = flagged = 0
example = None
for f in files[:40]:
    tab, imp = imputed_atoms(f)
    total += len(tab); flagged += len(imp)
    if imp and example is None:
        example = (f.split('/')[-1], imp)

print(f'{flagged} imputed atoms out of {total} across {len(files[:40])} structures')
if example:
    name, imp = example
    print(f'\nfirst structure with any: {name} ({len(imp)} atoms)')
    for r in imp[:8]:
        print('  imputed:', r['label_comp_id'], r['label_atom_id'])
# Exclude these before any claim about experimental geometry.

Output:

262 imputed atoms out of 104367 across 40 structures

first structure with any: protein_ligand_0001.cif.zst (7 atoms)
  imputed: ARG CG
  imputed: ARG CD
  imputed: ARG NE
  imputed: ARG CZ
  imputed: ARG NH1
  imputed: ARG NH2
  imputed: ASP OXT

The panel is mostly metal ions

protein_ligand sounds like 128 protein-drug complexes. It is not. On a 40-file sample, 55% of the examples have a single metal ion as their only non-polymer entity and only 45% contain an organic ligand. If you want drug-like ligands, filter first.

Note also that the newest components use 5-character CCD codes (A1IZA, A1AVC), so any regex assuming three characters silently drops them.

METALS = {'CU','ZN','MG','CA','FE','MN','NA','K','NI','CO','CD','HG','PT','FE2','MO','AL'}

def non_polymers(path):
    text = read_zst(path)
    s = gemmi.read_structure_string(text, format=gemmi.CoorFormat.Mmcif)
    s.setup_entities()
    out = []
    for ch in s[0]:
        for res in ch:
            info = gemmi.find_tabulated_residue(res.name)   # None for unknown comps
            if info is None or not info.is_amino_acid():
                out.append((res.name, len(res)))
    return out

organic, metal_only = [], 0
for f in files[:40]:
    comps = non_polymers(f)
    if comps and all(n in METALS for n, _ in comps):
        metal_only += 1
    elif comps:
        organic.append((f.split('/')[-1], comps))

print(f'metal-ion-only: {metal_only}   has an organic ligand: {len(organic)}')
for name, comps in organic[:5]:
    print(' ', name, comps)

Output:

metal-ion-only: 22   has an organic ligand: 18
  protein_ligand_0002.cif.zst [('A1IZA', 65)]
  protein_ligand_0007.cif.zst [('A1AVC', 33)]
  protein_ligand_0008.cif.zst [('CO2', 3)]
  protein_ligand_0010.cif.zst [('PMP', 16)]
  protein_ligand_0011.cif.zst [('A1IZB', 60)]

Why the training half needs care

dataset-inventory.json at the repo root is the authoritative manifest, and it is the first thing to read before touching train_datasets/. It is also where two traps are visible that nothing else in the repo announces.

import json
inv = json.load(open('/mnt/archive/dataset-inventory.json'))
print(f"{inv['object_count']} objects, {int(inv['total_bytes'])/1e9:.1f} GB\n")

for e in inv['datasets']:
    print(f"{e['dataset']:24s} published={e['published_examples']:>10}  "
          f"passing={str(e.get('passing_filters')):>10}")
    print(f"{'':24s} {e['sampling_parquet']}")

# Trap 1: published != passing. The filter is published but NOT pre-applied.
# Trap 2: antibody_interfaces_pdb and tcr_interfaces_pdb are the SAME parquet file.
paths = {e['dataset']: e['sampling_parquet'] for e in inv['datasets']}
print('\nsame file?', paths['antibody_interfaces_pdb'] == paths['tcr_interfaces_pdb'])
print('=> loading either config returns both populations; filter on ig_type yourself.')

Output:

4251 objects, 238.5 GB

afdb_monomer             published=   1186995  passing=    914831
                         train_datasets/streaming-latest/synthetic/afdb_genie3_subset/examples.parquet
pdb_interfaces           published=  13938465  passing=   8431727
                         train_datasets/streaming-latest/pdb/2026_10_04_tmol_plip_cath/sampling/interfaces.parquet
antibody_interfaces_pdb  published=     81895  passing=     72562
                         train_datasets/streaming-latest/pdb/2026_10_04_tmol_plip_cath/sampling/immune_interfaces.parquet
tcr_interfaces_pdb       published=      9526  passing=      8608
                         train_datasets/streaming-latest/pdb/2026_10_04_tmol_plip_cath/sampling/immune_interfaces.parquet
pdb_dna_interface        published=     12812  passing=      None
                         train_datasets/streaming-latest/pdb/pdb_dna_interface_2026_10_13/interfaces.parquet

same file? True
=> loading either config returns both populations; filter on ig_type yourself.

Ask Scigantic AI

Open the panel (top right) and try:

> *"Across the protein_ligand panel, separate the real organic ligands from the bare metal ions and tell me how big the drug-like subset actually is."*

Run it

Open this notebook to run it, see the dataset page for the full description, or browse the full catalog.