IndexMan is a lightweight, browser-based tool for simulating X-ray Diffraction (XRD) powder patterns. It calculates theoretical reflection positions (HKL indices) based on Space Group symmetry and Unit Cell parameters, allowing for direct comparison with experimental data. Various settings for the space groups can be selected, it is designed mostly for teaching.
Created by NitaD (Univ Paris-Saclay).
-
Space Group Support: * Supports all 230 space groups.
- Handles various settings (e.g., Monoclinic unique axis
a,b, orc; Hexagonal settings). - Automatically applies extinction rules (Centering, Glide planes, Screw axes) to filter forbidden reflections.
- Handles various settings (e.g., Monoclinic unique axis
-
Dynamic Parameter Input: * Input fields automatically adjust based on the Crystal System (e.g.,
a=b=cfor Cubic,γ=120°for Hexagonal).- Real-time validation of lattice parameters.
-
Wavelength Control: * Presets for common anode materials: Cu, Mo, Co, Fe, Cr.
- Option to split
$K\alpha_1$ and$K\alpha_2$ peaks. - Custom monochromatic wavelength input.
- Option to split
-
Interactive Visualization:
- Responsive Chart.js plotting.
- Zoom & Pan: Mouse wheel to zoom, click-and-drag to pan (Right-click to reset).
- Tooltip details for every reflection (h, k, l, d-spacing).
-
Experimental Data Import: * Overlay experimental patterns for indexing and comparison.
- Supported formats:
.xy,.csv,.txt,.xrdml,.brml,.ras,.esd,.std,.udf,.xra,.gsa,.dat,.asc.
- Supported formats:
- Export: Save the calculated HKL list (including d-spacing and 2$\theta$ positions) to a text file.
This is a client-side application using HTML5 and JavaScript. It can be used directly at the link provided or, if you copy all the repo, it can be run on your computer. In this case, because it fetches a local JSON database for Space Groups, you likely need to run a local web server to avoid CORS (Cross-Origin Resource Sharing) errors typical when opening files directly via file://.
-
Clone the repository (or download the files):
IndexMan.html(The main application)space_groups_all_settings.json(Required database file)
-
Directory Structure:
/Project-Folder ├── IndexMan.html ├── space_groups_all_settings.json └── README.md
Option A: VS Code (Recommended)
- Open the folder in Visual Studio Code.
- Install the "Live Server" extension.
- Right-click
IndexMan.htmland select "Open with Live Server".
Option B: Python
- Open your terminal/command prompt in the project folder.
- Run:
python -m http.server - Open your browser and go to
http://localhost:8000/IndexMan.html.
IndexMan includes a parser capable of reading various proprietary and generic XRD formats:
| Format | Extension(s) | Notes |
|---|---|---|
| Generic ASCII | .xy, .csv, .txt, .dat |
XY columns (2Theta, Intensity) |
| Panalytical | .xrdml |
XML-based format |
| Bruker | .brml, .rasx |
XML-based format |
| Rigaku | .ras |
Standard ASCII format |
| GSAS/Expgui | .esd, .std, .xra |
Standard banks |
| Bruker/Siemens | .uxd |
User Exchange Data |
| Philips | .udf |
UDF Data |
- HTML5 / CSS3: Uses CSS Variables for theming (Inter font).
- JavaScript (ES6): Vanilla JS logic for crystallography math.
- Chart.js: For rendering the diffraction pattern.
- Hammer.js: For gesture recognition.
- Chart.js Plugin Zoom: For zooming and panning capabilities.
-
Canonicalization: The simulation maps input indices (
$hkl$ ) to their canonical form based on the Laue Class of the selected space group. -
d-spacing Calculation: Calculates
$1/d^2$ using the specific quadratic form for the crystal system (Triclinic through Cubic). -
Bragg's Law: Converts d-spacing to 2$\theta$ positions based on the selected wavelength (
$\lambda = 2d\sin\theta$ ). -
Extinction Conditions: Checks specific reflection conditions (e.g.,
h+k=2nfor C-centering) defined in the JSON database to filter out systematically absent reflections.
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.