Datasets:
Document 3D structure access (Files tab + hf_hub_download)
Browse files
README.md
CHANGED
|
@@ -64,18 +64,38 @@ structure). 2D depictions are embedded inline; 3D conformers ship as repo files.
|
|
| 64 |
|
| 65 |
## 3D structures
|
| 66 |
|
| 67 |
-
3D conformers (RDKit ETKDGv3 + MMFF94/UFF) are shipped
|
| 68 |
-
one `.xyz`, `.sdf`, and `.pdb` per molecule, named by InChIKey
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
```python
|
| 72 |
from datasets import load_dataset
|
|
|
|
|
|
|
| 73 |
ds = load_dataset("SupraBench/Binding-Affinity", split="train")
|
| 74 |
row = ds[0]
|
| 75 |
-
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
```
|
| 78 |
|
|
|
|
|
|
|
|
|
|
| 79 |
## Resolution & validation
|
| 80 |
|
| 81 |
SMILES were resolved through a cascade (local SupraBank/CB7 dictionaries -> InChI
|
|
|
|
| 64 |
|
| 65 |
## 3D structures
|
| 66 |
|
| 67 |
+
3D conformers (RDKit ETKDGv3 + MMFF94/UFF) are shipped as repo files under
|
| 68 |
+
`structures_3d/`, one `.xyz`, `.sdf`, and `.pdb` per molecule, named by InChIKey
|
| 69 |
+
(1,399 molecules x 3 formats = 4,197 files).
|
| 70 |
+
|
| 71 |
+
> **Note.** The 3D files are **not shown in the dataset viewer** (XYZ/SDF/PDB are
|
| 72 |
+
> not a HuggingFace column type). They live under the **Files and versions** tab.
|
| 73 |
+
> Each record links to them through the `host_3d_basename` and `guest_3d_basename`
|
| 74 |
+
> columns, where the file path is `structures_3d/<basename>.{xyz,sdf,pdb}`.
|
| 75 |
+
|
| 76 |
+
Download a record's 3D structures programmatically:
|
| 77 |
|
| 78 |
```python
|
| 79 |
from datasets import load_dataset
|
| 80 |
+
from huggingface_hub import hf_hub_download
|
| 81 |
+
|
| 82 |
ds = load_dataset("SupraBench/Binding-Affinity", split="train")
|
| 83 |
row = ds[0]
|
| 84 |
+
|
| 85 |
+
# host conformer (XYZ); swap the extension for .sdf or .pdb
|
| 86 |
+
host_xyz = hf_hub_download(
|
| 87 |
+
repo_id="SupraBench/Binding-Affinity", repo_type="dataset",
|
| 88 |
+
filename=f"structures_3d/{row['host_3d_basename']}.xyz",
|
| 89 |
+
)
|
| 90 |
+
guest_sdf = hf_hub_download(
|
| 91 |
+
repo_id="SupraBench/Binding-Affinity", repo_type="dataset",
|
| 92 |
+
filename=f"structures_3d/{row['guest_3d_basename']}.sdf",
|
| 93 |
+
)
|
| 94 |
```
|
| 95 |
|
| 96 |
+
An empty `host_3d_basename` / `guest_3d_basename` means no 3D conformer is
|
| 97 |
+
available for that molecule (see *Known limitations* and `failures.csv`).
|
| 98 |
+
|
| 99 |
## Resolution & validation
|
| 100 |
|
| 101 |
SMILES were resolved through a cascade (local SupraBank/CB7 dictionaries -> InChI
|