File size: 1,926 Bytes
4e36519 ffcef9c 4e36519 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | ---
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.
|