--- license: mit tags: - crystallography - powder-diffraction - indexing library_name: mlindex --- # MLINDEX models Machine-learning models used by [MLINDEX](https://github.com/dwmoreau/MLI), a powder diffraction indexing program. Given a list of observed diffraction peaks, MLINDEX returns candidate unit cells ranked by the de Wolff M20 figure of merit. These models initialize the candidate unit cells for each Bravais lattice; the candidates are then refined by least-squares optimization. ## 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 | Within each, `random_forest/` and `random/` hold random-forest volume predictors, `template/` holds the Miller-index template libraries and their calibrators, `integral_filter/` holds the quantized ONNX candidate-filter networks, and `data/` holds the `hkl_ref_*.npy` reference sets and training parameters. Total: 780 files, ~545 MB. ## Usage ```bash 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: ```python from huggingface_hub import snapshot_download snapshot_download("dwmoreau/mlindex-models", revision="v1", local_dir="models") ``` ## Revisions Releases of mlindex pin a specific tag, so a given version always gets the exact weights it was tested against. `v1` corresponds to the models released with mlindex 0.1.x. ## Citation Please check the [GitHub repository](https://github.com/dwmoreau/MLI) for the current citation. ## License MIT, matching the MLINDEX source.