PhaseMix-135K
English · 简体中文 · PhaseMatcher code · Model weights
PhaseMix-135K is a synthetic powder X-ray diffraction dataset for identifying complete phase sets from a large reference library and reconstructing individual phase contributions. It contains reference patterns for 135,258 Materials Project structure records, five perturbed single-phase realizations per record, and recipes for mixtures containing one to four components.
The data are stored as memory-mappable NumPy arrays. Mixture spectra are generated from the supplied recipes and observation bank during loading, rather than stored as a dense array of all mixtures.
At a glance
| Property | Value |
|---|---|
| Reference library | 135,258 structure records |
| Diffraction grid | 2θ = 10–80°, step 0.02°; 3,501 points |
| Perturbed single-phase bank | 5 realizations per record |
| Components per mixture | 1–4 |
| Training recipes | 12,135,258 |
| Validation recipes | 100,000 |
| Test recipes | 100,000 |
| Array file size | Approximately 7.05 GB in total |
Download
From the PhaseMatcher repository root:
pip install -U huggingface_hub
hf download pengzhonglong/PhaseMix-135k --repo-type dataset --local-dir dataset/phasemix
For a standalone download, replace dataset/phasemix with any destination directory. Individual arrays are also available under Files and versions.
Files and fields
dataset/phasemix/
├── reference/
│ ├── patterns.npy
│ ├── entry.npy
│ └── axis_two_theta.npy
├── observations/
│ ├── patterns.npy
│ ├── entry.npy
│ └── axis_two_theta.npy
└── manifest/
├── train/ train_ids.npy, train_weights.npy, train_counts.npy
├── val/ val_ids.npy, val_weights.npy, val_counts.npy
└── test/ test_ids.npy, test_weights.npy, test_counts.npy
In the table below, split is train, val, or test, and M is the corresponding recipe count.
| File | Shape | Type | Contents |
|---|---|---|---|
reference/patterns.npy |
(135258, 3501) | float32 | Reference diffraction patterns |
observations/patterns.npy |
(135258, 5, 3501) | float16 | Perturbed single-phase patterns |
reference/entry.npy, observations/entry.npy |
(135258,) | Unicode <U14 |
Materials Project identifiers in library order |
reference/axis_two_theta.npy, observations/axis_two_theta.npy |
(3501,) | float32 | 2θ coordinates in degrees |
manifest/{split}/{split}_ids.npy |
(M, 4) | int32 | Library row indices; unused slots are −1 |
manifest/{split}/{split}_weights.npy |
(M, 4) | float32 | Spectral mixing weights; unused slots are 0 |
manifest/{split}/{split}_counts.npy |
(M,) | uint8 | Number of components in each recipe |
Library indices range from 0 to 135257 and map to source identifiers through entry.npy. Structure records are not deduplicated into crystallographic phase-equivalence classes. Both banks use the same record order and angular grid. Valid recipe entries are ordered by decreasing mixing weight. These weights are spectral mixing coefficients, not calibrated mass fractions.
Splits and mixture construction
| Split | Single-phase realization indices | Observation sampling |
|---|---|---|
| Train | 0, 1, 2 | Random realization per component and random measurement perturbations |
| Validation | 3 | Deterministic per sample |
| Test | 4 | Deterministic per sample |
The splits share the reference-library identities but use separate single-phase realizations. This is a full-library identification benchmark, not an unseen-structure split. Validation and test each contain 10,000 one-component, 20,000 two-component, 30,000 three-component, and 40,000 four-component recipes.
The loader casts bank patterns to float32 and divides their stored intensity scale by 100. It weights the selected component patterns and applies a shared angular shift and additional Gaussian broadening. A smooth background and Gaussian noise are then added to the summed contributions.
| Mixture-level perturbation | Uniform sampling range |
|---|---|
| Shared zero shift | −0.03° to +0.03° |
| Additional broadening FWHM | 0° to 0.05° |
| Background peak / structural-mixture peak | 0 to 0.01 |
| Noise standard deviation / structural-mixture peak | 0.0008 to 0.002 |
The observation is clipped to nonnegative intensity and divided by its maximum. Contribution and residual targets use that same observation scale. Validation and test use seed 20260826, with per-sample NumPy RandomState seeds seed + 1 + index and seed + 2 + index, respectively. The data loader and observation model implement the complete construction procedure.
Load a test sample
Install PhaseMatcher with pip install -e . from its repository root after downloading the data. The following example constructs the noisy observation and aligned supervision without loading a model or checkpoint:
from phasematcher.config import load_config
from phasematcher.data.dataset import MixtureDataset
cfg = load_config("configs/phasemix.yaml")
dataset = MixtureDataset(
cfg.data_root,
"test",
seed=cfg.seed,
measurement=cfg.measurement,
)
sample = dataset[0]
k = int(sample["counts"])
print("Mixture:", sample["mixture"].shape) # (1, 3501)
print("Library indices:", sample["phase_ids"][:k].tolist())
print("Contributions:", sample["component_contributions"].shape) # (4, 1, 3501)
print("Residual targets:", sample["residual_patterns_common"].shape) # (5, 1, 3501)
Only the first K contribution slots are active; the others are zero-padded. Residual slot t corresponds to removing the first t components in recipe order, for t = 0,…,K; slots beyond K are padding. These are constructed supervision targets, not model predictions.
For direct array access, use numpy.load(path, mmap_mode="r", allow_pickle=False) and select rows as needed. This NumPy-bank layout is consumed by the loader above rather than Hugging Face's tabular load_dataset interface.
Source and license
The reference structures originate from the Materials Project. The dataset is distributed under Creative Commons Attribution 4.0. When using it, acknowledge PhaseMix-135K and its Materials Project source, retain attribution, and indicate modifications. The PhaseMatcher code and released model weights have a separate MIT license.
Questions: Peng Zhonglong.
- Downloads last month
- 97