| --- |
| license: cc-by-4.0 |
| --- |
| |
| # QHMat Dataset Sample (1 GB) Preview |
|
|
|
|
| ## Dataset Details |
| It contains a **~1 GB subset** derived from the full QHMat dataset, intended for **quick data quality checks**. The **complete public release of full QHMat (~4.1TB) is planned after peer review**. This subset shares the same indexing conventions and data format as the full release. |
|
|
| > **Hierarchy:** Full QHMat (4.1 TB) → **1 GB subset (this repository)** |
|
|
| ### Dataset Description |
|
|
| This dataset is a **small, byte-limited preview** intended for **peer review, sanity checks, and pipeline testing**. It contains **45 crystal/material structures** as serialized graph/tensor records (Hamiltonian and overlap blocks, geometry, and metadata). |
|
|
| ### Files in this release |
|
|
| | File / pattern | Description | |
| |----------------|-------------| |
| | `train-000000.tar`, `train-000001.tar`, … | WebDataset-style archives. Each logical sample has two members sharing the same basename. | |
| | `00000000.pkl`, … | **Pickle blob** of `torch_geometric.data.Data` (same bytes as stored in the source LMDB value). | |
| | `00000000.json`, … | Small JSON sidecar: `lmdb_key` (integer database index), `value_bytes` (byte length of `.pkl`). | |
| | `train-manifest.csv` | Table mapping `sample_index` → shard file, member names, `lmdb_key`, `value_bytes`. | |
|
|
| ### Statistics (this build) |
|
|
| - **Samples:** 45 (rows in `train-manifest.csv`). |
| - **Shards:** 2 (`train-000000.tar`, `train-000001.tar`). |
| - **Approximate on-disk tar footprint:** ~568 MiB + ~490 MiB (see files after upload; exact sizes depend on filesystem). |
|
|
| ### Example record fields |
|
|
| After `pickle.loads` on a `.pkl` file, typical `Data` attributes include (names may vary slightly by pipeline version): |
|
|
| - **Geometry / graph:** `pos`, `atoms`, `lattice`, `multi_edge_index`, `multi_edge_vec`, `lattice_translation_vector`, … |
| - **Hamiltonian / overlap:** `diagonal_hamiltonian`, `off_diagonal_hamiltonian`, optional `diagonal_overlap`, `off_diagonal_overlap`, with associated `*_mask` tensors. |
| - **Metadata:** `database_idx`, `mp_id`, `raw_basename`, `fermi_level`, `elapsed_time`, … |
|
|
| Use `torch_geometric` introspection or print `data.keys` after loading. |
|
|
|
|
| ### Minimal load example (single sample) |
|
|
| ```python |
| import io |
| import json |
| import pickle |
| import tarfile |
| |
| import torch # noqa: F401 — needed for unpickling tensors inside Data |
| |
| tar_path = "train-000000.tar" |
| with tarfile.open(tar_path, "r") as tar: |
| pkl_info = tar.getmember("00000000.pkl") |
| pkl_bytes = tar.extractfile(pkl_info).read() |
| meta = json.loads(tar.extractfile(tar.getmember("00000000.json")).read()) |
| |
| data = pickle.loads(pkl_bytes) |
| print(meta) # {'lmdb_key': ..., 'value_bytes': ...} |
| print(data) # torch_geometric.data.Data |
| ``` |
|
|
| ### Direct Use |
|
|
| - Training or benchmarking **graph neural networks** and related models on **Hamiltonian / overlap tensor blocks** paired with **crystal structure** fields. |
| - **Dataset loader development** and **integration tests** before downloading larger subsets. |
| - **Reproducibility checks** during peer review (inspect manifests, decode samples). |
|
|
| ### Out-of-Scope Use |
|
|
| - **Not** a guaranteed statistically representative sample of the full corpus (structure count is small). |
| - **Not** for safety-critical or high-stakes decisions without domain validation. |
| - **Not** a substitute for the full release when training production-scale models. |
|
|
| ### Splits |
|
|
| - **Single split:** all samples are shipped under the `train-*` shard prefix (preview bundle). There is **no** separate val/test split in this artifact. |
|
|
|
|
| #### Data Collection and Processing |
|
|
| 1. **Upstream:** Structures and electronic-structure-derived tensors originate from computational workflows (OpenMX-class outputs) merged into a large LMDB in the parent project. |
| 2. **Subset:** A **~1 GiB LMDB** subset was built by copying records in **canonical index order** until the byte budget was reached (same convention as documented in the upstream repo). |
|
|
| #### Personal and Sensitive Information |
|
|
| This dataset is **not expected** to contain personal data. Identifiers such as `mp_id` refer to **materials database IDs**, not individuals. |
|
|
| ## Bias, Risks, and Limitations |
|
|
| - **Coverage:** The preview contains **very few** structures relative to the full corpus; metrics are **not** indicative of full-dataset diversity. |
| - **Simulation bias:** Electronic-structure workflows, basis choices, and convergence criteria induce systematic differences versus experiment. |
| - **Technical:** `.pkl` relies on Python pickling; loading requires compatible **`torch` / `torch_geometric`** versions with the training stack used to build the data. |
| |
| ### Recommendations |
| |
| - Validate loader behavior on this preview before scaling to multi-TB subsets. |
| - Pin dependency versions in your training repo. |
| - Prefer citing the **paper + dataset version + manifest checksum** once available. |
| |
| |