@@ -4,26 +4,31 @@ OpenAlphaDiffract is an open-source implementation of the AlphaDiffract research
44- Create a dataset from the Materials Project
55- Simulate powder diffraction patterns from those structures
66- Train and evaluate models on the generated dataset
7+ - Run an inference web app to try out the model
78
8- For ease of use, a HF endpoint exists [ TODO] .
9-
10- ## Inference Quickstart
11- [ TODO] : (probably hosting on HF)
12- [ TODO] : Minimal local install with the trainer container
139
1410## Dataset Pipeline Overview
1511
16- 1 . Acquire CIFs (Downloader Container )
12+ 1 . Acquire CIFs (downloader.Dockerfile )
1713 - Uses the Materials Project API to fetch crystal structures as CIF files
1814 - Configurable via ` configs/download.yaml `
1915 - Filters structures by checking conventional cell consistency across multiple angle tolerances. This filters ~ 4.4% of MP structures as of 10/22/2025.
2016
21- 2 . GSAS-II XRD Simulation (Simulator Container )
17+ 2 . GSAS-II XRD Simulation (simulator.Dockerfile )
2218 - Generates synthetic powder diffraction patterns from CIFs
2319 - Configurable via ` configs/simulator.yaml ` (e.g., instrument file, noise ranges, job parallelism)
2420 - Creates .npy files with simulated pattern and metadata ready to be consumed by the training system
2521
26- 3 . TODO: Training
22+ 3 . Open Alpha Diffract Training (trainer.Dockerfile)
23+ - Trains the multi-task AlphaDiffract model on the generated dataset
24+ - Configurable via ` configs/trainer.docker.yaml ` or ` configs/trainer.local.yaml `
25+ - Logs checkpoints and metrics (CSV and optional MLflow)
26+
27+ 4 . XRD Inference Web App (ui.Dockerfile)
28+ - FastAPI service for model inference with a React frontend
29+ - Accepts processed XRD patterns and returns predictions via ` /api/predict `
30+ - Serves the built frontend from the same container
31+
2732
2833## Training from Scratch Quickstart
2934
@@ -45,14 +50,22 @@ Setup:
4550 - Optionally set ` UID ` and ` GID ` so the containers write files as your user.
4651
47522 . Download CIFs:
48- - ` scripts/download.sh `
53+ - ` scripts/download.sh ` (or docker compose run --rm trainer)
4954 - CIFs will be written to ` ./data/raw_cif `
5055
51563 . Simulate diffraction patterns:
52- - ` scripts/simulate.sh `
57+ - ` scripts/simulate.sh ` (or docker compose run --rm simulator)
5358 - Patterns will be written to ` ./data/dataset `
5459 - Errors (if any) go to ` ./data/error_logs `
5560
61+ 4 . Train the model:
62+ - ` docker compose run --rm trainer `
63+ - Checkpoints and logs will be written to ` ./outputs `
64+
65+ 5 . Run the inference UI:
66+ - Move a model checkpoint to ` ./src/ui/models/xrd_model.ckpt `
67+ - ` docker compose up ui `
68+
5669Notes:
5770- You can pass extra CLI args to the simulator via ` scripts/simulate.sh ` , e.g. ` --sims_per_file 1 --parallel_jobs 4 `
5871- The default container commands and mounts are defined in ` compose.yaml `
@@ -66,12 +79,12 @@ OpenAlphaDiffract/
6679├── scripts/ - User-facing scripts
6780├── src/ - Source code for pipeline components
6881│ ├── downloader/
69- │ └── simulator/
70-
82+ │ ├── simulator/
83+ │ ├── trainer/
84+ │ └── ui/
7185```
7286
7387
74-
7588## Citation
7689
77- We hope this code was helpful to your work! If you use our code or extend our work, please consider citing our paper:
90+ We hope this code was helpful to your work! If you use our code or extend our work, please consider citing our paper. (Will be added once released!)
0 commit comments