MLINDEX models
Machine-learning models used by MLINDEX, a powder diffraction indexing program. Given a list of observed diffraction peaks, MLINDEX returns candidate unit cells. Most of these models initialize the candidate unit cells for each Bravais lattice; the candidates are then refined by least-squares optimization. One more, the learned ranker, orders the refined candidates of all fourteen lattices by the calibrated probability that each is correct.
Contents
One directory per lattice system, each holding the trained components for its Bravais lattices and split groups:
| Directory | Bravais lattices |
|---|---|
cubic_1/ |
cF, cI, cP |
hexagonal_1/ |
hP |
rhombohedral_1/ |
hR |
tetragonal_1/ |
tI, tP |
orthorhombic_1/ |
oC, oF, oI, oP |
monoclinic_1/ |
mC, mP |
triclinic_1/ |
aP |
ranker_1/ |
all fourteen (the learned ranker) |
Within each, random_forest/ and random/ hold random-forest volume predictors,
template/ holds the Miller-index template libraries and their calibrators, abnn/ holds the
quantized ONNX ABNN networks (an attention-based network that predicts unit cells from the peak
list), and data/ holds the hkl_ref_*.npy reference sets and training parameters.
ranker_1/ holds the learned ranker: a gradient-boosted classifier over sixteen inputs per
candidate (figures of merit, a systematic-absence fraction, the frequency of the candidate's
extinction group among known structures of its lattice, the lattice, and three gaps to the
pattern's best candidate), as one ONNX TreeEnsemble node (model.onnx); per-lattice isotonic
calibrators (calibrators.npz); the extinction-group frequency table (group_frequency.csv);
and specification.json, naming the inputs in order and the fit it came from. Without it,
MLINDEX ranks by the M_sym figure of merit and says so in its output.
Total: 741 files, 472 MB.
Usage
pip install mlindex
mlindex.download_models
mlindex.download_models fetches this repository at the revision pinned by your installed
mlindex version. No git or git-lfs required.
To fetch it directly:
from huggingface_hub import snapshot_download
snapshot_download("dwmoreau/mlindex-models", revision="v3", local_dir="models")
Revisions
Releases of mlindex pin a specific tag, so a given version always gets the exact weights it was tested against.
v3addsranker_1/, the learned ranker, and changes nothing else. An mlindex that does not read it ignores it.v2removes the 43 per-peak Miller-index assignment networks (104.7 MB), which a closed-form posterior replaced, and renamesintegral_filter/toabnn/. It needs an mlindex that looks forabnn/.v1corresponds to the models released with mlindex 0.1.x, which keep working against it.
Citation
Please check the GitHub repository for the current citation.
License
MIT, matching the MLINDEX source.