OpenBind on Fragalysis: FatA and DENV-2/ZIKV RdRp fragment-screen structures: sample notebook
A worked notebook for OpenBind on Fragalysis: FatA and DENV-2/ZIKV RdRp fragment-screen structures, with 8 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
- OpenBind Consortium (Diamond Light Source XChem)
- License
- Hosted with OpenBind's permission; no published license (credit OpenBind and Diamond Light Source)
- Size
- 68 objects, 4.46 GB in the bucket
- Format
- Parquet, JSON (in sampled files)
- Stored at
- Amazon S3, s3://scigantic-openbind-fragalysis (us-east-1)
- Access
- Free and public. No account with the data provider is needed.
The notebook
Start here. Click the grey cell below and press Shift+Enter. It reads one target's events table off the archive and takes about a second. Then change TARGET to Flavi_NS5_RdRp and run it again.
# Start here: click this cell, press Shift+Enter.
import os
from pathlib import Path
import duckdb
TARGET = "FatA" # try "Flavi_NS5_RdRp", then run again
mount = Path(os.environ.get("SCIGANTIC_MOUNT_PATH") or Path.home() / "archive")
RELEASE = {"FatA": "v3.1-2026-07-28", "Flavi_NS5_RdRp": "v3.1-2026-09-01"}[TARGET]
events = mount / TARGET / RELEASE / "parquet" / "events.parquet"
n, crystals, compounds = duckdb.sql(
f"SELECT count(*), count(distinct dataset), count(distinct smiles) FROM '{events}' WHERE NOT is_pdb_reference").fetchone()
print(f"{TARGET}: {n} ligand observations in {crystals} crystals, {compounds} distinct compounds")
best = duckdb.sql(f"""
SELECT observation_id, smiles, resolution_a FROM '{events}'
WHERE NOT is_pdb_reference ORDER BY resolution_a LIMIT 1""").fetchone()
print(f"best resolution: {best[2]:.2f} A, {best[0]}")
print(best[1])
OpenBind on Fragalysis: FatA and the dengue 2 / Zika polymerases
Crystallographic fragment screens that the OpenBind consortium published on Diamond Light Source's Fragalysis platform. FatA is a plant fatty acid thioesterase and a herbicide target. Flavi_NS5_RdRp holds the NS5 RNA polymerase of dengue virus 2 and Zika virus, two different proteins in one Fragalysis target.
Hosted with OpenBind's permission. OpenBind has not published a license for these datasets, so credit OpenBind and the Diamond Light Source XChem facility. There are no affinity measurements here, only structures.
The archive has one folder per target. Each holds parquet/ (four tables), raw/ (the upload tarballs exactly as Fragalysis serves them, with the electron-density maps), metadata/ and _SOURCE.json. This notebook reads events (one row per ligand observation), structures (the aligned structures as text) and sites (binding sites).
import duckdb, numpy as np, pandas as pd
import matplotlib.pyplot as plt
FATA = mount / "FatA" / "v3.1-2026-07-28" / "parquet"
FLAVI = mount / "Flavi_NS5_RdRp" / "v3.1-2026-09-01" / "parquet"
con = duckdb.connect()
for prefix, d in (("fata", FATA), ("flavi", FLAVI)):
for f in sorted(d.glob("*.parquet")):
con.execute(f"CREATE OR REPLACE VIEW {prefix}_{f.stem} AS SELECT * FROM read_parquet('{f}')")
for t in ("fata_events", "fata_structures", "flavi_events", "flavi_structures"):
print(f"{t}: {con.sql(f'SELECT count(*) FROM {t}').fetchone()[0]:,} rows")
Output:
fata_events: 402 rows fata_structures: 402 rows flavi_events: 402 rows flavi_structures: 402 rows
Observations, crystals and compounds
An observation is one ligand modelled in one crystal. A crystal can hold several ligand copies or sites, so there are more observations than crystals, and a compound can appear in several crystals. Flavi's 24 is_pdb_reference rows are public PDB structures used to align the others; they are left out of the compound counts.
con.sql("""
SELECT target, CASE WHEN is_pdb_reference THEN 'PDB reference' ELSE coalesce(soakdb_ProteinName, '(no SoakDB row)') END AS protein,
count(*) AS observations, count(distinct dataset) AS crystals, count(distinct smiles) AS compounds
FROM (SELECT * FROM fata_events UNION ALL BY NAME SELECT * FROM flavi_events)
GROUP BY 1, 2 ORDER BY 1, 2
""").df()
Output:
target protein observations crystals compounds 0 FatA (no SoakDB row) 4 3 3 1 FatA FATAATA 398 163 162 2 Flavi_NS5_RdRp DNV2_NS5A 120 96 95 3 Flavi_NS5_RdRp PDB reference 24 20 16 4 Flavi_NS5_RdRp Zika_NS5A 258 144 141
Fragments and follow-on compounds in FatA
FatA's SoakDB library names split the observations into fragment-screen hits (libraries DSIPoised and EnamineEF) and follow-on compounds (KateKFUs, plus four crystals with no library). Those counts match what OpenBind states for FatA.
con.sql("""
SELECT CASE WHEN soakdb_LibraryName IN ('DSIPoised', 'EnamineEF') THEN 'fragment' ELSE 'follow-on' END AS kind,
coalesce(soakdb_LibraryName, '(no library)') AS library,
count(*) AS observations, count(distinct smiles) AS compounds
FROM fata_events GROUP BY 1, 2 ORDER BY 1, 3 DESC
""").df()
Output:
kind library observations compounds 0 follow-on KateKFUs 87 34 1 follow-on (no library) 4 3 2 fragment DSIPoised 197 86 3 fragment EnamineEF 114 42
Resolution and alignment quality
Resolution and R-factors come from each crystal's PDB header. chain_align_rmsd_a is how well each chain aligned onto the target's reference. The Zika chains are aligned onto a dengue 2 based reference, so their alignment RMSD is much larger.
con.sql("""
SELECT target, CASE WHEN is_pdb_reference THEN 'PDB reference' ELSE coalesce(soakdb_ProteinName, '(no SoakDB row)') END AS protein, count(*) AS observations,
round(min(resolution_a), 2) AS res_min, round(median(resolution_a), 2) AS res_median, round(max(resolution_a), 2) AS res_max,
round(median(r_free), 3) AS r_free_median, round(median(chain_align_rmsd_a), 2) AS align_rmsd_median
FROM (SELECT * FROM fata_events UNION ALL BY NAME SELECT * FROM flavi_events)
GROUP BY 1, 2 ORDER BY 1, 2
""").df()
Output:
target protein observations res_min res_median \ 0 FatA (no SoakDB row) 4 1.76 1.86 1 FatA FATAATA 398 1.37 1.82 2 Flavi_NS5_RdRp DNV2_NS5A 120 1.49 1.75 3 Flavi_NS5_RdRp PDB reference 24 1.40 2.10 4 Flavi_NS5_RdRp Zika_NS5A 258 1.43 1.84 res_max r_free_median align_rmsd_median 0 1.89 0.313 0.43 1 2.87 0.282 0.34 2 2.43 0.243 0.87 3 3.00 0.224 2.63 4 2.49 0.271 4.99
Where the ligands bind
The aligner groups observations into canonical binding sites. Most FatA observations share one site.
con.sql("""
SELECT canonical_site_id, count(*) AS observations, count(distinct dataset) AS crystals,
count(*) FILTER (WHERE soakdb_LibraryName IN ('DSIPoised', 'EnamineEF')) AS fragment_obs
FROM fata_events GROUP BY 1 ORDER BY 2 DESC
""").df()
Output:
canonical_site_id observations crystals fragment_obs 0 FATAATA-x4223+A+459+0+1 308 138 223 1 FATAATA-x1147+A+360+0+1 42 21 42 2 FATAATA-x1985+A+360+0+1 39 19 39 3 FATAATA-x1285+B+403+0+1 5 4 5 4 FATAATA-x4024+A+503+0+1 2 1 0 5 FATAATA-x4223+A+461+0+1 2 1 0 6 FATAATA-x4223+A+462+0+1 2 1 0 7 FATAATA-x1142+A+360+0+1 2 1 2
Ten follow-on compounds from FatA
Drawn in 2D from the stored ligand SDF, one row per compound (the best-resolved crystal).
from rdkit import Chem
from rdkit.Chem import Draw, AllChem
pick = con.sql("""
SELECT DISTINCT ON (smiles) observation_id, smiles, resolution_a
FROM fata_events WHERE soakdb_LibraryName = 'KateKFUs'
ORDER BY smiles, resolution_a
""").df().sort_values("resolution_a").head(10)
sdf = con.sql("SELECT observation_id, ligand_sdf FROM fata_structures").df().set_index("observation_id").ligand_sdf
mols, legends = [], []
for r in pick.itertuples():
m = Chem.MolFromMolBlock(sdf[r.observation_id])
AllChem.Compute2DCoords(m) # 2D drawing only; the stored pose stays 3D
mols.append(m); legends.append(f"{r.observation_id.split('_')[0][-5:]} {r.resolution_a:.2f} A")
Draw.MolsToGridImage(mols, molsPerRow=5, subImgSize=(230, 190), legends=legends)
One structure, read
structures.parquet holds each aligned structure as text, so no file is opened. gemmi parses the best-resolved FatA follow-on, and the pocket is the set of protein residues within 4 A of the ligand.
import gemmi
obs = pick.iloc[0].observation_id
ev = con.sql(f"SELECT chain, ligand_res_seq, resolution_a, canonical_site_id FROM fata_events WHERE observation_id = '{obs}'").fetchone()
text = con.sql(f"SELECT aligned_pdb FROM fata_structures WHERE observation_id = '{obs}'").fetchone()[0]
st = gemmi.read_pdb_string(text)
model = st[0]
lig = next(r for ch in model if ch.name == ev[0] for r in ch if r.name == "LIG" and r.seqid.num == ev[1])
ns = gemmi.NeighborSearch(model, st.cell, 5).populate()
pocket = set()
for a in lig:
for mark in ns.find_atoms(a.pos, "\0", radius=4.0):
cra = mark.to_cra(model)
if cra.residue.het_flag != "H":
pocket.add((cra.chain.name, cra.residue.seqid.num, cra.residue.name))
print(f"{obs}: resolution {ev[2]:.2f} A, ligand {len(lig)} atoms, site {ev[3]}")
print(f"{len(pocket)} protein residues within 4 A:", ", ".join(f"{n}{i}" for _, i, n in sorted(pocket)))
Output:
FATAATA-x4034_A_459_0_1_FATAATA-x4223+A+459+0+1: resolution 1.37 A, ligand 21 atoms, site FATAATA-x4223+A+459+0+1 15 protein residues within 4 A: HIS117, ALA118, VAL121, PHE123, ALA129, TRP141, CYS166, GLN167, SER168, THR174, ARG176, TRP196, ARG214, TYR217, CYS221
Things to know when using this data
- No affinities. SoakDB's AssayIC50 field is empty in every row. These are structures, not binding measurements.
- Flavi is two proteins. Filter on soakdb_ProteinName (Zika_NS5A or DNV2_NS5A) and drop is_pdb_reference rows.
- Observations are not crystals or compounds. Count dataset and distinct smiles, and keep a crystal's observations together when
you split data.
- Flavi is a superset of OpenBind's tag. It includes later uploads, so its counts are higher than the 124 and 191 on OpenBind's page.
- The shared frame is approximate. Superpose on the binding site before measuring a pose RMSD.
- Hosted with permission, not under a stated license. Credit OpenBind and the Diamond Light Source XChem facility.
- The archive's schema card (the Data tab, and the in-notebook assistant) lists the measured details and the raw tarballs that hold
the electron-density maps.
Run it
Open this notebook to run it, see the dataset page for the full description, or browse the full catalog.